How ajaykumar-847/face-mask-detection-and-recognition works
This repository trains a face-mask classifier, builds a face-identity encoding file, and runs a webcam application that detects faces, classifies mask use, identifies recognized people without masks, and speaks a warning. Training and identity enrollment are separate preparation workflows; the runtime entry point coordinates live detection and warnings. Edges are limited to relationships shown in the sampled scripts; the README is empty.
Main entry points: detect_mask.py Start detection · train_mask_detector.py Train classifier · facerec_video.py Build encodings · mask_detector.model Mask model
Components 15
Model training
- Mask dataset
dataset - Train classifier
train_mask_detector.py - Mask model
mask_detector.model
Identity enrollment
- Identity images
Images - Build encodings
facerec_video.py - Face encodings
face_enc
Live detection
- Start detection
detect_mask.py - Face detector assets
face_detector - Detect faces
detect_mask.py - Classify mask use
detect_mask.py - Recognize people
detect_mask.py - Speak warning
detect_mask.py - Display results
detect_mask.py
Other components
- Operator
- Webcam
Connections 14
- Mask dataset → Train classifier: supplies images
train_mask_detector.py - Train classifier → Mask model: saves model
train_mask_detector.py - Identity images → Build encodings: provides images
facerec_video.py - Build encodings → Face encodings: writes encodings
facerec_video.py - Operator → Start detection: starts
detect_mask.py - Webcam → Start detection: streams frames
detect_mask.py - Start detection → Mask model: loads model
detect_mask.py - Start detection → Face detector assets: loads detector
detect_mask.py - Start detection → Face encodings: loads identities
detect_mask.py - Start detection → Detect faces: calls
detect_mask.py - Detect faces → Classify mask use: predicts faces
detect_mask.py - Start detection → Recognize people: looks up unmasked
detect_mask.py - Start detection → Speak warning: speaks warning
detect_mask.py - Start detection → Display results: shows frame
detect_mask.py