Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fyt3rp4til/face-mask-detection
https://github.com/fyt3rp4til/face-mask-detection
cnn keras-neural-networks keras-tensorflow opencv python3 tensorflow
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fyt3rp4til/face-mask-detection
- Owner: FYT3RP4TIL
- Created: 2023-09-11T09:07:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T19:00:14.000Z (about 1 year ago)
- Last Synced: 2024-01-18T20:16:55.155Z (10 months ago)
- Topics: cnn, keras-neural-networks, keras-tensorflow, opencv, python3, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 1.35 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Face Mask Detection
Face Mask Detection System built with OpenCV, Keras/TensorFlow using Deep Learning and Computer Vision concepts in order to detect face masks in static images as well as in real-time video streams.
## Introduction
Due to the seen pandemic Covid-19 in the past years we got to know how wearing masks beccame important hence this system can therefore be used in real-time applications which require face-mask detection for safety purposes due to the outbreak . This project can be integrated with embedded systems for application in airports, railway stations, offices, schools, and public places to ensure that public safety guidelines are followed.## :warning: TechStack
- [OpenCV](https://opencv.org/)
- [Keras](https://keras.io/)
- [TensorFlow](https://www.tensorflow.org/)
- [Python](https://www.python.org/)## :file_folder: Dataset
The dataset used can be downloaded here - [Click to Download](https://www.kaggle.com/datasets/ashishjangra27/face-mask-12k-images-dataset/download?datasetVersionNumber=1)This dataset consists of ~12k images belonging to three classes:
* Train
* Test
* Validation## :key: Prerequisites
All the dependencies and required libraries are included in the file
requirements.txt
[See here](https://github.com/Sudhanshu21xx/Face-Mask-Detection/blob/main/requirements.txt)## 🚀 Installation
1. Clone the repo
```
$ git clone https://github.com/Sudhanshu21xx/Face-Mask-Detection.git
```2. Open the repo in notebook
3. Now, run the following command in your notebook to install the libraries required
```
$ pip3 install -r requirements.txt
```## :bulb: Working
1. Download the dataset.
2. Change the directory main_dir in the Facemask_model.ipynb and run it:
```
import os
main_dir ='New Masks Dataset'
train_dir = os.path.join(main_dir,'Train')
test_dir = os.path.join(main_dir,'Test')
valid_dir = os.path.join(main_dir,'Validation')train_mask_dir = os.path.join(train_dir,'Mask')
train_nomask_dir = os.path.join(train_dir,'Non Mask')
```3. Run the Facemaskdetection(open_cv).ipynb (you can also change the videocapture to livecapture)
```
cap = cv2.VideoCapture('video.mp4')
#cap = cv2.VideoCapture(0)
```## :key: Results