Giter VIP home page Giter VIP logo

face-mask-detector's Introduction

Face-Mask-Detector

GitHub PyPI - Python Version

Face Mask Detector built with OpenCV, TensorFlow/Keras using Deep Learning CNN and Computer Vision concepts in order to detect face masks in static images as well as in real-time video streams.

⭐ TechStack/framework used

📁 Dataset

The dataset used can be downloaded here - Click to Download

This dataset consists of 4095 images belonging to two classes:

  • with_mask: 2165 images
  • without_mask: 1930 images

The images used were real images of faces wearing masks. The images were collected from the following sources:

🔑 Prerequisites

All the dependencies and required libraries are included in the file requirements.txt Run the following command in your Terminal/Command Prompt to install the libraries required

$ pip3 install -r requirements.txt

💡 Working

  1. Open terminal. Go into the cloned project directory and type the following command:
$ python3 train_mask_detector.py --dataset dataset
  1. To detect face masks in an image type the following command:
$ python3 detect_mask_image.py --image images/pic1.jpeg
  1. To detect face masks in real-time video streams type the following command:
$ python3 detect_mask_video.py 

📑Streamlit app

Face Mask Detector webapp using Tensorflow & Streamlit

command

$ streamlit run app.py 

☑️Result

Hyperparameter: - batch size: 32 - Learing rate: 0.0001 - Input size: 64x64x3

The Pre-trained models used can be downloaded here - Click to Download

Model result

Model Test Accuracy Size Params Memory consumption
CNN 87.67% 27.1MB 2,203,557 72.58 MB
VGG16 93.08% 62.4MB 288,357 18.06 MB
MobileNetV2 (fine tune) 97.33% 20.8MB 1,094,373 226.67 MB
Xception 98.33% 96.6MB 1,074,789 368.18 MB

🌸 License

MIT © Om Bhatia

face-mask-detector's People

Contributors

ombhatia99 avatar

Stargazers

Prithvi Sharma avatar

Watchers

 avatar

face-mask-detector's Issues

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.