peterpaulorange / Social-Distancing-using-YOLOv5

Classifying people as high risk and low risk based on their distance to other people.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Social-Distancing-using-YOLOv5

Classifying people as high risk and low risk based on their distance to other people 😷

The original YOLOv5 model was used to detect people. Thereafter the people were classified as "High Risk" and "Low Risk" based on their distance from one another.


Requirements

Python 3.7 or later with all requirements.txt dependencies installed, including torch >= 1.5. To install run:

$ pip install -U -r requirements.txt

Usage

Run on a single video file

$ python detect.py --source ./inference/videos/videofile.mp4

Run on all video files inside a folder

$ python detect.py --source ./inference/videos/

Options

Add using '--'

agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', fourcc='mp4v', half=False, img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='./inference/images/', view_img=False, weights='yolov5s.pt'

Output


TODO

  • Remove a bug which classifies people as low risk instead of high.
  • Add live video support
  • Add image support

About

Classifying people as high risk and low risk based on their distance to other people.

License:GNU General Public License v3.0


Languages

Language:Python 97.8%Language:Dockerfile 1.3%Language:Shell 0.9%