Look at Boundary: A Boundary-Aware Face Alignment Algorithm
- Publication
- CVPR 2018Conference
- First submitted to arXiv
- arXiv:1805.10483
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{faceanalysislab2018,
title = {{Look at Boundary: A Boundary-Aware Face Alignment Algorithm}},
author = {Wayne Wu and Chen Qian and Shuo Yang and Quan Wang and Yici Cai and Qiang Zhou},
year = {2018},
eprint = {1805.10483},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1805.10483}
}
Try placing 17 points along the jawline of a face. The two mouth corners and the two outer eye corners are easy to find, and the tip of the chin is probably fine too; the dozen or so remaining points on the contour can only be spread roughly evenly along that line. Switch to another annotator, or turn the face 30 degrees, and point 5 slides along the contour to somewhere else.
Every dataset also spreads them its own way. 300-W puts 17 points on the contour, while WFLW, the dataset this paper built, puts 33; COFW has only 29 points for the whole face, and the common AFLW protocol uses just 19. Nobody can say exactly where the points go, and there's no agreement on how many there should be; the contour line itself, though, is hardly in dispute.
LAB's idea starts right here, with the lines first and the points second. The authors split the face into 13 boundary lines, first estimate a heatmap for each line, then have a landmark regressor look at those lines and output coordinates. First author Wayne Wu was a student at Tsinghua University at the time, and the work was done during an internship at SenseTime Research. The paper also released the WFLW dataset, 98 points on 10,000 faces; for the next several years, most facial landmark papers had to report results on WFLW.
Defining the Problem
Input, output and two approaches
In this paper, face alignment simply means landmark detection. The input is a face cropped by its face box and resized to , and the output is the coordinates of points, for example the 68 points of 300-W: 17 on the contour, 5 on each eyebrow, 9 on the nose, 6 on each eye and 20 on the mouth.
Deep methods at the time took one of two approaches. Coordinate regression ends the CNN with fully connected layers that output numbers directly; it's simple and needs no post-processing. Heatmap regression outputs a small image for each point (say ); the training target is an image with a Gaussian peak at the correct position, and at inference the location of the maximum is taken as the coordinate. The paper observes that heatmap regression is usually more accurate than coordinate regression; the best method at the time (JMFA) was a stacked hourglass network that outputs heatmaps.
LAB uses both. The boundaries are estimated as heatmaps, but the landmarks come out in the end as coordinates regressed by fully connected layers; we'll see later why it's wired this way.
Measuring the error
The standard metric is the normalized mean error (NME). Average the Euclidean distance between each predicted point and its annotation, then divide by a length that stands for the size of the face:
The trouble is that there are several ways to choose . 300-W and WFLW commonly use the distance between the two outer eye corners (inter-ocular); older papers use the distance between the two pupils (inter-pupil), and since the 68 points include no pupils, the mean of the 6 points around each eye stands in for the pupil; AFLW has many profile faces where the eye distance is unstable, so it uses the size of the face box instead.

