dabanba commited on
Commit
2d0b3c8
·
verified ·
1 Parent(s): 50a8c5d

Add FaceFill ONNX weights, eval.json, and model card

Browse files
Files changed (3) hide show
  1. README.md +81 -0
  2. eval.json +60 -0
  3. model.onnx +3 -0
README.md CHANGED
@@ -1,3 +1,84 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ tags:
4
+ - onnx
5
+ - facial-expression
6
+ - arkit
7
+ - vr
8
+ - mediapipe
9
+ - gru
10
+ library_name: onnx
11
+ pipeline_tag: other
12
  ---
13
+
14
+ # FaceFill
15
+
16
+ Causal GRU that predicts **11 upper-face ARKit morphs** (brows / eyes / blinks) from **30 lower-face** channels when an HMD occludes the upper face.
17
+
18
+ ~3.36M params · streaming `step` with GRU hidden state.
19
+
20
+ ## Files
21
+
22
+ | File | Description |
23
+ |------|-------------|
24
+ | `model.onnx` | Stateful single-frame step (opset 17) |
25
+ | `eval.json` | Autoregressive test metrics (held-out MEAD W009) |
26
+
27
+ ## Inputs / outputs
28
+
29
+ **Inputs**
30
+
31
+ | Name | Shape | Meaning |
32
+ |------|-------|---------|
33
+ | `current` | `[B, 80]` | lower + vel + head + conf + blink state |
34
+ | `history` | `[B, 176]` | prior full morphs + vel + obs mask + … |
35
+ | `u_prev` | `[B, 11]` | previous upper prediction |
36
+ | `hidden_in` | `[3, B, 384]` | GRU hidden |
37
+
38
+ **Outputs**
39
+
40
+ | Name | Shape |
41
+ |------|-------|
42
+ | `u_hat` | `[B, 11]` |
43
+ | `u_abs` | `[B, 11]` |
44
+ | `u_delta` | `[B, 11]` |
45
+ | `blink_onset_logits` | `[B, 3]` |
46
+ | `blink_duration` | `[B]` |
47
+ | `blink_amplitude` | `[B]` |
48
+ | `hidden_out` | `[3, B, 384]` |
49
+
50
+ Combine rule: `û = clamp(α·(u_prev + Δu) + (1−α)·u_abs)`, α=0.8.
51
+
52
+ ## Training data
53
+
54
+ Features derived from **[MEAD](https://wywu.github.io/projects/MEAD/MEAD.html)** frontal videos via MediaPipe Face Landmarker (person-disjoint M033 / W015 / W009 for this release). Does **not** redistribute MEAD videos.
55
+
56
+ ## Eval (AR, test)
57
+
58
+ - mean MAE **0.075**
59
+ - mean Pearson **0.82**
60
+ - blink F1 **0.73**
61
+
62
+ ## Usage
63
+
64
+ ```python
65
+ import onnxruntime as ort
66
+ import numpy as np
67
+
68
+ sess = ort.InferenceSession("model.onnx")
69
+ B = 1
70
+ feeds = {
71
+ "current": np.zeros((B, 80), np.float32),
72
+ "history": np.zeros((B, 176), np.float32),
73
+ "u_prev": np.zeros((B, 11), np.float32),
74
+ "hidden_in": np.zeros((3, B, 384), np.float32),
75
+ }
76
+ outs = sess.run(None, feeds)
77
+ # u_hat, u_abs, u_delta, blink_onset_logits, blink_duration, blink_amplitude, hidden_out
78
+ ```
79
+
80
+ Browser / WebXR companion: load with ONNX Runtime Web (see FaceFill / WebXREmotion projects).
81
+
82
+ ## License
83
+
84
+ MIT (this model). Respect MEAD terms for any further training on that dataset.
eval.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "loss": -0.270650763217717,
3
+ "mae_mean": 0.07525657350226833,
4
+ "mae_per_morph": {
5
+ "eyeBlinkLeft": 0.06987516691020862,
6
+ "eyeBlinkRight": 0.06888288799163005,
7
+ "eyeSquintLeft": 0.1289079342990025,
8
+ "eyeSquintRight": 0.10251996431590442,
9
+ "eyeWideLeft": 0.021121998027298753,
10
+ "eyeWideRight": 0.02907926433533997,
11
+ "browDownLeft": 0.016598441486021496,
12
+ "browDownRight": 0.01722284220198922,
13
+ "browInnerUp": 0.1508742139208353,
14
+ "browOuterUpLeft": 0.09600114416688273,
15
+ "browOuterUpRight": 0.12673845086983848
16
+ },
17
+ "mae_groups": {
18
+ "blink": 0.06937902745091934,
19
+ "squint": 0.11571394930745346,
20
+ "wide": 0.02510063118131936,
21
+ "brow_down": 0.016910641844005356,
22
+ "brow_up": 0.12453793631918551
23
+ },
24
+ "pearson_per_morph": {
25
+ "eyeBlinkLeft": 0.7453276415821082,
26
+ "eyeBlinkRight": 0.6888304890769676,
27
+ "eyeSquintLeft": 0.8038703414783854,
28
+ "eyeSquintRight": 0.78358740158809,
29
+ "eyeWideLeft": 0.6692869067921419,
30
+ "eyeWideRight": 0.6514029539266546,
31
+ "browDownLeft": 0.9166941237147277,
32
+ "browDownRight": 0.9165265760822071,
33
+ "browInnerUp": 0.9308003032171192,
34
+ "browOuterUpLeft": 0.9551331834288482,
35
+ "browOuterUpRight": 0.9576431897440126
36
+ },
37
+ "pearson_mean": 0.8199184646028421,
38
+ "velocity_mae": 0.008077342975108573,
39
+ "freeze_rate": 0.002379235760634463,
40
+ "blink_onset": {
41
+ "precision": 0.5710382513661202,
42
+ "recall": 1.0,
43
+ "f1": 0.7269565217391305
44
+ },
45
+ "baseline_hold_mae": 0.03263168485375912,
46
+ "baseline_neutral_mae": 0.17193665852149329,
47
+ "frames_supervised": 42048,
48
+ "eval_seconds": 16.188790458,
49
+ "approx_fps": 2597.3527861200514,
50
+ "mode": "autoregressive",
51
+ "checkpoint": "artifacts/model/best.pt",
52
+ "split": "test",
53
+ "windows": 438,
54
+ "device": "mps",
55
+ "latency": {
56
+ "step_ms": 1.477977920000004,
57
+ "fps": 676.6000942693361,
58
+ "steps": 200
59
+ }
60
+ }
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c00e4b985a81c1b8953befe67bdb4ac8a4bac5b143af22db59123efaa2f508be
3
+ size 13254607