Skip to content

Dedicated to enhancing Covid-19 safety, this project automates mask detection, assisting authorities in enforcing protocols and reducing risks using advanced technology. By streamlining the process and issuing warnings, it optimizes resource allocation and strengthens public safety measures.

Notifications You must be signed in to change notification settings

PrathamBhatTech/Face-Mask-Detection

Repository files navigation

GitHub release (latest by date including pre-releases)
GitHub contributors GitHub issues

LinkedIn

Mask-Detection

Introduction

During the Covid-19 Pandemic, immense efforts and resources have been put into maintaining protocols like Social Distancing and regulating mass public on usage of Masks. Any lapses on these fronts have resulted in countless fatalities and losses. This project is dedicated to contribute and provide help in regulating these protocols to ensure safety of mass population. Immense military and policing resources have been spent on regulating a compulsory mask wearing policy, and yet lapses have been found in public spaces. This project addresses this issue and aims to automate the process of checking for the presence of mask and provide support to authorities by issuing a warning.



Detection:

No Mask IMG | With Mask IMG

Creating Dataset:

This component works independently to create the dataset needed to train the model. This component makes use of the Tkinter library to make a Graphical User Interface to take in some parameters to customize the program. The program takes in time delay, no of images and choice to determine the time delay between every frame to be captured, the number of images to be taken into dataset and the option to make a dataset for mask and no mask. This is done to make it easy for the user to create datasets of their own by taking samples of different angles, lighting and conditions to help improve the model quality.

DatasetCreated IMG


Built with:

  • Python
  • OpenCV
  • Mediapipe
  • Tensorflow
  • Tkinter
  • asyncio

Prerequisites:

Installation:

  • Clone the repository: git clone https://github.com/PrathamBhatTech/Mask-Detection.git

  • Change current directory to the repo: cd Mask-Detection

  • Install requirements: pip install -r requirements.txt


Usage:

  • To run the mask detection: python3.9 Run.py
  • To run the dataset creator: python3.9 CreateDataset.py
  • To train a model using the dataset you created:
    • Upload the dataset after zipping(.zip) to your drive. NOTE: Name of folder data.
    • open the train.ipynb file using google collab. Login to the account you uploaded the dataset.
    • Modify the path of the dataset in the code.
    • Start training.
    • Download the trained model.



Project Link: https://github.com/PrathamBhatTech/Mask-Detection

About

Dedicated to enhancing Covid-19 safety, this project automates mask detection, assisting authorities in enforcing protocols and reducing risks using advanced technology. By streamlining the process and issuing warnings, it optimizes resource allocation and strengthens public safety measures.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published