This project implements a real-time Face Mask Detection system using the YOLOv8 model. It helps monitor and enforce face mask compliance in public places by detecting and classifying face mask usage in images or video feeds.
-
Multi-Class Detection: The system classifies faces into three categories:
- With Mask: Faces wearing a mask correctly.
- Without Mask: Faces not wearing a mask.
- Incorrectly Worn Mask: Faces wearing a mask incorrectly.
-
Real-Time Detection: Capable of processing live video streams for real-time monitoring.
-
MAPE Calculation: The system evaluates model performance using Mean Absolute Percentage Error (MAPE).
- Model: A pre-trained YOLOv8 model is used to detect faces and classify them into the three categories mentioned above.
- Data: The system is trained on a dataset containing images of people with various mask-wearing statuses.
- Real-Time Application: The trained model can be deployed on live video streams to provide instant feedback about mask compliance.
-
Clone the repository:
git clone /~https://github.com/yourusername/Face-Mask-Detection.git cd Face-Mask-Detection
-
Install dependencies:
pip install -r requirements.txt
-
Download pre-trained weights: The model requires pre-trained weights for YOLOv8. You can download them and place them in the appropriate folder. Example weight file: weights_resnet.pth