Social Distancing Detector Using Yolo

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

SOCIAL DISTANCING DETECTOR USING YOLO

Balineni Kushaal
[email protected] Naveen Marella Penugonda Sandeep
[email protected] [email protected]

halls, shopping malls, airports, schools,etc).social


ABSTRACT— So as the corona virus(covid-19) distancing mainly benefits the people those are at higher
pandemic has brought the catastrophe with its rapid risks with pre medical conditions.
spreading. In the present scenario as there are no
Our main objective through this project we aim to develop a
effective proper medical treatments aganist the virus, it
deep learning platform for detection of people. In order to
may cause threat to humanity .Therefore, social distancing detect social distance at controlled environments. As we
is the prominent way to stop the increase in positive need public to follow social distancing we need a system to
cases of covid-19. And the virus risk can be brought under observe and find those who violate. . So by minimizing the
control by maintaining physical distance from each spread from one person to person, disease spread can be
individual. The aim of this project is to improve a deep minimized.
learning technology for social distancing algorithm using What is YOLO?
YOLO . Due to its good accuracy towards the detection of The abbreviation of YOLO is given as YOU ONLY LOOK
subjects (humans,objects) and small objects, in this ONCE . It is a real time object recognition algorithm, first
project we have used yolov3 . Due to its adjusted network mentioned and written in the 2015 seminar paper by Joseph
structure Yolo v3 has an advantage that is used for multi Redmonetal yolo involves the concept of object detection
scale object detection . our dectecting model identifies the with higher accuracy rate.
people placing bounding boxes over the subjects . This
methodology of using yolo increases the accuracy of the
model when compared to RCNN&SSD as shown in below
fig.

INTRODUCTION I. LITERATURE SURVEY


. This project was espoused and developed due to two- In the proposed model [3] the authors explained and
pronged reasons : developed the Tinier YOLO, which is derived from the
1. An intelligent model to identify the persons YOLO-V3, it is a model suggested for obtaining better
without mask. accuracy of detection by minimizing the model size and
2. A socially impactful model to stop the spread of real-time performance. From this journal we have obtained
virus. the idea and how to use the COCO data set.
The  present COVID pandemic, also known as
the coronavirus is still a viral disease which we are From [1] authors used the single stage network framework
facing since 2019 and to as of date , it is caused of an to estimate the overlapping boxes and their class
acute respiratorysyndrome SARS COV 2.The virus was probabilities.
first discovered in December 2019 in wuhan(china). The At first COCO was used to train the model . Full form of
WHO declared the outbreak as a global pandemic on COCO is “Common objects in context”.
11 March.As of April 30 2021, more than 150  million COCO is one of the database management system. In this
cases  of COVID-19 have been reported resulting paper we analyzed the concept and approach in develop of
in more than 3.17 million deaths . the code.
Social distance will help maintain distance between each
individual in order to cut down the increase of covid19 The NMS (NON-MAXIMA SUPRESSION) algorithm [5] is
spread it helps in various crowded places like (function explained how to use. Which is used to decrease the
overlapping of the multiple bounding boxes. So that the box
which contains the more probability can be drawn around assigned in video frame as shown in the below fig (a) . In
the subject this project We used YOLO V3 .

The estimation and characterization of person-person


distances from images is presented as the VSD problem
Solving[7] such issues enables a rapid monitoring of the
population for possible threats .behaviour that poses a health
risk, particularly in light of recent events Outbreaks of
pandemics

From [4] The output of commonly used deep learning


techniques for object detection and recognition are in pattern
of RGB(RED-GREEN-BLUE). So we have also used the
same RGB pattern. Thermal surveillance scenarios were
used to analyse visual images.
Fig(a): Schematic representation of YOLO v3 architecture
II. PROPOSED WORK
Non-Maxima suppression
Initially it detects the subjects(“humans”and etc) in a
video frames by using YOLO object detection algorithm. NMS (Non-maxima suppression) is a technique used in
The primary goal of this device is to analyse recorded video many computer vision algorithms also used to reduce
footage for individual identification and then process it overlapping bounding boxes to only a single bounding box,
further for social distancing or safety violations. It is used to thus representing the true detection of the object. Having
give the output of the person prediction’s probability, overlapping boxes for each individual is not accurate
boundary box coordinates for the detected person, and the especially when we are counting the number of boxes in
centroid of each individual. each individual frame. The example of NMS is given in the
This process contains 4 stages below fig b where the algorithm detects the bounding box
1. Object detection around the object which has maximum probability by
suppressing the minimum probabilities(i.e which are not not
2. Non-Maxima suppression. maximum). So from the example the box with 0.9
3. Object localization probability is considered as the bounding box.
4. Distance calculation.

III. METHODOLOGY

Object detection

YOLO OBJECT DETECTOR

With just one look at the picture, the type of an object and
location of the object can be predicted by using this model.
In allocating class probabilities to the subjects, YOLO treats
the detection issue as a regression task rather than a
classification task. This YOLO algorithm also predicts
multiple bounding boxes for a single subject and with
closest probabilities at the same instance. Basically
YOLOv1, YOLOv2, and YOLOv3 are the three main Fig (b) showing an example of Non maxima suppression
algorithms used in object classification. The YOLO v1
algorithm is used to identify subjects in the video frame
image. YOLO is an object detector which can detect the Distance caluculation
possible areas within an image where certain objects may be
present and classifies certain areas into object classes in a After detection of each individual in each video frame, in
single step. YOLOv3 has a 53 convolutional layers further step, the distance is computed by the bounding boxes
including 3x3 and 1x1 filters, with shortened connections from the centroid of every identified subject. The detected
between each layers for extraction of each subject. For each boundary box specific coordinates are used for calculating
individual subject three predictions of bounding boxes are each box’s centroid. After calculating, the centroid each
identified bounding box Is given a unique ID and the next
step is to compute the distance between each detected
object. we first examined each individual frame in the video
stream and centroids of every bounding box and the pair-
wise distance is calculated using Euclidean distance. Every
centroid data is stored within the sort of an inventory. Based
on the each distance value between every pair in the frame To calculate the distance between the centroids
image an input threshold value is given to check if the
distance is less than the specified pixel or not. If they are
C1 and C2 of the detected pair subjects
less than given threshold value the colour of the bounding
box is displayed as red indicating they are not following the
social distancing or else it displays green as shown in the
flow chart diagram in fig(c) The information in the violation
set will be updated frame to frame. If the violation set (list)
consists the existing present index , then the colour is
where c= centroid of the bounding box,
changed to red, and even the number of violations is also C1=(Xmin,Ymin) ; C2=(Xmax,Ymax) , (x,y) are
shown in the output. the co-ordinates of the centroid.
IV. FLOW CHART

VI. RESULTS DISCUSSION

In Fig1 and Fig2 , the testing results of the social distancing


detector are given below . The results obtained are updated
at every individual frame , providing us with the accurate
results for spreading of virus among the people.

Fig 1

Fig(c)
Fig 2

V. EQUATIONS & PARAMETERS VII. CONCLUSION

As Artificial intelligence technology is blooming in today


To calculate the bounding box center point C(x,y) world, we have social detector which can contribute to the
the formula for midpoint of the detected person in healthcare of the world. This model consists of YOLO as the
backbone which can detect the HUMANS. With this project
the frame is given as we have developed a social distancing detector using deep
learning concept. YOLOv3 trained with coco dataset is used
for human detection to obtain good accuracy for detection
.The project can be developed in the future for detecting in Sell Decision’’ Model Over 2D Candlestick Charts"
all type of environments where social distance is must to be Published 2020 may 14.
maintained. By the development of Social distancing
detector we can detect if the person is in close proximity 6. Afiq Harith Ahamad, Norliza Zaini, Mohd Fuad Abdul
and it would be of great help to the society. Latip "Person Detection for Social Distancing and Safety
Our future work will extend the object localization Violation Alert based on Segmented ROI"2020 10th IEEE
algorithm with further more features and testing the InternationalConference. 2018;5:1598– 1605.
algorithm with high performance GPU’s for better video
outputs. 7. MARCO CRISTANI,ALESSIO DEL BUE,VITTORIO
MURINO,FRANCESCO SETTI "The Visual Social
Distancing Problem" Published 2020.

VIII. REFERENCES 8. Ahmed I., Ahmad A., Piccialli F., Sangaiah A.K., Jeon G.
IEEE Internet of Things Journal. 2018;5:1598– 1605.

1. Imran Ahmed, Misbah Ahmed ,joel J.P.C. Rodrigues, 9. Ahmed I., Ahmad M., Adnan A., Ahmad A., Khan M.
Gwanggil Jeon, and Sadia Din ‘A deep learning based social International Journal of Machine Learning and Cybernetics.
distancing monitoring framework for COVID-19’ 2020 Nov 2019:1–12.
1. pp.7-20
10. Girshick R. Proceedings of the IEEE international
2. Ahmad M., Ahmed I., Ullah K., Khan I., Adnan A. 2018 conference on computer vision. 2015. pp. 1440–1448
9th IEEE annual ubiquitous computing, electronics mobile
communication conference (UEMCON) 2018. pp. 746–752 11. Ramadass L., Arunachalam S., Sagayasree Z.
. International Journal of Pervasive Computing and
3. WEI FANG,LIN WANG,and PEIMING REN " Tinier- Communications. 2020
YOLO: A Real-Time Object Detection Method for
Constrained Environments" Published on 2019 Dec 24. 12. N. S. Punn, S. K. Sonbhadra, and S. Agarwal, “Covid-
19 epidemic analysis using machine learning and deep
4. MATE KRIŠTO,MARINA IVASIC-KOS,and MIRAN learning algorithms,” medRxiv, 2020.
POBAR "Thermal Object Detection in Difficult Weather
Conditions Using YOLO" 2020 july 06 vol 8.pp.8-9

5. SERDAR BIROGUL,GÜNAYTEMÜR,and UTKU


KOSE "YOLO Object Recognition Algorithm and ‘‘Buy-

You might also like