C11240283S19

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

International Journal of Engineering and Advanced Technology (IJEAT)

ISSN: 2249-8958 (Online), Volume-8 Issue-3S, February 2019

Real-Time Object Detection with Yolo


Geethapriya. S, N. Duraimurugan, S.P. Chokkalingam
Abstract: The Objective is to detect of objects using You Only detecting objects using a regression algorithm. To get high
Look Once (YOLO) approach. This method has several accuracy and good predictions they have proposed YOLO
advantages as compared to other object detection algorithms. In algorithm in this paper [1]. Understanding of Object
other algorithms like Convolutional Neural Network, Fast-
Detection Based on CNN Family and YOLO, by Juan Du.
Convolutional Neural Network the algorithm will not look at the
image completely but in YOLO the algorithm looks the image In this paper, they generally explained about the object
completely by predicting the bounding boxes using convolutional detection families like CNN, R-CNN and compared their
network and the class probabilities for these boxes and detects the efficiency and introduced YOLO algorithm to increase the
image faster as compared to other algorithms. efficiency [2]. Learning to Localize Objects with Structured
Keyword: Convolutional Neural Network, Fast-Convolutional Output Regression, by Matthew B. Blaschko. This paper is
Neural Network, Bounding Boxes, YOLO. about Object Localization. In this, they used the Bounding
box method for localization of the objects to overcome the
I. INTRODUCTION drawbacks of the sliding window method [3].
Object detection is a technology that detects the semantic
objects of a class in digital images and videos. One of its III. WORKING OF YOLO ALGORITHM
real-time applications is self-driving cars. In this, our task is First, an image is taken and YOLO algorithm is applied.
to detect multiple objects from an image. The most common In our example, the image is divided as grids of 3x3
object to detect in this application is the car, motorcycle, and matrixes. We can divide the image into any number grids,
pedestrian. For locating the objects in the image we use depending on the complexity of the image. Once the image
Object Localization and have to locate more than one object is divided, each grid undergoes classification and
in real-time systems. There are various techniques for object localization of the object. The objectness or the confidence
detection, they can be split up into two categories, first is the score of each grid is found. If there is no proper object found
algorithms based on Classifications. CNN and RNN come in the grid, then the objectness and bounding box value of
under this category. In this, we have to select the interested the grid will be zero or if there found an object in the grid
regions from the image and have to classify them using then the objectness will be 1 and the bounding box value
Convolutional Neural Network. This method is very slow will be its corresponding bounding values of the found
because we have to run a prediction for every selected object. The bounding box prediction is explained as follows.
region. The second category is the algorithms based on Also, Anchor boxes are used to increase the accuracy of
Regressions. YOLO method comes under this category. In object detection which also explained below in detail.
this, we won't select the interested regions from the image.
Instead, we predict the classes and bounding boxes of the
whole image at a single run of the algorithm and detect
multiple objects using a single neural network. YOLO
algorithm is fast as compared to other classification
algorithms. In real time our algorithm process 45 frames per
second. YOLO algorithm makes localization errors but
predicts less false positives in the background.

II. LITERATURE SURVEY


You Only Look Once: Unified, Real-Time Object
Detection, by Joseph Redmon. Their prior work is on

Figure 1: Working of YOLO

Manuscript published on 28 February 2019. 3.1. Bounding box predictions:


* Correspondence Author (s) YOLO algorithm is used for predicting the accurate
Geethapriya.S, M.E. Student, Department of CSE, Rajalakshmi
Engineering College, Chennai, Tamil Nadu, India (E-mail: bounding boxes from the image. The image divides into S x
[email protected]) S grids by predicting the bounding boxes for each grid and
N. Duraimurugan Assistant Professor Department of CSE, Rajalakshmi class probabilities. Both image classification and object
Engineering College, Chennai, Tamil Nadu, India
S.P. Chokkalingam, Professor, Department of CSE, Saveetha School of
localization techniques are applied for each grid of the
Engineering, Chennai, Tamil Nadu, India. image and each grid is assigned with a label.
© The Authors. Published by Blue Eyes Intelligence Engineering and
Sciences Publication (BEIESP). This is an open access article under the
CC-BY-NC-ND license https://creativecommons.org/licenses/by-nc-nd/4.0/

Published By:
Blue Eyes Intelligence Engineering
Retrieval Number C11240283S19/19©BEIESP and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 578 © Copyright: All rights reserved.
Real-Time Object Detection With Yolo

