This repository contains a Python program for object detection using the YOLO (You Only Look Once) model with OpenCV.
This project demonstrates object detection on an input image using the YOLOv3 model. The YOLO algorithm is known for its speed and accuracy in detecting objects in real-time. The program uses OpenCV to handle image processing and visualization tasks.
- Python 3.x
- OpenCV
- NumPy
-
Clone the repository:
git clone https://github.com/yourusername/yolo-object-detection.git cd yolo-object-detection
-
Install the required packages:
pip install opencv-python numpy
-
Download the YOLOv3 weights and configuration files:
-
Place the downloaded files (
yolov3.weights
,yolov3.cfg
, andcoco.names
) in the project directory.
-
Replace
sampleimage1.jpg
with your input image in the project directory. -
Run the program:
python yolo_object_detection.py
-
The program will display the input image with detected objects outlined with bounding boxes and labeled with class names.