To build a system for detectiong if an individual is wearing a mask in a give image.
The Mask Wearing dataset is an object detection dataset of individuals wearing various types of masks and those without masks. The images were originally collected by Cheng Hsun Teng from Eden Social Welfare Foundation, Taiwan and relabeled by the Roboflow team.
- Download from: https://public.roboflow.ai/object-detection/mask-wearing
- Dataset contain total 149 images into two classes i.e Mask & Without Mask
- Example image (some with masks, some without):
- Prepare folder structure that can be accept by YoloV5.
- Total 105 images for training and 29 images for validation present in 2 classes.
- Create a bounding boxes with the help of label-img And makesense.ai website according to YoloV5.
- Cloning the YoloV5 file from official repository.
- Changing the directory of yolov5
- Installing the dependencies
- Download all versions pre-trained weights
-
Go to yolov5/data/
-
Open coco128.yaml
-
Edit the following inside it:
A. Training and Validation file path
B. Number of classes and Class names.
- Set images size 640 with batch of 8
- Train model around 1000 epochs but Stopping training early as no improvement observed in last 100 epochs Best results observed at epoch 278 i.e P:0.877 R:0.876 mAP50:0.909 mAP50-95:0.62
- Visualise the training metrics with the help of tensorboard
Face.Mask.Detection.mp4
- challenge faced in bounding boxes creation
- Assign the same no for all classes
- Made mistake in yolov5 folder structure
- Take lots of time to create bounding boxes
- Understand the YoloV5 folder structure as well as learn label-IMG tool.
- Learn Pytorch library.