Unverified 提交 b8f979ba authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Inside Ultralytics video https://youtu.be/Zgi9g1ksQHc (#5546)

* Update detect.py Usage examples * Inside Ultralytics at https://youtu.be/Zgi9g1ksQHc
上级 3f64ad17
...@@ -109,11 +109,11 @@ the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and ...@@ -109,11 +109,11 @@ the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and
```bash ```bash
$ python detect.py --source 0 # webcam $ python detect.py --source 0 # webcam
file.jpg # image img.jpg # image
file.mp4 # video vid.mp4 # video
path/ # directory path/ # directory
path/*.jpg # glob path/*.jpg # glob
'https://youtu.be/NUsoVlDFqZg' # YouTube 'https://youtu.be/Zgi9g1ksQHc' # YouTube
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
``` ```
......
...@@ -3,7 +3,13 @@ ...@@ -3,7 +3,13 @@
Run inference on images, videos, directories, streams, etc. Run inference on images, videos, directories, streams, etc.
Usage: Usage:
$ python path/to/detect.py --source path/to/img.jpg --weights yolov5s.pt --img 640 $ python path/to/detect.py --weights yolov5s.pt --source 0 # webcam
img.jpg # image
vid.mp4 # video
path/ # directory
path/*.jpg # glob
'https://youtu.be/Zgi9g1ksQHc' # YouTube
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
""" """
import argparse import argparse
......
...@@ -438,11 +438,11 @@ ...@@ -438,11 +438,11 @@
"\n", "\n",
"```shell\n", "```shell\n",
"python detect.py --source 0 # webcam\n", "python detect.py --source 0 # webcam\n",
" file.jpg # image \n", " img.jpg # image \n",
" file.mp4 # video\n", " vid.mp4 # video\n",
" path/ # directory\n", " path/ # directory\n",
" path/*.jpg # glob\n", " path/*.jpg # glob\n",
" 'https://youtu.be/NUsoVlDFqZg' # YouTube\n", " 'https://youtu.be/Zgi9g1ksQHc' # YouTube\n",
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n", " 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
"```" "```"
] ]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论