Bekhouche commited on
Commit
b9ce39d
·
verified ·
1 Parent(s): 9e15f23

Update model card

Browse files
Files changed (1) hide show
  1. README.md +87 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - facial-expression-recognition
5
+ - action-units
6
+ - valence-arousal
7
+ - affective-computing
8
+ - abaw
9
+ - rectified-flow
10
+ - dinov3
11
+ pipeline_tag: image-classification
12
+ ---
13
+
14
+ # AffectFlow-DINO
15
+
16
+ Uncertainty-aware multi-task facial affect estimation for the **11th ABAW Multi-Task Learning
17
+ challenge**: DINOv3 backbone + deterministic VA/expression/AU heads + a conditional
18
+ rectified-flow head over the joint 22-dimensional affect vector.
19
+
20
+ Code, training scripts, and the full 28-experiment ablation study:
21
+ **[github.com/Bekhouche/AffectFlow-DINO](https://github.com/Bekhouche/AffectFlow-DINO)**.
22
+
23
+ ## Quickstart
24
+
25
+ ```bash
26
+ pip install torch torchvision transformers huggingface_hub pillow
27
+ git clone https://github.com/Bekhouche/AffectFlow-DINO.git && cd AffectFlow-DINO
28
+ python inference.py --model finetune-flow-retune-b10 --image face.jpg
29
+ ```
30
+
31
+ ## Models in this repo
32
+
33
+ Each subfolder is one checkpoint: `model.pt` (weights + architecture config) plus, where
34
+ applicable, `au_thresholds.json` and/or `expr_weights.json` post-hoc calibration files that
35
+ `inference.py` applies automatically.
36
+
37
+ | Folder | Backbone | Best decode | P_MTL (calibrated) | P_VA | P_EXPR | P_AU |
38
+ |---|---|---|---|---|---|---|
39
+ | `finetune-flow-retune-b10` | ViT-S/16, fine-tuned | Det | **1.177** | 0.325 | 0.350 | 0.502 |
40
+ | `vitb-finetune` | ViT-B/16, fine-tuned | Det | 1.116 | 0.354 | 0.255 | 0.507 |
41
+ | `finetune-flow-retune-b05` | ViT-S/16, fine-tuned | Det / Flow | 1.062 / 0.956 | 0.291 | 0.303 | 0.469 |
42
+ | `finetune` | ViT-S/16, fine-tuned | Det | 1.101 | 0.318 | 0.285 | 0.497 |
43
+ | `au-posw-cw` | ViT-S/16, frozen | Det | 0.890 (no cal.) | 0.211 | 0.240 | 0.439 |
44
+ | `psp` | ViT-S/16, frozen (patch soft-pool) | Det | 0.859 (no cal.) | 0.235 | 0.236 | 0.389 |
45
+ | `affectflow-base` | ViT-S/16, frozen | Flow | 0.888 | 0.237 | 0.210 | 0.441 |
46
+ | `det-baseline` | ViT-S/16, frozen | Det | 0.793 (no cal.) | 0.199 | 0.216 | 0.378 |
47
+
48
+ `P_MTL = P_VA + P_EXPR + P_AU` is the official ABAW MTL composite metric (P_VA = mean CCC of
49
+ valence/arousal, P_EXPR = expression macro-F1, P_AU = mean AU F1), evaluated on the s-Aff-Wild2
50
+ validation split. Official challenge baseline: P_MTL = 0.450.
51
+
52
+ These 8 checkpoints are a curated subset of the ~30 ablation runs behind the paper — one per
53
+ architecturally distinct configuration. The full ablation table, including sweeps that reused
54
+ one of these architectures with different loss weights/regularization, is in the GitHub repo's
55
+ [EXPERIMENTS.md](https://github.com/Bekhouche/AffectFlow-DINO/blob/main/EXPERIMENTS.md).
56
+
57
+ ## Input / output
58
+
59
+ - Input: a cropped, roughly frontal face image, resized to 224x224 and ImageNet-normalized
60
+ (handled automatically by `inference.py`).
61
+ - Output: valence, arousal in `[-1, 1]`; one of 8 expressions (Neutral, Anger, Disgust, Fear,
62
+ Happiness, Sadness, Surprise, Other); a subset of 12 active Action Units (AU1, AU2, AU4, AU6,
63
+ AU7, AU10, AU12, AU15, AU23, AU24, AU25, AU26).
64
+ - Two decode modes: `deterministic` (task heads directly) or `flow` (average of N sampled
65
+ rectified-flow trajectories — enables uncertainty estimation via trajectory spread).
66
+
67
+ ## Limitations
68
+
69
+ Trained and validated only on s-Aff-Wild2 (in-the-wild but frame-level, no temporal context).
70
+ Expression prediction remains the weakest task (P_EXPR <= 0.35): Fear and Sadness are rare
71
+ classes that only partially recover under calibration. Not evaluated on demographic subgroups;
72
+ treat outputs as research signals, not clinical or high-stakes decisions.
73
+
74
+ ## Citation
75
+
76
+ ```bibtex
77
+ @inproceedings{affectflowdino2026,
78
+ title = {AffectFlow-DINO: Uncertainty-Aware Multi-Task Affect Estimation via Conditional Rectified Flow},
79
+ author = {Bekhouche, Salah},
80
+ booktitle = {11th Workshop on Affective Behavior Analysis in-the-wild (ABAW), ECCV},
81
+ year = {2026}
82
+ }
83
+ ```
84
+
85
+ ## License
86
+
87
+ MIT.