Skip to main content

DOTA Devkit CLI

Project description

DOTA Devkit

PyPi License Python Version Code style: black

About

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.

Installation

pip install dotadevkit

Usage

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

  1. Split only images with 8 processes
 dotadevkit split \
        ./example/images \
        ./example_split/images \
        8 \
        --images
  1. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotadevkit-1.3.0.tar.gz (66.1 kB view hashes)

Uploaded Source

Built Distributions

dotadevkit-1.3.0-cp39-cp39-win_amd64.whl (127.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

dotadevkit-1.3.0-cp39-cp39-win32.whl (115.8 kB view hashes)

Uploaded CPython 3.9 Windows x86

dotadevkit-1.3.0-cp39-cp39-manylinux2010_x86_64.whl (393.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

dotadevkit-1.3.0-cp39-cp39-manylinux2010_i686.whl (388.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

dotadevkit-1.3.0-cp39-cp39-manylinux1_x86_64.whl (393.0 kB view hashes)

Uploaded CPython 3.9

dotadevkit-1.3.0-cp39-cp39-manylinux1_i686.whl (388.2 kB view hashes)

Uploaded CPython 3.9

dotadevkit-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl (75.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

dotadevkit-1.3.0-cp38-cp38-win_amd64.whl (127.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

dotadevkit-1.3.0-cp38-cp38-win32.whl (116.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

dotadevkit-1.3.0-cp38-cp38-manylinux2010_x86_64.whl (390.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

dotadevkit-1.3.0-cp38-cp38-manylinux2010_i686.whl (388.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

dotadevkit-1.3.0-cp38-cp38-manylinux1_x86_64.whl (390.9 kB view hashes)

Uploaded CPython 3.8

dotadevkit-1.3.0-cp38-cp38-manylinux1_i686.whl (388.2 kB view hashes)

Uploaded CPython 3.8

dotadevkit-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl (75.8 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

dotadevkit-1.3.0-cp37-cp37m-win_amd64.whl (127.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

dotadevkit-1.3.0-cp37-cp37m-win32.whl (116.0 kB view hashes)

Uploaded CPython 3.7m Windows x86

dotadevkit-1.3.0-cp37-cp37m-manylinux2010_x86_64.whl (391.5 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

dotadevkit-1.3.0-cp37-cp37m-manylinux2010_i686.whl (387.5 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

dotadevkit-1.3.0-cp37-cp37m-manylinux1_x86_64.whl (391.5 kB view hashes)

Uploaded CPython 3.7m

dotadevkit-1.3.0-cp37-cp37m-manylinux1_i686.whl (387.5 kB view hashes)

Uploaded CPython 3.7m

dotadevkit-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl (75.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

dotadevkit-1.3.0-cp36-cp36m-win_amd64.whl (127.6 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

dotadevkit-1.3.0-cp36-cp36m-win32.whl (116.0 kB view hashes)

Uploaded CPython 3.6m Windows x86

dotadevkit-1.3.0-cp36-cp36m-manylinux2010_x86_64.whl (390.0 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

dotadevkit-1.3.0-cp36-cp36m-manylinux2010_i686.whl (385.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

dotadevkit-1.3.0-cp36-cp36m-manylinux1_x86_64.whl (390.0 kB view hashes)

Uploaded CPython 3.6m

dotadevkit-1.3.0-cp36-cp36m-manylinux1_i686.whl (385.9 kB view hashes)

Uploaded CPython 3.6m

dotadevkit-1.3.0-cp36-cp36m-macosx_10_9_x86_64.whl (75.6 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page