[Docs] Add model inference in yolov5_tutorial.md (#31)

* Add model inference in yolov5_tutorial.md

* Update yolov5_tutorial.md

Add result image
pull/34/head
Range King 2022-09-19 09:12:13 +08:00 committed by GitHub
parent cb2a9f2fc3
commit 8aa107ca85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -155,3 +155,14 @@ python tools/train.py configs/yolov5/yolov5_s-v61_syncbn_fast_1xb4-300e_balloon.
```
![](https://cdn.vansin.top/img/20220913213221.png)
### 模型推理
```shell
python tools/test.py configs/yolov5/yolov5_s-v61_syncbn_fast_1xb4-300e_balloon.py work_dirs/yolov5_s-v61_syncbn_fast_1xb4-300e_balloon/epoch_300.pth --show-dir show_results
```
运行以上推理命令,推理结果图片会自动保存至 `work_dirs/yolov5_s-v61_syncbn_fast_1xb4-300e_balloon/{timestamp}/show_results` 文件夹中。下面为其中一张结果图片,左图为实际标注,右图为模型推理结果。
![result_img](https://user-images.githubusercontent.com/27466624/190913272-f99709e5-c798-46b8-aede-30f4e91683a3.jpg)