Objective: Detect whether the pedestrians are maintaining social distance or not. Also give the number of violence.
- Get video input from webcam or video file.
- Use a pre-trained yolov3 model to detect pedestrians.
- Measure the centroid of pedestrians using the bounding box co-ordinate, which is taken from the output of yolov3 model.
- Then map the pixel value to distance.
- Measure the distance between all centroid points.
- If the distance is less than the threshold value, pedestrians action is marked as violence.
- Show the output with co-responding bounding boxes and number of violence.