Skip to content
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

Merged
merged 17 commits into from
Mar 12, 2025
Merged

Add DOTA dataset #2551

merged 17 commits into from
Mar 12, 2025

Conversation

nilsleh
Copy link
Collaborator

@nilsleh nilsleh commented Jan 31, 2025

This PR adds the DOTA dataset for object detection.

Dataset rehosted on HF for faster and comprehensive download in one place.

Dataset features:

  • multi-class object detection (15 classes in V1 and 18 classes in V2)
  • horizontal and oriented bounding boxes

Dataset format:

  • images are three channel PNGs with various pixel sizes
  • annotations are text files with one line per bounding box

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
Closes #2599

@github-actions github-actions bot added documentation Improvements or additions to documentation datasets Geospatial or benchmark datasets testing Continuous integration testing labels Jan 31, 2025
@nilsleh nilsleh marked this pull request as draft January 31, 2025 15:16
@nilsleh nilsleh added this to the 0.7.0 milestone Jan 31, 2025
@nilsleh nilsleh marked this pull request as ready for review February 3, 2025 17:12
@nilsleh
Copy link
Collaborator Author

nilsleh commented Mar 10, 2025

I tediously reorganized the original data to now extract into separate annotation version directories, so they can be used interchangeably.

image: image tensor
"""
image = Image.open(os.path.join(self.root, path)).convert('RGB')
return torch.from_numpy(np.array(image).transpose(2, 0, 1)).float()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use einops.rearrange to make this more clear

adamjstewart
adamjstewart previously approved these changes Mar 12, 2025
@adamjstewart adamjstewart enabled auto-merge (squash) March 12, 2025 16:27
@adamjstewart adamjstewart merged commit 6067656 into microsoft:main Mar 12, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets documentation Improvements or additions to documentation testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue loading images from DOTA dataset on Huggingface DOTA Dataset
3 participants