This project leverages the power of Mask R-CNN to perform instance segmentation and classification of face masks in images. The system can identify:
- 👷♂️ Faces with masks
- 🚫 Faces without masks
- 😕 Faces with incorrectly worn masks
The solution is implemented in Python and built upon the Mask R-CNN framework. It is designed for real-world applications like monitoring public spaces during a pandemic.
- 🔍 Instance Segmentation: Identifies mask-wearing status and segments faces in images.
- 🎨 Customizable Classes: Extensible to detect other classes.
- ⚙️ Pre-trained Weights: Utilizes COCO weights for transfer learning.
- 🎮 Visualizations: Overlay predictions with bounding boxes and segmentation masks.
- ⏳ Real-time Applications: Can be integrated with OpenCV for live detection.
- 🧬 Framework: Mask R-CNN
- 🚀 Deep Learning: TensorFlow, Keras
- 📊 Dataset Handling: XML Annotations, Numpy
- 📚 Visualization: Matplotlib, Seaborn
- ⚙️ Image Processing: OpenCV, Skimage
- 📈 Training Data: Custom Dataset (Face Mask Detection)
$ git clone https://github.com/your-username/mask-detection-mask-rcnn.git
$ cd mask-detection-mask-rcnn
$ pip install -r requirements.txt
$ wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5
- Dataset Preparation: Ensure images and XML annotations are placed in
/images
and/annotations
directories, respectively. - Configure Model: Update parameters in
MaskConfig
. - Train Model:
$ python train_model.py
- Fine-tune Model:
$ python tune_model.py
After training, visualize results on test images:
$ python visualize_results.py
- 🔒 Public Safety: Monitoring mask compliance in public spaces.
- 🔧 Access Control: Ensuring mask-wearing in restricted areas.
- 🎮 AI Solutions: Integration with real-time systems like OpenCV.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to reach out:
- ✉ Email: ayemenbaig26@gmail.com
- 🔗 GitHub: Aymen016
Thank you for checking out this project! 🚀