Learning Calibrated-Guidance for Object Detection in Aerial Images

Related tags

Deep Learning CG-Net
Overview

Learning Calibrated-Guidance for Object Detection in Aerial Images arxiv

We propose a simple yet effective Calibrated-Guidance (CG) scheme to enhance channel communications in a feature transformer fashion, which can adaptively determine the calibration weights for each channel based on the global feature affinity-pairs. Specifically, given a set of feature maps, CG first computes the feature similarity between each channel and the remaining channels as the intermediary calibration guidance. Then, re-representing each channel by aggregating all the channels weighted together via the guidance. Our CG can be plugged into any deep neural network, which is named as CG-Net. To demonstrate its effectiveness and efficiency, extensive experiments are carried out on both oriented and horizontal object detection tasks of aerial images. Results on two challenging benchmarks (i.e., DOTA and HRSC2016) demonstrate that our CG-Net can achieve state-of-the-art performance in accuracy with a fair computational overhead.


Introduction

This codebase is created to build benchmarks for object detection in aerial images. It is modified from mmdetection. The master branch works with PyTorch 1.1 or higher. If you would like to use PyTorch 0.4.1, please checkout to the pytorch-0.4.1 branch.

Results

Visualization results for oriented object detection on the test set of DOTA. Different class results

Comparison to the baseline on DOTA for oriented object detection with ResNet-101. The figures with blue boxes are the results of the baseline and pink boxes are the results of our proposed CG-Net. Baseline and CG-Net results

Experiment

ImageNet Pretrained Model from Pytorch

The effectiveness of our proposed methods with different backbone network on the test of DOTA.

Backbone +CG Weight mAP(%)
ResNet-50 download 73.26
ResNet-50 + download 74.21
ResNet-101 download 73.06
ResNet-101 + download 74.30
ResNet-152 download 72.78
ResNet-152 + download 73.53

CG-Net Results in DOTA.

Backbone Aug Rotate Task Weight mAP(%)
ResNet-101 + Oriented download 77.89
ResNet-101 + Horizontal download 78.26

Installation

Please refer to INSTALL.md for installation.

Get Started

Please see GETTING_STARTED.md for the basic usage of mmdetection.

Contributing

We appreciate all contributions to improve benchmarks for object detection in aerial images.

Citing

If you use our work, please consider citing:

@InProceedings{liang2021learning,
      title={Learning Calibrated-Guidance for Object Detection in Aerial Images}, 
      author={Dong, Liang and Zongqi, Wei and Dong, Zhang and Qixiang, Geng and Liyan, Zhang and Han, Sun and Huiyu, Zhou and Mingqiang, Wei and Pan, Gao},
      booktitle ={arXiv:2103.11399},
      year={2021}
}

Thanks to the Third Party Libs

Pytorch

mmdetection

AerialDetection

