From b8f979bafab6db020d86779b4b40619cd4d77d57 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 6 Nov 2021 20:34:54 +0100 Subject: [PATCH] Inside Ultralytics video https://youtu.be/Zgi9g1ksQHc (#5546) * Update detect.py Usage examples * Inside Ultralytics at https://youtu.be/Zgi9g1ksQHc --- README.md | 6 +++--- detect.py | 8 +++++++- tutorial.ipynb | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3e2f5b6..6e72d85 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/detect.py b/detect.py index 9527ae2..661a0b8 100644 --- a/detect.py +++ b/detect.py @@ -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 diff --git a/tutorial.ipynb b/tutorial.ipynb index 9184a66..b013fe6 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -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", "```" ]