insightface
InsightFace Python Library
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- 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.
- Low install friction with a pure Python wheel and eight common dependencies (numpy, onnxruntime, opencv-python, scipy, scikit-image, requests, tqdm, onnx).
License · maintenance · safety
(unclear) — 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.
last release 2026-05-23 (83 days) · last repo commit 2026-07-27 · 29,495 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,121,728 downloads/mo, #4,334 on PyPI
Alternatives
Verify before relying
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)- 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
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 on it.
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
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.
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.
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)
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 packagesnumpyonnxonnxruntimeopencv-pythontqdmrequestsscipyscikit-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
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “face alignment and attributes”
- insightfaceInsightFace is a Python library for face detection, recognition,…
- facexlibFacexlib provides a collection of PyTorch-based face analysis…
- retina-faceDetects faces in images and extracts facial landmarks (eyes, nose,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also deepface · retina-face · retinaface-py · face-alignment · face-recognition · facexlib · facenet-pytorch · face_recognition_models · mtcnn · gfpgan