Comments
  • ImportError: Couldn't find a file matching the module name: deform_conv_cuda  (opt_in = False)

    ImportError: Couldn't find a file matching the module name: deform_conv_cuda (opt_in = False)

    This error may be caused by another error when I execute compile.sh: "error: command '/usr/bin/gcc' failed with exit code 1". But I do not know how to solve the problem. Is there anyone who solves the problem successfully?

    opened by fmy7834 2
  • pytorch梯度报错

    pytorch梯度报错

    您好,我运行命令: python tools/train.py configs/DOTA/faster_rcnn_RoITrans_r50_fpn_CG.py 后 mmdection报错: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1024, 256, 7, 7]], which is output 0 of IndexPutBackward, is at version 5; expected version 4 instead.

    opened by awei-97 0
  • mAP

    mAP

    hi tnx for puting pth file link i used google colab for testing them it gives tesla t4 graphic card

    1. i installed pythorch 1.1 and test your baseline res101 pth https://drive.google.com/file/d/1VU4owAoUSfXGT0pxQdye9hEVHLLpTVzO/view?usp=sharing
    2. after getting .pkl file and transforming results i get 3 folder and i zip Task1_results_nms and post for evaluation but i get this aps: mAP: 0.3733905671275838 ap of each class: plane:0.5327755102420805, baseball-diamond:0.2727272727272727, bridge:0.43349424196751235, ground-track-field:0.14393939393939395, small-vehicle:0.24720080996134897, large-vehicle:0.2587558692501386, ship:0.6995540225796933, tennis-court:0.5415296696817145, basketball-court:0.3157765610096118, storage-tank:0.09090909090909091, soccer-ball-field:0.18594385620726467, roundabout:0.16136363636363638, harbor:0.6924949948674773, swimming-pool:0.620672825385503, helicopter:0.4037207518220176

    its more fewer than paper and table that you put it on first page

    where is my error??

    opened by mmoghadam11 1
  • cuda error

    cuda error

    loading annotations into memory... Done (t=0.01s) creating index... index created! [ ] 0/4750, elapsed: 0s, ETA:THCudaCheck FAIL file=src/roi_align_kernel.cu line=145 error=209 : unrecognized error code Traceback (most recent call last): File "/content/CG-Net/tools/test.py", line 212, in main() File "/content/CG-Net/tools/test.py", line 182, in main outputs = single_gpu_test(model, data_loader, args.show, args.log_dir) File "/content/CG-Net/tools/test.py", line 38, in single_gpu_test result = model(return_loss=False, rescale=not show, **data) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.7/dist-packages/torch/nn/parallel/data_parallel.py", line 150, in forward return self.module(*inputs[0], **kwargs[0]) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/content/CG-Net/mmdet/models/detectors/base_new.py", line 97, in forward return self.forward_test(img, img_meta, **kwargs) File "/content/CG-Net/mmdet/models/detectors/base_new.py", line 86, in forward_test return self.simple_test(imgs[0], img_metas[0], **kwargs) File "/content/CG-Net/mmdet/models/detectors/RoITransformer.py", line 265, in simple_test x[:len(self.bbox_roi_extractor.featmap_strides)], rois) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/content/CG-Net/mmdet/models/roi_extractors/single_level.py", line 86, in forward roi_feats_t = self.roi_layers[i](feats[i], rois_) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/content/CG-Net/mmdet/ops/roi_align/modules/roi_align.py", line 16, in forward self.spatial_scale, self.sample_num) File "/content/CG-Net/mmdet/ops/roi_align/functions/roi_align.py", line 32, in forward sample_num, output) RuntimeError: cuda runtime error (209) : unrecognized error code at src/roi_align_kernel.cu:145

    opened by mmoghadam11 2
  • About the Base Calibrated-Guidance

    About the Base Calibrated-Guidance

    Where did you inserted the Calibrated-Guidance module, is it in between of every convolution or after the ResNet?

    In page 4 of your paper, you mentioned "From the perspective of levels inside the feature pyramid, each level can been seen as local features, i.e., only part of the features of the input image are captured", so I assume you inserted the Calibrated-Guidance module only after the ResNet?

    opened by chandlerbing65nm 1
  • Training Loss Error

    Training Loss Error

    在单卡训练的过程中,当训练到第一个epoch 450/38298时,损失值异常,直到后400batch报bbox错误。是不是数据集生成的代码有问题? 2021-04-08 14:26:24,187 - INFO - Epoch [1][400/38298] lr: 0.00692, eta: 4 days, 5:44:23, time: 0.798, data_time: 0.030, memory: 4559, loss_rpn_cls: 0.3144, loss_rpn_bbox: 0.1515, s0.rbbox_loss_cls: 0.4531, s0.rbbox_acc: 92.7930, s0.rbbox_loss_bbox: 0.5924, s1.rbbox_loss_cls: 0.2729, s1.rbbox_acc: 95.7763, s1.rbbox_loss_bbox: 0.1261, loss: 1.9104 2021-04-08 14:27:03,769 - INFO - Epoch [1][450/38298] lr: 0.00746, eta: 4 days, 5:38:36, time: 0.792, data_time: 0.027, memory: 4559, loss_rpn_cls: 1.1329, loss_rpn_bbox: 3.9938, s0.rbbox_loss_cls: 0.3731, s0.rbbox_acc: 94.3412, s0.rbbox_loss_bbox: 0.3807, s1.rbbox_loss_cls: 0.3043, s1.rbbox_acc: 95.6289, s1.rbbox_loss_bbox: 0.0709, loss: 6.2557 2021-04-08 14:27:43,211 - INFO - Epoch [1][500/38298] lr: 0.00799, eta: 4 days, 5:31:41, time: 0.789, data_time: 0.030, memory: 4559, loss_rpn_cls: 4606.1320, loss_rpn_bbox: 411.3401, s0.rbbox_loss_cls: 3.2093, s0.rbbox_acc: 95.5460, s0.rbbox_loss_bbox: 1.5279, s1.rbbox_loss_cls: 3.1706, s1.rbbox_acc: 96.1591, s1.rbbox_loss_bbox: 0.0434, loss: 5025.4235 2021-04-08 14:28:28,953 - INFO - Epoch [1][550/38298] lr: 0.00800, eta: 4 days, 6:53:34, time: 0.915, data_time: 0.139, memory: 4804, loss_rpn_cls: 2756.4105, loss_rpn_bbox: 772.6908, s0.rbbox_loss_cls: 2.1745, s0.rbbox_acc: 93.6437, s0.rbbox_loss_bbox: 1.4731, s1.rbbox_loss_cls: 2.1121, s1.rbbox_acc: 93.7372, s1.rbbox_loss_bbox: 0.0369, loss: 3534.8980 2021-04-08 14:29:06,726 - INFO - Epoch [1][600/38298] lr: 0.00800, eta: 4 days, 6:20:04, time: 0.755, data_time: 0.020, memory: 4804, loss_rpn_cls: 22709.9212, loss_rpn_bbox: 2486.1367, s0.rbbox_loss_cls: 12.9946, s0.rbbox_acc: 94.3856, s0.rbbox_loss_bbox: 5.9148, s1.rbbox_loss_cls: 17.1465, s1.rbbox_acc: 94.4870, s1.rbbox_loss_bbox: 0.2170, loss: 25232.3292 2021-04-08 14:29:44,850 - INFO - Epoch [1][650/38298] lr: 0.00800, eta: 4 days, 5:55:45, time: 0.762, data_time: 0.033, memory: 4804, loss_rpn_cls: 112816.2896, loss_rpn_bbox: 60489.4470, s0.rbbox_loss_cls: 92.8384, s0.rbbox_acc: 83.4779, s0.rbbox_loss_bbox: 22.8278, s1.rbbox_loss_cls: 109.9155, s1.rbbox_acc: 83.5014, s1.rbbox_loss_bbox: 1.9195, loss: 173533.2350 2021-04-08 14:30:21,997 - INFO - Epoch [1][700/38298] lr: 0.00800, eta: 4 days, 5:24:08, time: 0.743, data_time: 0.020, memory: 4804, loss_rpn_cls: 17055451.9681, loss_rpn_bbox: 28939940.7239, s0.rbbox_loss_cls: 1998.5494, s0.rbbox_acc: 85.2132, s0.rbbox_loss_bbox: 360.3875, s1.rbbox_loss_cls: 2116.1039, s1.rbbox_acc: 85.2131, s1.rbbox_loss_bbox: 42.7391, loss: 45999909.1724 2021-04-08 14:30:58,686 - INFO - Epoch [1][750/38298] lr: 0.00800, eta: 4 days, 4:52:00, time: 0.734, data_time: 0.020, memory: 4804, loss_rpn_cls: 610655327.4717, loss_rpn_bbox: 877621758.9251, s0.rbbox_loss_cls: 4449.5225, s0.rbbox_acc: 84.1080, s0.rbbox_loss_bbox: 1000.2603, s1.rbbox_loss_cls: 4128.5755, s1.rbbox_acc: 81.5336, s1.rbbox_loss_bbox: 79.6218, loss: 1488286705.3515 2021-04-08 14:31:36,322 - INFO - Epoch [1][800/38298] lr: 0.00800, eta: 4 days, 4:32:51, time: 0.753, data_time: 0.031, memory: 4804, loss_rpn_cls: 3780733863668.9443, loss_rpn_bbox: 4202940688343.9102, s0.rbbox_loss_cls: 191388.0878, s0.rbbox_acc: 83.0183, s0.rbbox_loss_bbox: 89285.3539, s1.rbbox_loss_cls: 480514.5821, s1.rbbox_acc: 83.1815, s1.rbbox_loss_bbox: 2610.6784, loss: 7983675289758.8213 Traceback (most recent call last): File "tools/train.py", line 97, in main() File "tools/train.py", line 93, in main logger=logger) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/apis/train.py", line 61, in train_detector _non_dist_train(model, dataset, cfg, validate=validate) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/apis/train.py", line 219, in _non_dist_train runner.run(data_loaders, cfg.workflow, cfg.total_epochs) File "/home/gen/anaconda3/envs/cgnet/lib/python3.6/site-packages/mmcv/runner/runner.py", line 384, in run epoch_runner(data_loaders[i], **kwargs) File "/home/gen/anaconda3/envs/cgnet/lib/python3.6/site-packages/mmcv/runner/runner.py", line 283, in train self.model, data_batch, train_mode=True, **kwargs) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/apis/train.py", line 39, in batch_processor losses = model(**data) File "/home/gen/anaconda3/envs/cgnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/home/gen/anaconda3/envs/cgnet/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/gen/anaconda3/envs/cgnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/models/detectors/base_new.py", line 95, in forward return self.forward_train(img, img_meta, **kwargs) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/models/detectors/RoITransformer.py", line 223, in forward_train gt_labels[i]) File "/home/gen/PycharmProjects/CG-Net-master/mmdet/core/bbox/assigners/max_iou_assigner_rbbox.py", line 73, in assign raise ValueError('No gt or bboxes') ValueError: No gt or bboxes

    opened by j18567260 4
