Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 2.31 KB

README.md

File metadata and controls

71 lines (47 loc) · 2.31 KB

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