InsightFace-REST  by SthPhoenix

High-performance face recognition REST API

Created 7 years ago
632 stars

Top 52.7% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> InsightFace-REST delivers a production-ready, high-performance REST API for face detection and recognition pipelines. It leverages FastAPI and NVIDIA TensorRT for optimized inference, targeting developers and researchers needing efficient, deployable face analysis solutions.

How It Works

The project utilizes FastAPI for its API framework and integrates NVIDIA TensorRT for accelerated inference on GPUs, with ONNX Runtime support for CPU fallback. It offers automatic model downloads, batch processing, and is containerized using Docker for streamlined deployment. The architecture is based on the official DeepInsight InsightFace repository, prioritizing performance and ease of use.

Quick Start & Requirements

  • Prerequisites: Docker, NVIDIA Container Toolkit, NVIDIA GPU Drivers (535+), compatible NVIDIA GPU.
  • Installation: Clone repo, cd to compose, copy example.env to .env and configure, then run docker compose build and docker compose up.
  • Access: API documentation is available at http://localhost:18081/docs.

Highlighted Details

  • Performance: Claims up to 820 FPS on RTX4090 with default settings.
  • Deployment: Fully Dockerized for NVIDIA GPU systems.
  • Model Support: Includes SCRFD/YoloV5 detectors and PyTorch recognition models, with automatic Google Drive downloads.
  • Optimization: Features optimized SCRFD implementations (e.g., scrfd_10g_gnkps) with Group Normalization for improved large face detection accuracy and speed. Supports batch inference.
  • Backends: TensorRT (GPU) and ONNX Runtime (CPU).
  • Efficiency: Implements GPU-accelerated normalization (CuPy) and Numba-optimized functions. Experimental msgpack support reduces embedding network traffic.

Maintenance & Community

The project features a detailed changelog indicating active development since late 2020. Specific community channels or contributor information are not detailed in the provided text, though the original InsightFace library authors are acknowledged.

Licensing & Compatibility

The specific open-source license for this repository is not mentioned in the provided README content.

Limitations & Caveats

Automatic model downloads rely on Google Drive, potentially inaccessible in certain regions. Users may encounter Numba compilation issues requiring cache clearing. Custom SCRFD models, while fixing large face detection bugs, may have a slight accuracy trade-off due to Group Normalization.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.