How far apart are the two denominators for the same face? Computed on WFLW's 2,500 test faces, the inter-ocular distance averages 1.43 times the inter-pupil distance. So the same 2-pixel error comes to 3.53% with inter-ocular normalization and 5.05% with inter-pupil. Same model, different denominator, and the numbers differ by forty percent; this is exactly where LAB's own 300-W table later trips up.
Overall performance is read from the cumulative error distribution (CED) curve. The horizontal axis is an NME threshold and the vertical axis is the fraction of images whose error doesn't exceed it; the earlier the curve shoots up, the better. Take the area under the curve up to a threshold of 0.1 and divide by 0.1, and you get the AUC, between 0 and 1. Intuitively, if every image's error were exactly 4.7%, the CED would be a single step at 0.047 and the AUC would be . The failure rate (FR) is the fraction of images with NME above 10%.
On 300-W, the training set has 3,148 images. The test Fullset has 689, split into the easier common subset (554) and the challenging subset (135), mostly large poses and exaggerated expressions; there's also a 600-image test set, the private test set of the original 300-W competition.
Points are vague, and heatmaps blur
The authors point out three problems.
The first is ambiguous definitions. Corner points such as eye corners and mouth corners are clearly defined, but points on the contour or in the middle of an eyebrow are hard to keep at the same semantic position under large poses and occlusion.
The second is incompatible annotation schemes. Datasets differ in point count (19, 29, 68, 194 points), which makes them hard to combine for training, and a model trained on one dataset does poorly on a new in-the-wild test set.
The third is occlusion. Under heavy occlusion, heatmap methods often output heatmaps that are a mess of noise or sprout several peaks.
The three problems have one thing in common. A point is a weak definition, yet nearly all of these points sit on some clear boundary, such as the upper eyelid, the nose bridge or the bottom edge of the lower lip. If you find that line first, won't the points be easier to find?
Solving the Problem
13 lines
Start with how the ground truth is made. Given a face and its annotated points , the points belonging to the same boundary are picked out into a subset , for example the 5 points of the upper eyelid. The authors use boundaries: the outer contour, the left and right eyebrows, the nose bridge, the lower edge of the nose, four eyelids (upper and lower for each eye), the top and bottom edges of the upper lip, and the top and bottom edges of the lower lip.
Each boundary becomes a heatmap in four steps.
- Interpolate into a dense line.
- Draw it as a binary image , with pixels on the line set to 1 and everything else 0. The author added in issue #3 that the line is 1 pixel wide.
- Apply a distance transform to to get , the shortest distance from each pixel to the line.
- Turn distances into heatmap values with a Gaussian, zeroing everything beyond (Eq. (1) of the paper):
The heatmap is a quarter of the input on each side, so a face corresponds to a heatmap. The supplementary material gives . Plug in a few distances: pixels on the line are 1, one cell off the line is , two cells , and from 3 cells out it's 0 (0.011 without the cutoff). So on the heatmap each boundary is a band about 5 cells wide, bright in the middle and dark at the edges.

The blue line drawing on the right is what the network has to learn to draw. The left panel also shows a detail in passing. Of WFLW's 98 points, 96 lie on these 13 lines, and the remaining two pupil points belong to no boundary.
This representation doesn't depend on the number of points. Whether it's 300-W's 68 points or WFLW's 98, as long as the points are dense enough, they interpolate into the same 13 lines; that's the basis of the cross-dataset experiments later on.
If the boundaries were perfect
Before looking at how the estimator works, look at one of the authors' upper-bound experiments. If the boundary heatmaps were completely correct, how accurate could the landmarks get?
The setup feeds the ground-truth boundary heatmaps straight into the regressor (the paper calls this Oracle). On 300-W's 600-image test set, the best method at the time, JMFA, has an AUC of 0.5485 and a failure rate of 1.00%; LAB given the ground-truth boundaries scores 0.7626 and 0.
The authors run the same upper-bound comparison with other kinds of "structural information," on 300-W challenging:
| Ground truth fed to the regressor | NME (%) |
|---|---|
| None (res-18 baseline) | 7.12 |
| Facial-part Gaussians | 5.25 |
| Face parsing map | 4.16 |
| Boundary heatmaps | 3.28 |
Compiled from Table 5 of the paper.
Part Gaussians (one blob per facial feature) are too coarse. In face parsing (cutting the face into non-overlapping regions), every region has to be closed, but there's no clear closed edge between the nose and the cheek to begin with. Boundary lines don't have to close: the nose bridge is one line and the lower edge of the nose is another. They're the most flexible to express, and they have the highest ceiling.
This table only shows that boundaries are worth learning. In practice the boundaries have to be estimated by the network, and the better they're estimated, the more accurate the landmarks; the ablations show this again and again.
The full architecture

