Skip to content

metaloom/face-recognition-server

Repository files navigation

Face Recognition Server

A simple FastAPI face recognition server for the insightface library.

Env

  • MODEL_ID: buffalo_l

Container

podman run \
    --device nvidia.com/gpu=all \
    --shm-size 1g \
    --name face-recognition-server \
    -v /extra/cache/insightface:/root/.insightface/ \
    -p 8000:8000 \
    --rm \
    metaloom/face-recognition-server:latest

Java Client

String BASE_URL = "http://localhost:8000/api/v1";

FaceDetectionServerClient client = FaceDetectionServerClient.newBuilder()
  .setBaseURL(BASE_URL).build();

FaceDetectionServerClient client = client();
JsonObject json = client.detect(MULTIFACE_IMAGE_URL, null);

Spec

POST /api/v1/detect

{
  "image_url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/SmolVLM.png",
  "image_data": "dGVzd…"
}

Build

./build.sh

Test

./test.sh

Development

pip3 install -r requirements.txt

uvicorn main:app --reload

Releases

No releases published

Packages

No packages published