This project is a CNN-based Face Mask Detection system built using MobileNetV2 and TensorFlow.
It classifies whether a person is wearing a mask or not from images or real-time camera input.
🚀 Features
📁 Upload image for prediction
📷 Real-time camera detection
🤖 CNN-based deep learning model
⚡ Fast inference using MobileNetV2
🌐 Streamlit web interface
🛠 Tech Stack
Python
TensorFlow / Keras
OpenCV
Streamlit
NumPy
PIL
🧠 Model Details
Architecture: MobileNetV2 (Transfer Learning)
Input Size: 128x128
Output Classes: Mask / No Mask
Accuracy: ~96%
Loss: ~0.13
📊 Dataset
Kaggle Face Mask Detection Dataset:
853 images
Bounding box annotations used for face cropping
🚀 How to Run
1️⃣ Install dependencies
pip install -r requirements.txt
2️⃣ Run Streamlit app
streamlit run app.py
💻 Usage (Python)
python
1import tensorflow as tf
23model = tf.keras.models.load_model("mobilenet_mask_model.keras")4🌐 Deployment
5Streamlit Cloud
6Hugging Face Spaces
7Render
8👩💻 Author
910Ayesha Yaqub
1112📌 License
1314This project isfor educational purposes only