Home

Awesome

FGD

CVPR 2022 Paper: Focal and Global Knowledge Distillation for Detectors

Install MMDetection and MS COCO2017

Higher mmdet and mmcv-full version

Add and Replace the codes

Train

#single GPU
python tools/train.py configs/distillers/fgd/fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py

#multi GPU
bash tools/dist_train.sh configs/distillers/fgd/fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py 8

Transfer

# Tansfer the FGD model into mmdet model
python pth_transfer.py --fgd_path $fgd_ckpt --output_path $new_mmdet_ckpt

Test

#single GPU
python tools/test.py configs/retinanet/retinanet_r50_fpn_2x_coco.py $new_mmdet_ckpt --eval bbox

#multi GPU
bash tools/dist_test.sh configs/retinanet/retinanet_r50_fpn_2x_coco.py $new_mmdet_ckpt 8 --eval bbox

Results

ModelBackboneBaseline(mAP)+FGD(mAP)configweightcode
RetinaNetResNet-5037.440.7configbaiduwsfw
RetinaNetResNet-10138.941.7config
Faster RCNNResNet-5038.442.0configbaidudgpf
Faster RCNNResNet-10139.844.1config
RepPointsResNet-5038.642.0configbaiduqx5d
RepPointsResNet-10140.543.8config
FCOSResNet-5038.542.7configbaidusedt
MaskRCNNResNet-5039.242.1configbaidusv8m
GFLResNet-5040.243.5config
ModelBackboneBaseline(Mask mAP)+FGD(Mask mAP)configweightcode
SOLOResNet-5033.136.0config
MaskRCNNResNet-5035.437.8configbaidusv8m
StudentTeacherBaseline(mAP)+FGD(mAP)configweightcode
YOLOX-mYOLOX-l45.946.6configbaiduaf9g
  1. Please refer branch yolox

Citation

@inproceedings{yang2022focal,
  title={Focal and global knowledge distillation for detectors},
  author={Yang, Zhendong and Li, Zhe and Jiang, Xiaohu and Gong, Yuan and Yuan, Zehuan and Zhao, Danpei and Yuan, Chun},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={4643--4652},
  year={2022}
}

Acknowledgement

Our code is based on the project MMDetection.

Thanks to the work GCNet and mmetection-distiller.