Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 3.24 KB

README.md

File metadata and controls

85 lines (57 loc) · 3.24 KB

The yolov code by MIT has been used for object detection with modifications.

PLease note:

  1. Download the pretrained weights of Yolov from the link below and place it in the yolov3-coco folder:

wget https://pjreddie.com/media/files/yolov3.weights

  1. Install darknet:

git clone https://github.com/pjreddie/darknet
cd darknet
make

Go to this link for further customizations : https://pjreddie.com/darknet/yolo/

  1. Open CV version must be 3.3 or higher (I am currently using version 4.1) To upgrade : pip install --upgrade opencv-python

Install numpy and other required dependencies. You are now ready to go!

YOLOv3-Object-Detection-with-OpenCV

This project implements an image and video object detection classifier using pretrained yolov3 models. The yolov3 models are taken from the official yolov3 paper which was released in 2018. The yolov3 implementation is from darknet. Also, this project implements an option to perform classification real-time using the webcam.

How to use?

  1. Clone the repository
git clone https://github.com/Sanskar777/elmart.git
  1. Move to the directory
cd elmart
  1. To infer on an image that is stored on your local machine
python3 yolo.py --image-path='/path/to/image/'
  1. To infer on a video that is stored on your local machine
python3 yolo.py --video-path='/path/to/video/'
  1. To infer real-time on webcam
python3 yolo.py

Note: This works considering you have the weights and config files at the yolov3-coco directory.
If the files are located somewhere else then mention the path while calling the yolov3.py. For more details

yolo.py --help

Inference on images

yolo_img_infer_1 yolo_img_infer_2 yolo_infer_3 yolo_img_infer_4

Inference on Video

yolov3-video Click on the image to Play the video on YouTube

Inference in Real-time

yolov3-video Click on the image to Play the video on YouTube

References

  1. PyImageSearch YOLOv3 Object Detection with OpenCV Blog

License

The code in this project is distributed under the MIT License.