MagFace
An iResNet face-embedding network trained so that the embedding's magnitude tracks face image quality.
Image classification · 359 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 65.2M
- Operations
- 359
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2021
- Cited by
- 34 (as of 28 October 2026)
- Authors
- Qiang Meng, Shichao Zhao, Zhida Huang, Feng Zhou
- Source
- GitHub: IrvingMeng/MagFace
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18287
- Graph hash
- beb3b4e0a282bcbc3c568a8a0bdd104f85d00986b14b9389829e51b15747b4cc
- Skeleton hash
- b51c89e1bf47cb00466a036d10c90e0722934dae006e43ba809fb571d4e6ad4c
- Architecture hash
- 71dd5b8868ee29296a6b4daeb32706f77169e9aaa0672414507630d9e486c939
- Diagram SHA-256
- 036b9ef95739a37932dd2e36dda5399d510f4e491b670b51b20fcf4cf16b6071
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
This model is the iResNet100 backbone trained with the MagFace loss on MS1MV2.
MagFace is a category of training losses for face recognition that yield a single embedding whose magnitude measures the quality of the face image. The networks released with it are iResNet backbones trained with the MagFace loss on MS1MV2.
The paper describes the loss as an extension of ArcFace with a magnitude-aware margin and a regularizer. The loss pulls easy samples toward their class centers and pushes hard ones away, which the authors say keeps a model from overfitting on noisy low-quality samples. Because quality is carried by the embedding's magnitude and not its direction, the authors can keep the cosine-based comparison that existing inference systems use. No quality labels are involved in training.
The paper trains on MS1M-V2, which it describes as 5.8M images of 85k identities. Input faces are aligned to 112x112 pixels using 5 facial landmarks. At test time, 512-D features are compared by cosine distance. To score face quality, the repository's instructions are to extract features and compute their magnitudes.
Key idea. The paper proposes MagFace, a category of losses that learn a face embedding whose magnitude measures face quality, extending ArcFace with a magnitude-aware margin and regularizer.
- MagFace
- magface_ir50
- magface_ir100
- face recognition
- face quality assessment
- face embedding
- feature magnitude
- face clustering
- magnitude-aware margin loss
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{meng2021magfaceuniversalrepresentationface,
title={MagFace: A Universal Representation for Face Recognition and Quality Assessment},
author={Qiang Meng and Shichao Zhao and Zhida Huang and Feng Zhou},
year={2021},
eprint={2103.06627},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2103.06627},
}