Coder Social home page Coder Social logo

face-mask-detection's Introduction

Face Mask Detection Using MobileNetV2

This a Intelligent Face Mask Detection system to track whether a person is wearing a Face Mask or not in Real Time Environmnent. This model was built using the following packages:

  • Tensorflow
  • Keras
  • Scikit-learn
  • OpenCV

Dataset

The dataset used is from Kaggle. The Dataset consists of Images:

  • With Mask
  • WIthout Mask

Then the Datset is split into

  • Training Data
  • Validation Data

Implementation

We have used the Convolutional Neural Networks to train the model. This CNN based model uses the MobileNetV2 Architecture due to it's light weight, fewer parameters and high accuracy. And then the Real Time environment is built using the OpenCV package.

Model Flow

We have implemented the MobileNetV2 architecture to ensure accurate face-mask detection. It is an inverted residual system created specifically for mobile devices. A convolutional layer and 19 residual bottleneck layers make up its architecture.

  • Input of images is fed into the layer.
  • AveragePooling2D is implemented to reduce the dimensionality.
  • The resultant is then flattened into a vector and then sent into a fully connected layer.
  • Dropout is implemented to improve the performance. During this few neurons are dropped to prevent the model from overfitting.
  • Then an activation function is used and the class label is given as output.

Web capture_20-10-2022_114145_

Results

Our model has a recall of 0.99, it correctly identifies 99 percent of all face mask images and 99 percent of all the without mask images.

Web capture_20-10-2022_11453_

Real Time Detection

After detecting the locations of the face and predicting the mask, we use the inbuilt putText method from openCV to display MASK or NO MASK. Similarly, the name of the person if detected will be displayed.

download

face-mask-detection's People

Contributors

varshitha-rao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.