diff --git a/README.md b/README.md index f23075d846b078d976fb51a9ca5f4f6843f26a1f..6755b510b421ddf81eb15a4d538fe4759c569f42 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ - [车辆检测预训练模型](docs/featured_model/CONTRIB_cn.md) - [Objects365 2019 Challenge夺冠模型](docs/featured_model/CACascadeRCNN.md) - [Open Images 2019-Object Detction比赛最佳单模型](docs/featured_model/OIDV5_BASELINE_MODEL.md) +- [服务器端实用目标检测模型](configs/rcnn_enhance/README.md): V100上速度20FPS时,COCO mAP高达47.8%。 ## 许可证书 diff --git a/README_en.md b/README_en.md index 9b7f12c686bd5a976b2ecca510d04966aaf88b61..597d83b08ced91be03be9523180adf9d083469be 100644 --- a/README_en.md +++ b/README_en.md @@ -136,6 +136,7 @@ The following is the relationship between COCO mAP and FPS on Tesla V100 of repr - [YOLOv3 enhanced model](docs/featured_model/YOLOv3_ENHANCEMENT.md): Compared to MAP of 33.0% in paper, enhanced YOLOv3 reaches the MAP of 43.6%, and inference speed is improved as well - [Objects365 2019 Challenge champion model](docs/featured_model/CACascadeRCNN.md) - [Best single model of Open Images 2019-Object Detction](docs/featured_model/OIDV5_BASELINE_MODEL.md) +- [Practical Server-side detection method](configs/rcnn_enhance/README_en.md): Inference speed on single V100 GPU can reach 20FPS when COCO mAP is 47.8%. ## License diff --git a/configs/rcnn_enhance/README.md b/configs/rcnn_enhance/README.md new file mode 100644 index 0000000000000000000000000000000000000000..44f9ba043419a7d1cd00241ba035f5027bba49c5 --- /dev/null +++ b/configs/rcnn_enhance/README.md @@ -0,0 +1,36 @@ +## 服务器端实用目标检测方案(Practical Server-side detection, PSS-DET) + +### 简介 + +* 近年来,学术界和工业界广泛关注图像中目标检测任务。基于[PaddleClas](https://github.com/PaddlePaddle/PaddleClas)中SSLD蒸馏方案训练得到的ResNet50_vd预训练模型(ImageNet1k验证集上Top1 Acc为82.39%),结合PaddleDetection中的丰富算子,飞桨提供了一种面向服务器端实用的目标检测方案PSS-DET(Practical Server Side Detection)。基于COCO2017目标检测数据集,V100单卡预测速度为为61FPS时,COCO mAP可达41.6%;预测速度为20FPS时,COCO mAP可达47.8%。 + +* 以标准的Faster RCNN ResNet50_vd FPN为例,下表给出了PSS-DET不同的模块的速度与精度收益。 + +| Trick | Train scale | Test scale | COCO mAP | Infer speed/FPS | +|- |:-: |:-: | :-: | :-: | +| `baseline` | 640x640 | 640x640 | 36.4% | 43.589 | +| +`test proposal=pre/post topk 500/300` | 640x640 | 640x640 | 36.2% | 52.512 | +| +`fpn channel=64` | 640x640 | 640x640 | 35.1% | 67.450 | +| +`ssld pretrain` | 640x640 | 640x640 | 36.3% | 67.450 | +| +`ciou loss` | 640x640 | 640x640 | 37.1% | 67.450 | +| +`DCNv2` | 640x640 | 640x640 | 39.4% | 60.345 | +| +`3x, multi-scale training` | 640x640 | 640x640 | 41.0% | 60.345 | +| +`auto augment` | 640x640 | 640x640 | 41.4% | 60.345 | +| +`libra sampling` | 640x640 | 640x640 | 41.6% | 60.345 | + + +基于该实验结论,PaddleDetection结合Cascade RCNN,使用更大的训练与评估尺度(1000x1500),最终在单卡V100上速度为20FPS,COCO mAP达47.8%。下图给出了目前类似速度的目标检测方法的速度与精度指标。 + + +![pssdet](../../docs/images/pssdet.png) + +**注意** +> 这里为了更方便地对比,统一将V100的预测耗时乘以1.2倍,近似转化为Titan V的预测耗时。 + + +## 模型库 + +| 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 |推理时间(fps) | Box AP | Mask AP | 下载 | 配置文件 | +| :---------------------- | :-------------: | :-------: | :-----: | :------------: | :----: | :-----: | :-------------: | :-----: | +| ResNet50-vd-FPN-Dcnv2 | Faster | 2 | 3x | 61.425 | 41.6 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | +| ResNet50-vd-FPN-Dcnv2 | Cascade Faster | 2 | 3x | 20.001 | 47.8 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | diff --git a/configs/rcnn_enhance/README_en.md b/configs/rcnn_enhance/README_en.md new file mode 100644 index 0000000000000000000000000000000000000000..4add4dcef58283666b60874f34fb9d060863f794 --- /dev/null +++ b/configs/rcnn_enhance/README_en.md @@ -0,0 +1,40 @@ +# Practical Server-side detection method base on RCNN + +## Introduction + + +* In recent years, object detection tasks have attracted widespread attention. [PaddleClas](https://github.com/PaddlePaddle/PaddleClas) open-sourced the ResNet50_vd_SSLD pretrained model based on ImageNet(Top1 Acc 82.4%). And based on the pretrained model, PaddleDetection provided the PSS-DET (Practical Server-side detection) with the help of the rich operators in PaddleDetection. The inference speed can reach 61FPS on single V100 GPU when COCO mAP is 41.6%, and 20FPS when COCO mAP is 47.8%. + +* We take the standard `Faster RCNN ResNet50_vd FPN` as an example. The following table shows ablation study of PSS-DET. + +| Trick | Train scale | Test scale | COCO mAP | Infer speed/FPS | +|- |:-: |:-: | :-: | :-: | +| `baseline` | 640x640 | 640x640 | 36.4% | 43.589 | +| +`test proposal=pre/post topk 500/300` | 640x640 | 640x640 | 36.2% | 52.512 | +| +`fpn channel=64` | 640x640 | 640x640 | 35.1% | 67.450 | +| +`ssld pretrain` | 640x640 | 640x640 | 36.3% | 67.450 | +| +`ciou loss` | 640x640 | 640x640 | 37.1% | 67.450 | +| +`DCNv2` | 640x640 | 640x640 | 39.4% | 60.345 | +| +`3x, multi-scale training` | 640x640 | 640x640 | 41.0% | 60.345 | +| +`auto augment` | 640x640 | 640x640 | 41.4% | 60.345 | +| +`libra sampling` | 640x640 | 640x640 | 41.6% | 60.345 | + + +And the following figure shows `mAP-Speed` curves for some common detectors. + + +![pssdet](../../docs/images/pssdet.png) + + +**Note** +> For fair comparison, inference time for PSS-DET models on V100 GPU is transformed to Titan V GPU by multiplying by 1.2 times. + + + + +## Model Zoo + +| Backbone | Type | Image/gpu | Lr schd | Inf time (fps) | Box AP | Mask AP | Download | Configs | +| :---------------------- | :-------------: | :-------: | :-----: | :------------: | :----: | :-----: | :----------------------------------------------------------: | :-----: | +| ResNet50-vd-FPN-Dcnv2 | Faster | 2 | 3x | 61.425 | 41.6 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | +| ResNet50-vd-FPN-Dcnv2 | Cascade Faster | 2 | 3x | 20.001 | 47.8 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | diff --git a/configs/rcnn_server_side_det/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml b/configs/rcnn_enhance/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml similarity index 100% rename from configs/rcnn_server_side_det/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml rename to configs/rcnn_enhance/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml diff --git a/configs/rcnn_server_side_det/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml b/configs/rcnn_enhance/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml similarity index 100% rename from configs/rcnn_server_side_det/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml rename to configs/rcnn_enhance/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml diff --git a/configs/rcnn_server_side_det/README.md b/configs/rcnn_server_side_det/README.md deleted file mode 100644 index c53d523c8144a370295d20084736458425414683..0000000000000000000000000000000000000000 --- a/configs/rcnn_server_side_det/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Practical Server-side detection method base on RCNN - -## Introduction - -* This is developed by PaddleDetection. Many useful tricks are utilized for the model training process. More details can be seen in the configuration file. - - -## Model Zoo - -| Backbone | Type | Image/gpu | Lr schd | Inf time (fps) | Box AP | Mask AP | Download | Configs | -| :---------------------- | :-------------: | :-------: | :-----: | :------------: | :----: | :-----: | :----------------------------------------------------------: | :-----: | -| ResNet50-vd-FPN-Dcnv2 | Faster | 2 | 3x | 61.425 | 41.6 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/faster_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | -| ResNet50-vd-FPN-Dcnv2 | Cascade Faster | 2 | 3x | 20.001 | 47.8 | - | [model](https://paddlemodels.bj.bcebos.com/object_detection/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.tar) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/rcnn_server_side_det/cascade_rcnn_dcn_r50_vd_fpn_3x_server_side.yml) | diff --git a/docs/images/pssdet.png b/docs/images/pssdet.png new file mode 100644 index 0000000000000000000000000000000000000000..e3b213eeae1209273435951b843f60dd8c478090 Binary files /dev/null and b/docs/images/pssdet.png differ