Skip to content

Ayushparikh-code/Face--Mask--Detection

Repository files navigation

Face Mask Detection

Face Mask Detection system built with:--

PYTHON OPENCV TensorFlow Keras

                                    demo

⭐ Features

The Face mask detector didn't use any morphed masked images dataset. The model is accurate, and since we used the MobileNetV2 architecture, it’s also computationally efficient and thus making it easier to deploy the model to embedded systems (Raspberry Pi, Google Coral, etc.).

This system can therefore be used in real-time applications which require face-mask detection for safety purposes due to the outbreak of Covid-19. This project can be integrated with embedded systems for application in airports, railway stations, offices, schools, and public places to ensure that public safety guidelines are followed.

📁 Dataset

This dataset consists of 3833 images belonging to two classes:

  • with_mask: 1915 images
  • without_mask: 1918 images

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

  • Bing & Google Search API
  • Kaggle datasets
  • RMFD dataset
  • Open-Source Stock Image Websites

🔑 Prerequisites

All the dependencies and required libraries are included in the file requirements.txt See here

Contributing 👷

  • Fork the project.
  • Create your Feature Branch
git checkout -b '<your_branch_name>'
  • Stage your changes
git add .
  • Commit your changes
git commit -m '<your_commit_message>'
  • Check for Status to be sure everything is added
git status
  • Check for your remote
git remote -v
  • Push changes to remote
git push origin '<your_branch_name>'
git remote add upstream https://github.com/Ayushparikh-code/Face--Mask--Detection
git fetch upstream
git merge upstream/master
  • Checkout to main branch
git checkout main
  • Checkout to New branch
git checkout '<your_branch_name>'

Levels & Points

Level Points
Level 0 5
Level 1 10
Level 2 15
Level 3 30
Level 4 45

🚀  Installation

  1. Clone the repo
$ git clone https://github.com/Ayushparikh-code/Face--Mask--Detection.git
  1. Change your directory to the cloned repo
$ cd Face--Mask--Detection
  1. Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip install -r requirements.txt

💡 Working

  1. Open terminal. Go into the cloned project directory and type the following command:
$ python train_mask_detector.py  
  1. To detect face masks in real-time video streams type the following command:
$ python detect_mask_video.py 

🔑 Results

This model gave 98% accuracy for Face Mask Detection after training via tensorflow>=1.15.2

Here is the following accuracy/loss training curve plot

IMAGES



Our Project Admins 🤓



Ayush Parikh


📌 Opensource Programs

This project is a part of following Open Source Program



Note: If you Like this project then just follow me👍 and Star✨ this repository !



Happy Contribution ✨

Releases

No releases published

Packages

No packages published

Languages