Downloads · 30 days
0
py-feat/au_to_landmarks
au_to_landmarks is a machine learning model from py-feat. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for py-feat. The card lists the license as mit.
This repository hosts the AU → 68-point dlib facial-landmark visualization model used by py-feat's feat.plotting.predict() / loadvizmodel() to render schematic facial expressions from action-unit (AU) intensity vectors.
Downloads · 30 days
0
Access
Public
Updated Jun 1, 2026
Repo size
47.4 MB
Likes
0
Public
Click a slice to open those files.
.joblib24.6 MB · 52%
From the Hugging Face model README
This repository hosts the AU → 68-point dlib facial-landmark visualization
model used by py-feat's feat.plotting.predict() / load_viz_model() to
render schematic facial expressions from action-unit (AU) intensity vectors.
Two versions are provided. The v2 PLS model is the default; v1 is preserved for reproducibility / rollback.
au_to_landmarks_pls_v2.npzCheong / Py-Feat-tutorial-06 style: linear PLS regression mapping 20 FACS AU intensities to 68 mobilefacenet dlib landmarks (136-d output, 68 × 2). Re-trained on 27× more data than v1 with stricter preprocessing.
Detector(landmark_model="mobilefacenet") (the default Detector landmark model)Detector(face_model="img2pose", au_model="xgb") (the default AU model)PLSRegression(n_components=20, scale=True) — full input rankFor comparison, v1 (Cheong et al. 2023) was trained on ~13K class-balanced rows from EmotioNet/DISFA/BP4D and reports R² ≈ 0.4–0.5.
import numpy as np
m = np.load("au_to_landmarks_pls_v2.npz")
au = np.zeros(20); au[m["au_columns"].tolist().index("AU12")] = 1.0 # smile
pose = np.zeros(3) # pitch, yaw, roll
x = np.concatenate([au, pose]) # (23,)
flat = x @ m["coef"] + m["intercept"] # (136,)
# IMPORTANT: layout is axis-major [all x | all y], NOT interleaved
landmarks = np.stack([flat[:68], flat[68:]], axis=1) # (68, 2)
NPZ also includes:
mean_aligned_landmarks (68, 2) — population mean canonical landmarksmean_low_au_landmarks (68, 2) — mean of low-AU-sum frames (cleaner neutral)reference_anchors (8, 2) for input alignment at inferencemodel_card, training_metadatapyfeat_aus_to_landmarks.{joblib,h5}Original Cheong et al. 2023 / Py-Feat tutorial-06 model. Trained on EmotioNet + DISFA + BP4D class-balanced subsample (~13K rows), affine registration to a single neutral template, 20-component PLSRegression.
Preserved here for reproducibility and to allow rollback. Loadable via
feat.plotting.load_viz_model("pyfeat_aus_to_landmarks") if you want the
original predictions.
See py-feat tutorial 06 for the original training recipe.
| File | Version | Format | Size | Status |
|---|---|---|---|---|
au_to_landmarks_pls_v2.npz | v2 | NPZ | 20 KB | default; loaded automatically by py-feat |
pyfeat_aus_to_landmarks.joblib | v1 | sklearn pickle | 24 MB | legacy fallback |
pyfeat_aus_to_landmarks.h5 | v1 | HDF5 metadata | 20 MB | legacy fallback (paired with .joblib) |

If you use these models, please cite py-feat and Cheong et al. 2023 (for the original v1 method, which v2 extends):
Cheong, J. H., Jolly, E., et al. (2023). Py-Feat: Python Facial Expression Analysis Toolbox. Affective Science. https://doi.org/10.1007/s42761-023-00191-4