Object detection using YOLO object detector
I'll use YOLOv3 in this project, in particular, YOLO trained on the COCO dataset.
The COCO dataset consists of 80 labels, including, but not limited to:
- People
- Bicycles
- Cars and trucks
- Airplanes
- Stop signs and fire hydrants
- Animals, including cats, dogs, birds, horses, cows, and sheep, to name a few
- Kitchen and dining objects, such as wine glasses, cups, forks, knives, spoons, etc. …and much more!
You can find the full list of what YOLO trained on the COCO dataset can detect using this link.
-
yolo-coco : The YOLOv3 object detector pre-trained (on the COCO dataset) model files. These were trained by the Darknet team.
-
yolo-coco/yolov3.weights : You can download yolov3.weights here
pip install numpy
pip install opencv-python
python yolo.py --image images/baggage_claim.jpg
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 can notice that YOLO has also detected the handbag on the lady’s shoulder.
YOLO can detect each of the players on the pitch correctly, including the soccer ball itself. Notice the person in the background who is detected despite the area being highly blurred and partially obscured.