Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 3.19 KB

README.md

File metadata and controls

69 lines (47 loc) · 3.19 KB

Face Mask Detector: Detect Mask-Wear Correctness

Face Mask Detector Logo

What is Face Mask Detector?

  • A python program that detects if mask is worn, not worn or worn incorrectly. The program is based on yolov5 model which was trained on custom dataset.
  • The project was a part of a Kaggle Competition and got the first ranking in the leaderboard.

Table of contents

Technologies

  • Programming Language: Python
  • GUI Framework: Tkinter
  • Deep Learning: Yolov5

Dataset

  • The model was trained on a dataset:
    • Training Set containing 3 classes:
      • With Mask: x images.
      • Without Mask: x images.
      • Mask Worn Incorrectly: x images.
    • Testing Set which was used for evaluation in kaggle.

Model

The project was based on Yolov5 training on custom dataset, The dataset was training on Yolov5L model. For more information check : Yolov5 Repo.

The model was trained for 1000 epochs with 16 batches and got the following results:

  • 0.4 MCRMS training error
  • 0.5 MCRMS testing error

Setup

To run the python application you need to install the requirements (It is preffered to start a new environment and install all the requirements) using the following command

 pip install -r requirements.txt

Features

Use Still Image

Browse and select any image, The program will automatically detect the faces and each face will passed to the pre-trained model for classification.

The output will be automatically displayed and also saved in ./runs/detect/ directory.

Mask Still Image

More Examples: woman-mask-split-04-ht-jt-210316_1615932165011_hpEmbed_4x3_992

face-recognition-test

GettyImages-1223601728_2_preview-c-d040c4f

Use Live Camera

Instead of using an image, If you have a camera in your PC/Laptop, you can press "Use Live Camera" to get the classification done on the camera input.

Each frame will be passed to the model for classification and the output will be automatically shown and also the video will be saved in ./runs/detect/ directory.

index