insightface

deepinsight活跃维护

一套开箱即用的 2D/3D 人脸分析算法库,集成 ArcFace、RetinaFace 等模型,覆盖人脸检测、对齐、识别和年龄估计,支持 PyTorch、MXNet 等多后端。

State-of-the-art 2D and 3D Face Analysis Project

model-zoo发布于 2026-09-03 12:19 UTC30,180star +16 / 7 天6,136fork同步于 2026-11-10 11:21 UTC

怎么上手

由 README 提炼,执行前请确认
pip install insightface
硬件要求按 README 说明

README 未给出具体显存要求;Python 包支持自动选择 CoreML/CUDA/CPU 后端,Server 可在单个 Linux x86_64 CPU 或 NVIDIA GPU 容器中运行,并提到单张 RTX 5090 可支撑 5000 万级图像检索。

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

项目说明

由 README 自动翻译提炼

一站式 2D/3D 人脸分析开源项目,覆盖检测、识别、对齐、活体与视频脱敏

一套开箱即用的 2D/3D 人脸分析算法库,集成 ArcFace、RetinaFace 等模型,覆盖人脸检测、对齐、识别和年龄估计,支持 PyTorch、MXNet 等多后端。

核心能力

  • 提供 ArcFace、PartialFC 等人脸识别训练与损失设计
  • 集成 RetinaFace、SCRFD 等高精度人脸检测方法
  • Python 包自动选择 CoreML/CUDA/CPU 推理后端
  • PrivateFrame 支持本地视频人脸模糊与马赛克脱敏
  • Server 提供自托管 REST API 与 5000 万级图像检索

容易踩的坑

模型需从 GitHub 手动下载或用 python-library 自动下载,且仅限非商业研究用途;inswapper 系列换脸模型和 buffalo_l 等识别模型需单独联系官方获取商业授权;Server 依赖运维方自行提供经清单校验的模型文件。

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

最近发版

2 个版本model-zoo
  1. model-zooInsightFace Model Zoo最新正式版2026-09-03 · 2026-09-03 12:19 UTC

    This release provides official InsightFace model packs and pretrained models.

    Model versions are managed independently. Updates to one model do not imply updates to other models.

    Existing legacy model files may also be mirrored here for centralized distribution.

    Legacy model files mirrored here are identical to their previously released versions unless explicitly stated otherwise.

  2. v0.7insightface v0.7 model packages2023-04-02 · 2023-04-02 07:43 UTC
    查看更新说明

    insightface v0.7 model packages

