Model Zoo and model usage

September 8, 2026 ยท View on GitHub

Back to the Python library

InsightFace loads ONNX models for face analysis and direct detection or recognition use. See the runtime guide for installation and execution provider selection.

Model licenses

The InsightFace Python library code is released under the MIT License and can be used for academic and commercial purposes.

The pretrained models provided with this library are available for non-commercial research purposes only, including both automatically and manually downloaded models. To use your own licensed models, see Use your own licensed model.

Raccoon model packages

InsightFace 2.0 supports raccoon_s and raccoon_l through task-aware V2 manifests that declare the model files and preprocessing. Use them with FaceAnalysis(name="raccoon_s") or FaceAnalysis(name="raccoon_l"). PrivateFrame requires one of these packages; its default and the default for new GUI configurations is raccoon_s. Ordinary FaceAnalysis() continues to use buffalo_l by default.

Model packages are stored under <root>/models/<name>/ (default root: ~/.insightface). PrivateFrame can download a missing selected package on first use; see its model setup guide. Liveness is a separate optional addon and must be enabled explicitly; see the liveness guide for installation and usage.

Legacy model packs

The library also provides the following model packs. The name in bold is the default for ordinary FaceAnalysis(). Auto indicates whether the Python library can download the pack directly.

After manually downloading a model pack ZIP, unzip it under ~/.insightface/models/ before running the program, so its model files are in ~/.insightface/models/<name>/.

NameDetection ModelRecognition ModelAlignmentAttributesModel-SizeLinkAuto
antelopev2SCRFD-10GFResNet100@Glint360K2d106 & 3d68Gender&Age407MBDownloadN
buffalo_lSCRFD-10GFResNet50@WebFace600K2d106 & 3d68Gender&Age326MBDownloadY
buffalo_mSCRFD-2.5GFResNet50@WebFace600K2d106 & 3d68Gender&Age313MBDownloadN
buffalo_sSCRFD-500MFMBF@WebFace600K2d106 & 3d68Gender&Age159MBDownloadN
buffalo_scSCRFD-500MFMBF@WebFace600K--16MBDownloadN

Recognition accuracy

NameMR-ALLAfricanCaucasianSouth AsianEast AsianLFWCFP-FPAgeDB-30IJB-C(E4)
buffalo_l91.2590.2994.7093.1674.9699.8399.3398.2397.25
buffalo_s71.8769.4580.4573.3951.0399.7098.0096.5895.02

buffalo_m has the same recognition accuracy as buffalo_l. buffalo_sc has the same recognition accuracy as buffalo_s.

Automatic downloads

For insightface>=0.3.3, initializing app = FaceAnalysis() automatically downloads the default model package when it is missing. Automatic ModelZoo downloads use the dedicated model-zoo release.

Legacy download command for 0.3.2

For insightface==0.3.2, download the model package before using it:

insightface-cli model.download buffalo_l

Use your own licensed model

Create a new model directory under ~/.insightface/models/ and place your own compatible ONNX models there in place of the pretrained models provided by InsightFace. For example, models in ~/.insightface/models/your_model_zoo/ can be loaded with:

from insightface.app import FaceAnalysis

app = FaceAnalysis(name="your_model_zoo")

Call models

The library supports ONNX models. Detection or recognition models trained with PyTorch, MXNet, or another framework must be converted to compatible ONNX models before loading them with InsightFace.

Call detection models

import insightface
from insightface.app import FaceAnalysis

# Method 1: use FaceAnalysis with only the detection module enabled.
app = FaceAnalysis(allowed_modules=["detection"])
app.prepare()  # ctx_id=0; Auto detection size: 128x128 + 640x640

# Method 2: load a detection model directly.
detector = insightface.model_zoo.get_model("your_detection_model.onnx")
detector.prepare(ctx_id=0)  # SCRFD defaults to Auto: 128x128 + 640x640

Call recognition models

import insightface

handler = insightface.model_zoo.get_model("your_recognition_model.onnx")
handler.prepare(ctx_id=0)