How hrishikeshchandi/visitor-face-matching works
The product is a Streamlit visitor face-recognition app. Its main workflow accepts an image, generates an embedding, searches the FAISS index, verifies the nearest known face, maps that image filename to a requisition number, and retrieves visitor records from MySQL for display. A separate setup workflow builds the initial embeddings and index; batch uploads add embeddings to the existing index. The README documents these capabilities, while the sampled source shows the runtime calls. The graph omits unshown implementation details and external library internals.
Main entry points: main.py Streamlit app · generate_embeddings.py Initial index builder · files_handler.py Batch upload processor · config.py Known visitor images
Components 16
Visitor interface
- Streamlit app
main.py - Recognition results
main.py - Temporary uploads
config.py
Face recognition
- Query embedding
face_matching.py - Similarity search
face_matching.py - Face verification
face_matching.py - Requisition mapping
face_matching.py
Visitor data
- Known visitor images
config.py - FAISS index
config.py - Visitor records
database.py - Saved embeddings
config.py
Index setup and updates
- Environment settings
config.py - Initial index builder
generate_embeddings.py - Batch upload processor
files_handler.py
Other components
- Visitor
- MySQL database
Connections 23
- Visitor → Streamlit app: uploads images
README.md - Streamlit app → Temporary uploads: saves query image
main.py - Streamlit app → Query embedding: requests recognition
main.py - Query embedding → Similarity search: searches embedding
face_matching.py - Similarity search → FAISS index: reads and searches
face_matching.py - Similarity search → Face verification: checks nearest face
face_matching.py - Face verification → Known visitor images: verifies against image
face_matching.py - Face verification → Requisition mapping: returns verified match
face_matching.py - Requisition mapping → Streamlit app: returns requisition number
main.py - Streamlit app → Visitor records: requests records
main.py - Visitor records → MySQL database: queries records
database.py - Streamlit app → Recognition results: displays records
main.py - Visitor → Initial index builder: provides dataset images
README.md - Initial index builder → Known visitor images: reads image files
generate_embeddings.py - Initial index builder → Saved embeddings: saves embeddings
generate_embeddings.py - Initial index builder → FAISS index: builds and saves
generate_embeddings.py - Streamlit app → Batch upload processor: submits batch uploads
main.py - Batch upload processor → Known visitor images: adds image files
files_handler.py - Batch upload processor → Saved embeddings: loads and updates
files_handler.py - Batch upload processor → FAISS index: loads and updates
files_handler.py - Environment settings → Known visitor images: configures location
config.py - Environment settings → FAISS index: configures location
config.py - Environment settings → Saved embeddings: configures location
config.py