LAB is made of three networks.
- (a) Boundary heatmap estimator: a stacked hourglass network that takes a face and outputs 13 boundary heatmaps.
- (b) Boundary-aware landmark regressor: res-18 plus fully connected layers, which takes the face and the boundary heatmaps and outputs coordinates.
- (c) Boundary effectiveness discriminator: judges whether an estimated boundary heatmap is good enough, and improves (a) in turn through adversarial training.
How the regressor takes in the 13 maps
The regressor's baseline is a four-stage res-18 followed by two fully connected layers of 256 units each, outputting numbers. Boundary information is fused in at four places: once at the input image and once after each of the first three stages, which are the Input Image Fusion and the three FMFs in (b) of the figure.
Input fusion uses the boundary heatmaps to "mask" the original image (Eq. (2) of the paper):
is element-wise multiplication and is concatenation along the channel dimension. The heatmaps are first upscaled to , and the -th copy, , keeps only the texture near the -th boundary, with the background and the textureless cheeks squashed to 0. The original image is also concatenated at the front, so useful information away from the boundaries isn't thrown away altogether. In the officially released WFLW model, for example, the input is a single-channel grayscale face, which becomes channels after fusion.
Feature fusion happens in the middle of the network. Suppose a stage outputs a feature map of size (Eq. (3) of the paper):

