Thameur Portfolio

Face Detection and Recognition with Mask Detection Based on MTCNN and Facenet πŸ€–

June 15, 2022 (2y ago)

πŸ€– A real-time facial recognition system utilizing MTCNN for face detection and Facenet for recognition, with mask detection capabilities to identify vaccinated individuals.

πŸ’» Source CodeΒ Β β€’Β 
Face Detection and Recognition with Mask Detection
Face Detection and Recognition with Mask Detection

πŸ“ Abstract

The Face Detection and Recognition with Mask Detection system is designed for real-time facial recognition using the MTCNN and Facenet models. The system can detect faces and recognize individuals while also identifying whether they are wearing a mask. The project integrates the EfficientNetB3 model for mask detection and uses a live webcam feed for real-time processing. It can be used for applications such as identifying vaccinated persons in environments where mask-wearing is mandatory.

🌟 Features

  • Real-Time Face Detection and Recognition: Detect and recognize faces in real-time using live webcam feeds.
  • Mask Detection: Uses the EfficientNetB3 model to detect whether a person is wearing a mask.
  • MTCNN for Face Detection: Detect faces with high accuracy using the MTCNN model.
  • Vaccinated Person Identification: The system identifies vaccinated individuals through mask detection.
  • Live Webcam Integration: Processes live webcam video streams for real-time monitoring.
  • Easy Setup: Run the Python scripts for face detection, recognition, and mask detection with minimal setup.

πŸš€ Getting Started

Prerequisites

Before you can run this project, ensure the following packages are installed:

  • TensorFlow
  • Keras
  • OpenCV
  • MTCNN
  • EfficientNetB3
  • NumPy
  • Scikit-learn

Installation

  1. Clone the repository:
git clone https://github.com/verus56/d-tection-et-de-reconnaissance-facial-avec-masque-bas-e-sur-mtcnn-facnet cd face-detection-system
  1. Install required dependencies:
pip install tensorflow keras opencv-python mtcnn efficientnet numpy scikit-learn

Running the App

To train the model with your images:

python train_v2.py

To detect faces in real-time:

python detect.py

To detect face masks:

python detectmask.py

πŸ€– How It Works

  1. Face Detection: The MTCNN model detects faces from the webcam feed.
  2. Face Recognition: Facenet is used to recognize the detected faces.
  3. Mask Detection: EfficientNetB3 checks whether the person is wearing a mask.
  4. Vaccinated Identification: Based on mask detection, the system identifies whether a person is vaccinated.

πŸ“Š Technical Stack

  • AI Engine: MTCNN, Facenet, EfficientNetB3
  • Image Processing: OpenCV
  • Data Processing: NumPy
  • Face Recognition: TensorFlow, Keras
  • Machine Learning: Scikit-learn

πŸ› οΈ Deployment

This system can be deployed on a laptop or desktop with a webcam to perform real-time face detection, recognition, and mask detection.

πŸ“ License

Released under the GPL-3.0 License.

πŸ“² Contact

Made with ❀️ by Hamzaoui Thameur