Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks
- Publication
- CVPR 2018Conference
- First submitted to arXiv
- arXiv:1711.06753
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{faceanalysiswingloss2017,
title = {{Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks}},
author = {Zhen-Hua Feng and Josef Kittler and Muhammad Awais and Patrik Huber and Xiao-Jun Wu},
year = {2017},
eprint = {1711.06753},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1711.06753}
}
Take a convolutional network only six layers deep, with a 64×64 face as input and fewer than 4 million parameters. Train it with an L2 loss to find 19 facial landmarks on AFLW, and the mean error is 2.41% of the face box width. Switch the loss to L1, leaving the network, the data and the number of training steps untouched, and the error drops to 2.00%. In the same table, the best deep method of the time, TR-DRN, gets 2.17%.
That a change of loss function alone beats other people's carefully designed architectures also says something about where the field stood in 2017. Facial landmark papers of those years spent their effort on network structure, with cascades, heatmaps, RNNs and hourglass networks taking turns, while the loss function was almost always plain L2.
Zhen-Hua Feng and colleagues at the CVSSP lab of the University of Surrey in the UK (the last author, Xiao-Jun Wu, is at Jiangnan University) first pitted L2, L1 and smooth L1 against each other on the same small network, then designed a new loss from what they saw. They call it Wing loss; plotted, it's symmetric, sharp in the middle, and flares outward on both sides. The paper also comes with two engineering add-ons, one for the shortage of large-pose samples and one a coarse-to-fine two-stage network.
Defining the Problem
Which numbers the network spits out
Facial landmark detection, also called face alignment, finds a predefined set of points on a face. How many points there are and where they go is up to the dataset. The usual AFLW protocol has 19 points, spread across the eyebrows, eyes, nose, mouth and chin; 300-W has 68 points, 17 on the jaw contour, 10 on the eyebrows, 9 on the nose, 12 on the eyes and 20 on the mouth.
This paper takes the coordinate regression route. A face detector first boxes the face and crops it out, and the network takes in this image and directly outputs real numbers:
is the number of landmarks, so AFLW's 19 points make 38 numbers. In training, the network output and the label are subtracted coordinate by coordinate, each difference goes through the same function , and the results are summed. This is equation (3) in the paper:
What this paper decides is .
The other route is heatmap regression. The network outputs a map for each landmark, where brighter areas mean the point is more likely to be there, and the peak of the map is taken as the coordinate. Architectures like the hourglass network work this way. They're accurate, but dense prediction on high-resolution feature maps costs far more computation. Wing belongs to the camp that outputs coordinates directly.
Before deep learning, the mainstream was cascaded regression, which starts from a mean face and predicts a small shape correction at each level. The paper notes at the start that these methods are shallow and hard to improve once they're stacked four or five levels deep.
How the error is measured
The standard metric for landmarks is NME (normalized mean error). Compute the Euclidean distance between each point's predicted and labeled positions, average them, and divide by a length that stands for the size of the face:
Dividing by lets big and small faces be compared together. What is depends on each dataset's protocol. AFLW's protocol gives square test boxes, and is the box width; for 300-W the common choices are the distance between the outer eye corners or the distance between the two pupils. The same model with a different denominator can give very different numbers, and we'll work that out again when reading the 300-W table.
To get a feel for the scale, take AFLW's numbers. If the face box is shrunk exactly to the network's 64-pixel input, an NME of 2% means each point is off by about 1.3 pixels on average. By 2017, this task was already fighting over errors of a pixel or two.
Looking only at the mean misses the distribution. The other chart papers often use is the CED curve (cumulative error distribution). The horizontal axis is an NME threshold, and the vertical axis is the fraction of test faces whose NME falls below that threshold. The closer the curve hugs the top left, the better; the left part of the curve reflects the faces with very small errors, and the right part the hardest ones.
A first round on a six-layer network
To compare losses quickly, the authors used a very plain network called CNN-6.

