This project performs object detection on a video using YOLOv8 and OpenCV.
Install the required dependencies:
pip install ultralytics opencv-python numpy torch torchvision- Place your video file in the same directory as the script and name it
video.mp4or specify another path invideo_path. - Download a YOLOv8 pre-trained model (default:
yolov8n.pt) or just run script to install it. - Run the script:
python main.py- The output video with detections will be saved as
output.mp4.
python main.py