Skip to content

Latest commit

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ML Project: A face mask detector

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.

Performance

We get 80.9 mAP0.5 in the validation dataset with more than 100FPS in Tesla P100-PCIE-16GB.

The performance of our model

Class#LabelsPrecisionRecallmAPval
0.5
mAPval
0.5:0.95
with mask6300.8280.9350.9510.647
without mask1040.6320.8850.8650.558
mask weared incorrectly200.720.650.6120.372
total7540.7270.8230.8090.526

The improvement of our model

Prepare

Download data

  • Down load data from my drive
  • Unzip the file in root, replace datasets directory via unzip file
  • Format like this

Environment

  • We strongly recommend you to run in Google Colab or other Linux system.
  • Install necessary part
pip install -r requirements.txt

Run!

Inference

  • Open demo.ipynb
  • Set path
  • Run the cells

Validation

  • Just continue running the cells

Train

  • 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.

Effect show

  • Wear mask, and wear mask incorrectly

* No mask

Reference

https://github.com/ultralytics/yolov5
https://github.com/spacewalk01/yolov5-face-mask-detection

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages