Skip to content

A python application to detect if a person is wearing a mask or not

License

Notifications You must be signed in to change notification settings

Achilles107/mask-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mask Recognition

Table of contents

The challenge

Create a Python program to determine the understanding of Convolutional Neural Network, resnet34 and deep learning skills. Handson experience on Jupyter Notebook code.

Overview

In this project, we have used Convolutional Neural Network to check whether a person is wearing mask or not.

My process

  • First Colored Human Face images wearing mask and without mask Dataset was taken from Kaggle.
  • Then images labeled as "with_mask" and "without_mask" were transformed using get_transforms() method. Following random transforms were applied on each image:
    • flip
    • rotation
    • zoom
    • lightning and contrast change
    • symmetric warp of magnitude
    • affine transform

alt text

  • The labelled dataset was trained using CNN with resnet34 model. The Metric used was accuracy.
  • The Learning rate was calculated using "lr_find()" and "recorder.plot()" methods. alt text
  • (Learning Rate Value= 1e-04)
  • The training was done on Google Colab with GPU Hardware accelerator. It took around 5 minutes to complete the training.
  • The model ended up with a 98% accuracy. alt text

Built with

  • Python 3
  • pandas
  • fastai

Result of classifier

alt text

Future Work

  • You can save your model in .pkl file, which can be integrated in other webapps or mobile applications.
  • It can be installed in CCTV cameras of Hospitals and Microbiology lab to check if a person is wearing a mask or not.
  • Below is the link of how to integrate .pkl file using OpenCV.
  • How to integrate .pkl file using OpenCV

Useful resources

Author

About

A python application to detect if a person is wearing a mask or not

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published