Skip to content
KUA

SmartAttendanceSystem

• In Progress • Face Recognition / Python, FastAPI & PySide6
On this page (3) Expand

SmartAttendanceSystem is a local face-recognition event logging system. A live webcam or pre-recorded video file detects and identifies faces, then logs every sighting (known or unknown) into a shared SQLite database tagged by location (Entrance, Exit, Room 101, Hallway). Each logged event also saves a short .mp4 clip around the sighting so records can be reviewed visually.

This project is still in progress. The enrollment pipeline, FAISS index, PySide6 desktop interface, live recognizer, and FastAPI dashboard are working, but I am still testing edge cases across changing lighting and multiple concurrent camera feeds.

Technical details

Component Implementation
Face detection & recognition InsightFace buffalo_l (SCRFD detection + ArcFace embeddings)
Vector search faiss-cpu cosine similarity index over averaged per-person embeddings
Desktop interface PySide6 GUI for camera control, enrollment, and live monitoring
Backend API FastAPI + Uvicorn managed with Python 3.12+ and uv
GPU acceleration PyTorch (CUDA 13.0 wheel index) and onnxruntime-gpu, with CPU fallback
Database SQLite in WAL mode storing events, camera heartbeats, and per-location settings
Web dashboard Static HTML/CSS/JS frontend served directly by FastAPI

System subsystems

  • Enrollment pipeline (backend/data/embeddings/embeddings.py): Reads Person_Name/*.jpg folders, extracts normalized ArcFace embeddings, averages vectors per person, and builds the lookup index.
  • Live recognizer (backend/core/face_recognition.py): Runs the real-time OpenCV loop with an on-screen HUD, FAISS/cosine matching, camera heartbeats, per-location cooldowns, and ring-buffered .mp4 clip capture.
  • Desktop GUI (PySide6): Native desktop wrapper for launching cameras, adjusting thresholds, and reviewing logs without relying only on CLI flags.
  • Backlog video processor (backend/core/process_recording.py): Processes pre-recorded footage with an interactive scrubber (pause, step, jump, seek) and writes event timestamps aligned to the video timeline.
  • Motion liveness check: Frame-motion heuristic across pre-roll frames to catch basic static-photo spoofing attempts.
  • Backend-authoritative settings: Match thresholds, cooldown windows, and liveness toggles live per location in SQLite (camera_settings) and update live via API or keyboard shortcuts without restarting the camera loop.
  • Web dashboard & cleanup (backend/api/api.py, backend/core/cleanup.py): Filter events by date, location, or known/unknown status; inspect saved clips; export CSV reports; view online camera heartbeats; and prune expired rows and video clips via a retention job.

Why local processing

Running InsightFace, FAISS, and SQLite locally keeps camera footage on the local network, avoids per-request cloud vision costs, and lets the system keep logging even without internet access.

KUA
• Systems Architect & Developer

Specializing in resilient distributed architectures, modular Minecraft server infrastructure (Forge/Paper), and zero-trust security. Holder of 32 verified credentials across Google, IBM, Microsoft, and Coursera.

© 2026 KUA
RSS
Keep moving / Keep looking