• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

zhanghengdev/MutualGuide: Localize to Classify and Classify to Localize: Mutual ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

zhanghengdev/MutualGuide

开源软件地址(OpenSource Url):

https://github.com/zhanghengdev/MutualGuide

开源编程语言(OpenSource Language):

Python 98.3%

开源软件介绍(OpenSource Introduction):

Introduction

MutualGuide is a compact object detector specially designed for edge computing devices. Comparing to existing detectors, this repo contains two key features.

Firstly, the Mutual Guidance mecanism assigns labels to the classification task based on the prediction on the localization task, and vice versa, alleviating the misalignment problem between both tasks; Secondly, the teacher-student prediction disagreements guides the knowledge transfer in a feature-based detection distillation framework, thereby reducing the performance gap between both models.

For more details, please refer to our ACCV paper and BMVC paper.

Planning

  • Train medium and large models.
  • Add SIOU loss.
  • Add CspDarknet backbone.
  • Add RepVGG backbone.
  • Add ShuffleNetV2 backbone.
  • Add SwinTransformer backbone.
  • Add TensorRT transform code for inference acceleration.
  • Add vis function to plot detection results.
  • Add custom dataset training (annotations in XML format).

Benchmark

Backbone Size APval
0.5:0.95
APval
0.5
APval
0.75
APval
small
APval
medium
APval
large
Params
(M)
FLOPs
(G)
Speed
(ms)
cspdarknet-0.75 640x640 43.0 61.1 46.2 24.2 50.0 59.9 24.32 24.02 11.4(3060)
cspdarknet-0.5 640x640 40.4 58.4 43.3 21.0 46.4 58.0 17.40 12.67 6.5(3060)
resnet18 640x640 40.4 58.5 43.3 19.9 46.5 58.9 22.09 22.95 8.5(3060)
repvgg-A0 640x640 39.9 58.2 42.5 20.3 46.1 57.9 12.30 18.40 7.5(3060)
shufflenet-1.5 640x640 35.7 53.9 37.9 16.5 41.3 53.5 2.55 2.65 5.6(3060)
shufflenet-1.0 640x640 31.8 49.0 33.1 13.6 35.8 48.4 1.50 1.47 5.4(3060)

Remarks:

  • The precision is measured on the COCO2017 Val dataset.
  • The inference runtime is measured by Pytorch framework (without TensorRT acceleration) on a GTX 3060 GPU, and the post-processing time (e.g., NMS) is not included (i.e., we measure the model inference time).
  • To dowload from Baidu cloud, go to this link (password: mugu).

Datasets

First download the COCO2017 dataset, you may find the sripts in data/scripts/ helpful. Then modify the parameter self.root in data/coco.py to the path of COCO dataset:

self.root = os.path.join("/home/heng/Documents/Datasets/", "COCO/")

Remarks:

  • For training on custom dataset, first modify the dataset path and categories XML_CLASSES in data/xml_dataset.py. Then apply --dataset XML.

Training

For training with Mutual Guide:

$ python3 train.py --neck ssd --backbone vgg16    --dataset COCO
                          fpn            resnet34           VOC
                          pafpn          repvgg-A2          XML
                                         cspdarknet-0.75
                                         shufflenet-1.0
                                         swin-T

For knowledge distillation using PDF-Distil:

$ python3 distil.py --neck ssd --backbone vgg11    --dataset COCO  --kd pdf
                           fpn            resnet18           VOC
                           pafpn          repvgg-A1          XML
                                          cspdarknet-0.5
                                          shufflenet-0.5

Remarks:

  • For training without MutualGuide, just use the --mutual_guide False;
  • For training on custom dataset, convert your annotations into XML format and use the parameter --dataset XML. An example is given in datasets/XML/;
  • For knowledge distillation with traditional MSE loss, just use parameter --kd mse;
  • The default folder to save trained model is weights/.

Evaluation

Every time you want to evaluate a trained network:

$ python3 test.py --neck ssd --backbone vgg11    --dataset COCO --trained_model path_to_saved_weights --vis
                         fpn            resnet18           VOC
                         pafpn          repvgg-A1          XML
                                        cspdarknet-0.5
                                        shufflenet-0.5

Remarks:

  • It will directly print the mAP, AP50 and AP50 results on COCO2017 Val;
  • Add parameter --vis to draw detection results. They will be saved in vis/VOC/ or vis/COCO/ or vis/XML/;

Citing us

Please cite our papers in your publications if they help your research:

@InProceedings{Zhang_2020_ACCV,
    author    = {Zhang, Heng and Fromont, Elisa and Lefevre, Sebastien and Avignon, Bruno},
    title     = {Localize to Classify and Classify to Localize: Mutual Guidance in Object Detection},
    booktitle = {Proceedings of the Asian Conference on Computer Vision (ACCV)},
    month     = {November},
    year      = {2020}
}

@InProceedings{Zhang_2021_BMVC,
    author    = {Zhang, Heng and Fromont, Elisa and Lefevre, Sebastien and Avignon, Bruno},
    title     = {PDF-Distil: including Prediction Disagreements in Feature-based Distillation for object detection},
    booktitle = {Proceedings of the British Machine Vision Conference (BMVC)},
    month     = {November},
    year      = {2021}
}

Acknowledgement

This project contains pieces of code from the following projects: ssd.pytorch, rfbnet, mmdetection and yolox.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mustafasaaed/Angular-Localization发布时间:2022-08-16
下一篇:
comprobo18/robot_localization: This is the base repo for the Olin Computational ...发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap