From 453054f52751652fd09d54b48e5abc2940e233c5 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Wed, 20 Mar 2019 11:56:24 +0800 Subject: [PATCH] fixed some typo and added infer time --- fluid/PaddleCV/yolov3/README.md | 23 ++++++++++++++++------- fluid/PaddleCV/yolov3/README_cn.md | 25 ++++++++++++++++++------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/fluid/PaddleCV/yolov3/README.md b/fluid/PaddleCV/yolov3/README.md index be2d8ea1..23b69d32 100644 --- a/fluid/PaddleCV/yolov3/README.md +++ b/fluid/PaddleCV/yolov3/README.md @@ -87,14 +87,14 @@ To train the model, [cocoapi](https://github.com/cocodataset/cocoapi) is needed. **model configuration:** -* The model uses 9 anchors generated based on the COCO dataset, which are (10x13), (16x30), (33x23), (30x61), (62x45), (59x119), (116x90), (156x198), (373x326). +* The model uses 9 anchors generated based on the COCO dataset, which are 10x13, 16x30, 33x23, 30x61, 62x45, 59x119, 116x90, 156x198, 373x326. -* NMS threshold=0.7, NMS valid=0.1 nms_topk=400, nms_posk=100 +* NMS threshold=0.45, NMS valid=0.005 nms_topk=400, nms_posk=100 **training strategy:** * Use momentum optimizer with momentum=0.9. -* In first 1000 iteration, the learning rate increases linearly from 0.0 to 0.01. Then lr is decayed at 450000, 500000 iteration with multiplier 0.1, 0.01. The maximum iteration is 500000. +* In first 4000 iteration, the learning rate increases linearly from 0.0 to 0.01. Then lr is decayed at 450000, 500000 iteration with multiplier 0.1, 0.01. The maximum iteration is 500000. Training result is shown as below:

@@ -116,11 +116,11 @@ Evaluation is to evaluate the performance of a trained model. This sample provid Evalutaion result is shown as below: -| mAP |IoU=0.50:0.95 | IoU=0.50 | IoU=0.75 | +| input size | mAP(IoU=0.50:0.95) | mAP(IoU=0.50) | mAP(IoU=0.75) | | :------: | :------: | :------: | :------: | -| input size=608x608| 37.7 | 59.8 | 40.8 | -| input size=416x416 | 36.5 | 58.2 | 39.1 | -| input size=320x320 | 34.1 | 55.4 | 36.3 | +| 608x608| 37.7 | 59.8 | 40.8 | +| 416x416 | 36.5 | 58.2 | 39.1 | +| 320x320 | 34.1 | 55.4 | 36.3 | ## Inference and Visualization @@ -133,6 +133,15 @@ Inference is used to get prediction score or image features based on trained mod --image_name=000000000139.jpg \ --draw_threshold=0.5 +Inference speed: + +| input size | infer speed | +| :------: | :------: | +| 608x608| 50 ms/frame | +| 416x416 | 29 ms/frame | +| 320x320 | 24 ms/frame | + + Visualization of infer result is shown as below:

diff --git a/fluid/PaddleCV/yolov3/README_cn.md b/fluid/PaddleCV/yolov3/README_cn.md index 5be4382f..8e62a3f3 100644 --- a/fluid/PaddleCV/yolov3/README_cn.md +++ b/fluid/PaddleCV/yolov3/README_cn.md @@ -89,13 +89,13 @@ YOLOv3 的网络结构由基础特征提取网络、multi-scale特征融合层 **模型设置:** -* 模型使用了基于COCO数据集生成的9个先验框:(10x13),(16x30),(33x23),(30x61),(62x45),(59x119),(116x90),(156x198),(373x326) -* 检测过程中,nms_topk=400, nms_posk=100,nms_thresh=0.4 +* 模型使用了基于COCO数据集生成的9个先验框:10x13,16x30,33x23,30x61,62x45,59x119,116x90,156x198,373x326 +* 检测过程中,nms_topk=400, nms_posk=100,nms_thresh=0.45 **训练策略:** * 采用momentum优化算法训练YOLOv3,momentum=0.9。 -* 学习率采用warmup算法,前1000轮学习率从0.0线性增加至0.01。在400000,450000轮时使用0.1,0.1乘子进行学习率衰减,最大训练500000轮。 +* 学习率采用warmup算法,前4000轮学习率从0.0线性增加至0.01。在400000,450000轮时使用0.1,0.01乘子进行学习率衰减,最大训练500000轮。 下图为模型训练结果:

@@ -117,11 +117,13 @@ Train Loss 模型评估结果: -| mAP |IoU=0.50:0.95 | IoU=0.50 | IoU=0.75 | +| input size | mAP(IoU=0.50:0.95) | mAP(IoU=0.50) | mAP(IoU=0.75) | | :------: | :------: | :------: | :------: | -| input size=608x608| 37.7 | 59.8 | 40.8 | -| input size=416x416 | 36.5 | 58.2 | 39.1 | -| input size=320x320 | 34.1 | 55.4 | 36.3 | +| 608x608| 37.7 | 59.8 | 40.8 | +| 416x416 | 36.5 | 58.2 | 39.1 | +| 320x320 | 34.1 | 55.4 | 36.3 | + + ## 模型推断及可视化 @@ -134,6 +136,14 @@ Train Loss --image_name=000000000139.jpg \ --draw_threshold=0.5 +模型预测速度: + +| input size | infer speed | +| :------: | :------: | +| 608x608| 50 ms/frame | +| 416x416 | 29 ms/frame | +| 320x320 | 24 ms/frame | + 下图为模型可视化预测结果:

@@ -143,3 +153,4 @@ Train Loss YOLOv3 预测可视化

+ -- GitLab