Skip to content

KaremBenChikha/FaceMaskDetection

Repository files navigation

FaceMaskDetection

Python TensorFlow OpenCV Keras License

Neural Network Algorithm to detect people wearing face masks and take actions accordingly.

Hackster YouTube Dataset

Overview

This project detects face masks in real-time using a neural network trained with TensorFlow. When a person without a mask is detected, the system sends a serial command to an Arduino to trigger an action (e.g., LED indicator).

Achieves 98% confidence on the trained model.

Pipeline

Step 1: Train the Model

Train a CNN on a dataset of masked vs unmasked faces using TensorFlow/Keras.

Works best on Ubuntu 20.04 LTS with GPU acceleration.

Step 2: Detection

Run the face recognition algorithm that uses the trained model to detect masks on faces via webcam.

A pre-trained model (mask_detector.model) is included if you want to skip training.

Step 3: Actuate

Serial command triggers an Arduino to switch an LED based on detection state.

Installation

pip3 install -r requirements.txt

Hardware Requirements

  • Arduino board
  • Webcam
  • LED + resistor

Dependencies

TensorFlow - Keras - imutils - numpy - OpenCV - matplotlib - scipy - argparse - pyserial

About

Neural Network Algorithm to detect people wearing face masks and take actions accordingly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors