Skip to content

Commit

Permalink
fix modelzoo and custom dataset docs error (PaddlePaddle#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
yghstill authored Jul 6, 2020
1 parent 79270ca commit 2a3cafd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/MODEL_ZOO.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ results of image size 608/416/320 above. Deformable conv is added on stage 5 of
| MobileNet_v1 | 300 | 64 | Cosine decay(40w) | - | 23.6 | [model](https://paddlemodels.bj.bcebos.com/object_detection/ssdlite_mobilenet_v1.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v1.yml) |
| MobileNet_v3 small | 320 | 64 | Cosine decay(40w) | - | 16.2 | [model](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small.yml) |
| MobileNet_v3 large | 320 | 64 | Cosine decay(40w) | - | 23.3 | [model](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_large.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_large.yml) |
| MobileNet_v3 large w/ FPN | 320 | 64 | Cosine decay(40w) | - | 18.9 | [model](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small_fpn.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small_fpn.yml) |
| MobileNet_v3 small w/ FPN | 320 | 64 | Cosine decay(40w) | - | 18.9 | [model](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small_fpn.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small_fpn.yml) |
| MobileNet_v3 large w/ FPN | 320 | 64 | Cosine decay(40w) | - | 24.3 | [model](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_large_fpn.pdparams) | [config](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_large_fpn.yml) |

**Notes:** `SSDLite` is trained in 8 GPU with total batch size as 512 and uses cosine decay strategy to train.
Expand Down
2 changes: 1 addition & 1 deletion docs/MODEL_ZOO_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Paddle提供基于ImageNet的骨架网络预训练模型。所有预训练模型
| MobileNet_v1 | 300 | 64 | Cosine decay(40w) | - | 23.6 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/ssdlite_mobilenet_v1.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v1.yml) |
| MobileNet_v3 small | 320 | 64 | Cosine decay(40w) | - | 16.2 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small.yml) |
| MobileNet_v3 large | 320 | 64 | Cosine decay(40w) | - | 23.3 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_large.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_large.yml) |
| MobileNet_v3 large w/ FPN | 320 | 64 | Cosine decay(40w) | - | 18.9 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small_fpn.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small_fpn.yml) |
| MobileNet_v3 small w/ FPN | 320 | 64 | Cosine decay(40w) | - | 18.9 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_small_fpn.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_small_fpn.yml) |
| MobileNet_v3 large w/ FPN | 320 | 64 | Cosine decay(40w) | - | 24.3 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/mobile_models/ssdlite_mobilenet_v3_large_fpn.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/configs/ssd/ssdlite_mobilenet_v3_large_fpn.yml) |

**注意事项:** SSDLite模型使用学习率余弦衰减策略在8卡GPU下总batch size为512。
Expand Down
26 changes: 12 additions & 14 deletions docs/tutorials/Custom_DataSet.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# 如何训练自定义数据集

