{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/magface-a-universal-representation-for-face","title":"MagFace: A Universal Representation for Face Recognition and Quality Assessment","arxiv_id":"2103.06627","date":"2021-03-11","proceeding":"CVPR 2021 1","authors":["Qiang Meng","Shichao Zhao","Zhida Huang","Feng Zhou"],"abstract":"The performance of face recognition system degrades when the variability of the acquired faces increases. Prior work alleviates this issue by either monitoring the face quality in pre-processing or predicting the data uncertainty along with the face feature. This paper proposes MagFace, a category of losses that learn a universal feature embedding whose magnitude can measure the quality of the given face. Under the new loss, it can be proven that the magnitude of the feature embedding monotonically increases if the subject is more likely to be recognized. In addition, MagFace introduces an adaptive mechanism to learn a wellstructured within-class feature distributions by pulling easy samples to class centers while pushing hard samples away. This prevents models from overfitting on noisy low-quality samples and improves face recognition in the wild. Extensive experiments conducted on face recognition, quality assessments as well as clustering demonstrate its superiority over state-of-the-arts. The code is available at https://github.com/IrvingMeng/MagFace.","url_abs":"https://arxiv.org/abs/2103.06627v4","url_pdf":"https://arxiv.org/pdf/2103.06627v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"magface-a-universal-representation-for-face","repo_url":"https://github.com/IrvingMeng/MagFace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"magface-a-universal-representation-for-face","repo_url":"https://github.com/leondgarse/Keras_insightface","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"face-quality-assessement","task_name":"Face Quality Assessement"},{"task_slug":"face-recognition","task_name":"Face Recognition"},{"task_slug":"face-verification","task_name":"Face Verification"}],"methods":[{"method_slug":"magface","method_name":"MagFace"}],"datasets_introduced":[],"methods_introduced":[{"slug":"magface","name":"MagFace","full_name":"MagFace"}],"results":[{"leaderboard":"/sota/face-verification-on-ijb-c","task":"Face Verification","dataset":"IJB-C","model":"MagFace++","rank_in_archive_order":10,"of":26,"metrics":{"TAR @ FAR=1e-4":"95.97%","TAR @ FAR=1e-5":"90.36%","model":"R100","training dataset":"MS1MV2"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2103.06627","atlas_url":"https://app.syntology.ai/?focus=2103.06627","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.06627"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/IrvingMeng/MagFace","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leondgarse/Keras_insightface","reach":null}],"summary":{"ran":1,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":1,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"fa095276af145056","entry":"MagLoss","repo":"IrvingMeng/MagFace","repo_kind":"official","path":"models/magface.py","file_url":"https://github.com/IrvingMeng/MagFace/blob/HEAD/models/magface.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fa095276af145056"}},{"code_sha256_prefix":"400961e23ef53c8e","entry":"MagFaceLoss","repo":"leondgarse/Keras_insightface","repo_kind":"listed","path":"losses.py","file_url":"https://github.com/leondgarse/Keras_insightface/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"400961e23ef53c8e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}