zepiris

zepto-labs更新放缓

面向考勤场景的自拍人脸认证平台,无需 OTP、注册或代打卡,专为低成本手机优化,可大规模部署。

No OTPs. No registers. No buddy punching. Just a selfie. ZepIris is Zepto's purpose-built face authentication platform - engineered for scale, tuned for budget phones.

release-v1.0.0发布于 2026-05-25 11:49 UTC355star93fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
git clone <repository-url>
cd zepiris
docker-compose up -d
curl http://localhost:8000/healthz
硬件要求按 README 说明

README 未给出显存要求;ML 推理服务可独立部署在 GPU 上,但未说明具体 GPU 厂商或型号。Milvus 需 4GB+ 内存,另需 10GB+ 空闲磁盘。

需要 CUDA有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源自托管人脸认证平台,一条流水线搞定检测、向量检索与活体风控

面向考勤场景的自拍人脸认证平台,无需 OTP、注册或代打卡,专为低成本手机优化,可大规模部署。

核心能力

  • 用 AuraFace-v1 或 buffalo_l 提取 512 维归一化人脸向量
  • 通过 Milvus 做 1-to-N COSINE 相似度检索
  • 独立 ML 推理服务并行跑 NSFW、防伪、模糊三项质检
  • 按 tenant 隔离命名空间,支持多租户注册与检索
  • 人脸记录支持 insert/upsert/delete/get 全套 CRUD

容易踩的坑

