Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coolmunzi/face_mask_detector
Face mask detection based on tensorflow 2 object detection API using Efficientdet-D1 model. This project can perform face mask detection on images as well as videos.
https://github.com/coolmunzi/face_mask_detector
covid19 detection-api efficientdet-ssd face-mask-detection face-mask-detector opencv opencv-python python tensorflow tensorflow-examples tensorflow-object-detection-api tensorflow2 tensorflow2-object-detection tfod-api
Last synced: 12 days ago
JSON representation
Face mask detection based on tensorflow 2 object detection API using Efficientdet-D1 model. This project can perform face mask detection on images as well as videos.
- Host: GitHub
- URL: https://github.com/coolmunzi/face_mask_detector
- Owner: coolmunzi
- Created: 2020-12-22T15:21:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-22T17:55:49.000Z (almost 4 years ago)
- Last Synced: 2024-10-17T13:16:03.938Z (29 days ago)
- Topics: covid19, detection-api, efficientdet-ssd, face-mask-detection, face-mask-detector, opencv, opencv-python, python, tensorflow, tensorflow-examples, tensorflow-object-detection-api, tensorflow2, tensorflow2-object-detection, tfod-api
- Language: Python
- Homepage:
- Size: 27.5 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
About the project
Wearing mask is the most effective way to control the spread of Corona virus. Face mask detector applications are in high demand especially to monitor public places like public marketplaces, public offices, malls, government buildings etc This project aims to create an efficient Face Mask detector application based on deep neural network.
![alt text](./readme_images/test2.png) ![alt text](./readme_images/test3.png)
Dataset used for training
I have used the data from [Face Mask Detection](https://www.kaggle.com/andrewmvd/face-mask-detection/activity) dataset from Kaggle. The dataset contained annotated images with 3 classes:
1. with mask
2. without mask
3. mask worn incorrectlyThe dataset contains total of 853 images along with annotations in PASCAL VOC format.
Technolgy stack used
1. [OpenCV](https://opencv.org/)
2. [TensorFlow 2 Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection)
3. [EfficientDet-SSD based Face Mask detector](https://tfhub.dev/tensorflow/efficientdet/d1/1)
4. [Python](https://www.python.org/)Prerequisites
All the dependencies and required libraries are included in the file _requirements.txt_.
Model Training
The repo contains ssd efficientdet model trained with 20,000 iterations using Google Colab. You can also refer to [my colab notebook](https://colab.research.google.com/drive/1tGTuIg2xJipoln8IC8cxH35Wr4nJ7930?usp=sharing), where I have tried to explain step by step flow for performing model training using Tensorflow2 object detection API.
Installation
1. Clone the repo using following command
$ git clone https://github.com/coolmunzi/face_mask_detector.git
2. Create a virtual environment and change the directory to the cloned repo
3. Change your directory to the cloned repo and create a Python virtual environment named 'test'
4. Install the dependencies using following command
$pip install -r requirements.txt
5. To perform face mask detection on images:
$python face_mask_detector.py --type image --input {Path to directory containing images} --output {Path to directory where you want to store the images with predictions}
6. To perform face mask detection on webcam:
$python face_mask_detector.py --type video --input webcam