未验证 提交 29838a68 编写于 作者: Q qingqing01 提交者: GitHub

Add Python version description for ViualDL (#896)

上级 4d70d009
...@@ -20,6 +20,14 @@ python dataset/fruit/download_fruit.py ...@@ -20,6 +20,14 @@ python dataset/fruit/download_fruit.py
Training: Training:
```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml --eval
```
Use `yolov3_mobilenet_v1` to fine-tune the model from COCO dataset.
Meanwhile, loss and mAP can be observed on VisualDL by set `--use_vdl` and `--vdl_log_dir`. But note Python version required >= 3.5 for VisualDL.
```bash ```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--use_vdl=True \ --use_vdl=True \
...@@ -27,7 +35,7 @@ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ ...@@ -27,7 +35,7 @@ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--eval --eval
``` ```
Use `yolov3_mobilenet_v1` to fine-tune the model from COCO dataset. Meanwhile, loss and mAP can be observed on VisualDL. Then observe the loss and mAP curve through VisualDL command:
```bash ```bash
visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num> visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>
...@@ -35,7 +43,9 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num> ...@@ -35,7 +43,9 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>
Result on VisualDL is shown below: Result on VisualDL is shown below:
![visualdl_fruit.jpg](../images/visualdl_fruit.jpg) <div align="center">
<img src='../images/visualdl_fruit.jpg' width='800'>
</div>
Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar) Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar)
...@@ -55,8 +65,13 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \ ...@@ -55,8 +65,13 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \
Inference images are shown below: Inference images are shown below:
<div align="center">
<img src='../../demo/orange_71.jpg' width='600'>
</div>
![orange_71.jpg](../../demo/orange_71.jpg) <div align="center">
![orange_71_detection.jpg](../images/orange_71_detection.jpg) <img src='../images/orange_71_detection.jpg' width='600'>
</div>
For detailed infomation of training and evalution, please refer to [GETTING_STARTED.md](GETTING_STARTED.md). For detailed infomation of training and evalution, please refer to [GETTING_STARTED.md](GETTING_STARTED.md).
...@@ -22,6 +22,16 @@ python dataset/fruit/download_fruit.py ...@@ -22,6 +22,16 @@ python dataset/fruit/download_fruit.py
训练命令如下: 训练命令如下:
```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml --eval
```
训练使用`yolov3_mobilenet_v1`基于COCO数据集训练好的模型进行finetune。
如果想通过VisualDL实时观察loss和精度值,启动命令添加`--use_vdl=True`,以及通过`--vdl_log_dir`设置日志保存路径,但注意**VisualDL需Python>=3.5**
```bash ```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--use_vdl=True \ --use_vdl=True \
...@@ -29,7 +39,7 @@ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ ...@@ -29,7 +39,7 @@ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--eval --eval
``` ```
训练使用`yolov3_mobilenet_v1`基于COCO数据集训练好的模型进行finetune。训练期间可以通过VisualDL实时观察loss和精度值,启动命令如下 通过`visualdl`命令实时查看变化曲线
```bash ```bash
visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num> visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>
...@@ -38,7 +48,9 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num> ...@@ -38,7 +48,9 @@ visualdl --logdir vdl_fruit_dir/scalar/ --host <host_IP> --port <port_num>
VisualDL结果显示如下: VisualDL结果显示如下:
![](../images/visualdl_fruit.jpg) <div align="center">
<img src='../images/visualdl_fruit.jpg' width='800'>
</div>
训练模型[下载链接](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar) 训练模型[下载链接](https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar)
...@@ -61,7 +73,14 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \ ...@@ -61,7 +73,14 @@ python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \
预测图片如下: 预测图片如下:
![](../../demo/orange_71.jpg) <div align="center">
![](../images/orange_71_detection.jpg) <img src='../../demo/orange_71.jpg' width='600'>
</div>
<div align="center">
<img src='../images/orange_71_detection.jpg' width='600'>
</div>
更多训练及评估流程,请参考[入门使用文档](GETTING_STARTED_cn.md) 更多训练及评估流程,请参考[入门使用文档](GETTING_STARTED_cn.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册