Skip to content

hiimmuc/Face-Mask-Detector-Yolo

Repository files navigation

Face Mask Detection

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

Face Mask Detetor😷

Including executable file for Windows user

                               Python Tensorflow LinkedIn

😇 Motivation

In the present scenario due to Covid-19, there is no efficient face mask detection applications which are now in high demand for transportation means, densely populated areas, residential districts, large-scale manufacturers and other enterprises to ensure safety. Also, the absence of large datasets of ‘with_mask’ images has made this task more cumbersome and challenging.

What I did??

  • I use Google colab t train my Yolov4 tiny model
  • Data for training, can be get from https://www.kaggle.com/andrewmvd/face-mask-detection
  • And you can use Roboflow to generate up to 2400 images(with starter plans)
  • Using PyQt5 to create gui and convert to .exe file by pyinstaller

⌛ Project Demo

🎥 YouTube Demo Link

🎥r: Youtube

⚠️ Framework used

#1

⭐ Features

Our 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.

This system can detect and classify three types: masked, unmasked and incorrectly masked

🔑 Prerequisites

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

🚀  Installation

  1. Clone the repo
$ git clone https://github.com/hiimmuc/Face_mask_detction_vn.git
  1. Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip3 install -r requirements.txt
  1. Install .exe file with this link
$ https://drive.google.com/drive/folders/1uCUeixNxNFYcKXnO4dkaDV_UmtcW-Kzk?usp=sharing

💡 Working

  1. Open terminal. After cloning my respo, go with this command to run the detector
$ python3 main.py
  1. or you cand use this command for the simplier version:
$ python3 main02.py
  1. To detect face masks in real-time video streams type the following command:
$ python3 facedetect_yolo.py 
  1. To see the ui design type:
$ python3 GUI.py 

👏 And it's done!

Feel free to mail me for any doubts/query :email: [email protected] or my facebbok: https://www.facebook.com/phgnam1811/

🙋 Citation

You are allowed to cite any part of the code or our dataset. You can use it in your Research Work or Project. Remember to provide credit to the Maintainer Bernard Deng by mentioning a link to this repository and her GitHub Profile.

Follow this format:

  • Author's name - Bernard Deng
  • Date of publication or update in parentheses.
  • Title or description of document.
  • URL.

👏 References:

https://www.pyimagesearch.com/2020/05/04/covid-19-face-mask-detector-with-opencv-keras-tensorflow-and-deep-learning/ https://www.tensorflow.org/tutorials/images/transfer_learning

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages