Skip to content

Build, train and deploy a complete human face mask detector using tensorflow.keras and opencv

License

Notifications You must be signed in to change notification settings

bm777/humanface-mask-detector

Repository files navigation

How does human face mask detector work?

Install dependencies

  • tensorflow
  • numpy
  • sklearn (scikit-learn)
  • tensorflow-gpu
  • matplotlib
  • imutils

Clone the project

$git clone https://github.com/bm777/humanface-mask-detector.git
cd humanface-mask-detector

How to implement your own face mask detector

  • Fine tuning Load model: res10_300x300_ssd_iter_140000.caffemodel. We Construct new FC head(Fully connected layers), append it the base model and we freeze the base layers of the network(res10.*.caffemodel) -Notice: the weight sof the layers(base model) will not uploaded during the process of backpropagation. Whereas the head layer weight will be tunued.
  • Training, testing and validation stage In this section, we load face mask dataset from disk and then train a model using tensorflow.keras 2.1.0. To perform your accuracy, you can change your hyperparameters(batch size and number of epoch learning rate)
python3 fm_train.py --dataset dataset
# After training you can test your classifier by:
python3 detect_mask_picture.py --image examples/other.jpg

Training phase

  • History ploted

History of training and validation stage

Credit

About

Build, train and deploy a complete human face mask detector using tensorflow.keras and opencv

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published