{"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/adaptive-wing-loss-for-robust-face-alignment","title":"Adaptive Wing Loss for Robust Face Alignment via Heatmap Regression","arxiv_id":"1904.07399","date":"2019-04-16","proceeding":"ICCV 2019 10","authors":["Xinyao Wang","Liefeng Bo","Li Fuxin"],"abstract":"Heatmap regression with a deep network has become one of the mainstream approaches to localize facial landmarks. However, the loss function for heatmap regression is rarely studied. In this paper, we analyze the ideal loss function properties for heatmap regression in face alignment problems. Then we propose a novel loss function, named Adaptive Wing loss, that is able to adapt its shape to different types of ground truth heatmap pixels. This adaptability penalizes loss more on foreground pixels while less on background pixels. To address the imbalance between foreground and background pixels, we also propose Weighted Loss Map, which assigns high weights on foreground and difficult background pixels to help training process focus more on pixels that are crucial to landmark localization. To further improve face alignment accuracy, we introduce boundary prediction and CoordConv with boundary coordinates. Extensive experiments on different benchmarks, including COFW, 300W and WFLW, show our approach outperforms the state-of-the-art by a significant margin on various evaluation metrics. Besides, the Adaptive Wing loss also helps other heatmap regression tasks. Code will be made publicly available at https://github.com/protossw512/AdaptiveWingLoss.","url_abs":"https://arxiv.org/abs/1904.07399v3","url_pdf":"https://arxiv.org/pdf/1904.07399v3.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":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/protossw512/AdaptiveWingLoss","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/SeungyounShin/Adaptive-Wing-Loss-for-Robust-Face-Alignment-via-Heatmap-Regression","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/affromero/SMILE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/emilianavt/OpenSeeFace","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"BSD-2-Clause"}},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/mikgur/MADE_CV_1000_facial_landmarks","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/ttruty/facial-feature-mouse-control","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"adaptive-wing-loss-for-robust-face-alignment","repo_url":"https://github.com/zs7779/FAN_AdaptiveWingLoss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"face-alignment","task_name":"Face Alignment"},{"task_slug":"robust-face-alignment","task_name":"Robust Face Alignment"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"coordconv","method_name":"CoordConv"},{"method_slug":"heatmap","method_name":"Heatmap"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/face-alignment-on-300w","task":"Face Alignment","dataset":"300W","model":"AWing","rank_in_archive_order":11,"of":48,"metrics":{"NME_inter-ocular (%, Challenge)":"4.52","NME_inter-ocular (%, Common)":"2.72","NME_inter-ocular (%, Full)":"3.07","NME_inter-pupil (%, Challenge)":"6.52","NME_inter-pupil (%, Common)":"3.77","NME_inter-pupil (%, Full)":"4.31"},"uses_additional_data":false},{"leaderboard":"/sota/face-alignment-on-wflw","task":"Face Alignment","dataset":"WFLW","model":"AWing","rank_in_archive_order":16,"of":36,"metrics":{"AUC@10 (inter-ocular)":"57.19","FR@10 (inter-ocular)":"2.84","NME (inter-ocular)":"4.36"},"uses_additional_data":false},{"leaderboard":"/sota/face-alignment-on-wfw-extra-data","task":"Face Alignment","dataset":"WFW (Extra Data)","model":"Awing","rank_in_archive_order":8,"of":11,"metrics":{"AUC@10 (inter-ocular)":"57.19","FR@10 (inter-ocular)":"2.84","NME (inter-ocular)":"4.36"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1904.07399","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1904.07399"}},"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/emilianavt/OpenSeeFace","reach":{"status":"ok","spdx":"BSD-2-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SeungyounShin/Adaptive-Wing-Loss-for-Robust-Face-Alignment-via-Heatmap-Regression","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/affromero/SMILE","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mikgur/MADE_CV_1000_facial_landmarks","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ttruty/facial-feature-mouse-control","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zs7779/FAN_AdaptiveWingLoss","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/protossw512/AdaptiveWingLoss","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":6,"ran":1,"unverified":20},"by_repo_kind":{"official":{"samples":6,"ran":0,"repositories":1},"listed":{"samples":21,"ran":7,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/arcface_resnet.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/arcface_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"cd28335574411d48","entry":"conv3x3","repo":"zs7779/FAN_AdaptiveWingLoss","repo_kind":"listed","path":"core/models.py","file_url":"https://github.com/zs7779/FAN_AdaptiveWingLoss/blob/HEAD/core/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cd28335574411d48"}},{"code_sha256_prefix":"a0131fb70c267a9e","entry":"conv_1x1_bn","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/mobilenetv2.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/mobilenetv2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0131fb70c267a9e"}},{"code_sha256_prefix":"408e747e0425a594","entry":"conv_3x3_bn","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/mobilenetv2.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/mobilenetv2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"408e747e0425a594"}},{"code_sha256_prefix":"325b8d54f52e2421","entry":"create_layer_basic","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/segmentation_model.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/segmentation_model.py","link_basis":"harvester_set","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":"325b8d54f52e2421"}},{"code_sha256_prefix":"bd8fb5c95fa87652","entry":"resnet18","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/arcface_resnet.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/arcface_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd8fb5c95fa87652"}},{"code_sha256_prefix":"bb357f89cac141ff","entry":"resnet34","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/arcface_resnet.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/arcface_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb357f89cac141ff"}},{"code_sha256_prefix":"e47699a7d59b856e","entry":"bisenet2sean","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/segmentation_model.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/segmentation_model.py","link_basis":"harvester_set","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":"e47699a7d59b856e"}},{"code_sha256_prefix":"0def50a351111624","entry":"calculate_frechet_distance","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/fid_score.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/fid_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0def50a351111624"}},{"code_sha256_prefix":"cf6388d3dfe650b4","entry":"compute_f1","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/f1_score.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/f1_score.py","link_basis":"harvester_set","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":"cf6388d3dfe650b4"}},{"code_sha256_prefix":"70a97576b2e259bc","entry":"cv_crop","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70a97576b2e259bc"}},{"code_sha256_prefix":"d5a717a5a0d0df17","entry":"draw_gaussian","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d5a717a5a0d0df17"}},{"code_sha256_prefix":"d27b2e2462c936f0","entry":"gan_feat_loss","repo":"affromero/SMILE","repo_kind":"listed","path":"misc/losses.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/misc/losses.py","link_basis":"harvester_set","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":"d27b2e2462c936f0"}},{"code_sha256_prefix":"914550130b4d8353","entry":"get_activations","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/fid_score.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/fid_score.py","link_basis":"harvester_set","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":"914550130b4d8353"}},{"code_sha256_prefix":"4566e5df584812fa","entry":"get_disc","repo":"affromero/SMILE","repo_kind":"listed","path":"misc/losses.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/misc/losses.py","link_basis":"harvester_set","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":"4566e5df584812fa"}},{"code_sha256_prefix":"608139996fc77fef","entry":"get_images","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/fid_score.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/fid_score.py","link_basis":"harvester_set","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":"608139996fc77fef"}},{"code_sha256_prefix":"2cef682f544273a6","entry":"get_loader","repo":"affromero/SMILE","repo_kind":"listed","path":"data_loader.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/data_loader.py","link_basis":"harvester_set","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":"2cef682f544273a6"}},{"code_sha256_prefix":"24d857446f68d11f","entry":"get_transformations","repo":"affromero/SMILE","repo_kind":"listed","path":"data_loader.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/data_loader.py","link_basis":"harvester_set","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":"24d857446f68d11f"}},{"code_sha256_prefix":"74b3e6d3ba3df864","entry":"get_zero_tensor","repo":"affromero/SMILE","repo_kind":"listed","path":"misc/losses.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/misc/losses.py","link_basis":"harvester_set","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":"74b3e6d3ba3df864"}},{"code_sha256_prefix":"0ef7e489513c369c","entry":"load_meta_subset_data","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"dataset/convert_WFLW.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/dataset/convert_WFLW.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ef7e489513c369c"}},{"code_sha256_prefix":"44d3e225af74f1a4","entry":"mobilenetv2","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/mobilenetv2.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/mobilenetv2.py","link_basis":"harvester_set","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":"44d3e225af74f1a4"}},{"code_sha256_prefix":"b26af76575924632","entry":"parse_pts","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"dataset/convert_WFLW.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/dataset/convert_WFLW.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b26af76575924632"}},{"code_sha256_prefix":"011d1c9dcf2417ee","entry":"process_image","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/identity_model.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/identity_model.py","link_basis":"harvester_set","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":"011d1c9dcf2417ee"}},{"code_sha256_prefix":"32fe5c39d154aeef","entry":"toGray","repo":"affromero/SMILE","repo_kind":"listed","path":"metrics/identity_model.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/metrics/identity_model.py","link_basis":"harvester_set","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":"32fe5c39d154aeef"}},{"code_sha256_prefix":"79b7a34d972b528d","entry":"transform","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"dataset/convert_WFLW.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/dataset/convert_WFLW.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79b7a34d972b528d"}},{"code_sha256_prefix":"1cd6afcc14570b53","entry":"transform","repo":"protossw512/AdaptiveWingLoss","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/protossw512/AdaptiveWingLoss/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1cd6afcc14570b53"}},{"code_sha256_prefix":"e0e9e48345e57d40","entry":"update_config","repo":"affromero/SMILE","repo_kind":"listed","path":"config.py","file_url":"https://github.com/affromero/SMILE/blob/HEAD/config.py","link_basis":"harvester_set","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":"e0e9e48345e57d40"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}