Every layer is a 3×3 convolution followed by ReLU and then 2× max pooling. After five layers, the 64×64 image is down to 2×2×512, which is flattened to 2,048 dimensions, passed through a 1,024-dimensional fully connected layer, and turned into coordinates. No BN, no dropout, no residual connections, trained from scratch. For 68 points it has about 3.8 million parameters, more than half of them in that fully connected layer.
The three candidate losses are defined as follows, with the error of one coordinate:
- L2: , the default choice in landmark papers of the time.
- L1: .
- smooth L1: when , and otherwise. It comes from Fast R-CNN's box regression and behaves like L2 for small errors and like L1 for large ones.
Each was trained for 120,000 iterations on AFLW:
| Method | NME (%) |
|---|---|
| CCL | 2.72 |
| DAC-CSR | 2.27 |
| TR-DRN | 2.17 |
| CNN-6 (L2) | 2.41 |
| CNN-6 (L1) | 2.00 |
| CNN-6 (smooth L1) | 2.02 |
| CNN-6 (Wing) | 1.88 |
Compiled from Table 1 of the paper, AFLW-Full, normalized by the face box width.
The first three rows are the strong methods of the time. CCL and DAC-CSR are multi-view cascaded shape regression, and TR-DRN is a two-stage deep regression network with reinitialization. CNN-6 trained with L2 gets 2.41, losing to two of them; switch to L1 or smooth L1 and it becomes the best in the table. Set the last row aside for now; we'll come back to it.
Incidentally, the L2 group uses a learning rate one tenth of the other losses' (from down to , against down to for the rest). The coordinates are in pixels, and L2's gradient grows with the error to several dozen, so cutting the learning rate tenfold makes sense.
The averages alone don't show where the difference lies. The CED curves spread it out:

Start with the right end. The L1, smooth L1 and Wing lines practically sit on top of each other past 0.035, and by 0.05 even L2 has caught up to around 0.97; the hardest 2% to 3% of faces are equally hard whatever the loss. The gap is concentrated between 0.01 and 0.03. At the 0.02 threshold, only about 45% of faces pass with L2; L1 and smooth L1 manage a little over 60%, and the black Wing line is highest.
The authors' conclusion from this figure is that these losses all handle large errors well enough, and training should pay more attention to samples with small and medium errors. The question then becomes how to make the loss function "care" about a difference of a pixel or two.
Solving the Problem
Gradients and step sizes
The authors first compare the gradients and step sizes of L1 and L2.
Take a single coordinate with error . The magnitude of L2's gradient is , and L1's is always 1. If you want one step of gradient descent to land exactly at zero error, what should the learning rate be? L2's gradient is , which times a learning rate of 1 gives , so its "optimal step size" is 1; L1's gradient is 1, so the learning rate has to be to get there. That's what the paper means when it says that for L1 and L2 "the corresponding optimal step sizes should be and 1."
With one coordinate, either is easy. The trouble is that all 38 coordinates share the same network and the same learning rate, and their gradients pile up on the same set of weights. Let's try two coordinates, one off by 1 pixel and the other off by 20.
- L2: their gradients are 1 and 20. Of the combined update direction, comes from the point that's 20 pixels off, and the point that's 1 pixel off barely gets a say.
- L1: both gradients are 1, so they get an equal say. But the step sizes the two points need are 1 and 20, and a shared learning rate can only suit one of them; the paper says L1's step size is dominated by the large error.
Either way, the large error dominates the update, and relatively small displacements are hard to correct.
What about ? Its gradient is , which gets bigger as the error gets smaller, and its optimal step size is (the gradient times is exactly ). For the same two points, the gradients become 1 and 0.05, so now the small error dominates, while the step size is still dominated by the large error. The two forces pull in opposite directions, and the authors see this as what balances errors of different sizes.
But goes to negative infinity at 0, and the influence of small errors mustn't be overcompensated either, or the network will take big steps in a possibly wrong direction. So a logarithm with a positive offset is needed. At the other end, in-the-wild faces come in extreme poses and errors early in training can be very large; there the loss should let the network pull back quickly, behaving like L1 or L2. L2 is too sensitive to outliers, so the authors pick L1.
A logarithm with an offset for small errors, L1 for large ones; join the two pieces and you have Wing.
A pair of wings
Equation (5):
The three symbols:
- sets the range of the nonlinear part, so errors within use the logarithm and those outside use L1.
- controls how sharply the logarithmic part curves.
- is a constant that joins the two pieces at .
Where does come from? At , the left piece equals and the right piece ; setting them equal gives
With the paper's CNN-6 setting of and , , so . The right piece is really ; at both pieces equal 17.918, so they join up.
is negative, which means the whole L1 piece is lifted by almost 8. In issue #10 of the official repo (November 2018), someone asked whether this doesn't make the loss for large errors even bigger. Zhen-Hua Feng's answer was that Wing cares about gradients, and shifting the curve up doesn't change the gradient anywhere.
So let's compute the gradient. Differentiating for , the logarithmic piece gives and the linear piece 1:
| Error (px) | Wing gradient |
|---|---|
| 0⁺ | 5 |
| 1 | 3.33 |
| 2 | 2.5 |
| 5 | 1.43 |
| 10⁻ | 0.83 |
| ≥10 | 1 |
Computed for this note from equation (5) of the paper, with and .
The smaller the error, the larger the gradient, up to a maximum of . Going back to those two points, the 1-pixel error now has a gradient of 3.33 and the 20-pixel error 1, so the small error's say goes from 5% under L2 to .
The role of shows up as well. The gradient as is , so the smaller is, the sharper the tip at zero. The paper specifically warns against setting too small, or tiny errors will produce exploding gradients and unstable training.
The paper also offers another way to look at it. Rewrite the expression as
As goes from 0 to 1, the first term is the stretch of the curve over , scaled up times in both the X and Y directions; the second term is a constant that shifts the curve up so that . With and , it takes from 0.2 to 1.2, right where is steepest.
Here are the four losses and their gradients plotted together:

The blue line in the bottom chart has two jumps, one at 0, from −5 to +5, and one at ±10, from 0.83 to 1. The loss itself is continuous; its gradient isn't. The paper doesn't discuss these two jumps, and later, when people tried to train heatmaps with Wing, the one at zero turned into a real headache.
Written in PyTorch following equations (3) and (5), it looks roughly like this:
import math
import torch
def wing_loss(pred, target, w=10.0, eps=2.0):
"""pred, target: (B, 2L) landmark coordinates, in pixels of the network input."""
x = (target - pred).abs()
C = w - w * math.log(1.0 + w / eps)
loss = torch.where(x < w, w * torch.log1p(x / eps), x - C)
return loss.sum(dim=1).mean() # eq. (3): sum over the 2L coordinates, mean over the batch
Giving profiles more screen time
The second add-on deals with large poses.
The authors' view is that profiles are hard mainly because there are too few of them in the training data. Most training samples are near-frontal faces, so the network is dominated by frontal faces, overfits to them, and falls apart on large poses. The paper's reasoning is that training and testing only on frontal faces should be about as hard as training and testing only on profiles; multi-view methods build a separate model for each view, which is why even the traditional view-based AAM can handle faces with yaw up to 90°.
So the question becomes how to know each training face's pose and then top up the underrepresented groups. This is called Pose-based Data Balancing (PDB), and it has four steps:
- Procrustes alignment. Each face's 19 points are aligned to the mean face through translation, uniform scaling and in-plane rotation. This removes "where the face is, how big it is and how tilted," leaving only the differences in the shape itself.
- PCA. Run principal component analysis on the aligned shapes. When a face turns left or right, the far half gets squashed and all the points crowd toward one side; this is a major direction of shape variation in AFLW and shows up among the first few principal components.
- Projection. Project each face onto this "pose" principal component to get a single number, and build a histogram with bins. AFLW uses , and 300-W uses .
- Duplication. In bins with few samples, the faces are copied several times, and each copy gets its own data augmentation, such as random rotation and box perturbation, so they don't look exactly alike.