用户点评

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

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

    README 原文

    未翻译

    InsightFace: 2D and 3D Face Analysis Project

    InsightFace project is mainly maintained by Jia Guo and Jiankang Deng.

    For more information, please visit our website at https://www.insightface.ai

    InsightFace 2.0 Update

    InsightFace 2.0 adds PrivateFrame for local video face blur and mosaic, reference-photo selection, and editable analysis JSON through desktop, CLI, and Python workflows, plus optional RGB liveness detection for FaceAnalysis and InsightFace Server. The Python package also supports raccoon_s / raccoon_l model packages, automatic CoreML/CUDA/CPU provider selection, and reusable CoreML compilation caches. PrivateFrame defaults to Fast mode (target 15 analysis FPS).

    PersonAnalysis adds person detection, face recognition, and body ReID for matching people against registered references. Use its Python API or try local videos, webcams, and RTSP streams in the desktop GUI.

    For installation and use, start with the Python SDK and GUI documentation.

    InsightFace Server

    The new InsightFace Server provides a simple self-hosted Web UI, snake_case REST API, and Python client for detection, optional liveness checks, comparison, registration, and Person search. A single Linux x86_64 CPU or NVIDIA GPU container runs local ONNX Runtime inference and SQLite with operator-supplied, manifest-verified models. It is a simple AWS Rekognition alternative with accuracy-preserving INT8 embedding quantization and 50M+ image search on one RTX 5090 GPU.

    License

    The code of InsightFace is released under the MIT License. There is no limitation for both academic and commercial usage.

    The training data containing the annotation (and the models trained with these data) are available for non-commercial research purposes only.

    Both manual-downloading models from our github repo and auto-downloading models with our python-library follow the above license policy(which is for non-commercial research purposes only).

    2025-11-24 Update:

    1. For inswapper series face swap models (e.g., inswapper_128.onnx/inswapper-512-live), please contact [email protected] for licensing and additional support.
    2. For open-sourced face recognition models (e.g., buffalo_l package), please contact [email protected] for licensing.
    3. For advanced face recognition SDK and models (e.g., InspireFace SDK), please contact [email protected] for licensing and additional support.

    ChangeLogs

    2026-10-03 InsightFace 2.1 PersonAnalysis update: Add person detection, face recognition and body ReID with separate get(), match() and optional update() calls. Support cheetah_s / cheetah_l on CPU or CUDA with automatic model downloads, plus a GUI workflow for local videos, webcams and RTSP with analysis-rate controls and advanced settings. See the Python package and full change log.

    2026-09-09 InsightFace 2.0 Liveness update: Add the optional RGB liveness addon, normal/observe modes, per-face scores and input-rejection reasons, plus Server Web model installation and activation. See Python usage and Server usage.

    2026-09-09 InsightFace 2.0 PrivateFrame update: Add local video detection and tracking, Gaussian blur/mosaic, selective redaction from reference photos, reusable JSON with rendering without another inference pass, and integrated desktop, CLI, and Python API workflows. See the feature and usage guide.

    2026-07-27 InsightFace Server Added a simple AWS Rekognition alternative with accuracy-preserving INT8 embedding quantization and 50M+ image search on one RTX 5090 GPU.

    2026-05-23 InsightFace 1.0 Added a cross-platform desktop GUI Demo for face recognition, enterprise evaluation, reports, and face swap trials, with a lighter default Python install that removes C++ build requirements.

    2025-11-18 [Picsi.ai] Released Live Face Swap macOS & iOS App and updated Picsi.ai services with our latest series of swap models (incl. inswapper-live/Cyn/Dax).

    2024-05-04 [Picsi.ai] Released InspireFace, a cross-platform C/C++ face recognition SDK.

    2024-04-17: Monocular Identity-Conditioned Facial Reflectance Reconstruction accepted by CVPR-2024.

    2023-08-08: We released the implementation of Generalizing Gaze Estimation with Weak-Supervision from Synthetic Views at reconstruction/gaze.

    2023-05-03: We have launched the ongoing version of wild face anti-spoofing challenge. See details here.

    2023-02-13: We launch a large scale in the wild face anti-spoofing challenge on CVPR23 Workshop, see details at challenges/cvpr23-fas-wild.

    2022-11-28: Single line code for facial identity swapping in our python packge ver 0.7, please check the example here.

    2022-10-28: MFR-Ongoing website is refactored, please create issues if there's any bug.

    2022-09-22: Now we have web-demos: face-localization, face-recognition, and face-swapping.

    2022-08-12: We achieved Rank-1st of Perspective Projection Based Monocular 3D Face Reconstruction Challenge of ECCV-2022 WCPA Workshop, paper and code.

    2022-03-30: Partial FC accepted by CVPR-2022.

    2022-02-23: SCRFD accepted by ICLR-2022.

    2021-11-30: MFR-Ongoing challenge launched(same with IFRT), which is an extended version of iccv21-mfr.

    2021-10-29: We achieved 1st place on the VISA track of NIST-FRVT 1:1 by using Partial FC (Xiang An, Jiankang Deng, Jia Guo).

    2021-10-11: Leaderboard of ICCV21 - Masked Face Recognition Challenge released. Video: Youtube, Bilibili.

    2021-06-05: We launch a Masked Face Recognition Challenge & Workshop on ICCV 2021.

    Introduction

    InsightFace is an open source 2D&3D deep face analysis toolbox, mainly based on PyTorch and MXNet.

    Please check our website for detail.

    The master branch works with PyTorch 1.6+ and/or MXNet=1.6-1.8, with Python 3.x.

    InsightFace efficiently implements a rich variety of state of the art algorithms of face recognition, face detection and face alignment, which optimized for both training and deployment.

    Quick Start

    Please start with our python-package, for testing detection, recognition and alignment models on input images.

    ArcFace Video Demo

    <img src=https://raw.githubusercontent.com/nttstar/insightface-resources/refs/heads/master/images/facerecognitionfromvideo.PNG width="760" />

    Please click the image to watch the Youtube video. For Bilibili users, click here.

    Projects

    The page on InsightFace website also describes all supported projects in InsightFace.

    You may also interested in some challenges hold by InsightFace.

    Face Recognition

    Introduction

    In this module, we provide training data, network settings and loss designs for deep face recognition.

    The supported methods are as follows:

    Commonly used network backbones are included in most of the methods, such as IResNet, MobilefaceNet, MobileNet, InceptionResNet_v2, DenseNet, etc..

    Datasets

    The training data includes, but not limited to the cleaned MS1M, VGG2 and CASIA-Webface datasets, which were already packed in MXNet binary format. Please dataset page for detail.

    Evaluation

    We provide standard IJB and Megaface evaluation pipelines in evaluation

    Pretrained Models

    Please check Model-Zoo for more pretrained models.

    Third-party Re-implementation of ArcFace

    Face Detection

    Introduction

    In this module, we provide training data with annotation, network settings and loss designs for face detection training, evaluation and inference.

    The supported methods are as follows:

    RetinaFace is a practical single-stage face detector which is accepted by CVPR 2020. We provide training code, training dataset, pretrained models and evaluation scripts.

    SCRFD is an efficient high accuracy face detection approach which is initialy described in Arxiv. We provide an easy-to-use pipeline to train high efficiency face detectors with NAS supporting.

    Face Alignment

    Introduction

    In this module, we provide datasets and training/inference pipelines for face alignment.

    Supported methods:

    SDUNets is a heatmap based method which accepted on BMVC.

    SimpleRegression provides very lightweight facial landmark models with fast coordinate regression. The input of these models is loose cropped face image while the output is the direct landmark coordinates.

    Citation

    If you find InsightFace useful in your research, please consider to cite the following related papers:

    @inproceedings{ren2023pbidr,
      title={Facial Geometric Detail Recovery via Implicit Representation},
      author={Ren, Xingyu and Lattas, Alexandros and Gecer, Baris and Deng, Jiankang and Ma, Chao and Yang, Xiaokang},
      booktitle={2023 IEEE 17th International Conference on Automatic Face and Gesture Recognition (FG)},  
      year={2023}
     }
    
    @article{guo2021sample,
      title={Sample and Computation Redistribution for Efficient Face Detection},
      author={Guo, Jia and Deng, Jiankang and Lattas, Alexandros and Zafeiriou, Stefanos},
      journal={arXiv preprint arXiv:2105.04714},
      year={2021}
    }
    
    @inproceedings{gecer2021ostec,
      title={OSTeC: One-Shot Texture Completion},
      author={Gecer, Baris and Deng, Jiankang and Zafeiriou, Stefanos},
      booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
      year={2021}
    }
    
    @inproceedings{an_2022_pfc_cvpr,
      title={Killing Two Birds with One Stone: Efficient and Robust Training of Face Recognition CNNs by Partial FC},
      author={An, Xiang and Deng, Jiangkang and Guo, Jia and Feng, Ziyong and Zhu, Xuhan and Jing, Yang and Tongliang, Liu},
      booktitle={CVPR},
      year={2022}
    }
    @inproceedings{an_2021_pfc_iccvw,
      title={Partial FC: Training 10 Million Identities on a Single Machine},
      author={An, Xiang and Zhu, Xuhan and Gao, Yuan and Xiao, Yang and Zhao, Yongle and Feng, Ziyong and Wu, Lan and Qin, Bin and Zhang, Ming and Zhang, Debing and Fu, Ying},
      booktitle={ICCVW},
      year={2021},
    }
    
    
    @inproceedings{deng2020subcenter,
      title={Sub-center ArcFace: Boosting Face Recognition by Large-scale Noisy Web Faces},
      author={Deng, Jiankang and Guo, Jia and Liu, Tongliang and Gong, Mingming and Zafeiriou, Stefanos},
      booktitle={Proceedings of the IEEE Conference on European Conference on Computer Vision},
      year={2020}
    }
    
    @inproceedings{Deng2020CVPR,
    title = {RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild},
    author = {Deng, Jiankang and Guo, Jia and Ververas, Evangelos and Kotsia, Irene and Zafeiriou, Stefanos},
    booktitle = {CVPR},
    year = {2020}
    }
    
    @inproceedings{guo2018stacked,
      title={Stacked Dense U-Nets with Dual Transformers for Robust Face Alignment},
      author={Guo, Jia and Deng, Jiankang and Xue, Niannan and Zafeiriou, Stefanos},
      booktitle={BMVC},
      year={2018}
    }
    
    @article{deng2018menpo,
      title={The Menpo benchmark for multi-pose 2D and 3D facial landmark localisation and tracking},
      author={Deng, Jiankang and Roussos, Anastasios and Chrysos, Grigorios and Ververas, Evangelos and Kotsia, Irene and Shen, Jie and Zafeiriou, Stefanos},
      journal={IJCV},
      year={2018}
    }
    
    @inproceedings{deng2018arcface,
    title={ArcFace: Additive Angular Margin Loss for Deep Face Recognition},
    author={Deng, Jiankang and Guo, Jia and Niannan, Xue and Zafeiriou, Stefanos},
    booktitle={CVPR},
    year={2019}
    }
    

    Contributing

    Main contributors: