KrishArul26 / Live-Face-Mask-Detection-Using-Faster_rcnn

Due to the COVID-19 regulation, people have to wear masks to protect themselves. Also, you need to create a system to find out if a person is wearing a mask or not. Also, this system should give a warning or sound when people are not wearing masks. So, I created the model with the help of Fast-R-CNN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Live-Face-Mask-Detection-Using-Faster_rcnn

Fast R-CNN Quick Overview

**Fast R-CNN** is an object detector that was developed solely by Ross Girshick, a Facebook AI researcher and a former Microsoft Researcher. Fast R-CNN overcomes several issues in R-CNN. As its name suggests, one advantage of the Fast R-CNN over R-CNN is its speed. Here is a summary of the main contributions in

  1. Proposed a new layer called ROI Pooling that extracts equal-length feature vectors from all proposals (i.e. ROIs) in the same image. Compared to R-CNN, which has multiple stages (region proposal generation, feature extraction, and classification using SVM), Faster R-CNN builds a network that has only a single stage.
  2. Faster R-CNN shares computations (i.e. convolutional layer calculations) across all proposals (i.e. ROIs) rather than doing the calculations for each proposal independently. #
  3. This is done by using the new ROI Pooling layer, which makes Fast R-CNN faster than R-CNN.
  4. Fast R-CNN does not cache the extracted features and thus does not need so much disk storage compared to R-CNN, which needs hundreds of gigabytes.
  5. Fast R-CNN is more accurate than R-CNN.
  6. The general architecture of Fast R-CNN is shown above. The model consists of a single-stage, compared to the 3 stages in R-CNN. It just accepts an image as an input and returns the class probabilities and bounding boxes of the detected objects..

Problem Statment

Due to the COVID-19 regulation, people have to wear masks to protect themselves. Also, you need to create a system to find out if a person is wearing a mask or not. Also, this system should give a warning or sound when people are not wearing masks. So, I created the model with the help of Fast-R-CNN.

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

πŸ“ Data Collection

This project has done up to 50000 epochs with error 0.08 values.Futher, 2200 images were collected among them 1000 images are without mask and 1200 images are with mask.

  • With Mask: 1200
  • Without Mask: 1000

πŸ”‘ Prerequisites

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

πŸš€ Installation For Live Mask Detection

  1. Clone the repo
  1. Change your directory to the cloned repo
cd Live-Face-Mask-Detection-Using-Faster_rcnn
  1. Create a Python 3.6 version of virtual environment named 'mask' and activate it
pip install virtualenv

  • Create virtual environmental
virtualenv mask

  • Activate that environmental
mask\Scripts\activate

  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 mask_detection_video.py

πŸ”‘ Results

  • For this mask detection I have used computer vision trained net work which is faster-rcnn

πŸš€ Installation For Mask Detection for images

  1. Clone the repo
  1. Change your directory to the cloned repo
cd Live-Face-Mask-Detection-Using-Faster_rcnn
  1. Create a Python 3.6 version of virtual environment named 'mask' and activate it
pip install virtualenv

  • Create virtual environmental
virtualenv mask

  • Activate that environmental
mask\Scripts\activate

  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 mask_detection_image.py

πŸ”‘ Results

Testing-1

Testing-2

Testing-3

About

Due to the COVID-19 regulation, people have to wear masks to protect themselves. Also, you need to create a system to find out if a person is wearing a mask or not. Also, this system should give a warning or sound when people are not wearing masks. So, I created the model with the help of Fast-R-CNN


Languages

Language:Python 100.0%