{"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/adaface-quality-adaptive-margin-for-face","title":"AdaFace: Quality Adaptive Margin for Face Recognition","arxiv_id":"2204.00964","date":"2022-04-03","proceeding":"CVPR 2022 1","authors":["Minchul Kim","Anil K. Jain","Xiaoming Liu"],"abstract":"Recognition in low quality face datasets is challenging because facial attributes are obscured and degraded. Advances in margin-based loss functions have resulted in enhanced discriminability of faces in the embedding space. Further, previous studies have studied the effect of adaptive losses to assign more importance to misclassified (hard) examples. In this work, we introduce another aspect of adaptiveness in the loss function, namely the image quality. We argue that the strategy to emphasize misclassified samples should be adjusted according to their image quality. Specifically, the relative importance of easy or hard samples should be based on the sample's image quality. We propose a new loss function that emphasizes samples of different difficulties based on their image quality. Our method achieves this in the form of an adaptive margin function by approximating the image quality with feature norms. Extensive experiments show that our method, AdaFace, improves the face recognition performance over the state-of-the-art (SoTA) on four datasets (IJB-B, IJB-C, IJB-S and TinyFace). Code and models are released in https://github.com/mk-minchul/AdaFace.","url_abs":"https://arxiv.org/abs/2204.00964v2","url_pdf":"https://arxiv.org/pdf/2204.00964v2.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":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/mk-minchul/adaface","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/chelsea234/m2f2_det","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/sithu31296/EasyFace","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/tomas-gajarsky/facetorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/Armxyz1/Results-on-RFW","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/Faceplugin-ltd/FaceRecognition-Android","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/Recognito-Vision/Android-FaceRecognition-FaceLivenessDetection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"adaface-quality-adaptive-margin-for-face","repo_url":"https://github.com/RocketFlash/easy_metric_learning/tree/master/tools","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"adaface-quality-adaptive-margin-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":"face-recognition","task_name":"Face Recognition"},{"task_slug":"face-recognition-closed-set","task_name":"Face Recognition (Closed-Set)"},{"task_slug":"face-verification","task_name":"Face Verification"},{"task_slug":"surveillance-to-booking","task_name":"Surveillance-to-Booking"},{"task_slug":"surveillance-to-single","task_name":"Surveillance-to-Single"},{"task_slug":"surveillance-to-surveillance","task_name":"Surveillance-to-Surveillance"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/face-recognition-on-ijb-b","task":"Face Recognition","dataset":"IJB-B","model":"ArcFace + MS1MV2 + R100","rank_in_archive_order":2,"of":4,"metrics":{"Rank-1":"0.9450","TAR @ FAR=1e-5":"0.8933"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-ijb-b","task":"Face Recognition","dataset":"IJB-B","model":"AdaFace + MS1MV3 + R100","rank_in_archive_order":4,"of":4,"metrics":{"TAR @ FAR=0.0001":"0.9425"},"uses_additional_data":false},{"leaderboard":"/sota/face-recognition-on-lfw","task":"Face Recognition","dataset":"LFW","model":"ArcFace +  MS1MV2 + R100","rank_in_archive_order":5,"of":16,"metrics":{"Accuracy":"0.9983"},"uses_additional_data":true},{"leaderboard":"/sota/face-recognition-on-lfw","task":"Face Recognition","dataset":"LFW","model":"AdaFace +  WebFace4M + R100","rank_in_archive_order":7,"of":16,"metrics":{"Accuracy":"0.9980"},"uses_additional_data":true},{"leaderboard":"/sota/face-verification-on-ijb-b","task":"Face Verification","dataset":"IJB-B","model":"AdaFace (WebFace4M)","rank_in_archive_order":10,"of":12,"metrics":{"TAR@FAR=0.0001":"96.03"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ijb-b","task":"Face Verification","dataset":"IJB-B","model":"AdaFace (MS1MV3)","rank_in_archive_order":11,"of":12,"metrics":{"TAR@FAR=0.0001":"95.84"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ijb-b","task":"Face Verification","dataset":"IJB-B","model":"AdaFace (MS1MV2)","rank_in_archive_order":12,"of":12,"metrics":{"TAR@FAR=0.0001":"95.67"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ijb-c","task":"Face Verification","dataset":"IJB-C","model":"AdaFace (WebFace4M)","rank_in_archive_order":13,"of":26,"metrics":{"TAR @ FAR=1e-4":"97.39%"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ijb-c","task":"Face Verification","dataset":"IJB-C","model":"AdaFace (MS1MV3)","rank_in_archive_order":16,"of":26,"metrics":{"TAR @ FAR=1e-4":"97.09%"},"uses_additional_data":false},{"leaderboard":"/sota/face-verification-on-ijb-c","task":"Face Verification","dataset":"IJB-C","model":"AdaFace (MS1MV2)","rank_in_archive_order":17,"of":26,"metrics":{"TAR @ FAR=1e-4":"96.89%"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2204.00964","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.00964"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tomas-gajarsky/facetorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sithu31296/EasyFace","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mk-minchul/adaface","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Armxyz1/Results-on-RFW","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leondgarse/Keras_insightface","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Recognito-Vision/Android-FaceRecognition-FaceLivenessDetection","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Faceplugin-ltd/FaceRecognition-Android","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/RocketFlash/easy_metric_learning/tree/master/tools","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chelsea234/m2f2_det","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":11,"ran_draft_wrong":3,"ran_honours":2,"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":20,"ran":15,"repositories":5}},"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":11,"samples":[{"code_sha256_prefix":"fdd08128d4e32cda","entry":"AdaFace","repo":"sithu31296/EasyFace","repo_kind":"listed","path":"easyface/recognition/heads/adaface.py","file_url":"https://github.com/sithu31296/EasyFace/blob/HEAD/easyface/recognition/heads/adaface.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fdd08128d4e32cda"}},{"code_sha256_prefix":"25446533fe6fcf5d","entry":"AdaFace","repo":"RocketFlash/easy_metric_learning","repo_kind":"listed","path":"src/model/margin/adaface.py","file_url":"https://github.com/RocketFlash/easy_metric_learning/blob/HEAD/src/model/margin/adaface.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":"25446533fe6fcf5d"}},{"code_sha256_prefix":"775e2b18a7335c45","entry":"AdaFace","repo":"mk-minchul/adaface","repo_kind":"official","path":"head.py","file_url":"https://github.com/mk-minchul/adaface/blob/HEAD/head.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"775e2b18a7335c45"}},{"code_sha256_prefix":"d9cbf9097e9b2f3b","entry":"BasicBlockIR","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d9cbf9097e9b2f3b"}},{"code_sha256_prefix":"c7ff115d76b10e48","entry":"BasicBlockIRSE","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7ff115d76b10e48"}},{"code_sha256_prefix":"5ff2d0550242806c","entry":"BottleneckIR","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5ff2d0550242806c"}},{"code_sha256_prefix":"e880b0d152ae66fd","entry":"BottleneckIRSE","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e880b0d152ae66fd"}},{"code_sha256_prefix":"3f852d5b1c843b52","entry":"Flatten","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f852d5b1c843b52"}},{"code_sha256_prefix":"28bfa34e142cf7bf","entry":"MagFaceIResNet100","repo":"tomas-gajarsky/facetorch","repo_kind":"listed","path":"model_defs/verify_model.py","file_url":"https://github.com/tomas-gajarsky/facetorch/blob/HEAD/model_defs/verify_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"28bfa34e142cf7bf"}},{"code_sha256_prefix":"20b077f2201866aa","entry":"SEModule","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"20b077f2201866aa"}},{"code_sha256_prefix":"1d1184e941b3a490","entry":"_MagFaceIBasicBlock","repo":"tomas-gajarsky/facetorch","repo_kind":"listed","path":"model_defs/verify_model.py","file_url":"https://github.com/tomas-gajarsky/facetorch/blob/HEAD/model_defs/verify_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1d1184e941b3a490"}},{"code_sha256_prefix":"00fcae2b28b19dbb","entry":"build_one_hot","repo":"RocketFlash/easy_metric_learning","repo_kind":"listed","path":"src/model/margin/adaface.py","file_url":"https://github.com/RocketFlash/easy_metric_learning/blob/HEAD/src/model/margin/adaface.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00fcae2b28b19dbb"}},{"code_sha256_prefix":"ad5dbf57f3ea2633","entry":"get_block","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"ad5dbf57f3ea2633"}},{"code_sha256_prefix":"e82dfb7d2386721b","entry":"get_blocks","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e82dfb7d2386721b"}},{"code_sha256_prefix":"ef4ec1a6ba91a991","entry":"is_mixed_label","repo":"RocketFlash/easy_metric_learning","repo_kind":"listed","path":"src/model/margin/adaface.py","file_url":"https://github.com/RocketFlash/easy_metric_learning/blob/HEAD/src/model/margin/adaface.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ef4ec1a6ba91a991"}},{"code_sha256_prefix":"32e701066e89cd01","entry":"l2_norm","repo":"sithu31296/EasyFace","repo_kind":"listed","path":"easyface/recognition/heads/adaface.py","file_url":"https://github.com/sithu31296/EasyFace/blob/HEAD/easyface/recognition/heads/adaface.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"32e701066e89cd01"}},{"code_sha256_prefix":"27524a6bac90b755","entry":"l2_norm","repo":"RocketFlash/easy_metric_learning","repo_kind":"listed","path":"src/model/margin/adaface.py","file_url":"https://github.com/RocketFlash/easy_metric_learning/blob/HEAD/src/model/margin/adaface.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"27524a6bac90b755"}},{"code_sha256_prefix":"bf12a79527a79d4a","entry":"AdaFaceLoss","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":"bf12a79527a79d4a"}},{"code_sha256_prefix":"40d45aa734161334","entry":"ArcfaceLossSimple","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":"40d45aa734161334"}},{"code_sha256_prefix":"f3ef8c1d9f566160","entry":"Backbone","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f3ef8c1d9f566160"}},{"code_sha256_prefix":"c9258e60d2cf27ee","entry":"Bottleneck","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9258e60d2cf27ee"}},{"code_sha256_prefix":"dd1764dcd0628ab8","entry":"initialize_weights","repo":"Armxyz1/Results-on-RFW","repo_kind":"listed","path":"AdaFace/backbones/net.py","file_url":"https://github.com/Armxyz1/Results-on-RFW/blob/HEAD/AdaFace/backbones/net.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dd1764dcd0628ab8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}