How mt-photos/mt-photos-deepface works
Project type and purpose
• This is a containerized, standalone REST-style microservice for face detection and feature extraction.
• It’s built in Python (FastAPI/Uvicorn) and wraps the DeepFace library to expose two endpoints: /check (health/auth check) and /represent (face analysis).
File structure
• Top-level files:
• server.py – FastAPI application entrypoint defining routes and orchestrating DeepFace.
• requirements.txt – Python dependencies (FastAPI, Uvicorn, DeepFace, etc.).
• .env.example – template for environment variables (API_AUTH_KEY, DETECTOR_BACKEND, RECOGNITION_MODEL).
• Dockerfile – container image build instructions.
• .github/workflows/build.yml – CI pipeline for automated build/test.
• sources.list – apt sources for base image.
• No separate “frontend” or “lib” directories: the service is a single Python monolith packaged in Docker.
README for additional insights
• The service allows configurable detection backends (retinaface, opencv, etc.) and recognition models (Facenet512, ArcFace, etc.) via env variables.
• It supports mounting a host /models volume for faster loading of pretrained weights.
• Usage covers Docker pull/run commands and local Python startup.