Then the algorithm checks each grid separately and marks


the label which has an object in it and also marks its
bounding boxes. The labels of the gird without object are
marked as zero.

Figure 5: Bounding box and Class values of grid 6.

In this table, 1 represents the presence of an object. And


bx, by, bh, bw are the bounding boxes of the object in the 6 th
grid. And the object in that grid is a car so the classes are
Figure 2: Example image with 3x3 grids (0,1,0). The matrix form of Y in this is Y=3x3x8.
For the 5th grid also the matrix will be little similar with
Consider the above example, an image is taken and it is different bounding boxes by depending on the objects
divided in the form of 3 x 3 matrixes. Each grid is labelled position in the corresponding grid.
and each grid undergoes both image classification and If two or more grids contain the same object then the
objects localization techniques. The label is considered as Y. center point of the object is found and the grid which has
Y consists of 8 values. that point is taken. For this, to get the accurate detection of
the object we can use to methods. They are Intersection over
Union and Non-Max Suppression. In IoU, it will takes the
actual and predicted bounding box value and calculates the
IoU of two boxes by using the formulae,
IoU = Area of Intersection / Area of Union.
If the value of IoU is more than or equal to our threshold
value (0.5) then it's a good prediction. The threshold value is
just an assuming value. We can also take greater threshold
Figure 3: Elements of label Y value to increase the accuracy or for better prediction of the
object.
Pc – Represents whether an object is present in the grid or The other method is Non-max suppression, in this, the
not. If present pc=1 else 0. high probability boxes are taken and the boxes with high
bx, by, bh, bw – are the bounding boxes of the objects (if IoU are suppressed. Repeat this until a box is selected and
present). consider that as the bounding box for that object.
c1, c2, c3 – are the classes. If the object is a car then c1
3.2. ACCURACY IMPROVEMENT
and c3 will be 0 and c2 will be 1.
In our example image, the first grid contains no proper ANCHOR BOX:
object. So it is represented as, By using Bounding boxes for object detection, only one
object can be identified by a grid. So, for detecting more
than one object we go for Anchor box.

Figure 4: Bounding box and Class values of grid 1.


Figure 6: An example image for anchor box
In this grid, there exists no proper object so the pc value is
0.
And rest of the values are doesn’t matter because there
exist no object. So, it is represented as ?.
Consider a grid with the presence of an object. Both 5 th
and 6th grid of the image contains an object. Let’ consider
the 6th grid, it is represented as.
Published By:
Blue Eyes Intelligence Engineering
Retrieval Number C11240283S19/19©BEIESP and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 579 © Copyright: All rights reserved.
International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249-8958 (Online), Volume-8 Issue-3S, February 2019

Consider the above picture, in that both the human and create a 7x7x2 bounding box prediction. Finally, a
the car’s midpoint come under the same grid cell. For this prediction is made by considering the high confidence score
case, we use the anchor box method. The red color grid cells of a box.
are the two anchor boxes for those objects. Any number of
anchor boxes can be used for a single image to detect
multiple objects. In our case, we have taken two anchor
boxes.

Figure 9: CNN Network Design


Figure 7: Anchor boxes
4.1. Loss function of YOLO algorithm:
The above figure represents the anchor box of the image For a single grid cell, the algorithm predicts multiple
we considered. The vertical anchor box is for the human and bounding boxes. To calculate the loss function we use only
the horizontal one is the anchor box of the car. one bounding box for object responsibility. For selecting
In this type of overlapping object detection, the label Y one among the bounding boxes we use the high IoU value.
contains 16 values i.e, the values of both anchor boxes. The box with high IoU will be responsible for the object.
Various loss functions are:
• Classification loss function
• Localization loss function
• Confidence loss function
Localization loss means the error between the ground
truth value and predicted boundary box. Confidence loss is
the objectness of the box. Classification loss calculated as,
the squared error of the class conditional probabilities for
each class:

Equation 1:Conditional probabilities for each class


Where,

Figure 8: Anchor box prediction values in Equation 1, If it is 1 means the object appears in
Pc in both the anchor box represents the presence of the the cell, or else it is 0.
object. is the conditional class probability for class c.
bx, by, bh, bw in both the anchor box represents their The localization loss is the measure of errors in the
corresponding bounding box values. predicted boundary box locations and the sizes. The box
The value of the class in anchor box 1 is (1, 0, 0) because which is responsible for the object is only counted.
the detected object is a human.
In the case of anchor box 2, the detected object is a car so
the class value is (0, 1, 0).
In this case, the matrix form of Y will be Y= 3x3x16 or
Y= 3x3x2x8. Because of two anchor box, it is 2x8.

