Skip to content

Getting Started

  • Python 3.12+
  • uv package manager
  • Rust toolchain (for FAISS bindings): curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • FAISS 1.14+ (macOS: brew install faiss; Linux: see FAISS install guide)
  • 4 GB RAM minimum (8 GB recommended for demo gallery)
Terminal window
git clone https://github.com/radekdymacz/ufme
cd ufme
make install

This runs uv sync --all-extras, installing all Python dependencies into a managed virtual environment.

Terminal window
make models

Downloads the following models into models/:

ModelFileSize
SCRFD_10G (detection)models/det_10g.onnx16 MB
w600k_r50 ArcFace (recognition)models/w600k_r50.onnx166 MB
MiniFASNetV2 (PAD)models/MiniFASNetV2.onnx1.8 MB
eDifFIQA(T) (quality)models/ediffiqa_t.onnx88 MB

To download stub/dummy models for development without running inference:

Terminal window
make models-dummy

The FAISS shard and compaction binaries are written in Rust. Build them once:

Terminal window
make rust-build
Terminal window
make demo

This starts the REST gateway on http://localhost:8080 with an in-memory FAISS index.

To load a demo gallery (downloads LFW faces and enrols ~20 subjects):

Terminal window
curl -X POST http://localhost:8080/api/v1/demo/load

Enrol a face:

Terminal window
curl -X POST http://localhost:8080/api/v1/enrol \
-H "Content-Type: application/json" \
-d '{
"image": "<base64-encoded-jpeg>",
"subject_id": "person-001",
"partition": "default"
}'

Search for it:

Terminal window
curl -X POST http://localhost:8080/api/v1/search \
-H "Content-Type: application/json" \
-d '{
"image": "<base64-encoded-jpeg>",
"partition": "default",
"top_k": 5
}'

See the REST API reference for full request and response schemas.

Terminal window
make test

Runs 246 tests (unit + integration + e2e). All tests use in-memory state — no external services required.