## 目录
- [1.数据准备](#1.准备数据)
- [将数据集转换为COCO格式](#方式一:将数据集转换为COCO格式)
- [将数据集转换为VOC格式](#方式二:将数据集转换为VOC格式)
- [添加新数据源](#方式三:添加新数据源)
- [2.选择模型](#2.选择模型)
- [3.修改参数配置](#3.修改参数配置)
- [4.开始训练与部署](#4.开始训练与部署)
- [附:一个自定义数据集demo](#附:一个自定义数据集demo)
- [1.数据准备](#1准备数据)
- [将数据集转换为COCO格式](#方式一将数据集转换为COCO格式)
- [将数据集转换为VOC格式](#方式二将数据集转换为VOC格式)
- [添加新数据源](#方式三添加新数据源)
- [2.选择模型](#2选择模型)
- [3.修改参数配置](#3修改参数配置)
- [4.开始训练与部署](#4开始训练与部署)
- [附:一个自定义数据集demo](#附一个自定义数据集demo)

## 1.准备数据
如果数据符合COCO或VOC数据集格式,可以直接进入[2.选择模型](#2.选择模型),否则需要将数据集转换至COCO格式或VOC格式。
如果数据符合COCO或VOC数据集格式,可以直接进入[2.选择模型](#2选择模型),否则需要将数据集转换至COCO格式或VOC格式。

### 方式一:将数据集转换为COCO格式

Expand Down Expand Up @@ -86,7 +86,7 @@ PaddleDetection中提供了丰富的模型库,具体可在[模型库](../MODEL

选择好模型后,需要在`configs`目录中找到对应的配置文件,为了适配在自定义数据集上训练,需要对参数配置做一些修改:

- 数据路径配置: 在yaml配置文件中,依据[1.数据准备](#1.准备数据)中准备好的路径,配置`TrainReader``EvalReader``TestReader`的路径。
- 数据路径配置: 在yaml配置文件中,依据[1.数据准备](#1准备数据)中准备好的路径,配置`TrainReader``EvalReader``TestReader`的路径。
- COCO数据集:
```yaml
dataset:
Expand Down Expand Up @@ -124,7 +124,7 @@ PaddleDetection中提供了丰富的模型库,具体可在[模型库](../MODEL

## 附:一个自定义数据集demo

我们以`AI识虫数据集`为例,对自定义数据集上训练过程进行演示,该数据集提供了2183张图片,其中训练集1693张,验证集与测试集分别有245张,共包含7种昆虫。在AIStudio上有很多用户公开了此数据集,您可以进行搜索并下载,如:[链接1](https://aistudio.baidu.com/aistudio/datasetdetail/34213),[链接2](https://aistudio.baidu.com/aistudio/datasetdetail/19748)等。
我们以`AI识虫数据集`为例,对自定义数据集上训练过程进行演示,该数据集提供了2183张图片,其中训练集1693张,验证集与测试集分别有245张,共包含7种昆虫。下载链接为:[数据集链接](https://paddlemodels.bj.bcebos.com/insect.tar), 在AIStudio上也有很多用户公开了此数据集,您可以进行搜索并下载,如:[链接1](https://aistudio.baidu.com/aistudio/datasetdetail/34213),[链接2](https://aistudio.baidu.com/aistudio/datasetdetail/19748)等。

#### 第一步:准备数据

Expand Down Expand Up @@ -230,8 +230,6 @@ PaddleDetection中提供了丰富的模型库,具体可在[模型库](../MODEL
--use_gpu=True
```
预测结果如下图所示:
<div align="center">
<img src="docs/images/2572.jpeg" />
</div>
![](../images/2572.jpeg)

如仍有疑惑,欢迎给我们提issue。
13 changes: 3 additions & 10 deletions docs/tutorials/QUICK_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>

Result on VisualDL is shown below:

<div align="center">
<img src='../images/visualdl_fruit.jpg' width='800'>
</div>
![](../images/visualdl_fruit.jpg)

Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar)

Expand All @@ -65,13 +63,8 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \

Inference images are shown below:

<div align="center">
<img src='../../demo/orange_71.jpg' width='600'>
</div>
![](../../demo/orange_71.jpg)


<div align="center">
<img src='../images/orange_71_detection.jpg' width='600'>
</div>
![](../images/orange_71_detection.jpg)

For detailed infomation of training and evalution, please refer to [GETTING_STARTED.md](GETTING_STARTED.md).
15 changes: 3 additions & 12 deletions docs/tutorials/QUICK_STARTED_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>

VisualDL结果显示如下:


<div align="center">
<img src='../images/visualdl_fruit.jpg' width='800'>
</div>
![](../images/visualdl_fruit.jpg)

训练模型[下载链接](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar)

Expand All @@ -72,15 +69,9 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \

预测图片如下:

![](../../demo/orange_71.jpg)

<div align="center">
<img src='../../demo/orange_71.jpg' width='600'>
</div>


<div align="center">
<img src='../images/orange_71_detection.jpg' width='600'>
</div>
![](../images/orange_71_detection.jpg)


更多训练及评估流程,请参考[入门使用文档](GETTING_STARTED_cn.md)

0 comments on commit 2a3cafd

Please sign in to comment.