Coder Social home page Coder Social logo

dal's Introduction

DAL

This project hosts the official implementation for our AAAI 2021 paper:

Dynamic Anchor Learning for Arbitrary-Oriented Object Detection [arxiv] [comments].

Abstract

In this paper, we propose a dynamic anchor learning (DAL) method, which utilizes the newly defined matching degree to comprehensively evaluate the localization potential of the anchors and carry out a more efficient label assignment process. In this way, the detector can dynamically select high-quality anchors to achieve accurate object detection, and the divergence between classification and regression will be alleviated.

Getting Started

The codes build Rotated RetinaNet with the proposed DAL method for rotation object detection. The supported datasets include: DOTA, HRSC2016, ICDAR2013, ICDAR2015, UCAS-AOD, NWPU VHR-10, VOC.

Installation

Insatll requirements:

pip install -r requirements.txt
pip install git+git://github.com/lehduong/torch-warmup-lr.git

Build the Cython and CUDA modules:

cd $ROOT/utils
sh make.sh
cd $ROOT/utils/overlaps_cuda
python setup.py build_ext --inplace

Installation for DOTA_devkit:

cd $ROOT/datasets/DOTA_devkit
sudo apt-get install swig
swig -c++ -python polyiou.i
python setup.py build_ext --inplace

Inference

You can use the following command to test a dataset. Note that weight, img_dir, dataset,hyp should be modified as appropriate.

python demo.py

Train

  1. Move the dataset to the $ROOT directory.
  2. Generate imageset files for daatset division via:
cd $ROOT/datasets
python generate_imageset.py
  1. Modify the configuration file hyp.py and arguments in train.py, then start training:
python train.py

Evaluation

Different datasets use different test methods. For UCAS-AOD/HRSC2016/VOC/NWPU VHR-10, you need to prepare labels in the appropriate format in advance. Take evaluation on HRSC2016 for example:

cd $ROOT/datasets/evaluate
python hrsc2gt.py

then you can conduct evaluation:

python eval.py

Note that :

  • the script needs to be executed only once, but testing on different datasets needs to be executed again.
  • the imageset file used in hrsc2gt.py is generated from generate_imageset.py.

Main Results

Method Dataset Bbox Backbone Input Size mAP/F1
DAL DOTA OBB ResNet-101 800 x 800 71.78
DAL UCAS-AOD OBB ResNet-101 800 x 800 89.87
DAL HRSC2016 OBB ResNet-50 416 x 416 88.60
DAL ICDAR2015 OBB ResNet-101 800 x 800 82.4
DAL ICDAR2013 HBB ResNet-101 800 x 800 81.3
DAL NWPU VHR-10 HBB ResNet-101 800 x 800 88.3
DAL VOC 2007 HBB ResNet-101 800 x 800 76.1

Detections

DOTA_results

Citation

If you find our work or code useful in your research, please consider citing:

@article{ming2020dynamic,
  title={Dynamic Anchor Learning for Arbitrary-Oriented Object Detection},
  author={Ming, Qi and Zhou, Zhiqiang and Miao, Lingjuan and Zhang, Hongwei and Li, Linhao},
  journal={arXiv preprint arXiv:2012.04150},
  year={2020}
}

If you have any questions, please contact me via issue or email.

dal's People

Contributors

ming71 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.