Owner
null
YOLTv5 rapidly detects objects in arbitrarily large aerial or satellite images that far exceed the ~600×600 pixel size typically ingested by deep learning object detection frameworks

YOLTv5 rapidly detects objects in arbitrarily large aerial or satellite images that far exceed the ~600×600 pixel size typically ingested by deep learning object detection frameworks.

Adam Van Etten 145 Jan 1, 2023
Tiny Object Detection in Aerial Images.

AI-TOD AI-TOD is a dataset for tiny object detection in aerial images. [Paper] [Dataset] Description AI-TOD comes with 700,621 object instances for ei

jwwangchn 116 Dec 30, 2022
An image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testingAn image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testing

SVM Données Une base d’images contient 490 images pour l’apprentissage (400 voitures et 90 bateaux), et encore 21 images pour fait des tests. Prétrait

Achraf Rahouti 3 Nov 30, 2021
A public available dataset for road boundary detection in aerial images

Topo-boundary This is the official github repo of paper Topo-boundary: A Benchmark Dataset on Topological Road-boundary Detection Using Aerial Images

Zhenhua Xu 79 Jan 4, 2023
Official code of the paper "ReDet: A Rotation-equivariant Detector for Aerial Object Detection" (CVPR 2021)

ReDet: A Rotation-equivariant Detector for Aerial Object Detection ReDet: A Rotation-equivariant Detector for Aerial Object Detection (CVPR2021), Jiam

