Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akihironitta/xview-pytorch
PyTorch data utilities for object detection with xView Detection Challenge dataset [http://xviewdataset.org/]
https://github.com/akihironitta/xview-pytorch
deep-learning machine-learning pytorch remote-sensing satellite-imagery
Last synced: about 1 month ago
JSON representation
PyTorch data utilities for object detection with xView Detection Challenge dataset [http://xviewdataset.org/]
- Host: GitHub
- URL: https://github.com/akihironitta/xview-pytorch
- Owner: akihironitta
- Created: 2020-02-21T05:10:01.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-22T17:22:58.000Z (almost 5 years ago)
- Last Synced: 2024-12-05T17:52:07.733Z (about 2 months ago)
- Topics: deep-learning, machine-learning, pytorch, remote-sensing, satellite-imagery
- Language: Python
- Homepage:
- Size: 25.7 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* DESCRIPTION
This is a PyTorch implementation of data utilities for [[http://xviewdataset.org/][xView Detection Challenge dataset]].
=XviewDataset= is a subclass of =torchvision.datasets.vision.VisionDataset= similarly to =torchvision.datasets.VOCDetection= and =torchvision.datasets.CocoDetection=.
Given an =index=, =XviewDataset= returns =PIL.Image= and a list of dictionaries in the image.
Each dictionary describes an object consisting of elements with the keys, ="image_id"=, ="bbox"=, and ="category_id"=.
| key | value |
|---------------+-------------------------------------------------------------------------|
| "image_id" | int (e.g. =1468=) |
| "bbox" | list of int in =[x, y, width, height]= format (e.g. =[0, 0, 100, 100]=) |
| "category_id" | int (e.g. =77= for "Building") |
* Usage#+begin_src sh
git clone https://github.com/akihironitta/xView-PyTorch.git
cd xView-PyTorch
#+end_srcJust use =XviewDataset= class in your PyTorch code:
#+begin_src python
from datasets import XviewDatasetds = XviewDataset(root="/path/to/image_dir/",
annFile="/path/to/annotation_file.json")
img, target = ds[0] # take the 0th image and objects in it.
print(img) #
print(target) # [{'image_id': 1468, 'bbox': [2479, 1522, 166, 168], 'category_id': 73}, ...]
#+end_srcTo view an image with bouding boxes:
#+begin_src sh
python view.py 0 --output /path/to/output_dir/
#+end_src
To save an image with bouding boxes:
#+begin_src sh
python view.py 0 --output /path/to/output_dir/
#+end_srcYou can also view or save multiple images by:
#+begin_src sh
python view.py 0 1 2 3
python view.py 0 1 2 3 --output /path/to/output_dir/
#+end_src* SEE ALSO
The official TensorFlow implementation by DIUx is available at:
1. [[https://github.com/DIUx-xView/data_utilities][data utilities]]
2. [[https://github.com/DIUx-xView/xview2018-baseline][baseline models]]