This is the repository of paper "Gliding vertex on the horizontal bounding box for multi-oriented object detection".
The project is based on Maskrcnn Benchmark. Please follow its instructions to prepare the environment. For caution's sake, specific version 73ed879 is suggested to use. We list the some details here:
Python: 3.6.7
PyTorch: 1.2.0.dev20190704
CUDA: 9.0
CUDNN: 7
Compile the poly_nms
:
REPO_ROOT/maskrcnn_benchmark/utils/poly_nms$ python setup.py build_ext --inplace
Don't forget to add maskrcnn_benchmark
into $PYTHONPATH
:
REPO_ROOT/maskrcnn_benchmark$ export PYTHONPATH=$PYTHONPATH:`pwd`
Please edit the file maskrcnn_benchmark/config/paths_catalog.py
to set the datasets.
Train:
REPO_ROOT$ python -m torch.distributed.launch --nproc_per_node=$NUM_GPUS tools/train_net.py --config-file $PATH_TO_CONFIG
Test:
REPO_ROOT$ python -m torch.distributed.launch --nproc_per_node=$NUM_GPUS tools/test_net.py --config-file $PATH_TO_CONFIG --ckpt=$PATH_TO_CKPT
Config: configs/glide/dota.yaml
Clone DOTA_Devkit as a sub-module:
REPO_ROOT$ git submodule update --init --recursive
REPO_ROOT/maskrcnn_benchmark/DOTA_devkit$ sudo apt-get install swig
REPO_ROOT/maskrcnn_benchmark/DOTA_devkit$ swig -c++ -python polyiou.i
REPO_ROOT/maskrcnn_benchmark/DOTA_devkit$ python setup.py build_ext --inplace
Edit the config.json
and run:
REPO_ROOT$ python prepare.py
You can train the model by yourself or directly use the snapshot provided by us (our method with FPN on DOTA): from Google Drive or Baidu NetDisk.
REPO_ROOT$ python -m torch.distributed.launch --nproc_per_node=3 tools/train_net.py --config-file configs/glide/dota.yaml
REPO_ROOT$ python -m torch.distributed.launch --nproc_per_node=3 tools/test_net.py --config-file configs/glide/dota.yaml
# Edit ResultMerge.py and run it.
# srcpath = "REPO_ROOT/exp_dota/dota/inference/dota_test_cut/results"
REPO_ROOT/maskrcnn_benchmark/DOTA_devkit$ python ResultMerge.py
BibTex:
@article{xu2019gliding,
title={Gliding vertex on the horizontal bounding box for multi-oriented object detection},
author={Xu, Yongchao and Fu, Mingtao and Wang, Qimeng and Wang, Yukang and Chen, Kai and Xia, Gui-Song and Bai, Xiang},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2020}
}