ArcFace

Angular-margin loss and PyTorch training code for face recognition embeddings, part of InsightFace.

Open SourceSelf HostedOffline CapableGPU Required (4GB+ VRAM)
0.0 (0)

About

Proposed by Jiankang Deng, Jia Guo and colleagues at CVPR 2019, ArcFace trains face-recognition networks by adding a fixed angular margin between each embedding and its class center, clustering each person's images on a hypersphere while pushing others apart. The maintained implementation is InsightFace's arcface_torch folder: a config-driven PyTorch trainer for one GPU, an eight-GPU node or multi-node torchrun jobs, with mixed precision, gradient checkpointing, optional NVIDIA DALI loading, ViT backbones, and Partial FC, which samples a fraction of class centers per step so millions of identities still fit in memory. Configs target MS1MV3, Glint360K and WebFace42M, and a converter exports ONNX models. For inference only, the insightface pip package wraps detection, alignment and recognition, and the parent repository stays active. Serious training needs several GPUs. The code is MIT and free for commercial work, but the training data and pretrained models are limited to non-commercial research, and commercial model use needs a separate InsightFace license. Best for teams training their own recognition models.

Should you use ArcFace?

Pick it when

Pick this when you are training or fine-tuning your own face recognition model on data you have rights to, and want the angular margin loss that strong face embedding models are built on, with a GPU of at least 4 GB.

Look elsewhere when

Skip it if you only need to compare or search faces in an app: ArcFace is a training loss, not a pipeline. DeepFace or InsightFace give you detection and embeddings directly, and the bundled training data is research-only anyway.

Alternatives to ArcFace

  • InsightFace

    Full toolkit with RetinaFace detection, alignment and pretrained ArcFace models ready to run, but those models and data are non-commercial research only.

  • DeepFace

    Wraps ArcFace and 10 other recognition models behind one simple API and runs without a GPU, but gives you pretrained models, not a way to train your own.

  • timm

    Supplies the pretrained backbones you would put an ArcFace head on, but it is a general model zoo with no face-specific loss, data or pipeline.

  • MediaPipe

    Apache 2.0 face detection and face mesh that runs on phones and CPUs, but it only locates faces and produces no identity embeddings.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Intermediate (3/5)
License
MIT
Minimum VRAM
4 GB
Added
Apr 3, 2026

Tags