/Picodet_Pytorch

Primary LanguagePythonApache License 2.0Apache-2.0

PP-PicoDet: A Better Real-Time Object Detector on Mobile Devices

Introduction

@article{picodet,
  title={{PP-PicoDet}: A Better Real-Time Object Detector on Mobile Devices},
  author={Guanghua Yu, Qinyao Chang, Wenyu Lv, Chang Xu, Cheng Cui, Wei Ji, Qingqing Dang, Kaipeng Deng, Guanzhong Wang, Yuning Du, Baohua Lai, Qiwen Liu, Xiaoguang Hu, Dianhai Yu, Yanjun Ma},
  journal={arXiv preprint arXiv:2111.00902},
  year={2021}
}

Backbone Pretrained Weights

Results and Models

Bakcbone size box AP(ppdet) Config Download
picodet-s 320 26.9(27.1) config model | log
picodet-s 416 30.6(30.6) config model | log
picodet-m 416 34.2(34.3) config model | log
picodet-l 640 40.4(40.9) config model | log

Usage

Install MMdetection

Our implementation is based on mmdetection. Install mmdetection according to INSTALL

Note: Make sure your mmcv-full version is consistency with mmdet version(we use mmcv==1.4.0)

Train

  1. Download pretrained backbone using the link above

  2. training

bash tools/dist_train.sh ./configs/picodet/picodet_s_320_coco.py 4

Test

bash tools/dist_test.sh $CONFIG_PATH $TRAINED_MODEL_PATH $GPU_NUMS --eval bbox

eg. use picodet-s 320 pretrianed model
bash tools/dist_test.sh ./configs/picodet/picodet_s_320_coco.py $MODEL_DIR/picodet_s_320.26.9.pth 8 --eval bbox

Evaluating bbox...
Loading and preparing results...
DONE (t=1.76s)
creating index...
index created!
Running per image evaluation...
Evaluate annotation type *bbox*
DONE (t=43.50s).
Accumulating evaluation results...
DONE (t=14.63s).

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.269
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=1000 ] = 0.408
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=1000 ] = 0.279
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.076
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.269
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.462
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.421
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=300 ] = 0.421
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=1000 ] = 0.421
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.138
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.470
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.684

Deploy

TODO:

  • mnn deploy