Skip to content
/ ARC Public

[ICCV 2023] Adaptive Rotated Convolution for Rotated Object Detection

License

Notifications You must be signed in to change notification settings

LeapLabTHU/ARC

Repository files navigation

Adaptive Rotated Convolution for Rotated Object Detection (ICCV 2023)

Authors: Yifan Pu*, Yiru Wang*, Zhuofan Xia, Yizeng Han, Yulin Wang, Weihao Gan, Zidong Wang, Shiji Song, Gao Huang#.

*: Equal contribution, #: Corresponding author.

Introduction

This is the official implementation of the paper, Adaptive Rotated Convolution for Rotated Object Detection (ICCV 2023). This paper presents a novel adaptive rotation convolutional operation to capture orientation information of objects in images. It enhances the performance of rotated object detectors and achieves high efficiency in rotated object detection scenarios.

Motivation

Rotate the convolution kernels

Overall method

Get Started

(1) Prepare environment

# create environment
conda create -n arc python=3.7 -y
conda activate arc

# install pytorch and torchvision
pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 -f https://download.pytorch.org/whl/torch_stable.html

# clone this codebase, including submodule
git clone https://github.com/LeapLabTHU/ARC.git --recursive

# install submodule
cd BboxToolkit
pip install -v -e .
cd ..

# install mmcv
pip install mmcv-full==1.3.9 -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html

# install other requirements
pip install -r requirements/build.txt
pip install mmpycocotools
pip install einops

# install this codebase
pip install -v -e .

(2) Prepare data

Download the DOTA dataset from official website, change the diretory in ./BboxToolkit/tools/split_configs/dota1_0/ss_trainval.json and ./BboxToolkit/tools/split_configs/dota1_0/ss_test.json, and then run the following script

cd ./BboxToolkit/tools/
python img_split.py --base_json split_configs/dota1_0/ss_trainval.json
python img_split.py --base_json split_configs/dota1_0/ss_test.json

(3) Download the pretrained backbone

Download the pretrained ARC-ResNet from TsinghuaCloud or GoogleDrive, then put it in ./pretrained/.

(4) Change data path

In the file ./configs/obb/base/datasets/dota.py, change the data path following data_root to YOUR_DATA_PATH.

Usage

Training

# train a Oriented R-CNN model with ARC-ResNet50 backbone
python tools/train.py configs/obb/arc/arc_orcnn_r50fpn1x_ss_dota10_RxFFF_n4.py;

# train a Oriented R-CNN model with ARC-ResNet101 backbone
python tools/train.py configs/obb/arc/arc_orcnn_r101fpn1x_ss_dota10_RxFFF_n4.py;

Testing

python tools/test.py configs/obb/arc/arc_orcnn_r50fpn1x_ss_dota10_RxFFF_n4.py \
YOUR_CHECKPOINT_PATH --format-only --options save_dir=YOUR_SAVE_DIR;

python tools/test.py configs/obb/arc/arc_orcnn_r101fpn1x_ss_dota10_RxFFF_n4.py \
YOUR_CHECKPOINT_PATH --format-only --options save_dir=YOUR_SAVE_DIR;

We provide the pretrained models as listed below.

Detector Backbone box AP
(in paper)
box AP
(this repo)
pretrained model
Oriented R-CNN ARC-ResNet50 77.35 77.42 TsinghuaCloud / GoogleDrive
Oriented R-CNN ARC-ResNet101 77.70 77.75 TsinghuaCloud / GoogleDrive

Acknowledgement

This code is developed on the top of OBBDetection, we thank to their efficient and neat codebase.

Citation

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

@InProceedings{pu2023adaptive,
  title     = {Adaptive Rotated Convolution for Rotated Object Detection},
  author    = {Pu, Yifan and Wang, Yiru and Xia, Zhuofan and Han, Yizeng and Wang, Yulin and Gan, Weihao and Wang, Zidong and Song, Shiji and Huang, Gao},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  year      = {2023}
}

Contact

If you have any questions or concerns, please send email to [email protected].

About

[ICCV 2023] Adaptive Rotated Convolution for Rotated Object Detection

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published