IV. RESULTS & DISCUSSIOS


The idea of YOLO is to make a Convolutional neural Equation 2: The localization loss
network to predict a (7, 7, 30) tensor.It uses a Convolutional
neural network to scale back the spatial dimension to 7x7
with 1024 output channels at every location. By using two
fully connected layers it performs a linear regression to
Published By:
Blue Eyes Intelligence Engineering
Retrieval Number C11240283S19/19©BEIESP and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 580 © Copyright: All rights reserved.
Real-Time Object Detection With Yolo

Where, 4. Wei Liu, Dragomir Anguelov, Dumitru Erhan, “SSD: Single


Shot MultiBox Detector”, Published in Computer Vision –
in Equation 2, Is 1, if the jth bounding box of cell i ECCV 2016 pp 21-37.
is responsible for detecting the object. Otherwise, it is 0. 5. Lichao Huang, Yi Yang, Yafeng Deng, Yinan Yu DenseBox,
“Unifying Landmark Localization with End to End Object
Increase the weight for the loss of bounding box Detection”, Published in Computer Vision and Pattern
coordinates. Recognition (cs.CV).
6. Dumitru Erhan, Christian Szegedy, Alexander Toshev,
The Confidence loss, if the object is found in a box the
“Scalable Object Detection using Deep Neural Networks”,
confidence loss is, The IEEE Conference on Computer Vision and Pattern
Recognition (CVPR), 2014, pp. 2147-2154.
7. Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun, “Faster
R-CNN: Towards Real-Time Object Detection with Region
Proposal Networks”, Published in Advances in Neural
Equation 3:The Confidence loss Information Processing Systems 28 (NIPS 2015).
8. Joseph Redmon, Ali Farhadi,“YOLO9000: Better, Faster,
Stronger”, The IEEE Conference on Computer Vision and
Where, Pattern Recognition (CVPR), 2017, pp. 7263-7271.
in Equation 3, Is the confidence score of the box j in 9. Jifeng Dai, Yi Li, Kaiming He, Jian Sun, “R-FCN: Object
Detection via Region-based Fully Convolutional Networks”,
cell i. published in: Advances in Neural Information Processing
Systems 29 (NIPS 2016).
Is 1 if the jth bounding box of cell i is responsible 10. Karen Simonyan, Andrew Zisserman, “Very Deep
for detecting the object. Otherwise, it is 0. Convolutional Networks for Large-Scale Image
If the object is not detected then the confidence loss will Recognition”, published in Computer Vision and Pattern
be, Recognition (cs.CV).

Equation 4: Confidence loss if object not detected

Where,

in Equation 4, Is the complement of .


Is the confidence score of box j in cell i.

Is the weights down the loss when detecting the


background.

V. CONCLUSION
In this paper, we proposed about YOLO algorithm for the
purpose of detecting objects using a single neural
network.This algorithm is generalized, it outperforms
different strategies once generalizing from natural pictures
to different domains. The algorithm is simple to build and
can be trained directly on a complete image.Region proposal
strategies limit the classifier to a particular region. YOLO
accesses to the entire image in predicting boundaries. And
also it predicts fewer false positives in background
areas.Comparing to other classifier algorithms this algorithm
is much more efficient and fastest algorithm to use in real
time.

REFERENCES
1. Joseph Redmon, Santosh Divvala, Ross Girshick, “You Only
Look Once: Unified, Real-Time Object Detection”,The IEEE
Conference on Computer Vision and Pattern Recognition
(CVPR), 2016, pp. 779-788.
2. YOLO Juan Du1,”Understanding of Object Detection Based
on CNN Family”,New Research, and Development Center of
Hisense, Qingdao 266071, China.
3. Matthew B. Blaschko Christoph H. Lampert, “Learning to
Localize Objects with Structured Output Regression”,
Published in Computer Vision – ECCV 2008 pp 2-15.
Published By:
Blue Eyes Intelligence Engineering
Retrieval Number C11240283S19/19©BEIESP and Sciences Publication (BEIESP)
Journal Website: www.ijeat.org 581 © Copyright: All rights reserved.

You might also like