glenn-jocher
commited on
Commit
•
b8f979b
1
Parent(s):
3f64ad1
Inside Ultralytics video https://youtu.be/Zgi9g1ksQHc (#5546)
Browse files* Update detect.py Usage examples
* Inside Ultralytics at https://youtu.be/Zgi9g1ksQHc
- README.md +3 -3
- detect.py +7 -1
- tutorial.ipynb +3 -3
README.md
CHANGED
@@ -109,11 +109,11 @@ the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and
|
|
109 |
|
110 |
```bash
|
111 |
$ python detect.py --source 0 # webcam
|
112 |
-
|
113 |
-
|
114 |
path/ # directory
|
115 |
path/*.jpg # glob
|
116 |
-
'https://youtu.be/
|
117 |
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
118 |
```
|
119 |
|
|
|
109 |
|
110 |
```bash
|
111 |
$ python detect.py --source 0 # webcam
|
112 |
+
img.jpg # image
|
113 |
+
vid.mp4 # video
|
114 |
path/ # directory
|
115 |
path/*.jpg # glob
|
116 |
+
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
117 |
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
118 |
```
|
119 |
|
detect.py
CHANGED
@@ -3,7 +3,13 @@
|
|
3 |
Run inference on images, videos, directories, streams, etc.
|
4 |
|
5 |
Usage:
|
6 |
-
$ python path/to/detect.py --
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
"""
|
8 |
|
9 |
import argparse
|
|
|
3 |
Run inference on images, videos, directories, streams, etc.
|
4 |
|
5 |
Usage:
|
6 |
+
$ python path/to/detect.py --weights yolov5s.pt --source 0 # webcam
|
7 |
+
img.jpg # image
|
8 |
+
vid.mp4 # video
|
9 |
+
path/ # directory
|
10 |
+
path/*.jpg # glob
|
11 |
+
'https://youtu.be/Zgi9g1ksQHc' # YouTube
|
12 |
+
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
13 |
"""
|
14 |
|
15 |
import argparse
|
tutorial.ipynb
CHANGED
@@ -438,11 +438,11 @@
|
|
438 |
"\n",
|
439 |
"```shell\n",
|
440 |
"python detect.py --source 0 # webcam\n",
|
441 |
-
"
|
442 |
-
"
|
443 |
" path/ # directory\n",
|
444 |
" path/*.jpg # glob\n",
|
445 |
-
" 'https://youtu.be/
|
446 |
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
447 |
"```"
|
448 |
]
|
|
|
438 |
"\n",
|
439 |
"```shell\n",
|
440 |
"python detect.py --source 0 # webcam\n",
|
441 |
+
" img.jpg # image \n",
|
442 |
+
" vid.mp4 # video\n",
|
443 |
" path/ # directory\n",
|
444 |
" path/*.jpg # glob\n",
|
445 |
+
" 'https://youtu.be/Zgi9g1ksQHc' # YouTube\n",
|
446 |
" 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream\n",
|
447 |
"```"
|
448 |
]
|