yash42828 / YOLO-object-detection-with-OpenCV

Object detection using YOLO object detector
105 stars 74 forks source link

YOLO-object-detection-with-OpenCV

Object detection using YOLO object detector

Detect objects in both images and video streams using Deep Learning, OpenCV, and Python.

I’ll be using YOLOv3 in this project, in particular, YOLO trained on the COCO dataset.

The COCO dataset consists of 80 labels, including, but not limited to:

You can find a full list of what YOLO trained on the COCO dataset can detect using this link.

YOLO object detection in images

Installation

To Run the project

Screenshots

Image

Here you can see that YOLO has not only detected each person in the input image, but also the suitcases as well!

Furthermore, if you take a look at the right corner of the image you’ll see that YOLO has also detected the handbag on the lady’s shoulder.

YOLO is able to correctly detect each of the players on the pitch, including the soccer ball itself. Notice the person in the background who is detected despite the area being highly blurred and partially obscured.

YOLO object detection in video streams

Installation

To Run the project

Screenshots

In the video/GIF, you can see not only the vehicles being detected, but people, as well as the traffic lights, are detected too!

The YOLO object detector is performing quite well here.

Limitation:

Arguably the largest limitation and drawback of the YOLO object detector is that:

The YOLO object detector divides an input image into an SxS grid where each cell in the grid predicts only a single object. If there exist multiple, small objects in a single cell then YOLO will be unable to detect them, ultimately leading to missed object detections. Therefore, if you know your dataset consists of many small objects grouped close together then you should not use the YOLO object detector.

In terms of small objects, Faster R-CNN tends to work the best; however, it’s also the slowest.

SSDs can also be used here; however, SSDs can also struggle with smaller objects (but not as much as YOLO).

SSDs often give a nice tradeoff in terms of speed and accuracy as well.

Real-time object detection with deep learning and OpenCV

Installation

To Run the project

Screenshots

Notice how our deep learning object detector can detect not only a person, but also the sofa and the chair next to person — all in real-time!

Just follow☝️ me and Star⭐ my repository