Repository: Alauddinbukhari/Face-Mask-Recognition
Visibility: Public
Face-Mask-Recognition is a real-time face mask detection project built with Python, Keras, and OpenCV.
It trains a Convolutional Neural Network (CNN) to classify images as Mask or No Mask, and integrates with a webcam feed to detect faces and display results live.
- CNN model trained on custom dataset (
train/trainandtest/test). - Real-time detection using Haar Cascade classifier.
- Bounding boxes with labels:
- 🟥 No Mask → Red box
- 🟩 Mask → Green box
- Data augmentation for robust training.
- Model checkpointing (
model-010.h5) and final saved model (datamodel.h5).
- Python 3.x
- Keras / TensorFlow
- OpenCV
- NumPy
- Scikit-learn
Face-Mask-Recognition/
├── train/ # Training dataset
├── test/ # Validation dataset
├── train.py # Model training script
├── recognize.py # Real-time detection script
├── model-010.h5 # Saved trained model checkpoint
├── datamodel.h5 # Final trained model
├── haarcascade_frontalface_default.xml # Haar Cascade for face detection
├── more about dataset.txt # Dataset details
└── README.md # Project documentation
git clone https://github.com/Alauddinbukhari/Face-Mask-Recognition.git
cd Face-Mask-Recognitionpip install -r requirements.txtpython train.pyThis will train the CNN using images in train/ and test/ directories, and save the model as datamodel.h5.
python recognize.pyPress ESC to exit the webcam window.
- Conv2D + MaxPooling → Feature extraction
- Flatten → Convert to 1D vector
- Dropout → Prevent overfitting
- Dense layers → Classification
- Softmax output → Mask / No Mask
Owner: Alauddinbukhari
- Full‑stack developer (Python, Java, React, Cloud)
- Passionate about building scalable and secure applications
- Open to freelance and contract opportunities