Follow the sizes in the figure.
- The 13 boundary heatmaps of are first downsampled to to line up with .
- and are concatenated into .
- This goes into a small hourglass network . 's job is to "translate" the 13 channels of boundary information into channels, since there are always just 13 boundary maps while the feature map has channels. An hourglass is chosen so it can see large-scale structure, and a final sigmoid squashes the output to , giving an attention mask.
- The mask is multiplied element-wise with : features near the boundaries are kept and everything else is suppressed.
- The result is concatenated with the original again, giving a output.
The regressor's loss is simply the squared error of the coordinates, . The regressor has no heatmap output of its own; all of its "heatmaps" come from the estimator.
The estimator: stacked hourglasses and message passing
The boundary heatmaps are estimated by a stacked hourglass network, with an MSE loss attached to the output of every hourglass (stack):
Here is the number of samples in a batch, unrelated to the channel count of the feature maps earlier. The main experiments use 4 stacks; the ablations use only 2 to save time.
With this alone, the heatmaps turn into a mess under heavy occlusion. The authors borrow message passing from human pose estimation, so that the visible boundaries can help the invisible ones. The supplementary material spells out how.
- At the end of each stack, a convolution first gives a 256-channel feature .
- Each boundary then gets its own 16-channel branch, , where is a nonlinearity. 13 boundaries means 13 branches.
- Messages pass between the branches along a tree. For example, the left eyebrow (boundary 6) in the 2nd stack receives a message from the left upper eyelid (boundary 2) in the same stack, and another from the left eyebrow in the 1st stack:
Passing within a stack is called intra-level, and passing from one stack to the next is inter-level. When bangs cover the eyebrows, the position of the eyelids can still hint at roughly where the eyebrows are.
- The same tree is traversed again in the opposite direction to get ; the two are concatenated, and a convolution outputs the -th boundary heatmap.
The authors stress that this step is only feasible with boundaries. The number of message-passing branches equals the number of nodes, so 13 boundaries means 13 branches; with 68 points, let alone 194, parameters and computation would balloon beyond practicality.
The discriminator: let the landmarks keep score
MSE has another old problem. Where things are uncertain, the solution that minimizes squared error averages all the possibilities, so the heatmap blurs. The super-resolution literature observed this long ago.
The usual fix is to add a GAN and have a discriminator tell "real heatmaps" from "heatmaps drawn by the network." The authors argue that here a heatmap's quality has a very concrete criterion: whether it helps the regressor put the points in the right place. So when the discriminator learns, a heatmap drawn by the network isn't automatically labeled fake; that depends on whether the landmarks derived from it are accurate (Eq. (4) of the paper):
is the set of landmarks the regressor computes from this estimated heatmap, and is the distance map of the ground-truth boundaries, recording how far each position is from the true boundary. The supplementary material gives and .
Work it through on a 68-point face. means at least , that is 55, predicted points must land within 1.5 pixels of the true boundary for the heatmap to count as "effective," with ; if only 50 points land near the lines, .
The loss of the discriminator (Eq. (5) of the paper):
The first term asks to judge the ground truth as 1. The second asks to output for heatmaps drawn by the estimator , that is, 1 when and 0 when . The estimator, for its part, minimizes the adversarial loss (Eq. (6) of the paper):
In other words, it wants to say 1 for its own heatmaps. To fool the discriminator, the estimator has to draw heatmaps that put 55 points on the lines.
The three networks are trained in alternation (Algorithm 1 of the paper), with each round doing four things in order.
- The estimator minimizes .
- The discriminator minimizes the first term of with ground-truth heatmaps.
- The discriminator minimizes the second term of with estimated heatmaps.
- The regressor takes and the estimated heatmap and minimizes .
The loop runs until landmark accuracy on the validation set stops improving. The supplementary material's settings are SGD, batch 8, 2,000 epochs of training, learning rate divided by 5 at epochs 1,000 and 1,500, weight decay 0.0005 and momentum 0.9. Data augmentation is translation by ±30 pixels, rotation by ±20°, scaling by ±15% and horizontal flipping. The discriminator, like the regressor, is res-18 plus two fully connected layers. Everything is trained with Caffe on 4 Titan X GPUs.
One estimator, several annotation schemes
Because boundaries don't depend on the point count, there's a by-product. The boundary estimator can be trained on 300-W and then supply boundaries to a regressor for COFW (29 points) or AFLW (19 points). The regressor only has to learn its own set of point definitions, while the boundaries carry over from what was learned on 300-W. This is another advantage of having the regressor output coordinates through fully connected layers; switching to another annotation scheme only means changing the output size of the last layer, 58 numbers for 29 points and 38 for 19. The authors call this cross-dataset face alignment; the discussion shows both its effect and the dispute around it.
WFLW
Last comes the paper's other contribution. WFLW (Wider Facial Landmarks in-the-wild) takes its images from the face detection dataset WIDER FACE: 10,000 faces in total, 7,500 for training and 2,500 for testing, each hand-annotated with 98 points. Counting from the official annotation files, the 10,000 faces come from 6,551 images; a single group photo may have several annotated faces.
98 points are much denser than 68. The outer contour has 33 points, the eyebrows are annotated along their lower edge as well as the upper one (9 points each), each eye has 8 points, and there are two extra pupil points. Besides the points, each face carries 6 attribute labels: large pose, exaggerated expression, extreme illumination, make-up, occlusion and blur. The test set is split by attribute into six subsets:
| Subset | Faces |
|---|---|
| Large pose | 326 |
| Expression | 314 |
| Illumination | 698 |
| Make-up | 206 |
| Occlusion | 736 |
| Blur | 773 |
Computed for this note from the official WFLW test annotations.
The six subsets add up to more than 2,500 because a face can be both large-pose and occluded. The authors' intent is to evaluate factors such as pose, occlusion and expression on one dataset in one go, without switching between datasets with different evaluation rules. WFLW normalizes by the distance between the outer eye corners (points 60 and 72), with a 10% failure threshold, and the AUC is also computed up to 0.1.
Discussion
300-W: two normalizations
Start with the 300-W Fullset. This table comes in two halves: the top half uses inter-pupil normalization and the bottom half inter-ocular, and numbers from the two halves can't be compared directly.
| Method | Common | Challenging | Fullset |
|---|---|---|---|
| Inter-pupil | |||
| MDM | 4.83 | 10.14 | 5.88 |
| RAR | 4.12 | 8.35 | 4.94 |
| DVLN | 3.94 | 7.62 | 4.66 |
| TSR | 4.36 | 7.56 | 4.99 |
| LAB | 3.42 | 6.98 | 4.12 |
| LAB+Oracle | 2.57 | 4.72 | 2.99 |
| Inter-ocular | |||
| PCD-CNN | 3.67 | 7.62 | 4.44 |
| SAN | 3.34 | 6.60 | 3.98 |
| LAB | 2.98 | 5.19 | 3.49 |
| LAB+Oracle | 1.85 | 3.28 | 2.13 |
Compiled from Table 1 of the paper, in %, selected methods only.
Taken half by half, LAB comes first in both. On 300-W's 600-image test set, LAB's AUC is 0.5885 with a 0.83% failure rate, also beating JMFA's 0.5485 and 1.00%.
But put the two normalizations of LAB side by side and something's off. As computed earlier, switching to inter-pupil should multiply the numbers by about 1.4. LAB's inter-ocular Challenging score is 5.19, so the inter-pupil figure should be around 7.3, yet the table says 6.98; the Fullset's 3.49 should correspond to about 4.9, and the table says 4.12.
The community did the math quickly. In September 2018, someone reported in issue #15 that their own model got 3.30 inter-ocular but 4.30 inter-pupil, and suspected they had computed the inter-pupil distance wrong; another commenter estimated the inter-pupil distance at about 0.71 times the inter-ocular distance. In October, Roberto Valle, a PhD student working on face alignment, laid out in issue #20 the numbers of SHN and DAN under both normalizations, and pointed out that the same model couldn't possibly score both 6.98 inter-pupil and 5.19 inter-ocular on Challenging.
The author replied in November 2018 that the original version had left out some details: the inconsistency came from the two normalizations using hourglasses with different numbers of stacks, and the updated table was in the PDF on the project page. That updated version (PDF created on October 31, 2018) splits LAB into two rows:
| Model | Norm. | Com. | Chal. | Full |
|---|---|---|---|---|
| LAB 4-stack | Inter-ocular | 2.98 | 5.19 | 3.49 |
| LAB 4-stack | Inter-pupil | 4.20 | 7.41 | 4.92 |
| LAB 8-stack | Inter-ocular | 2.43 | 4.85 | 2.93 |
| LAB 8-stack | Inter-pupil | 3.42 | 6.98 | 4.12 |
Compiled from Table 1 of the updated version on the authors' project page (Wayback archive).
In the original version, the inter-pupil row was the 8-hourglass model and the inter-ocular row was the 4-hourglass model, while the text said "The estimator is stacked four times if not specially indicated." After the update, the ratio between the two normalizations of the same 4-stack model is , matching the community's estimate.
Measured by inter-pupil distance, that same 4-stack model's Fullset 4.92 trails DVLN's 4.66 in the table, and its Common 4.20 trails 3.94 as well (beaten by its own predecessor); DVLN is the previous year's work by LAB's first author and Shuo Yang. The Challenging score of 7.41 still beats the other methods (TSR 7.56, DVLN 7.62).
In the reply the author said "We will upload it to Arxiv later". In January 2021 someone left a reminder in the same thread, "I think you have forgotten to update the Arxiv version of the paper"; arXiv still has only v1, and the CVF open-access version also has the original table. The comparison tables of later papers (LUVLi, for example) cite the 4-stack 3.49. The 8-stack 2.93 is lower than Adaptive Wing's 3.07 a year later, yet there's no public code or model to verify it.
WFLW: an exam for those who came after
WFLW is a new dataset, so the only methods compared in the table are ESR, SDM, CFSS and DVLN. In the table below, the DVLN and LAB columns are NME, and the last two columns are LAB's failure rate and AUC:
| Subset | DVLN | LAB | LAB FR | LAB AUC |
|---|---|---|---|---|
| All | 6.08 | 5.27 | 7.56 | 0.5323 |
| Large pose | 11.54 | 10.24 | 28.83 | 0.2345 |
| Expression | 6.78 | 5.51 | 6.37 | 0.4951 |
| Illumination | 5.73 | 5.23 | 6.73 | 0.5433 |
| Make-up | 5.98 | 5.15 | 7.77 | 0.5394 |
| Occlusion | 7.33 | 6.79 | 13.72 | 0.4490 |
| Blur | 6.88 | 6.32 | 10.74 | 0.4630 |
Compiled from Table 3 of the paper, inter-ocular normalization, NME and FR in %.
Overall NME drops from DVLN's 6.08 to 5.27. Large pose is still the hardest cell: LAB fails on 28.83% of the 326 large-pose faces, more than a quarter, against DVLN's 46.93%. The occlusion subset's 13.72% failure rate is also clearly higher than those of expression, illumination and make-up. The authors' own conclusion is that WFLW leaves plenty of room for improvement.
This exam has been retaken many times since. A year later, Adaptive Wing pushed NME on the full WFLW test set down to 4.36, and the year after that LUVLi got 4.37; the 2023 STAR Loss paper states flatly that "WFLW is currently the most used dataset in facial landmark detection."
Cross-dataset: COFW and AFLW
In this set of experiments, LAB's boundary estimator is trained on 300-W, and only the regressor uses the target dataset's annotations. The control, "LAB w/o boundary," is a res-18 regressor with the same structure but no boundaries. In the table, the two COFW columns are the 29-point NME and failure rate, and the two AFLW columns are NME on the full set and on the frontal subset.
| Method | COFW | FR | AFLW | Frontal |
|---|---|---|---|---|
| Previous best | 6.03 | 4.14 | 2.17 | 1.81 |
| LAB, no boundary | 5.58 | 2.76 | 1.85 | 1.62 |
| LAB | 3.92 | 0.39 | 1.25 | 1.14 |
Compiled from Table 4 of the paper, in %. "Previous best" is the best result other than LAB in each column of the table (RAR and DAC-CSR for COFW, TSR and DAC-OSR for AFLW).
With boundaries, the error on COFW-29, AFLW-Full and AFLW-Frontal drops by 29%, 32% and 29% in relative terms. Every COFW test face is occluded to some degree, and the failure rate drops from 2.76% to 0.39%, leaving just two failures out of 507.
Two things to keep in mind when reading this table. First, the baseline without boundaries already beats the previous best, 1.85 against 2.17 on AFLW-Full. Second, LAB with boundaries uses 300-W's training data on top. Roberto Valle raised this in issue #20 as well, arguing that it makes the numbers incomparable with the literature; the author replied that the table was there to evaluate cross-dataset auxiliary training, not to compare. The LAB row in the table is set in bold as the best all the same.
On COFW-68 (the COFW test set re-annotated with 68 points), LAB trained on 300-W's training images gets 4.62% NME and a 2.17% failure rate; CFSS, also trained on images from the 300-W family, gets 6.28% and 9.07%.
Ablations: better lines, better points
The ablations are done mainly on 300-W challenging, with the estimator stacking only 2 hourglasses.
The more fusion layers, the better. Fusing at a single layer brings NME from the baseline's 7.12 down to 6.56; fusing at two, three and four layers gives 6.32, 6.19 and 6.13 in turn.
The fusion method was compared too. Replacing the hourglass subnetwork in feature fusion with consecutive convolutions gives an NME of 6.24; keeping the hourglass but withholding the boundary heatmaps only gets down to 6.95. The latter shows that the drop in error comes mainly from the boundary information, not from the parameters of an extra hourglass.
Next come the estimator's three components, added one at a time on top of the res-18 baseline:
| Setting | NME (%) | FR (%) |
|---|---|---|
| res-18 baseline | 7.12 | 10.37 |
| + Hourglass boundaries | 6.13 | 7.41 |
| + Message passing | 5.82 | 5.93 |
| + Adversarial learning | 5.59 | 3.70 |
Values read from Figure 8(a) of the paper, 300-W challenging.

