Skip to content

Commit

Permalink
Inside Ultralytics video https://youtu.be/Zgi9g1ksQHc (ultralytics#5546)
Browse files Browse the repository at this point in the history
* Update detect.py Usage examples

* Inside Ultralytics at https://youtu.be/Zgi9g1ksQHc
  • Loading branch information
glenn-jocher authored Nov 6, 2021
1 parent b9142d6 commit 6dfed29
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and

```bash
$ python detect.py --source 0 # webcam
file.jpg # image
file.mp4 # video
img.jpg # image
vid.mp4 # video
path/ # directory
path/*.jpg # glob
'https://youtu.be/NUsoVlDFqZg' # YouTube
'https://youtu.be/Zgi9g1ksQHc' # YouTube
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
```

Expand Down
8 changes: 7 additions & 1 deletion detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
Run inference on images, videos, directories, streams, etc.
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
Expand Down
6 changes: 3 additions & 3 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@
"\n",
"```shell\n",
"python detect.py --source 0 # webcam\n",
" file.jpg # image \n",
" file.mp4 # video\n",
" img.jpg # image \n",
" vid.mp4 # video\n",
" path/ # directory\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",
"```"
]
Expand Down

0 comments on commit 6dfed29

Please sign in to comment.