/yolov5_FaceMask

Detecting person with or without face mask. Trained using YOLOv5.

Primary LanguageJupyter Notebook

colab
Click on Train in Colab if .ipynb not opening

yolov5_FaceMask

  • The dataset used for training the yolov5 is from roboflow.ai

Output result from testing dataset

output_img

Installation

  1. Download and install yolov5
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
git clone https://github.com/pritul2/yolov5_FaceMask
  1. Run inference For running inference you required trained weights which is obtained from my repo cloned as yolov5_FaceMask
$ python detect.py --weights last_mask_yolov5s_results.pt --conf 0.4 --source 0  # webcam
                                                                              file.jpg  # image 
                                                                              file.mp4  # video
                                                                              path/  # directory
                                                                              path/*.jpg  # glob
                                                                              rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa  # rtsp stream
                                                                              http://112.50.243.8/PLTV/88888888/224/3221225900/1.m3u8  # http stream

Increasing accuracy and Future Scope

The dataset contains 149 Images which is very less for yolo architecture. So during training I performed augmentation and increased to 298 Images.
To get more accuracy the training dataset needs to increase.

Output Results from open source images

test5_out test4_out test3_out test2_out test1_out