How varshinipinnu8/face-detection-and-recognition works
This Streamlit application lets users either detect faces in one uploaded image or verify whether two uploaded images show the same person. Detection returns an annotated image and face count; verification detects and crops faces, creates FaceNet embeddings, compares them, and presents similarity, distance, and a prediction. The graph follows the documented features and the inspected app.py and utils.py; model and library nodes represent external dependencies, not repository modules.
Main entry points: utils.py Verify faces · app.py Streamlit app
Components 16
User interface
- Streamlit app
app.py
Face detection
- Detection handler
app.py - Process detection
utils.py - Detect faces
utils.py - Draw boxes
utils.py - MTCNN detector
- OpenCV
Face verification
- Verification handler
app.py - Verify faces
utils.py - Extract face
utils.py - Generate embedding
utils.py - Cosine similarity
utils.py - Euclidean distance
utils.py - FaceNet embedder
- SciPy distance
Other components
- User
Connections 19
- User → Streamlit app: uploads images
- Streamlit app → Detection handler: routes detection
- Detection handler → Process detection: calls
- Process detection → Detect faces: calls
- Process detection → Draw boxes: calls
- Detect faces → MTCNN detector: detects faces
- Detect faces → OpenCV: resizes images
- Draw boxes → OpenCV: draws annotations
- Streamlit app → Verification handler: routes verification
- Verification handler → Verify faces: calls
- Verify faces → Extract face: calls twice
- Extract face → MTCNN detector: detects face
- Extract face → OpenCV: resizes crops
- Verify faces → Generate embedding: calls twice
- Generate embedding → FaceNet embedder: generates embedding
- Verify faces → Cosine similarity: compares embeddings
- Cosine similarity → SciPy distance: computes distance
- Verify faces → Euclidean distance: compares embeddings
- Streamlit app → User: displays results