csuhan 334 Dec 23, 2022
Reviving Iterative Training with Mask Guidance for Interactive Segmentation

This repository provides the source code for training and testing state-of-the-art click-based interactive segmentation models with the official PyTorch implementation

Visual Understanding Lab @ Samsung AI Center Moscow 406 Jan 1, 2023
dualFace: Two-Stage Drawing Guidance for Freehand Portrait Sketching (CVMJ)

dualFace dualFace: Two-Stage Drawing Guidance for Freehand Portrait Sketching (CVMJ) We provide python implementations for our CVM 2021 paper "dualFac

Haoran XIE 46 Nov 10, 2022
Exploring Versatile Prior for Human Motion via Motion Frequency Guidance (3DV2021)

Exploring Versatile Prior for Human Motion via Motion Frequency Guidance This is the codebase for video-based human motion reconstruction in human-mot

Jiachen Xu 5 Jul 14, 2022
Edge-aware Guidance Fusion Network for RGB-Thermal Scene Parsing

EGFNet Edge-aware Guidance Fusion Network for RGB-Thermal Scene Parsing Dataset and Results Test maps: 百度网盘 提取码:zust Citation @ARTICLE{ author={Zhou,

ShaohuaDong 10 Dec 8, 2022
Official code for 'Robust Siamese Object Tracking for Unmanned Aerial Manipulator' and offical introduction to UAMT100 benchmark

SiamSA: Robust Siamese Object Tracking for Unmanned Aerial Manipulator Demo video ?? Our video on Youtube and bilibili demonstrates the evaluation of

Intelligent Vision for Robotics in Complex Environment 12 Dec 18, 2022
4st place solution for the PBVS 2022 Multi-modal Aerial View Object Classification Challenge - Track 1 (SAR) at PBVS2022

A Two-Stage Shake-Shake Network for Long-tailed Recognition of SAR Aerial View Objects 4st place solution for the PBVS 2022 Multi-modal Aerial View Ob

LinpengPan 5 Nov 9, 2022
Neural Ensemble Search for Performant and Calibrated Predictions

Neural Ensemble Search Introduction This repo contains the code accompanying the paper: Neural Ensemble Search for Performant and Calibrated Predictio

AutoML-Freiburg-Hannover 26 Dec 12, 2022
Training Confidence-Calibrated Classifier for Detecting Out-of-Distribution Samples / ICLR 2018

Training Confidence-Calibrated Classifier for Detecting Out-of-Distribution Samples This project is for the paper "Training Confidence-Calibrated Clas

null 168 Nov 29, 2022
Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective

Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective Zhengzhuo Xu, Zenghao Chai, Chun Yuan This is the PyTorch implement

Sincere 16 Dec 15, 2022
Hybrid CenterNet - Hybrid-supervised object detection / Weakly semi-supervised object detection

Hybrid-Supervised Object Detection System Object detection system trained by hybrid-supervision/weakly semi-supervision (HSOD/WSSOD): This project is

null 5 Dec 10, 2022
Yolo object detection - Yolo object detection with python

How to run download required files make build_image make download Docker versio

null 3 Jan 26, 2022
[CVPR2021] UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicles

UAV-Human Official repository for CVPR2021: UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicle Paper arXiv Res

null 129 Jan 4, 2023
A 3D Dense mapping backend library of SLAM based on taichi-Lang designed for the aerial swarm.

TaichiSLAM This project is a 3D Dense mapping backend library of SLAM based Taichi-Lang, designed for the aerial swarm. Intro Taichi is an efficient d

XuHao 230 Dec 19, 2022