This project uses YOLOv8 and OpenCV to perform real-time object detection with a webcam.
It detects objects like people, cars, animals, and more, and displays them on the screen with bounding boxes and labels.
- Real-time detection using your webcam
- YOLOv8 nano (
yolov8n.pt) pretrained model for fast performance - Displays detection boxes and confidence scores
- Can be modified to detect objects in images or video files
- Clone this repository:
git clone https://github.com/yourusername/object-detection.git
cd object-detection- Create a virtual environment:
python -m venv venv- Activate virtual environment:
venv\Scripts\activate- Install dependencies::
pip install ultralytics opencv-python- Run real-time webcam detection::
python main.py- Here are my screenshots showing detection results