How germanica-1/face-embedding-api works
This Flask backend accepts student images for face-embedding generation and syncing, and accepts face-match requests from clients such as the Raspberry Pi. Its main stages are image decoding, face detection and embedding, student matching, attendance logging, and parent email notification. The graph also shows the Supabase-backed student data operations and local embedding mirror. The README documents the capabilities; the sampled source supports the depicted calls, but the referenced local student JSON file is not present in the supplied tree.
Main entry points: app.py Flask Service · routes.py Match and Sync Routes · face_embeddings.py Embedding Sync · recog_logs.py Attendance Logging
Components 11
HTTP API
- Flask Service
app.py - Match and Sync Routes
app/routes.py
Face Processing
- Face Detection and Embedding
processing/face_processing.py
Student Records
- Student Embedding Updates
processing/supabase_helper.py - Embedding Sync
processing/face_embeddings.py - Local Embedding Files
data
Attendance Alerts
- Attendance Logging
processing/recog_logs.py - EmailJS Sender
processing/email_send.py
Other components
- Frontend / Pi
- Supabase
- EmailJS
Connections 14
- Frontend / Pi → Flask Service: sends images
- Flask Service → Match and Sync Routes: registers routes
- Flask Service → Student Embedding Updates: fetches and updates embeddings
- Flask Service → Face Detection and Embedding: processes faces
- Match and Sync Routes → Embedding Sync: syncs embeddings
- Match and Sync Routes → Attendance Logging: logs matched face
- Match and Sync Routes → Local Embedding Files: reads student JSON
- Embedding Sync → Supabase: fetches students
- Embedding Sync → Local Embedding Files: writes embedding mirror
- Student Embedding Updates → Supabase: reads and updates students
- Attendance Logging → Supabase: writes attendance and reads email
- Attendance Logging → EmailJS Sender: sends notification
- EmailJS Sender → EmailJS: posts email
- Flask Service → Frontend / Pi: returns API result