Skip to content

This is a repository for my Bachelor's graduation project in Deep Learning/Computer Vision.

License

Notifications You must be signed in to change notification settings

Ahmedx288/Graduation-Project

Repository files navigation

Face-mask Detection in Real-time

This repository is for my graduation project.

Face-mask Detection in Real-time is a software that helps users automatically identify whether someone or a group of people are wearing a face mask or not or in the wrong way in a real-time fashion.

This is software for Custom Object Detection, a paradigm that appeared in the Computer Vision Applications field of research relating to Deep Learning.

Final Mask Detection


Table of Contents:

Description
Overview The idea itself and how it lead to the creation of the project.
Phase 1 Detection using static images for one mask only.
Phase 2 Detection using static images as well as in real-time video streams for more than one mask (groups).

Overview

The big picture of mask detection

In our project, we try to enforce the culture of wearing masks to further prevent the spread of the virus by monitoring vital facilities.

  • It can be used to encourage and help people to wear masks in important areas.
  • It can be used to prevent people from entering some other areas without it as well.

Masks are a simple barrier to help prevent your respiratory droplets from reaching others. Studies show that masks reduce the spray of droplets when worn over the nose and mouth. You should wear a mask, even if you do not feel sick.


Phase 1 - Static Inference

Static Inference Example

Used Dataset: Face Mask Detection ~12K Images Dataset This dataset consists of images belonging to two classes (With Mask / Without Mask) divided into:

  • Train Data: 5000 Without Mask Images / 5000 With Mask Images
  • Test Data : 509 Without Mask Images / 483 With Mask Images
  • Validation Data: 400 Without Mask Images / 400 With Mask Images

Complete Project (Notebook): face-mask-detection.ipynb

Feel free to use the raw python scripts to train or inference:

1- Train: train.py

2- Inference: predict.py

Scripts instructions

Note: For more info about this phase of the project feel free to read the SRS Document. Link.


Phase 2 - Multi-Object-Detection

Static Inference Example

Used Dataset: Face Mask Detection [3 Classes] This dataset consists of 853 images belonging to three classes (With Mask / Without Mask / Wearing Wrong)

Complete Project (Notebook): YOLOv3_Face_mask_Detection.ipynb

Feel free to use our simple python OpenCV Application to infer images, videos, and real-time streaming through a camera:

1- Inference Images (multi objects detection): Images.py

2- Inference Videos (multi objects detection): Videos.py

3- Online camera: Camera.py

Note: For more info about this phase of the project feel free to read the project Documentation. Link.