face-mask-detection-system

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

https://github.com/pawarvivekkk/face-mask-detection-system

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

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

Basic Info
  • Host: GitHub
  • Owner: pawarvivekkk
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 9.66 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 4 years ago · Last pushed almost 4 years ago
Metadata Files
Readme License Citation

README.md

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.

:innocent: Motivation

Amid the ongoing COVID-19 pandemic, there are 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. The absence of large datasets of ‘with_mask’ images has made this task cumbersome and challenging.

:warning: TechStack/framework used

:star: Features

Our face mask detector doesn't use any morphed masked images dataset and the model is accurate. Owing to the use of MobileNetV2 architecture, it is computationally efficient, 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.

:file_folder: 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:

  • Bing Search API
  • Kaggle datasets
  • RMFD dataset

:key: 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/pawarvivekkk/Face-Mask-Detection-System

  2. Change your directory to the cloned repo $ cd Face-Mask-Detection-System

  3. Create a Python virtual environment named 'test' and activate it $ virtualenv test $ source test/bin/activate

  4. Now, run the following command in your Terminal/Command Prompt to install the libraries required $ pip3 install -r requirements.txt

:bulb: Working

  1. Open terminal. Go into the cloned project directory and type the following command: $ python3 train_mask_detector.py --dataset dataset

  2. To detect face masks in an image type the following command: $ python3 detect_mask_image.py --image images/pic1.jpeg

  3. To detect face masks in real-time video streams type the following command: $ python3 detect_mask_video.py

    :key: Results

Our model gave 98% accuracy for Face Mask Detection after training via tensorflow-gpu==2.5.0

We got the following accuracy/loss training curve plot

Owner

  • Name: Vivek Pawar
  • Login: pawarvivekkk
  • Kind: user
  • Location: Mumbai, Maharashtra, India

Cybersecurity Consultant

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Face Mask Detection
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - email: chandrikadeb7@gmail.com
    family-names: Deb
    given-names: Chandrika
repository-code: >-
  https://github.com/chandrikadeb7/Face-Mask-Detection
license: MIT
version: v1.0.0
date-released: '2022-02-27'

GitHub Events

Total
Last Year

Dependencies

package-lock.json npm
requirements.txt pypi
  • argparse ==1.4.0
  • imutils ==0.5.4
  • keras ==2.4.3
  • matplotlib ==3.4.1
  • numpy ==1.19.5
  • onnx ==1.10.1
  • opencv-python >=4.2.0.32
  • pillow >=8.3.2
  • scikit-learn ==0.24.1
  • scipy ==1.6.2
  • streamlit ==0.79.0
  • tensorflow >=2.5.0
  • tf2onnx ==1.9.3