skillfed

insightface

InsightFace Python Library

insightface v1.0.1 1.1M downloads/30d#4,334 on PyPI29,495
License unclear Active released

What it is and what it does

InsightFace is a deep learning library for face analysis tasks—detection, recognition, alignment, and attribute extraction—built on onnxruntime inference. It ships with a cross-platform desktop GUI (InsightFace Evaluation Studio) for local 1:1 face comparison, 1:N gallery search, album clustering with DBSCAN, batch processing, and face swap trials, all with data stored locally by default.

The library provides FaceAnalysis as its main entry point, supporting multiple detection and recognition model packs (buffalo_l, antelopev2, etc.) with configurable execution providers for CPU or GPU. Models are downloaded on demand or manually; the GUI includes a model manager for explicit downloads and optional GFPGAN post-processing for face restoration. The optional face3d extension can be built for legacy mask rendering.

Use it for:

  • Build a face recognition system to identify or verify individuals in photos or video streams using pretrained models.
  • Create a local face search application to find similar faces across a gallery of images without uploading data.
  • Cluster and organize photo albums by detected faces using the GUI's DBSCAN-based grouping with cosine similarity threshold of 0.48.
  • Generate face embeddings for downstream machine learning tasks like clustering, classification, or similarity matching.
  • Run batch face detection and attribute extraction (gender, age) across folders of images for analysis or reporting.
  • Evaluate face recognition performance on enterprise datasets with the GUI's evaluation workspace and PDF report export.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

InsightFace is a Python library for face detection, recognition, alignment, and attribute analysis using deep learning models, with a desktop GUI for local face comparison, search, clustering, and face swap operations.

Yes, with conditions. Install if you need local face detection, recognition, or analysis and accept the non-commercial model licensing restriction. The library is actively maintained, has low install friction, and offers both programmatic and GUI interfaces. Verify that your use case complies with the pretrained model license before deploying commercially.

Install

insightface on PyPI

pip

pip install insightface

uv

uv add insightface

poetry

poetry add insightface

Installing insightface

Before you install

Low install friction with a pure Python wheel and eight common dependencies (numpy, onnxruntime, opencv-python, scipy, scikit-image, requests, tqdm, onnx). The library is actively maintained with recent releases and high repository engagement.

License in practice

Code is MIT-licensed with no commercial restriction, but pretrained models are available for non-commercial research purposes only—commercial use requires separate model licensing.

Quickstart

pip install insightface

from insightface.app import FaceAnalysis
from insightface.data import get_image as ins_get_image

app = FaceAnalysis(providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
app.prepare(ctx_id=0)
img = ins_get_image('t1')
faces = app.get(img)

onnxruntime must be installed separately; use onnxruntime-gpu for GPU inference or onnxruntime for CPU-only. Models are not auto-downloaded; manual download and extraction to ~/.insightface/models/ may be required depending on the model pack.

Verify before relying

  • Minimum Python version requirement (requires_python not specified in metadata)
  • Whether pretrained model licensing restrictions apply to your intended use case
  • GPU support details and CUDA/cuDNN version compatibility
  • Performance benchmarks for different detection sizes and model packs

Package facts

License not declared (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 8 — numpy, onnx, onnxruntime, opencv-python, tqdm, requests, scipy, scikit-image
Maintenance actively maintained — 83 days since the last release
Last repo commit
First released
Downloads 1,121,728/month — #4,334 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: insightface-1.0.1-py3-none-any.whl

Tags

face detection and recognitionface alignment and attributesface comparison and searchface clustering and groupingface swap toolfacial analysis librarylocal face recognition gui
face-recognitioncomputer-visiondesktop-gui

More Artificial Intelligence packages