This repository provides a Python-based, GPU-accelerated real-time object detection pipeline using Ultralytics’ YOLOv8 and OpenCV.
It captures webcam input, detects objects in each frame, draws bounding boxes with confidence scores, and displays the real-time annotated video feed.
Steps to follow:
- Clone this repo and go to the project:
git clone https://github.com/lakhmanisahil/object_detection.git
cd object_detection
- Install dependencies:
pip install --upgrade pip
pip install -r requirements.txt
- Running this script:
- Ensure your webcam is plugged in and recognized (check ls /dev/video* on Linux or Device Manager on Windows).
- Run:
python main.py
- A window titled “Real-Time Detection” will open. Bounding boxes with [class_name] [confidence] will appear on each detected object. Press q to quit cleanly.