All You Need To Know About YOLO Algorithm For Object Detection | Easy Steps

YOLO Algorithm for Object Detection

Content

Introduction to Yolo Algorithm

During the last few years, there has been a rapid and successful expansion of computer vision techniques. One area that has attained great progress is real time Object Detection. Then the first YOLO Algorithm model was introduced by Joseph Redmon et all in the research paper titled “You Look Only Once: Unified, Real-Time Object Detection” in 2015.

You only look once(YOLO) is a real time object detection system. It is an algorithm that uses convolutional neural networks. This algorithm is popular because of its speed and accuracy. This article introduces the YOLO algo and explains how it works.

It also includes how to use a pre-trained YOLO algorithm for real-time Object Detection but firstly a brief introduction to Object detection.

Object Detection

Object detection is one of a computer vision techniques that is used to identify and locate objects in images, videos, and live streams as well. It draws bounding boxes including confidences within the detected objects.

Object detection

What is YOLO Algorithm

YOLO is a convolutional neural network for object detection. This applies a single neural network to the full image and then divides the image into regions then do the prediction for bounding boxes and probabilities for each region. It requires only one forward propagation pass through the neural network to make predictions.

After non-max suppression which makes sure that the YOLO object detection algorithm only detects each object once, then the outputs recognized objects together with bounding boxes. YOLO takes an image and splits it into an SxS grid. Each of these N grids is responsible for the detection and localization of the object it contains.

All You Need To Know About YOLO Algorithm For Object Detection | Easy Steps Tezeract

YOLO algorithm is a single-stage detector. In general, single stage detectors are less accurate than two-stage detectors but are significantly faster. YOLO object detector is capable of real-time object detection obtaining 45 FPS on a GPU. A smaller variant called Fast YOLO claims to achieve 155 FPS on a GPU.

YOLO is trained on the COCO dataset. The dataset consists of 80 labels, Some are:

  • People
  • Bicycles
  • Cars and trucks
  • Airplanes
  • Benches
  • And much more!

You can find a full list of the objects which are present in the COCO dataset.

How YOLO Algorithm for Object Detection Works

If you don’t already have Darknet installed, you have to do it first by running the command:

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

installing darknet

After that go to the darknet folder by typing cd darknet

going to darknet folder

After then type make

make command

Now you have the config file for YOLO in the cfg subdirectory. Download the pre-trained weights file using wget https://pjreddie.com/media/files/yolov3.weights in the terminal.

downloading file

Put your image in the data folder and run the detector by :

./darknet detect cfg/yolov3.cfg yolov3.weights data/image.jpg

putting image in data folder

Conclusion

This article has provided an overview of the what is YOLO algorithm and how to use YOLO for Object detection. YOLO also provides improved detection results compared to other object detection techniques such as Fast R-CNN and Retina-Net. We also got to know YOLO is very easy to use even for beginners. In the next part, we are going to know how to train the YOLO v3 object detector on a custom dataset.

Abdul Mannan

Abdul Mannan

AI Engineer

Share

Suggested Articles