hoiliu-0801 / DNTR

A DeNoising FPN with Transformer R-CNN for Tiny Object Detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A DeNoising FPN with Transformer R-CNN for Tiny Object Detection

method

A PyTorch implementation and pretrained models for DNTR (DeNoising Transformer R-CNN). We present DN-FPN, a plug-in that suppresses noise generated during the fusion of FPNs. In addition, we renalvate the standard R-CNN to consist of a transformer structure, namely Trans R-CNN.(base)

Installation and Get Started

Required environments:

Installation:

This implementation is based on MMDetection 2.24.1. Assume that your environment has satisfied the above requirements, please follow the following steps for installation.

git clone https://github.com/hoiliu-0801/DNTR.git
cd DNTR/mmdet-dntr
# Install pytorch
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
# Required packages
pip install -r requirements/build.txt
pip install yapf==0.40.0
pip install numbda
pip install timm
pip install torchprofile
python setup.py develop
# Install cocoapi
pip install pycocotools
# Install aitodcocoapi
pip install cython==0.29.36
pip install "git+https://github.com/jwwangchn/cocoapi-aitod.git#subdirectory=aitodpycocotools"
#Install mmcv
#pip install mmcv==2.0.0rc4 -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7/index.html
mim install mmcv-full==1.6.0

Get Started with single GPU

Training DNTR, for example :

python tools/train.py configs/aitod-dntr/aitod_DNTR_mask.py

Testing DNTR, for example :

python tools/test.py configs/aitod-dntr/aitod_DNTR_mask.py

Performance

Table 1. Training Set: AI-TOD trainval set, Validation Set: AI-TOD test set, 36 epochs, where FRCN, DR denotes Faster R-CNN and DetectoRS, respectively.

Method Backbone mAP AP50 AP75 APvt APt APs APm APm
FRCN R-50 11.1 26.3 7.6 0.0 7.2 23.3 33.6 22.9
ATSS R-50 12.8 30.6 8.5 1.9 11.6 19.5 29.2 25.8
ATSS w/ DN-FPN R-50 17.9 41.0 12.9 3.7 16.4 25.3 35.0 33.2
NWD-RKA R-50 23.4 53.5 16.8 8.7 23.8 28.5 36.0 6.9
DNTR R-50 26.2 56.7 20.2 12.8 26.4 31.0 37.0 7.6

Table 2. Training Set: Visdrone train set, Validation Set: Visdrone val set, 12 epochs,

Method Backbone AP AP50 AP75
DNTR R-50 34.4 57.9 35.3
UFPMP w/o DN-FPN R-50 36.6 62.4 36.7
UFPMP w/ DN-FPN R-50 37.8 62.7 38.6

Note

If you want to run other baseline method, please replace /mmdet/models/detectors/two_stage.py with mmdet/models/detectors/two_stage.py For example: Faster R-CNN: python tools/train.py configs/aitod-dntr/aitod_faster_r50_dntr_1x.py

Citation

@ARTICLE{10518058, author={Liu, Hou-I and Tseng, Yu-Wen and Chang, Kai-Cheng and Wang, Pin-Jyun and Shuai, Hong-Han and Cheng, Wen-Huang}, journal={IEEE Transactions on Geoscience and Remote Sensing}, title={A DeNoising FPN With Transformer R-CNN for Tiny Object Detection}, year={2024}, volume={62}, number={}, pages={1-15}, }

About

A DeNoising FPN with Transformer R-CNN for Tiny Object Detection

License:Apache License 2.0


Languages

Language:Jupyter Notebook 83.4%Language:Python 16.4%Language:Shell 0.1%