This is a modified version of the original 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. 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.
pip install dotadevkit
Once installed, you will have access to the dotadevkit
CLI. Run dotadevkit --help
or dotadevkit <command> --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:
.
├── example
│ ├── images
│ ├── labelTxt
│ ├── images.txt
Refer example directory in this repo for a concrete example
- Split only images with 8 processes
dotadevkit split \
./example/images \
./example_split/images \
8 \
--images
- Split
images
andlabelTxt
into tiles of size 800 x 800 with overlap of 200 pixels with 8 processes
dotadevkit split \
./example/ \
./example_split/ \
8 \
800 \
200
dotadevkit merge \
./example_split/dota_dets \
./example_split/merged_dets \
8
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 images that have plane
and helicopter
categories.
dotadevkit visualise \
./example_split/ \
-cat plane -cat helicopter
Convert tiled DOTA annotations of specified version to MS-COCO format.
dotadevkit convert \
./example_split/ \
--version 1.0