Team member: Peng Tianyi, Wang Shuai, Ye Huanyi
Based on 853 pictures and three classes (wear mask, no mask, wear mask incorrectly), we improved and trained the face mask detector based on YOLOv5s.
We get 80.9 mAP0.5 in the validation dataset with more than 100FPS in Tesla P100-PCIE-16GB.
| Class | #Labels | Precision | Recall | mAPval 0.5 | mAPval 0.5:0.95 |
|---|---|---|---|---|---|
with mask | 630 | 0.828 | 0.935 | 0.951 | 0.647 |
without mask | 104 | 0.632 | 0.885 | 0.865 | 0.558 |
mask weared incorrectly | 20 | 0.72 | 0.65 | 0.612 | 0.372 |
total | 754 | 0.727 | 0.823 | 0.809 | 0.526 |
- Down load data from my drive
- Unzip the file in
root, replacedatasetsdirectory via unzip file - Format like this
- We strongly recommend you to run in
Google Colabor other Linux system. - Install necessary part
pip install -r requirements.txt
- Open
demo.ipynb - Set path
- Run the cells
- Just continue running the cells
- Please use GPU and run the cell
- If you want to freeze, please train with freeze firstly, then train without freeze based on former weights.
- Wear mask, and wear mask incorrectly
https://github.com/ultralytics/yolov5
https://github.com/spacewalk01/yolov5-face-mask-detection





