Papers › Adaptive Wing Loss for Robust Face Alignment via Heatmap Regression

Adaptive Wing Loss for Robust Face Alignment via Heatmap Regression

16 Apr 2019ICCV 2019 10arXiv:1904.07399archive 2025-07-28

Xinyao Wang, Liefeng Bo, Li Fuxin

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1904.07399")

Code

Syntology Ran 7 of 27 code samples harvested from 3 repositories linked to this paper; 20 have no recorded run. Of those that ran: 6 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 0 ran; community (archive-listed): 21 samples from 2 repositories, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

protossw512/AdaptiveWingLoss officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
affromero/SMILE mentioned on GitHubpytorchMIT report
emilianavt/OpenSeeFace mentioned on GitHubtfBSD-2-Clause report
mikgur/MADE_CV_1000_facial_landmarks mentioned on GitHubpytorch report
ttruty/facial-feature-mouse-control mentioned on GitHubpytorch report
zs7779/FAN_AdaptiveWingLoss mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

27 samples harvested; 7 ran; 0 honoured the contract we drafted; 20 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran · our draft was wrong
1ran
20unverified

Licence: 1 of the 27 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

cv_crop protossw512/AdaptiveWingLoss/utils/utils.py official repository unverified Apache-2.0 (permissive) · 70a97576b2e259bc · report
draw_gaussian protossw512/AdaptiveWingLoss/utils/utils.py official repository unverified Apache-2.0 (permissive) · d5a717a5a0d0df17 · report
load_meta_subset_data protossw512/AdaptiveWingLoss/dataset/convert_WFLW.py official repository unverified Apache-2.0 (permissive) · 0ef7e489513c369c · report
parse_pts protossw512/AdaptiveWingLoss/dataset/convert_WFLW.py official repository unverified Apache-2.0 (permissive) · b26af76575924632 · report
transform protossw512/AdaptiveWingLoss/dataset/convert_WFLW.py official repository unverified Apache-2.0 (permissive) · 79b7a34d972b528d · report
transform protossw512/AdaptiveWingLoss/utils/utils.py official repository unverified Apache-2.0 (permissive) · 1cd6afcc14570b53 · report
conv3x3 affromero/SMILE/metrics/arcface_resnet.py community (archive-listed) ran · our draft was wrong MIT (permissive) · fac5364e2f53c6db · report
conv3x3 zs7779/FAN_AdaptiveWingLoss/core/models.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · cd28335574411d48 · report
conv_1x1_bn affromero/SMILE/metrics/mobilenetv2.py community (archive-listed) ran · our draft was wrong MIT (permissive) · a0131fb70c267a9e · report
conv_3x3_bn affromero/SMILE/metrics/mobilenetv2.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 408e747e0425a594 · report
create_layer_basic affromero/SMILE/metrics/segmentation_model.py community (archive-listed) ran MIT (permissive) · 325b8d54f52e2421 · report
resnet18 affromero/SMILE/metrics/arcface_resnet.py community (archive-listed) ran · our draft was wrong MIT (permissive) · bd8fb5c95fa87652 · report
resnet34 affromero/SMILE/metrics/arcface_resnet.py community (archive-listed) ran · our draft was wrong MIT (permissive) · bb357f89cac141ff · report
bisenet2sean affromero/SMILE/metrics/segmentation_model.py community (archive-listed) unverified MIT (permissive) · e47699a7d59b856e · report
calculate_frechet_distance affromero/SMILE/metrics/fid_score.py community (archive-listed) unverified MIT (permissive) · 0def50a351111624 · report
compute_f1 affromero/SMILE/metrics/f1_score.py community (archive-listed) unverified MIT (permissive) · cf6388d3dfe650b4 · report
gan_feat_loss affromero/SMILE/misc/losses.py community (archive-listed) unverified MIT (permissive) · d27b2e2462c936f0 · report
get_activations affromero/SMILE/metrics/fid_score.py community (archive-listed) unverified MIT (permissive) · 914550130b4d8353 · report
get_disc affromero/SMILE/misc/losses.py community (archive-listed) unverified MIT (permissive) · 4566e5df584812fa · report
get_images affromero/SMILE/metrics/fid_score.py community (archive-listed) unverified MIT (permissive) · 608139996fc77fef · report
get_loader affromero/SMILE/data_loader.py community (archive-listed) unverified MIT (permissive) · 2cef682f544273a6 · report
get_transformations affromero/SMILE/data_loader.py community (archive-listed) unverified MIT (permissive) · 24d857446f68d11f · report
get_zero_tensor affromero/SMILE/misc/losses.py community (archive-listed) unverified MIT (permissive) · 74b3e6d3ba3df864 · report
mobilenetv2 affromero/SMILE/metrics/mobilenetv2.py community (archive-listed) unverified MIT (permissive) · 44d3e225af74f1a4 · report
process_image affromero/SMILE/metrics/identity_model.py community (archive-listed) unverified MIT (permissive) · 011d1c9dcf2417ee · report
toGray affromero/SMILE/metrics/identity_model.py community (archive-listed) unverified MIT (permissive) · 32fe5c39d154aeef · report
update_config affromero/SMILE/config.py community (archive-listed) unverified MIT (permissive) · e0e9e48345e57d40 · report

Tasks

Face AlignmentRobust Face Alignmentregression

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Face Alignment 300W AWing NME_inter-ocular (%, Challenge) 4.52 #11 of 48 Archive leaderboard report
Face Alignment 300W AWing NME_inter-ocular (%, Common) 2.72 #11 of 48 Archive leaderboard report
Face Alignment 300W AWing NME_inter-ocular (%, Full) 3.07 #11 of 48 Archive leaderboard report
Face Alignment 300W AWing NME_inter-pupil (%, Challenge) 6.52 #11 of 48 Archive leaderboard report
Face Alignment 300W AWing NME_inter-pupil (%, Common) 3.77 #11 of 48 Archive leaderboard report
Face Alignment 300W AWing NME_inter-pupil (%, Full) 4.31 #11 of 48 Archive leaderboard report
Face Alignment WFLW AWing AUC@10 (inter-ocular) 57.19 #16 of 36 Archive leaderboard report
Face Alignment WFLW AWing FR@10 (inter-ocular) 2.84 #16 of 36 Archive leaderboard report
Face Alignment WFLW AWing NME (inter-ocular) 4.36 #16 of 36 Archive leaderboard report
Face Alignment WFW (Extra Data) Awing AUC@10 (inter-ocular) 57.19 #8 of 11 Archive leaderboard report
Face Alignment WFW (Extra Data) Awing FR@10 (inter-ocular) 2.84 #8 of 11 Archive leaderboard report
Face Alignment WFW (Extra Data) Awing NME (inter-ocular) 4.36 #8 of 11 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

CoordConvHeatmap

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections