Flowchart of physical distancing detection model
Output detection video 1
Output detection video 2
Physical Distancing Detection Model
- The pre-filmed video is fed into the model as the input. The first frame of the input video is captured as shown in Figure 1.
- Four points are selected from the first frame image. These points are connected with red lines forming a closed area, which is the desired region for person detection.
- Figure 3 illustrates the video frame that has been transformed into 2D bird's view.
- The bird’s view video is then fed into the YOLOv4 pre-trained model frame by frame for person detection. Figure 4 shows the output of the detection model.
- The bounding boxes represented in green indicate the person is maintaining a physical distance as the distance is within the acceptable threshold value. The people with red bounding boxes indicate that they violate the pre-defined threshold value. On the upper right of the frame, the number of people violating the physical distance is shown.
Figure 1: First frame of the input video
Figure 2: Frame with selected four points connecting with line
Figure 3: 2D bird’s view generated from the Perspective image
Figure 4: Output of physical distancing detection model using bird’s view video frame