← Back to Projects

leptons1618@anishgiri.dev:~/projects/visionid cat project.toml

Computer Vision 2024 Active development

VisionID

Face detection and recognition for live camera feeds — one build that runs on a Jetson, a CUDA desktop or a laptop CPU, with roles, audit and multi-camera sources.

category
Computer Vision
year
2024
status
Active development
stack
7 tools
highlights
5
write-up
4 min read

01Highlights

  1. One build, four execution providers: CUDA, TensorRT, DirectML or CPU, resolved at load from a priority list rather than chosen at install time.
  2. Recognition by cosine similarity against enrolled embeddings, with a tunable threshold and tolerance for slight side profiles.
  3. Multi-camera sources as `id=uri` pairs — RTSP streams or local device indices — switchable while running.
  4. Three roles with signed expiring tokens, plus an optional operator PIN in front of enrol, promote and delete.
  5. Unknown faces recorded with an insert cooldown and a retention window, so an empty corridor does not fill the database.

02Built with

  • 01Python
  • 02ONNX Runtime
  • 03OpenCV
  • 04NiceGUI
  • 05CUDA
  • 06TensorRT
  • 07DeepStream

03Case study

April 15, 2024 4 min read 807 words

VisionID

Face recognition at the edge, where the hardware is whatever the site already had and the interesting problems are not the model.

The problem

Face recognition on a live feed is a solved problem in a notebook and an unsolved one on site. The hardware is whatever is already there — a Jetson on a wall, a desktop with a consumer GPU, occasionally a laptop with neither — and a build that assumes CUDA simply does not start on two of the three. Then the questions stop being about the model: who is allowed to enrol a face, what happens to the faces you did not recognise, and how anyone knows which camera a match came from.

The solution

Inference runs through ONNX Runtime against a priority list of execution providers resolved at load, so CUDA, TensorRT, DirectML and CPU are the same build rather than four deployments. Recognition is cosine similarity against enrolled embeddings with a tunable threshold. Around that sits the part that actually makes it deployable: named camera sources switchable at runtime, three roles behind signed expiring tokens, an operator PIN on destructive actions, and a retention window on unknown faces.

Outcomes

  • `PROVIDER_PRIORITY` resolves CUDA → TensorRT/DirectML → CPU at load, so the same artefact runs on a Jetson, a CUDA desktop and a bare laptop with automatic fallback.
  • Cosine-similarity matching with a configurable threshold (0.35 by default), tuned for tolerance to slight side profiles rather than frontal-only accuracy.
  • Named multi-camera sources: `VIDEO_SOURCES` takes `id=uri` pairs — RTSP or device index — with the active source selectable at startup and switchable while running.

+4 more in the write-up

Inside the write-up

  1. The model was never the hard part
  2. One build, four execution providers
  3. Recognition, and the threshold that is a policy
  4. The knobs are the performance story
  5. Who is allowed to do what
  6. The unknowns need a policy too
  7. What is deliberately left out
Read the full case study →