-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DOTA dataset #2551
base: main
Are you sure you want to change the base?
Add DOTA dataset #2551
Conversation
@@ -14,6 +14,7 @@ Dataset,Task,Source,License,# Samples,# Classes,Size (px),Resolution (m),Bands | |||
`DeepGlobe Land Cover`_,S,DigitalGlobe +Vivid,-,803,7,"2,448x2,448",0.5,RGB | |||
`DFC2022`_,S,Aerial,"CC-BY-4.0","3,981",15,"2,000x2,000",0.5,RGB | |||
`Digital Typhoon`_,"C, R",Himawari,"CC-BY-4.0","189,364",8,512,5000,Infrared | |||
`DOTA`_,OD,"Google Earth, Gaofen-2, Jilin-1","CC-BY-NC-4.0","5,229",15,"varying","varying",RGB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually use a range of numbers instead of "varying"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you see this license? I agree that it's non-commercial, but there are multiple licenses like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOTA also includes aerial imagery provided by CycloMedia B.V.
The Google Earth images must adhere to their guidelines.
For other image sources, I did not mention a specific license in the dataset website, but it should be non-commercial.
class DOTA(NonGeoDataset): | ||
"""DOTA dataset. | ||
|
||
The `DOTA <https://captain-whu.github.io/DOTA/index.html>`_ is a large-scale object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `DOTA <https://captain-whu.github.io/DOTA/index.html>`_ is a large-scale object | |
`DOTA <https://captain-whu.github.io/DOTA/index.html>`__ is a large-scale object |
* helipad | ||
|
||
|
||
If you use this work in your research, please cite the following paper: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use this work in your research, please cite the following paper: | |
If you use this work in your research, please cite the following papers: |
Args: | ||
root: root directory where dataset can be found | ||
split: split of the dataset to use, one of ['train', 'val'] | ||
version: version of the dataset to use, one of ['1.0', '2.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you skipped 1.5? Is it very different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to also include DOTA-v1.5. The images of DOTA-v1.0 and DOTA-v1.5 are the same. But many small objects are annotated in DOTA-v1.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a lot of work to format the data to common structure.
split: str = 'train', | ||
version: str = '2.0', | ||
bbox_orientation: str = 'hbb', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split: str = 'train', | |
version: str = '2.0', | |
bbox_orientation: str = 'hbb', | |
split: Literal['train', 'val'] = 'train', | |
version: Literal['1.0', '2.0'] = '2.0', | |
bbox_orientation: Literal['hbb', 'obb'] = 'hbb', |
If you want to get technical, these type hints are more correct, but we don't yet use them anywhere else in TorchGeo (although we should).
gsd:0.146343590398 | ||
|
||
Args: | ||
path: path to annotation file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs empty line after it
split: split of the dataset to use, one of ['train', 'val'] | ||
version: version of the dataset to use, one of ['1.0', '2.0'] | ||
bbox_orientation: bounding box orientation, one of ['hbb', 'obb'], meaning horizontal | ||
or oriented bounding boxes, hbb only available for v2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could make our own hbb for 1.0 just by using min/max. It wouldn't be perfect, but it would be better than the current inconsistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, we have provided the hbb labels DOTA-v1.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found any hbb labels for DOTA-v1.0 in the various folders across the google drive. For Version 2, the hbb labels are also just extracted from the obb labels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://drive.google.com/file/d/1sS9hveKtYAiTsGVxC4msF5qJjhn3wYpY/view?usp=drive_link
@nilsleh The task 2 gt is for hbb labels
if self.bbox_orientation == 'obb': | ||
boxes, labels = self._load_annotations(sample_row['annotation_path']) | ||
else: | ||
boxes, labels = self._load_annotations(sample_row['annotation_path']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I blind, or are these two lines the same?
else: | ||
boxes, labels = self._load_annotations(sample_row['annotation_path']) | ||
|
||
sample['boxes'] = boxes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer uses boxes
for compatibility with Kornia, see #1978
This PR adds the DOTA dataset for object detection.
Dataset rehosted on HF for faster and comprehensive download in one place.
Dataset features:
Dataset format:
Horizontal BBox example:
Oriented BBox example:
@dingjiansw101 as inquired in CAPTAIN-WHU/DOTA#29, this is the PR that aims to make the DOTA datset more accessible. The dataset structure in the google and baidu drives was a bit confusing and I restructured it on HF which is hopefully more clear. If you would take a look and have any comments, that would be helpful.
Also @robmarkcole perhaps interesting for you.
Closes #1