The row of faces beneath the histogram, going from a full profile on the left through a frontal face to the other side on the right, matches the coefficients on the horizontal axis. The tall peak in the middle is frontal faces, about 540 per bin; the shoulders on either side are half profiles, two or three hundred per bin; full profiles with coefficients beyond ±80 barely exist.
The official repo later released PDB's Matlab code, pdb.m, which contains a few details the paper doesn't mention. First, it takes the absolute value of the projection coefficient, putting left and right turns in the same bin, so what it really sorts by is "how far the face is turned," regardless of direction. Second, the duplication factor is "the number of samples in the largest bin divided by the number in this bin," rounded. Suppose the frontal bin has 1,000 images and some profile bin only 50; each of those 50 will then appear 20 times. Also, for AFLW's 19 points it uses the second principal component, and for other point counts the first.
The author explained in issue #22 (July 2019) that PDB is done once, offline, before training, while data augmentation happens online during training; the augmentation consists only of rigid transforms such as translation, scaling and rotation, which don't change the face's yaw, so the two don't conflict.
Coarse first, then fine: two stages
Besides turning the head left and right, in-plane tilt and inaccurate detection boxes also drag down accuracy. The third add-on is a two-stage network called CNN-6/7.
The first stage is just CNN-6, with a 64×64 input and 400 images per second on a Titan X (Pascal), so adding it barely affects speed. It outputs a set of rough landmarks, which are used to estimate the face's rotation angle, straighten the face, and redetermine the crop. The straightened, recropped image is enlarged to 128×128 and handed to the second stage, CNN-7.
CNN-7 is structured like CNN-6 with one more round of convolution, ReLU and pooling; its six convolutional layers shrink 128×128×3 down to 2×2×512, and its first convolutional layer doubles from 32 filters to 64. The coordinates it outputs are finally transformed back to the original image. CNN-7's Wing parameters are and ; the input doubles, and the parameters grow with it, which echoes the unit issue above.
How do you get the rotation angle from the first stage's points? In issue #11 (January 2019), the author gave two examples, estimating the angle from the chin and the mean position of the two inner eye corners, or using Procrustes to compute the transform from the current points to the mean face.
Training setup
- Framework and hardware: Matlab with MatConvNet, on a Titan X (Pascal); speed was measured on a single card.
- Optimization: SGD with momentum 0.9, weight decay and batch size 8, for 120,000 iterations per model. Everything except ResNet-50 is trained from scratch.
- Learning rate: for CNN-6, L2 goes from to and the other losses from to ; CNN-7's are each about three times smaller (L2 from to , the others from to ).
- Data augmentation: random rotation (±30° for CNN-6, ±10° for CNN-7), horizontal flipping with 50% probability, random shifts of the box's top-left and bottom-right corners within 5% of the box size, and Gaussian blur with σ=1 at 50% probability.
Discussion
AFLW: what each add-on contributes
The AFLW-Full protocol has 20,000 training and 4,386 test images, 19 points per face, with yaw from −90° to 90°. Here are the three add-ons combined with the four losses:
| Setting | L2 | L1 | sL1 | Wing |
|---|---|---|---|---|
| CNN-6 | 2.41 | 2.00 | 2.02 | 1.88 |
| + PDB | 2.23 | 1.89 | 1.91 | 1.83 |
| CNN-6/7 | 2.06 | 1.82 | 1.84 | 1.71 |
| + PDB | 1.94 | 1.73 | 1.76 | 1.65 |
Compiled from Table 3 of the paper, NME (%); sL1 is smooth L1.
Read across, Wing is lowest in every row, ahead of L1 by 0.12, 0.06, 0.11 and 0.08. Read down, PDB and the two stages improve all four losses, with L2 gaining the most (2.41 to 1.94) and Wing the least (1.88 to 1.65). The biggest single step is still switching from L2 to L1, worth 0.41 on CNN-6 alone.
How Wing's two parameters were picked:
| \ | 4 | 6 | 8 |
|---|---|---|---|
| 0.5 | 1.95 | 1.92 | 1.92 |
| 1 | 1.95 | 1.91 | 1.91 |
| 2 | 1.98 | 1.92 | 1.91 |
| 3 | 2.02 | 1.96 | 1.93 |
| \ | 10 | 12 | 14 |
|---|---|---|---|
| 0.5 | 1.94 | 1.97 | 1.94 |
| 1 | 1.90 | 1.90 | 1.95 |
| 2 | 1.88 | 1.90 | 1.98 |
| 3 | 1.91 | 1.89 | 2.02 |
Compiled from Table 2 of the paper, CNN-6 on AFLW, NME (%).
The 24 settings land between 1.88 and 2.02, and the two worst cells ( or 14, with ) tie smooth L1 at 2.02, slightly worse than L1's 2.00. With anywhere from 6 to 12 it holds steady around 1.9; pick it too small or too large and it falls back to L1's level. AFLW-Full has only a training split and a test split, and the paper mentions no validation set, so the parameters in this table appear to have been picked directly on the test set, and the gap between the best cell's 1.88 and L1 (0.12) is about as large as the spread across the whole table (0.14).
What about a bigger network? The authors also compared the four losses on AFLW with an ImageNet-pretrained ResNet-50 (224×224 input), getting 1.68 for L2, 1.51 for L1, 1.52 for smooth L1 and 1.47 for Wing. The gap between L2 and L1 is still there, and Wing's lead over L1 shrinks to 0.04.
300-W: the denominator becomes the inter-pupil distance
The 300-W evaluation follows the protocol of the LBF paper. The training set is all of AFW plus the LFPW and HELEN training sets, 3,148 images in total; the 689 test images are split into two groups. common is the 554 test images of LFPW and HELEN, mostly ordinary faces; challenging is the 135 iBUG images that the 300-W organizers collected separately, home to the large poses, exaggerated expressions and heavy occlusions. The two together are called full.
Under this protocol, NME is normalized by the inter-pupil distance, the distance between the two pupil centers. The 68 points don't include the pupils, so each pupil's position is taken as the mean of the 6 points around the eye. The official 300-W protocol uses the outer eye-corner distance, between the outermost corners of the two eyes, which is longer than the inter-pupil distance. The longer the denominator, the smaller the NME. How big is the difference for the same model? The next paper, AWing, reports both in one table, 4.31% by inter-pupil distance and 3.07% by outer eye-corner distance on 300-W full, a difference of 40%. So before comparing 300-W numbers, check the denominator.
The account that opened issue #1 on Wing's official repo (August 2018), asking "since 68 landmarks do not contain landmarks on pupils, how could we get location of pupil?", was protossw512, who later became the maintainer of AWing's official repo.
| Method | Com. | Chall. | Full |
|---|---|---|---|
| ERT | – | – | 6.40 |
| LBF | 4.95 | 11.98 | 6.32 |
| RAR | 4.12 | 8.35 | 4.94 |
| TR-DRN | 4.36 | 7.56 | 4.99 |
| RCN+ | 4.20 | 7.78 | 4.90 |
| CNN-6/7 (L2) | 4.18 | 8.19 | 4.97 |
| CNN-6/7 (L1) | 3.58 | 7.02 | 4.26 |
| CNN-6/7 (sL1) | 3.57 | 7.08 | 4.26 |
| CNN-6/7 (Wing) | 3.27 | 7.18 | 4.04 |
| ResNet-50 (Wing) | 3.01 | 6.01 | 3.60 |
Compiled from Tables 4 and 5 of the paper, NME (%) normalized by the inter-pupil distance. CNN-6/7 and ResNet-50 both use PDB.
- Two stages plus PDB, trained with L2, already tie the best methods of the time. CNN-6/7 + PDB (L2) gets 4.97 on full, against 4.99 for TR-DRN and 4.94 for RAR.
- Switching to L1 drops it straight to 4.26, and Wing takes it down to 4.04. The paper says this is almost 20% lower than RAR; it's actually .
- Wing wins on common, not on challenging. On common it goes from L1's 3.58 down to 3.27; on challenging, L1's 7.02 is actually the best, Wing gets 7.18, and smooth L1 beats it too. For the hardest 135 faces, amplifying the gradient of small errors didn't help. This matches the way the lines pile up at the right end of the AFLW CED curves; what Wing mainly improves is the faces that were already nearly right.
- Switching to an ImageNet-pretrained ResNet-50 moves another notch forward, with 3.60 on full and challenging down from 7.18 to 6.01. For hard faces, a bigger network helps more visibly than a different loss.
Speed
| Network | Params | Size | GPU (fps) | CPU (fps) |
|---|---|---|---|---|
| CNN-6 | 3.8M | 14 MB | 400 | 150 |
| CNN-6/7 | 12.3M | 46 MB | 170 | 20 |
| ResNet-50 | 25M | 99 MB | 30 | 8 |
Compiled from Table 7 of the paper, 300-W with 68 points; the GPU is a GTX Titan X (Pascal) and the CPU a Xeon E5-2667 v4.
CNN-6/7 is about 5.7 times as fast as ResNet-50 on the GPU (170 versus 30 fps) and 2.5 times as fast on the CPU (20 versus 8 fps), which the paper calls "roughly an order of magnitude faster"; the accuracy gap is about 10% (300-W full 4.04 versus 3.60). For comparison, TR-DRN runs at 83 fps on a Titan X. The authors' claim is that at 170 fps on a GPU, CNN-6/7 is already more accurate than every method of the time.
Official code and the community
The official repo FengZhenhua/Wing-Loss has a Matlab demo, two CNN-6 models pretrained on AFLW, and the pdb.m mentioned above. The Wing loss implementation itself, the training code and the 300-W models were never posted.
In September 2018, the author said in issue #4 that the plan was to release the training code after checking with the university's IP office; nine days later, in issue #5, the author wrote that the training code was "still under the embargo period." The repo was last updated in October 2019, and not a single issue has been closed (the embargo has yet to lift).
In the same issue #5 thread, someone who implemented CNN-6 with PDB in PyTorch only got to about 5.8 on 300-W, against the paper's 4.04. The author replied that 300-W had no special settings and the only difference was probably the crop, since 300-W's boxes are narrow and tight and the short side should first be extended into a square, then enlarged 1.2 times. In issue #19 (May 2019), someone using a TensorFlow CNN-6 with L1 got only 7.2% on 300-W, against the paper's 4.26 for L1, and that thread got no reply.
The README also adds WFLW results that aren't in the paper (WFLW is the 98-point dataset of about 10,000 faces introduced by the LAB paper in 2018), using a single ResNet-50 with Wing and PDB (the author confirmed in issue #11 that it isn't two-stage). This number has changed several times. It was first written as 5.11 on October 2, 2018, changed to 4.99 the next day, and changed back to 5.11 eleven minutes later; on October 7, 2019 it was changed to 4.99 again, with only "Update README.md" as the commit message. The next paper, AWing, cited 5.11 in April 2019, and later papers can be found citing either number.
The pitfall the community steps in most is units. In issue #27 (November 2020), someone asked whether and still work after the coordinates are normalized to 0 to 1. Nobody answered.
Take OpenMMLab's mmpose as an example. Its coordinate regression divides the landmark coordinates by the input size (256), normalizing them to 0 to 1, and its Wing config for WFLW uses the default and as is (called omega and epsilon in mmpose). Each coordinate's error is then a few tenths at most, always inside , so only the logarithmic piece ever gets used. For very small , , so
The loss is effectively five times L1. Its comparison, smooth L1, is for errors below 1, which makes it effectively L2. On mmpose's model table, ResNet-50 on WFLW gets 4.88 with smooth L1 and 4.67 with Wing. This 0.21 gap measures something closer to the L2-to-L1 step in the paper's Table 1; the bend in Wing's logarithmic curve hardly comes into play.
Later fixes
Wing quickly became a common loss for landmark coordinate regression, and criticism followed.
- It doesn't work for heatmaps. AWing (April 2019) points out that Wing's gradient is discontinuous at zero error; applied to heatmaps, the tiny errors of thousands of background pixels all pull with the maximum gradient, and training doesn't converge.
- Too small an hurts. In a June 2020 paper, Zhu et al. of SenseTime retested on WFLW with their own baseline model. L1 gets 5.95, and as Wing's drops from 2 to 0.1, NME climbs steadily from 5.72 to 6.52. Zhu et al. explain that the labels themselves are noisy, so applying a large gradient around tiny errors amounts to forcing the network to fit label noise; the Soft Wing that Zhu et al. propose turns the small-error piece back into a linear one.
- The authors' own fix. Rectified Wing (RWing), published by the same team in IJCV (online in December 2019), sets the loss to 0 in the interval , again on the grounds of noise in human labels; the same person labeling the same face twice won't get exactly the same result.
The three fixes share much the same reasoning. Wing pushes the gradient of small errors to its maximum, yet part of the smallest errors comes from the labels themselves.
Conclusion
Looking back at the paper's evidence, the most solid step is switching from L2 to L1, which takes CNN-6 from 2.41 to 2.00 on its own. On top of L1, Wing cuts another 0.06 to 0.12 on AFLW and another 0.31 on 300-W common, and doesn't win on challenging; PDB and the two-stage network are add-ons that make every loss better.
Wing's and follow the pixels. The paper uses 10 and 2 for a 64-pixel input and 15 and 3 for 128 pixels; if your network normalizes coordinates to 0 to 1, scale the parameters down in proportion, or all you get is an L1 magnified five times. On data with uneven label quality, don't turn down either.
A year and a half later, AWing carried the same idea over to heatmaps, and one of the things it had to fix was that gradient jumping straight from −5 to +5 at zero.