Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


The repo is about our recent work on object detection in aerial image, the paper of the work "Clustered Object Detection in Aerial Image" (ICCV2019) and its supplementatry are available here or ResearchGate. If you think this project is useful for you, feel free to leave a star. (^^)

Installing codebase

  1. The work is implemented based on Caffe2 , please install it according to the corresponding instruction.
  2. Clone the repo
git clone

Please follow the instruction in Detectron to install the repo.

Generating cluster region ground truth

Here, we use VisDrone dataset as an example to demonstrate the process to generate cluster region ground truth.

  1. run "./detectron/ops/add_cluster_annotation.m" to generate cluster ground truth and add it to original object annotation files.
  2. run "./detectron/ops/visdrone2cocoformat.m" to convert VisDrone format annotation to COCO format.

Train CPNet and global detector

cd $ROOT_DIR/ClusDet
python ./tools/ \
    --cfg ./configs/e2e_faster_rcnn_R-50-FPN_CPNet_1x_1GPU.yaml \
    OUTPUT_DIR ./trainedmodel/faster_rcnn_R-50-FPN_CPNet_1x_1GPU

Inference CPNet to produce cluster regions on global image

python tools/ \
    --cfg ./configs/e2e_faster_rcnn_R-50-FPN_CPNet_1x_1GPU.yaml \
    TEST.WEIGHTS ./trainedmodel/faster_rcnn_R-50-FPN_CPNet_1x_1GPU/train/coco_2014_train/generalized_rcnn/model_final.pkl \
    NUM_GPUS 1

crop cluster regions by running

python detectron/ops/

Please Change the corresponding path when used on your computer.

Train detector on global images and cropped cluster chips

python ./tools/ \
  --cfg ./configs/e2e_faster_rcnn_R-50-FPN_1x_1GPU.yaml \
  OUTPUT_DIR ./trainedmodel/faster_rcnn_R-50-FPN_1x_1GPU

Inference detector on global images and cropped cluster chips

python tools/ \
    --cfg ./configs/e2e_faster_rcnn_R-50-FPN_1x_1GPU.yaml \
    TEST.WEIGHTS ./trainedmodel/faster_rcnn_R-50-FPN_1x_1GPU/train/coco_2014_train/generalized_rcnn/model_final.pkl \
    NUM_GPUS 1

Fuse the detections from global images and cluster chips

run "./detectron/ops/fuse_global_cluster_detections.m"


If you want to crop the image evenly, run "./detectron/ops/evenly_image_partition.m"

If you have any questions regarding the code, please feel free to contact me


@InProceedings{Yang_2019_ICCV, author = {Yang, Fan and Fan, Heng and Chu, Peng and Blasch, Erik and Ling, Haibin}, title = {Clustered Object Detection in Aerial Images}, booktitle = {The IEEE International Conference on Computer Vision (ICCV)}, month = {October}, year = {2019} }

You can’t perform that action at this time.