This figure matches the last three rows of the table. The mask covers the forehead, the area around the eyes and the nose bridge, and the contours drawn by the baseline hourglass are broken, with blobs of noise around them; add message passing and the lines join up; add adversarial learning on top and the lines get thinner and more concentrated.
The authors also measured the error of the heatmaps themselves: for the three settings it is 0.85, 0.76 and 0.63 in turn, while the landmark error falls in step from 6.13 and 5.82 to 5.59. In the abstract, the authors asked how boundary estimation relates to landmark localization; these numbers answer that the better the heatmap is drawn, the more accurately the points are placed.
The adversarial step has one more control. With a conventional real/fake discriminator instead, the failure rate on 300-W challenging is 5.19%; the version that uses landmarks to decide gets 3.70%.
Message passing helps most on WFLW's occlusion subset, where the authors say mean error drops by more than 11% relative (from 17.66 to 15.64). The absolute numbers of this WFLW ablation, though, are about three times those of the WFLW main table: the final model scores 17.19 on the expression subset here and 5.51 in the main table. The paper doesn't describe the setup of this experiment, so it's only good for reading relative changes.
Speed, code and reproduction
The paper's conclusion says the algorithm takes 60 milliseconds per image on a TITAN X.
The official code, wywu/LAB, is a modified Caffe that provides two WFLW models: WFLW_final, used in the paper, and WFLW_wo_mp, which drops message passing and is easier to read. In issue #25 (November 2018), a user timed them with Caffe's built-in timing tool: on a GTX TITAN X, one forward pass takes 178 milliseconds for WFLW_final and 61 milliseconds for WFLW_wo_mp; on CPU, 4.5 seconds and 0.8 seconds respectively. In these measurements, the one close to 60 milliseconds is the version without message passing; the paper doesn't say which model its 60 milliseconds refers to, and it's unclear whether the two TITAN X cards are the same generation. STAR Loss's verdict on LAB is along the same lines: "practical but computationally expensive."
The training code was never released. The README says that "For company security considerations" the training scripts can't be made public, and adds that with the released model definitions plus the data augmentation and hyperparameters described in the paper, reproducing it shouldn't be hard. The README's to-do list still has support for three datasets, AFLW, COFW and 300-W; the repo was last updated in October 2019.
The first hurdle in reproducing it is how to draw the boundaries. For the interpolation step, the paper writes a single word, "interpolated." Issue #22 (November 2018) asked which interpolation was used, reporting that lines drawn with scipy's interpolation weren't good enough; issue #39 and issue #47 ask the same thing, and none of them got a reply from a maintainer. Issue #37 asked how the ground-truth heatmaps were made, and the author's reply was "Please refer to the paper." (the paper only says interpolated)
The community's PyTorch reproductions also got stuck on 300-W. In issue #2 of FunkyKoki/Look_At_Boundary_PyTorch (April 2019), a user reported reaching only about 5.1 inter-pupil on 300-W; the author, FunkyKoki, replied that 300-W wasn't great, while WFLW came close to the original numbers. Another reproduction, Look_At_Boundary_PyTorch, says in its README that its best 300-W Fullset inter-pupil result is 5.78. That's far from the original table's 4.12, and a good deal closer to the updated 4-stack model's 4.92.
Using WFLW itself has a few pitfalls too.
- No license stated. Neither the project page nor the repo gives license terms for the dataset; issue #56 (March 2022) asked whether it could be used commercially and got no reply. The images themselves come from WIDER FACE.
- 98 points don't convert back to 68. In issue #17, someone asked whether 300-W's 68 points are a subset of the 98. The author replied that the two sets have no clear correspondence; they had tried picking 68 of WFLW's 98 points to train on and testing on 300-W, and it performed poorly because the point definitions differ.
- A few annotations are wrong. Someone reported a test face whose two inner-lip points are labeled at the same position (issue #41), and another report found training images with points outside the face box (issue #55); neither got a reply.
Conclusion
LAB first estimates 13 boundary heatmaps with stacked hourglasses, message passing and a discriminator that keeps score with landmarks, then fuses the boundaries into a res-18 regressor at the input and after three stages. Given the ground-truth boundaries, the AUC on 300-W test is 0.76; LAB estimating its own boundaries gets 0.59, and JMFA, the best at the time, 0.55. In the ablations, the more accurately the boundaries are drawn, the more accurate the points; across datasets, the failure rate on COFW drops from 2.76% to 0.39%. The price is three networks trained in alternation for two thousand epochs, plus a 300-W table that was corrected only on the project page and never made it to arXiv.
When you compare against LAB or any 300-W number from around 2018, first check whether the denominator is inter-ocular or inter-pupil; the two differ by about 1.4×. For LAB's own numbers, also check how many hourglasses were stacked. To use WFLW, compute the inter-ocular distance from the official points 60 and 72, with a 10% failure threshold. If your product needs 68 points, don't just pick points out of the 98 to make up the count; the author tried it, and the results on 300-W were poor.
Lines are easier to define than points; that's the premise of the whole LAB paper. As for how to connect the points into lines, at least five threads in the issue tracker are asking.