Online Multi-Layers Social Distance Detection in Iraqi Schools

In the circumstance of the COVID-19 pandemic, Prevention is better than cure, especially if the cure is not available, the first motto that all health organizations recommend is keep distances between people to prevent epidemic spread. In this paper, an online multi layers social distance detection system is proposed, the main idea is to detect distance among pupils and classify the distance to accept or not, this system treats stream video of fixed camera which monitor the whole school yard where the pupils are available, this proposed system used multi layers, the first is to make person detection using Yolo-4 approach including CNN model, and surround it by rectangle, the second is to specify the center of detected person, finally, calculate the relative distance to decide if it is accepted or not, this system works online and give high accuracy.


Introduction
COVID-19 belongs to the family of coronavirus caused diseases, initially reported at Wuhan, China, during late December 2020. On eleventh of March, it spread over 114 countries with 118,000 positive cases and 4000 deaths, WHO declared this a pandemic [1], assist police by minimizing their physical surveillance work in containment zones and public areas, at the same time, in the middle of 2020, many countries allowed people to do their daily activity by keeping care conditions, the first care condition is keep social distance among people to avoid spreading virus.
There are many previous valuable researches, studies, projects and tutorials focused on monitoring, tracking, object detection, in this section, some articles are interested with COVID-19 social distance will be highlighted depending on different approaches.
Authors in [2] studied the relation among social distancing measures and the spread of the COVID-19 epidemic. Authors studies synthetic location specific contact forms to simulate the ongoing path of the outbreak using susceptible-exposed-infected-removed (SEIR) models The authors in [3] showed how can social distance among people reduce the mean daily growth rate of COVID-19 in United States (US), supposed a cumulative epidemic size of 4,125 reported cases raised to 26,281 reported cases with no social distancing versus 24,625 reported cases with social distancing within few days.
Shashi Yadav [4] presented a utilizing MobileNet V2 architecture to avoid the spread of the COVID-19 virus using camera feeds with raspberry pi4 in real-time.
Singh Punn et al. [5] suggested a real-time using deep learning for monitoring social-distancing utilizing different object detection approaches Faster RCNN, SSD, and YOLO v3. Also, Ramadass and et. al. [6] checked the social distance among people using drone depending on YOLO3. In general YOLO3 or any other version is used for high speed and real-time recognition for many different objects [7] as will be shown later in details.
Rinkal and Ninad [8] studied if people are keeping social distancing by their self-model named SocialdistancingNet-19, and named the detected persons as saved or not, In general, object detection is the most popular approach that be interested when thinking of image processing, however, YOLOs in different versions are the most familiar.

Social Distance
Also called physical distancing, the main idea is if people are not close together, they cannot spread germs, viruses and infection. By referring to the official website of the World Health Organization, the social distancing allowed to limit the spread of COVID-19 infection is one meter as minimum [1] as shown in figure 1. Therefore, the most popular recommendations for all people to keep safety distance among them to prevent spread of disease.

Problem Statement
The pupils are ready to join the new study year, but the fair of spreading COVID-19 is still established, which spreads mainly among people who are in close contact, however, the whole world recommend with keep distances, in this research anew suggestion for surveillance system based on deep learning and object detection in order to alarm monitor if there are contacts less than the social distance.

Proposed Solution
AS denoted in block diagram in figure 2, the system is started within video stream camera which is fixed in main area to capture many frames. The system will process the captured frame and make sure if there are persons inside, then calculate the distance between each adjacent person and decide if it is accepted or not, then make green rectangle around the two adjacent persons to classify distance is accepted, and red one if not.
The steps in details are listed below:

Object Recognition
Image classification concept refers to assign each image to its class label, whereas object localization refers to bound the detected object by rectangle, these two challenges lead to new concept called object recognition, in real, many complex tasks are cooperated for identifying object recognition.
If we used object recognition strategy in deep learning, so we should think of these algorithms: • R-CNN and their variants, including the original R-CNN [9], Fast R-CNN [10], and Faster R-CNN .
However, R-CNNs head for high accuracy, but major drawback with the R-CNN is extremely slow, in general, single-stage detectors tend to give fewer accuracy than two-stage detectors but are meaningfully faster, YOLO is a good choice for a single stage detector, which is able to achieve a large number of object detections by execution combined training for both object detection and classification.

YOLO
YOLO (You Only Look Once) is a state of art Object Detector which can achieve object detection in real time with a very good accuracy. The first versions of YOLO have released in 2016, 2017 and 2018 (YOLO1 [11], YOLO2 [12] and YOLO3 [13]), later, within few days, another three versions have released (YOLO4 [14], YOLO5 [15] and PP-YOLO [16]). YOLO can make accurate detection for different objects like (persons, cars, animals, teddies, trees and others), in this research, YOLO4 is used to detect persons.

Dataset
The COCO Object Detection Task is considered to rise the state of the art in object detection forward, dataset holds pictures of 91 objects, with a total of 2.5 million labeled instances in 328k images. COCO structures two object detection ways first by using bounding box output and the other object segmentation output [17], in this research, bounding box technique is used.

Detects Full-Fledged Social Distancing
In the previous step, COCO data set is used to make training with object recognition using YOLO4, while the video datasets that used to experiment the system are Virat dataset [18] and so, the people are detected in each frame video and bounded with boxes, by using OPENCV, Compute the Euclidean distance among centers of people and compare the distance with minimum allowed distance, then color the box of accepted distance with green, and the forbidden with red.

Experimental Results
The system is modeled using python, the code is taken from [19] and modified by using YOLO4 instead of YOLO3, the code is tested using Virat video dataset [20] and EPFL video dataset [21], to ensure if it can work well using online camera with different distances position of camera, the proposed system has worked well, and shows very satisfy results in online persons detection and social distance detection as shown in figures 3 and 4 below:  The position of camera and the distance between persons and camera are different, and make different results in detection, so two videos are used with different positions, as shown in table1:

Conclusion
The system is implemented and tested using two different videos with different distances, and shows very satisfied results, by tuning the distance in system. The system can be used in schools, malls, streets and any other place may be crowdy with people. The system gives real time detection for video stream.