https://github.com/ashnair1/dotadevkit
Toolkit for working with the DOTA aerial object detection dataset
https://github.com/ashnair1/dotadevkit
dota dota-dataset object-detection satellite-imagery
Last synced: 7 months ago
JSON representation
Toolkit for working with the DOTA aerial object detection dataset
- Host: GitHub
- URL: https://github.com/ashnair1/dotadevkit
- Owner: ashnair1
- Created: 2020-09-23T17:36:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T21:06:03.000Z (about 1 year ago)
- Last Synced: 2025-02-28T13:20:07.289Z (7 months ago)
- Topics: dota, dota-dataset, object-detection, satellite-imagery
- Language: C++
- Homepage:
- Size: 94.5 MB
- Stars: 38
- Watchers: 2
- Forks: 3
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## DOTA Devkit

[](https://pypi.org/project/dotadevkit/)
[](https://pypi.org/project/dotadevkit/)
[](https://github.com/psf/black)### About
This is a modified version of the original [DOTA_Devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit). The devkit has had some issues regarding ease of installation and usage with the latter being a significant problem. This repo attemps to address these issues by providing a simple CLI for easier usage and cross-platform whls for easier installation.**Disclaimer**: This repo was created post [9938855](https://github.com/CAPTAIN-WHU/DOTA_devkit/commit/99388551054be9a6dabb01c8bb2a7eb562d57b4f). The DOTA authors could update the original repo and/or add support for (possible) new versions of the DOTA dataset. While this repo will try to remain in sync with the original, users should rely on the original should the repos diverge.
### Installation
```
pip install dotadevkit
```### Usage
Once installed, you will have access to the `dotadevkit` CLI. Run `dotadevkit --help` or `dotadevkit --help` for further details.
```
Usage: dotadevkit [OPTIONS] COMMAND [ARGS]...Options:
--help Show this message and exit.Commands:
convert Convert tiled DOTA annotations to COCO format.
evaluate Run evaluation for both tasks on DOTA & DOTA 1.5.
merge Merges annotations according to DOTA Tasks.
split Splits images and annotations.
visualise Visualise annotations.
```Your dataset directory should look as follows:
```markdown
.
├── example
│ ├── images
│ ├── labelTxt
│ ├── images.txt```
Refer [example](./example) directory in this repo for a concrete example
#### Split1. Split only images with 8 processes
```
dotadevkit split \
./example/images \
./example_split/images \
8 \
--images
```2. Split `images` and `labelTxt` into tiles of size 800 x 800 with overlap of 200 pixels with 8 processes
```
dotadevkit split \
./example/ \
./example_split/ \
8 \
800 \
200
```#### Merge
```
dotadevkit merge \
./example_split/dota_dets \
./example_split/merged_dets \
8
```#### Evaluate
DOTA evaluation on specific task and dataset version.
```
dotadevkit evaluate \
./example_split/merged_dets/Task1_{:s}.txt \
./example/labelTxt/{:s}.txt \
./example/images.txt \
1.0
```#### Visualise
Visualise images that have `plane` and `helicopter` categories.
```
dotadevkit visualise \
./example_split/ \
-cat plane -cat helicopter
```#### Convert
Convert tiled DOTA annotations of specified version to MS-COCO format.
```
dotadevkit convert \
./example_split/ \
--version 1.0
```