Ultralytics's YOLO CLI allows convenient execution of object detection on images and videos.
First, open the project in GitHub Codespaces by clicking here. Then, follow the steps below.
Note: GitHub Codespaces are free for a limited time (180 hours). When not in use, an active Codespace should be stopped or deleted. You can manage your GitHub Codespaces by clicking here.
Use yt-dlp
to retrieve a video from YouTube or a supported source. In the example, a video named cars.mp4
is downloaded:
yt-dlp -o cars.mp4 https://youtu.be/CftLBPI1Ga4
Note: Alternatively, a local video can be uploaded via Drag & Drop.
Use yolo
to perform object detection on the video cars.mp4
:
yolo predict model=yolov8n-seg.pt source='cars.mp4'
Note: The annotated video file is located in the
/runs/predict/predict{n}/
folder.
Options:
model
: Specifies the YOLO model for object detection. For a list of available models, see here.source
: Specifies the video source, which can be an image or video file.
Thank you for your message! Please fill out a bug report.
This project is licensed under the European Union Public License 1.2.