需先装 Docker Compose v1.29+ 和 Poetry 2.x,Python 版本须在 3.10–3.14 之间;Compose 会一并拉起 Milvus、MinIO、Etcd,MinIO 宿主机端口是 9002 而非 9000;ML 推理服务单独占 8001 端口,主 API 在 8000,两者需分别访问文档。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本release-v1.0.0
  1. release-v1.0.0v1.0.0最新正式版2026-05-25 · 2026-05-25 11:49 UTC

    ZepIris v1.0.0 — Open-source face search & content safety

    We're excited to share v1.0.0 of ZepIris, an open-source microservice from Zepto Labs for face embedding, vector search, and automated image quality / safety checks.

    What it does

    ZepIris helps teams ship face-based products without stitching together embedding, storage, search, and safety pipelines from scratch:

    • Face embeddings — 512-dimensional, L2-normalized vectors (InsightFace buffalo_l)
    • 1-to-N vector search — Milvus-backed COSINE similarity
    • Multi-tenant CRUD — insert, upsert, delete, and get under isolated namespaces
    • Content safety — nudity, anti-spoof, and blur detection via a separate ML inference service
    • Production-shaped architecture — main API (8000) + ML service (8001), MinIO for images, full Docker Compose stack
    • Developer-friendly API — FastAPI, OpenAPI/Swagger, requestId on responses

    Good fits

    • Attendance and workforce check-in
    • Onboarding with liveness / quality gates
    • Access control with safety validation before enrollment

    Get started

    git clone https://github.com/zepto-labs/zepiris.git
    cd zepiris
    # See docs/QUICK_START.md and docs/LOCAL_SETUP_AND_TEST.md
    
    • License: MIT
    • Docs: README, API reference, configuration guide in-repo

    Issues, PRs, and real-world feedback are welcome — this is the first stable open release and we'd love to hear how you use it.

    Repo: https://github.com/zepto-labs/zepiris

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ZepIris

    Python 3.10+ FastAPI Poetry License: MIT

    👁️ ZepIris — Scalable Face Authentication

    No OTPs. No registers. No buddy punching. Just a selfie.

    ZepIris is Zepto's purpose-built face authentication platform — open-sourced for teams running identity verification at operational scale.

    It handles the full pipeline: face detection, embedding generation, vector search, and spoof/blur/nsfw flagging. Designed to work on budget smartphones, in low light, under high concurrency.

    If you're running attendance or identity workflows at scale and don't want to stitch together multiple vendors, this is it.

    Current version: v1.0.0. URL paths use /v1/... for the HTTP API; OpenAPI info.version and the Python package follow semver (pyproject.toml / zepiris.version).


    Table of Contents


    Overview

    ZepIris simplifies face recognition and verification workflows by providing:

    • Pre-integrated face embeddings using AuraFace-v1 OR InsightFace's buffalo_l model, both are 512-dimensional representations, based on the flag ML_SERVICE_FACE_MODEL set in .env
    • 1-to-N face vector search via Milvus for fast COSINE similarity matching
    • Automated content safety checks: nsfw detection, anti-spoofing, blur detection — all via a dedicated ML inference service
    • Multi-tenant support — per-tenant face enrollment and search with isolated namespaces
    • Full CRUD operations — insert, upsert, delete, and get for face records
    • Production-ready microservice architecture with independent scaling for ML inference
    • S3-compatible image storage via MinIO
    • REST API with OpenAPI/Swagger auto-documentation and requestId traceability

    Use Cases

    • Attendance Tracking — Enroll employee faces, query against live camera feeds
    • Onboarding Workflows — Identity verification with liveness detection
    • Face-Based Access Control — 1-to-N face matching with content safety validation
    • Quality Assurance — Automatic detection of low-quality, spoofed, or unsafe images

    Features

    CapabilityDescription
    Face EmbeddingExtract 512-dimensional Normalized embeddings using AuraFace-v1 OR InsightFace's buffalo_l
    1-to-N Face SearchQuery vectors against Milvus for fast COSINE similarity matching
    Full CRUD APIInsert, upsert, delete, and retrieve face records with multi-tenant isolation
    Content Safety (ML)NSFW, spoof/deepfake, and blur detection via dedicated ML inference microservice
    Multi-TenantPer-tenant face enrollment and search with isolated namespaces
    Microservice ArchitectureSeparate ML inference service (port 8001) scales independently from main API (port 8000)
    Image StorageS3-compatible MinIO integration for persistent image archival
    REST APIFastAPI with OpenAPI/Swagger docs, requestId on every response
    Docker ReadyMulti-stage Dockerfiles for both services + Docker Compose with all dependencies
    Configurable ThresholdsFine-tune quality checks (blur sensitivity, spoof threshold, NSFW confidence)

    Architecture

    ZepIris consists of two independent FastAPI microservices that communicate via HTTP:

    ┌─────────────────────────────────────────────────┐
    │  Client / Application                           │
    └──────────────┬──────────────────────────────────┘
                   │ (REST API)
          ┌────────▼──────────────────────────────┐
          │  Main API (port 8000)                 │
          │  ├─ POST /v1/faces/search             │
          │  ├─ POST /v1/faces/insert             │
          │  ├─ POST /v1/faces/upsert             │
          │  ├─ DELETE /v1/faces/delete            │
          │  ├─ GET  /v1/faces/get/{face_id}      │
          │  ├─ GET  /healthz                     │
          │  └─ GET  /readyz                      │
          └───┬────────────────┬──────────────────┘
              │                │
           ┌──▼──┐          ┌──▼─────┐
           │MinIO│          │ Milvus │
           │ S3  │          │ Vector │
           │Store│          │ Store  │
           └─────┘          └────────┘
                               │
          ┌────────────────────▼───────────────────┐
          │ ML Inference (port 8001)                │
          │ ├─ POST /v1/embed   (Face Embedding)    │
          │ ├─ POST /v1/NSFW  (NSFW Detection)  │
          │ ├─ POST /v1/spoof   (Spoof Detection)   │
          │ ├─ POST /v1/blur    (Blur Detection)     │
          │ └─ POST /v1/assess  (Combined IQA)      │
          └─────────────────────────────────────────┘
    

    Main API Service (Port 8000)

    Responsibilities:

    • Handle user-facing CRUD and search endpoints under /v1/faces/
    • Manage image uploads and storage via MinIO
    • Coordinate with ML inference service for IQA and embedding extraction
    • Index face embeddings in Milvus with multi-tenant support
    • Return structured responses with requestId for traceability

    Dependencies:

    • FastAPI, Uvicorn, Pydantic
    • Milvus vector database (with Etcd for metadata)
    • MinIO (S3-compatible object storage)
    • HTTPx (for ML service communication)

    ML Inference Service (Port 8001)

    Responsibilities:

    • Run independent, parallelizable ML workloads
    • Maintain 4 PyTorch models in memory:
      • Face Embedding — AuraFace-v1 OR InsightFace's buffalo_l (640×640 input → 512-d output) based on the flag ML_SERVICE_FACE_MODEL set in .env
      • NSFW Detection — MobileNetV2 (2-class classifier)
      • Spoof Detection — MobileNetV3-Large (liveness detection)
      • Blur Detection — ResNet18 (image quality assessment)
    • Expose HTTP endpoints for individual or combined inference
    • Combined IQA runs all 3 quality checks in parallel via ThreadPoolExecutor

    Benefits:

    • Scale independently — run on GPU hardware if needed
    • Reuse models across requests — no repeated loading
    • Parallel execution — run all 3 quality checks simultaneously

    Quick Start

    Prerequisites

    • Python 3.10–3.14 (tested on 3.10–3.14)
    • Poetry 2.x for dependency management (install here)
    • Docker & Docker Compose (v1.29+; recommended for all-in-one setup)
    • 4GB+ RAM for Milvus, 10GB+ free disk space

    Check your versions:

    python3 --version
    poetry --version
    

    Docker Compose (One Command)

    For a fully containerized local setup:

    # Clone and navigate
    git clone <repository-url>
    cd zepiris
    
    # Start all services (Milvus, MinIO, Etcd, API, ML inference)
    docker-compose up -d
    
    # Verify health
    curl http://localhost:8000/healthz
    
    # Open API documentation
    # Visit: http://localhost:8000/docs
    
    # Stop services
    docker-compose down
    

    The Compose file sets name: zepiris, so images are tagged zepiris-api and zepiris-ml-inference regardless of clone directory name.

    This starts:

    • Main API (port 8000)
    • ML inference (port 8001)
    • Milvus (port 19530)
    • MinIO (host port 9002 → container 9000, console on 9001)
    • Etcd (metadata store for Milvus)

    API Endpoints

    Interactive Documentation

    Once running, visit these URLs in your browser:

    Main API (/v1/faces/)

    Health & Readiness
    curl http://localhost:8000/healthz
    # {"status": "ok"}
    
    curl http://localhost:8000/readyz
    # {"status": "ok"}
    
    Insert a Face

    Register a new face with an ID and tenant:

    curl -X POST http://localhost:8000/v1/faces/insert \
      -F "id=employee_001" \
      -F "tenant=acme_corp" \
      -F "[email protected]"
    

    Response:

    {
      "requestId": "a1b2c3d4-e5f6-...",
      "imageQualityAssessment": {
        "passed": true,
        "nsfw": {"is_safe": true, "probability": 0.02},
        "spoof": {"is_spoof": false, "probability": 0.05},
        "blur": {"is_sharp": true, "probability": 0.10}
      },
      "userOperationResult": {
        "operation": "INSERT",
        "status": "success"
      }
    }
    

    Parameters:

    • id (required) — unique face identifier
    • tenant (required) — tenant namespace for isolation
    • file (required) — JPEG/PNG image file (max 5 MB)
    • Returns 409 Conflict if a face with the same id already exists
    • Returns 422 Unprocessable Entity if IQA fails or no face detected
    Search Similar Faces

    Upload an image and find matching faces in the database:

    curl -X POST "http://localhost:8000/v1/faces/search?top_k=5" \
      -F "id=query_001" \
      -F "tenant=acme_corp" \
      -F "file=@query_face.jpg"
    

    Response:

    {
      "requestId": "d4e5f6a7-b8c9-...",
      "imageQualityAssessment": {
        "passed": true,
        "nsfw": {"is_safe": true, "probability": 0.01},
        "spoof": {"is_spoof": false, "probability": 0.03},
        "blur": {"is_sharp": true, "probability": 0.08}
      },
      "searchResult": {
        "matches": [
          {"id": "employee_001", "score": 0.92}
        ]
      }
    }
    

    Parameters:

    • id (required, form) — identifier for this query
    • tenant (required, form) — tenant namespace
    • file (required, form) — JPEG/PNG image file
    • top_k (optional, query, default: 5) — number of matches to return
    • threshold (optional, query) — minimum similarity score; defaults to ZEPIRIS_MILVUS_SEARCH_THRESHOLD
    • Returns 200 OK with empty matches array if IQA fails or no face detected
    Upsert a Face

    Insert or update a face record:

    curl -X POST http://localhost:8000/v1/faces/upsert \
      -F "id=employee_001" \
      -F "tenant=acme_corp" \
      -F "file=@updated_face.jpg"
    

    Response: Same structure as Insert, with "operation": "UPSERT".

    Delete a Face

    Remove a face record by ID:

    curl -X DELETE "http://localhost:8000/v1/faces/delete?id=employee_001"
    

    Response:

    {
      "requestId": "f6a7b8c9-d0e1-...",
      "userOperationResult": {
        "operation": "DELETE",
        "status": "success"
      }
    }
    
    Get Face Metadata

    Retrieve a face record by ID:

    curl http://localhost:8000/v1/faces/get/employee_001
    

    Response:

    {
      "face_id": "employee_001",
      "tenant": "acme_corp",
      "object_key": "faces/employee_001"
    }
    

    ML Inference API (/v1/)

    All POST endpoints accept JSON bodies with base64-encoded images.

    Base Payload Format
    {
      "image_b64": "<base64-encoded image bytes>"
    }
    

    Example: Encode an image to base64:

    base64 -i face.jpg | pbcopy   # macOS
    cat face.jpg | base64         # Linux
    
    Health Check
    curl http://localhost:8001/healthz
    # {"status": "ok"}
    
    NSFW Detection

    Check if image contains NSFW content:

    curl -X POST http://localhost:8001/v1/nsfw \
      -H "Content-Type: application/json" \
      -d '{"image_b64": "..."}'
    

    Response:

    {
      "is_safe": true,
      "probability": 0.02
    }
    
    Spoof Detection

    Check if face is real or spoofed/deepfake:

    curl -X POST http://localhost:8001/v1/spoof \
      -H "Content-Type: application/json" \
      -d '{"image_b64": "..."}'
    

    Response:

    {
      "is_spoof": false,
      "probability": 0.05
    }
    
    Blur Detection

    Check if face image is sharp enough:

    curl -X POST http://localhost:8001/v1/blur \
      -H "Content-Type: application/json" \
      -d '{"image_b64": "..."}'
    

    Response:

    {
      "is_sharp": true,
      "probability": 0.10
    }
    
    Face Embedding

    Generate a 512-dimensional face embedding:

    curl -X POST http://localhost:8001/v1/embed \
      -H "Content-Type: application/json" \
      -d '{"image_b64": "..."}'
    

    Response:

    {
      "face_detected": true,
      "embedding": [0.123, -0.456, 0.789, "..."],
      "embedding_dim": 512
    }
    
    Combined Assessment (IQA)

    Run all 3 quality checks in parallel:

    curl -X POST http://localhost:8001/v1/assess \
      -H "Content-Type: application/json" \
      -d '{"image_b64": "..."}'
    

    Response:

    {
      "passed": true,
      "nsfw": {"is_safe": true, "probability": 0.02},
      "spoof": {"is_spoof": false, "probability": 0.05},
      "blur": {"is_sharp": true, "probability": 0.10}
    }
    

    passed is true when: nsfw.is_safe AND (NOT spoof.is_spoof) AND blur.is_sharp.


    Database Schema

    Collection: zepiris_faces (Milvus)

    FieldTypePurpose
    face_idVARCHAR(128)Primary key
    tenantVARCHAR(256)Multi-tenancy support
    object_keyVARCHAR(512)MinIO image path
    embeddingFLOAT_VECTOR(512)Face embedding vector

    Index: FLAT with COSINE similarity metric.


    Configuration

    Environment Variables

    Copy .env.example to .env and customize. All settings use environment variable prefixes.

    Main API Service (ZEPIRIS_*)
    VariableDefaultDescription
    ZEPIRIS_API_TITLEZepIrisAPI title (shown in docs)
    ZEPIRIS_API_VERSION1.0.0API version (OpenAPI info.version)
    ZEPIRIS_API_HOST0.0.0.0Bind host
    ZEPIRIS_API_PORT8000Bind port
    ZEPIRIS_MINIO_ENDPOINTlocalhost:9002MinIO S3 host:port
    ZEPIRIS_MINIO_ACCESS_KEYminioadminMinIO access key
    ZEPIRIS_MINIO_SECRET_KEYminioadminMinIO secret key
    ZEPIRIS_MINIO_BUCKETzepirisS3 bucket name
    ZEPIRIS_MINIO_SECUREfalseUse TLS for MinIO
    ZEPIRIS_MILVUS_HOSTlocalhostMilvus vector database host
    ZEPIRIS_MILVUS_PORT19530Milvus port
    ZEPIRIS_MILVUS_COLLECTIONzepiris_facesMilvus collection name
    ZEPIRIS_MILVUS_EMBEDDING_DIM512Face embedding dimension
    ZEPIRIS_MILVUS_SEARCH_THRESHOLD0.5Default COSINE similarity threshold for search
    ZEPIRIS_ML_INFERENCE_SERVICE_URL(required)URL of the ML inference service (e.g. http://localhost:8001)

    Note: ZEPIRIS_ML_INFERENCE_SERVICE_URL is required. The main API will not start without it. Set it to http://ml-inference:8001 in Docker Compose or http://localhost:8001 when running locally.

    ML Inference Service (ML_SERVICE_*)
    VariableDefaultDescription
    ML_SERVICE_HOST0.0.0.0Bind host
    ML_SERVICE_PORT8001Bind port
    ML_SERVICE_ML_DEVICEcpuInference device: cpu, cuda:0, mps
    ML_SERVICE_NSFW_LOCAL_MODEL_PATH/app/models/nsfw_model.pthNSFW model file
    ML_SERVICE_NSFW_HF_REPO_ID``HuggingFace repo for NSFW model (optional)
    ML_SERVICE_NSFW_THRESHOLD0.5NSFW classification threshold (0–1)
    ML_SERVICE_SPOOF_LOCAL_MODEL_PATH/app/models/spoof_model.pthSpoof model file
    ML_SERVICE_SPOOF_HF_REPO_ID``HuggingFace repo for spoof model (optional)
    ML_SERVICE_SPOOF_THRESHOLD0.5Spoof classification threshold (0–1)
    ML_SERVICE_BLUR_LOCAL_MODEL_PATH/app/models/blur_model.pthBlur model file
    ML_SERVICE_BLUR_HF_REPO_ID``HuggingFace repo for blur model (optional)
    ML_SERVICE_BLUR_THRESHOLD0.5Blur classification threshold (0–1)
    ML_SERVICE_FACE_EMBEDDING_DIM512Face embedding dimension
    ML_SERVICE_FACE_DETECTION_WIDTH640Face detection input width
    ML_SERVICE_FACE_DETECTION_HEIGHT640Face detection input height
    ML_SERVICE_FACE_AREA_THRESHOLD0.01Minimum face area (fraction of image)

    Example: GPU Inference

    To enable GPU inference, set:

    export ML_SERVICE_ML_DEVICE=cuda:0
    poetry run zepiris-ml-inference-api
    

    Or in .env:

    ML_SERVICE_ML_DEVICE=cuda:0
    

    Ensure PyTorch CUDA version matches your GPU driver.


    Development

    Project Structure

    zepiris/
    ├── pyproject.toml              # Project metadata, dependencies
    ├── poetry.lock                 # Locked dependency versions
    ├── poetry.toml                 # Poetry config (in-project .venv)
    ├── .env.example                # Environment variable template
    ├── Dockerfile                  # Main service container
    ├── ml_inference.Dockerfile     # ML service container
    ├── docker-compose.yml          # All services (MinIO, Etcd, Milvus, ML, API)
    │
    ├── zepiris/
    │   ├── main.py                 # Main FastAPI app factory + lifespan
    │   ├── config.py               # Pydantic settings (ZEPIRIS_* prefix)
    │   ├── deps.py                 # FastAPI dependency injection
    │   ├── exceptions.py           # Domain exceptions (DuplicateFaceIdError, etc.)
    │   ├── exception_handlers.py   # Error response formatting
    │   │
    │   ├── api/routes/
    │   │   ├── __init__.py         # build_api_router()
    │   │   ├── face.py             # /v1/faces/ search, insert, upsert, delete, get
    │   │   └── health.py           # GET /healthz, /readyz
    │   │
    │   ├── ml_inference/
    │   │   ├── app.py              # ML service FastAPI app + MLServiceSettings
    │   │   ├── routes.py           # ML endpoints (/v1/nsfw, /spoof, /blur, /embed, /assess)
    │   │   ├── deps.py             # ML service dependency injection (503 if model missing)
    │   │   ├── base.py             # Base ModelService + ModelServiceConfig
    │   │   ├── face_embedding.py   # FaceEmbeddingService (AuraFace OR Buffalo_l)
    │   │   ├── nsfw_detection.py   # NSFWDetectionService (MobileNetV2)
    │   │   ├── spoof_detection.py  # SpoofDetectionService (MobileNetV3)
    │   │   ├── blur_detection.py   # BlurDetectionService (ResNet18)
    │   │   ├── image_quality_assessment.py # Combined IQA (ThreadPoolExecutor)
    │   │   └── models/             # PyTorch model definitions
    │   │
    │   ├── services/
    │   │   ├── embedding.py        # FaceEmbeddingProvider (ABC) + MLInferenceEmbeddingService
    │   │   ├── iqa.py              # MLInferenceIQAService → HTTP /v1/assess
    │   │   ├── milvus_store.py     # MilvusFaceStore (vector CRUD + search)
    │   │   ├── minio_storage.py    # MinioStorageService (S3 storage)
    │   │   └── ml_client.py        # MLInferenceClient (httpx, sync)
    │   │
    │   └── schemas/
    │       ├── face.py             # SearchResponse, UpsertResponse, DeleteResponse
    │       └── ml_inference.py     # FaceEmbeddingResult, IQA result schemas
    │
    └── models/                     # Pre-trained model weights
        ├── nsfw_model.pth
        ├── spoof_model.pth
        └── blur_model.pth
    

    Development Setup

    # Activate virtual environment
    source .venv/bin/activate
    # or use Poetry shell
    poetry shell
    

    Running with Auto-Reload

    For local development with hot-reloading:

    # Terminal 1 — ML service with reload
    uvicorn zepiris.ml_inference.app:app --reload --host 0.0.0.0 --port 8001
    
    # Terminal 2 — Main API with reload
    ZEPIRIS_ML_INFERENCE_SERVICE_URL=http://localhost:8001 \
      uvicorn zepiris.main:app --reload --host 0.0.0.0 --port 8000
    

    Adding Dependencies

    # Add a runtime dependency
    poetry add httpx-oauth
    
    # Add a development-only tool
    poetry add --group dev black ruff pytest
    
    # After changing dependencies, commit both files
    git add pyproject.toml poetry.lock
    git commit -m "chore: add new dependencies"
    

    Testing

    ZepIris includes test scripts for both unit and integration testing.

    End-to-End ML Service Test

    Tests all ML endpoints with real model inference:

    python scripts/test_ml_service.py \
      --test-image path/to/image.jpg \
      --nsfw-model ./models/nsfw_model.pth \
      --spoof-model ./models/spoof_model.pth \
      --blur-model ./models/blur_model.pth
    

    Or test against a running service:

    python scripts/test_ml_service.py \
      --test-image path/to/image.jpg \
      --no-server --port 8001
    

    Direct Model Testing

    Load and test models in-process without HTTP:

    python scripts/test_models.py \
      --test-image path/to/image.jpg \
      --nsfw-model ./models/nsfw_model.pth \
      --spoof-model ./models/spoof_model.pth \
      --blur-model ./models/blur_model.pth
    

    Manual API Testing

    Use curl, httpie, or Postman to test endpoints. Interactive Swagger docs available at /docs on both services.


    Troubleshooting

    Poetry Installation Issues

    Problem: poetry install fails with "No file/folder found"

    Solution: This is expected on first run. Poetry will resolve dependencies. Try again.

    Problem: Wrong Python version

    Solution: Point Poetry to the correct interpreter:

    poetry env use /path/to/python3.10
    poetry install
    

    Service Connection Issues

    Problem: Main API can't connect to Milvus or MinIO

    Solution: Verify external services are running:

    # Check all services
    docker compose ps
    
    # Or check individually
    curl http://localhost:9002/minio/health/live  # MinIO (host port 9002)
    curl http://localhost:8001/healthz             # ML inference
    

    Problem: Main API fails to start with "ML_INFERENCE_SERVICE_URL required"

    Solution: Set the required environment variable:

    export ZEPIRIS_ML_INFERENCE_SERVICE_URL=http://localhost:8001
    

    Problem: ML service doesn't load models on startup

    Solution: Check logs for model loading errors:

    docker compose logs ml-inference  # if using Docker Compose
    # or
    poetry run zepiris-ml-inference-api       # if running locally
    

    Ensure model files exist at configured paths. Default: /app/models/{nsfw,spoof,blur}_model.pth. If a model fails to load, that endpoint returns 503 Service Unavailable.

    GPU Not Detected

    Problem: ML service ignores ML_SERVICE_ML_DEVICE=cuda

    Solution:

    1. Verify PyTorch CUDA version matches your GPU driver:
    python -c "import torch; print(torch.cuda.is_available())"
    
    1. If unavailable, reinstall PyTorch with correct CUDA version:
    poetry remove torch torchvision
    poetry add torch torchvision --platform linux --python "^3.10"
    

    API Timeouts

    Problem: Requests hang or timeout to ML service

    Solution:

    • Ensure ML inference service is running and healthy (GET /healthz)
    • Check if models are still loading (can take 30-60s on first startup)
    • Check network connectivity between services
    • Monitor resource usage (disk space for model downloads, RAM for inference)

    Documentation

    Additional Resources


    License

    This project is licensed under the MIT License — see LICENSE file for details.

    The project is released under the LICENSE with contribution expectations described in CONTRIBUTING.md and CODE_OF_CONDUCT.md.


    Citation

    If you use ZepIris in research or production, please cite:

    @software{zepiris2026,
      title={ZepIris: Scalable Face Authentication},
      author={Zepto Data Science Team},
      year={2026},
      url={https://github.com/zepto-labs/zepiris}
    }
    

    Acknowledgments

    ZepIris stands on the shoulders of excellent open-source projects:

    • AuraFace & InsightFace — State-of-the-art face embedding models
    • Milvus — High-performance vector database
    • FastAPI — Modern async Python web framework
    • PyTorch — Deep learning framework
    • MinIO — S3-compatible object storage

    Support & Community


    Last Updated: April 2026 Status: v1.0.0