HRFFA: High-Angle Robust Fast FaceAlignment
A training, distillation and ONNX deployment pipeline for whole-head face alignment that stays robust at extreme head poses while remaining light enough for CPU inference.
- Face alignment on head crops, not face crops. Conventional face-alignment papers assume a tightly cropped face region; this is a special-purpose model that works on a crop of the whole head instead. The architecture is therefore at a considerable disadvantage against paper benchmarks, but the intent is to take in more features by processing the entire head and the background context contained in a small margin at the same time. It is also the practical choice: object detectors localize whole heads far more stably than faces.
- For head crops that include looking up / looking down (measured pitch beyond ±85°), in-plane rotation over the full 360° roll, and profile views (yaw ±90°), the models output 68 / 98 / 29 landmarks plus a 3-class visibility label per point (outside the image / occluded / visible).
- The teacher is a DINOv3 ViT-L/16 (320×320); the students are a ViT-T/16 (256 and 96 input) and a PP-HGNetV2-B0 based CNN (256 and 96 input). Students are trained by online distillation from the teacher and exported to ONNX graphs that run in 1.5–12 ms on a CPU.
Left: teacher vitl-320 on nine looking-up × profile tiles with a roll of 0–320° composited onto each tile.
Right: student vitt-256 on measured pitch extremes (+86° to −89°) with roll. Predictions only.
1. Results at a glance
inter-ocular NME %, lower is better; CPU latency on an i9-10900K with onnxruntime 1.22 CPU EP, batch 1.
Checkpoints and ONNX/TFLite(LiteRT): https://github.com/PINTO0309/High-Angle_Robust_Fast_FaceAlignment/releases/tag/weights
| Model |
Input |
Params |
GMACs |
GFLOPs |
CPU ms |
WFLW Full |
WFLW Pose |
300W Full |
COFW |
| D-ViT (paper) |
256 |
96.4M |
≈73.15 |
≈146.30 |
– |
3.75 |
6.43 |
2.85 |
4.13 |
| vitl-320 (teacher) |
320 |
308.2M |
131.32 |
262.63 |
520 |
1.51 |
2.54 |
1.03 |
1.21 |
| vitt-256 |
256 |
9.0M |
2.05 |
4.09 |
12.4 |
3.36 |
5.64 |
2.66 |
2.76 |
| hg0-256 |
256 |
1.6M |
0.70 |
1.40 |
5.2 |
5.32 |
9.53 |
3.87 |
3.77 |
| vitt-096 |
96 |
9.0M |
0.43 |
0.85 |
4.6 |
5.14 |
8.65 |
3.86 |
3.90 |
| hg0-096 |
96 |
1.6M |
0.13 |
0.26 |
1.5 |
7.46 |
14.71 |
4.77 |
4.99 |
How to read these numbers (important): all splits of the real-image datasets — including WFLW test, 300W and COFW test — are used for training. The "official" numbers above therefore measure how well the models fit the training distribution and must not be compared with published benchmark results. The only unleaked instrument is 300wlp_val (head-NME on a held-out 300W-LP subset; values in 050). The full tables — WFLW subsets, FR/AUC, breakdowns by pose (yaw / pitch / roll) and by image degradation, and the D-ViT paper values listed side by side with an explicit non-comparability note — follow in §1.1 (same content as 050 §2). The D-ViT (paper) row lists the published benchmark values of arXiv 2411.07167 (Tables 1 / 2, "Ours": 256×256 input, 8 prediction blocks = 96.4M parameters per its Table S1) for format reference only. The paper does not report FLOPs or latency; the GMACs / GFLOPs are our estimate from the official code with its default arguments (8 prediction blocks, 32×32 heatmaps, depth 256, 256×256 input, all 8 stages, batch 1, same FlopCounterMode method as the other rows) and are approximate because that configuration has 101.1M parameters, about 5 % more than Table S1. Its COFW NME is normalized by the inter-pupil distance instead of inter-ocular, and its test sets are held out from training, so no ranking against the fit measures above is implied.
1.1 Full tables
All tables below are generated from runs/<run>/eval_best_{official,stratreal,stress,style}.log by scripts/make_results_tables.py. Notes:
- Absolute values are fit measures (all real-image splits are in the training data). The
D-ViT (paper) rows in Tables 1 / 2 are the published test-benchmark values of arXiv 2411.07167 (p.6, "Ours") and are listed for format reference only — the conditions differ, so no ranking is implied.
- Yaw / pitch / roll: the models do not output head pose, so pose robustness is expressed as landmark accuracy per pose. Table 3: inter-ocular NME per effective pose bin (6DRepNet-estimated pose plus the applied rotation, 3 sets × 300 images × 16 configurations). Table 4: NME per in-plane roll (exact 360° roll equivariance; a small worst−base means equivariant). Table 5: NME under projective camera pitch ±15/±25° and yaw ±15° perturbations. Table 6: head-NME (normalized by the crop side, not inter-ocular) of the three real sets stratified by 6DRepNet-estimated pose.
- Table 7 perturbations are applied in crop pixels (mblur9/21 = 30° motion blur of 9/21 px, warm/cool = channel gains, gamma 0.6/1.6, gray, jpeg30 = JPEG quality 30). Their strength therefore depends on the input resolution: for the 96 models (vitt-096 / hg0-096) a 21 px blur on a 96 px crop corresponds to ~56 px at 256, so their Table 7 rows are not comparable with the 256 models.
Table 1. NME (%, inter-ocular, lower is better)
| Model |
WFLW Full |
Pose |
Exp |
Ill |
Mu |
Occ |
Blur |
COFW Full |
300W Full |
Comm |
Chal |
| D-ViT (paper) |
3.75 |
6.43 |
3.85 |
4.06 |
3.57 |
4.47 |
4.37 |
4.13 |
2.85 |
2.43 |
4.56 |
| vitl-320 |
1.51 |
2.54 |
1.55 |
1.47 |
1.42 |
1.56 |
1.58 |
1.21 |
1.03 |
0.96 |
1.34 |
| vitt-256 |
3.36 |
5.64 |
3.43 |
3.25 |
3.19 |
3.56 |
3.60 |
2.76 |
2.66 |
2.36 |
3.90 |
| hg0-256 |
5.32 |
9.53 |
5.54 |
5.16 |
5.09 |
6.29 |
6.04 |
3.77 |
3.87 |
3.37 |
5.96 |
| vitt-096 |
5.14 |
8.65 |
5.32 |
4.96 |
5.06 |
5.52 |
5.40 |
3.90 |
3.85 |
3.57 |
5.02 |
| hg0-096 |
7.46 |
14.71 |
7.77 |
7.19 |
8.10 |
8.91 |
8.16 |
4.99 |
4.77 |
4.24 |
6.91 |
Table 2. FR10 (%, lower is better) and AUC10 (%, higher is better) on WFLW
| Model |
FR10 Full |
Pose |
Exp |
Ill |
Mu |
Occ |
Blur |
AUC10 Full |
Pose |
Exp |
Ill |
Mu |
Occ |
Blur |
| D-ViT (paper) |
1.76 |
8.28 |
1.27 |
1.29 |
1.94 |
3.80 |
2.07 |
63.7 |
40.1 |
62.6 |
64.7 |
64.7 |
57.1 |
58.6 |
| vitl-320 |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
0.00 |
84.9 |
74.5 |
84.5 |
85.4 |
85.8 |
84.4 |
84.2 |
| vitt-256 |
0.28 |
1.53 |
0.32 |
0.00 |
0.00 |
0.54 |
0.52 |
66.5 |
43.9 |
65.7 |
67.5 |
68.2 |
64.5 |
64.1 |
| hg0-256 |
7.00 |
32.21 |
5.73 |
5.44 |
6.31 |
13.04 |
9.44 |
49.2 |
17.5 |
46.7 |
50.3 |
50.2 |
42.4 |
42.8 |
| vitt-096 |
4.20 |
23.31 |
4.78 |
2.72 |
2.91 |
5.57 |
3.75 |
49.7 |
20.2 |
47.7 |
51.2 |
49.9 |
46.2 |
47.1 |
| hg0-096 |
17.88 |
67.48 |
18.79 |
14.18 |
20.87 |
26.09 |
22.38 |
36.1 |
5.8 |
31.9 |
37.6 |
34.4 |
28.7 |
30.0 |
Table 3. NME (%) by yaw / pitch bin (effective pose bins of pose-stress)