File size: 7,685 Bytes
2d67433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25d4f36
 
 
2d67433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
05169cb
2d67433
 
 
 
 
 
05169cb
 
 
 
 
 
2d67433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
---
license: mit
tags:
  - facial-reaction-generation
  - dyadic-interaction
  - diffusion-model
  - affective-computing
  - react2026
  - mafrg
language:
  - en
pipeline_tag: other
---

# CaReDiff β€” Causal Reaction Diffusion (REACT 2026)


<img src="https://cdn-uploads.huggingface.co/production/uploads/65fdba70f485b5180897c642/q5J2ScpexbMFlRiEllA4p.png" alt="react_challenge_figure" width="600">

Model checkpoints for **CaReDiff**, a submission to the [REACT 2026 Challenge](https://sites.google.com/view/react2026/home) (ACM MM 2026, Multiple Appropriate Facial Reaction Generation).

Given speaker behaviour (audio, video, 3DMM coefficients, facial attributes), CaReDiff generates multiple appropriate listener facial reactions (25-d: 15 AUs + valence/arousal + 8 expressions) with an auxiliary EEG prediction head.

- **Code:** https://github.com/smu-ivpl/CaReDiff
- **Checkpoints (this repo):** https://huggingface.co/IVPL/CaReDiff

## Tracks

| Track | Architecture | Description |
|-------|-------------|-------------|
| Generic Online | PerFRDiff + EEG | Diffusion-based generation over autoregressive windows |
| Generic Offline | PerFRDiff + EEG | Diffusion-based full-sequence generation |
| Personalised Online | PerFRDiff + PRA + EEG | Frozen generic backbone + Personalised Residual Adapter (autoregressive windows) |
| Personalised Offline | PerFRDiff + PRA + EEG | Frozen generic backbone + Personalised Residual Adapter (full-sequence) |

## Repository Layout

```
CaReDiff/
β”œβ”€β”€ generic/
β”‚   β”œβ”€β”€ online/          prior + denoiser + EEG head (checkpoint_120.pth)
β”‚   └── offline/         prior + denoiser + EEG head (checkpoint_120.pth)
└── personalised/
    β”œβ”€β”€ online/          shared backbone + 3 adapters (personality / lhfb / both)
    └── offline/         shared backbone + 3 adapters (personality / lhfb / both)
```

Each generic track folder contains:

```
<track>/
β”œβ”€β”€ DiffusionPriorNetwork/checkpoint_120.pth
β”œβ”€β”€ CausalTransformerDenoiser/checkpoint_120.pth
└── EEGPredictionHead/checkpoint_120.pth
```

## Usage

1. Clone the code repository:
   ```bash
   git clone https://github.com/smu-ivpl/CaReDiff
   ```
2. Set up the environment (see the [code README](https://github.com/smu-ivpl/CaReDiff)):
   ```bash
   conda create -n react python=3.10 && conda activate react
   conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
   conda install -c fvcore -c iopath -c conda-forge fvcore iopath
   pip install -r generic/code/requirements.txt
   ```
3. Download the checkpoints from this repo and place them under `save/`. For the generic tracks:
   ```
   save/motion_diffusion/react_2025/
   β”œβ”€β”€ online/checkpoints/pretrained/
   β”‚   β”œβ”€β”€ DiffusionPriorNetwork/checkpoint_120.pth
   β”‚   β”œβ”€β”€ CausalTransformerDenoiser/checkpoint_120.pth
   β”‚   └── EEGPredictionHead/checkpoint_120.pth
   └── offline/checkpoints/pretrained/
       └── ... (same structure)
   ```
4. Run evaluation (see below).

Full placement instructions, SHA-256 checksums, and per-track details are in each variant's `checkpoints/README.md` in the code repository.

### Generic Evaluation

```bash
# Generic Online
python main.py --config-name generic_online/motion_diffusion \
    stage=test data_dir=./datasets/REACT2026/ \
    trainer.batch_size=1 resume_id=pretrained

# Generic Offline
python main.py --config-name generic_offline/motion_diffusion \
    stage=test data_dir=./datasets/REACT2026/ \
    trainer.batch_size=1 resume_id=pretrained
```

### Personalised Evaluation

Each personalised track uses a frozen generic backbone plus one of three
condition adapters (`personality` / `lhfb` / `both`). Download the
`personalised/<track>/` folder and set `PKG` to its parent absolute path; the
commands reference every weight explicitly through `PKG`.

```bash
PKG=<absolute path of the downloaded personalised folder>

# Personalised Offline (personality condition)
python main.py --config-name g2p_delta stage=test task=offline \
  data_dir=<MARS_ROOT> run_id=eval_offline_personality \
  trainer.batch_size=4 num_gts=10 \
  trainer.generic.eval_condition_mode=matched \
  trainer.generic.eval_eeg=false \
  trainer.main_model.args.personal_condition_mode=personality_only \
  resume_id=personality \
  trainer.ckpt_dir=$PKG/offline/adapters \
  trainer.pretrained.diffusion_decoder=$PKG/offline/backbone/CausalTransformerDenoiser/checkpoint_120.pth \
  trainer.pretrained.diffusion_prior=$PKG/offline/backbone/DiffusionPriorNetwork/checkpoint_120.pth \
  trainer.pretrained.eeg_head_checkpoint=$PKG/offline/backbone/EEGPredictionHead/checkpoint_120.pth

# Personalised Online (personality condition)
python main.py --config-name g2p_delta_online stage=test task=online \
  data_dir=<MARS_ROOT> run_id=eval_online_personality \
  trainer.batch_size=4 num_gts=10 \
  trainer.generic.eval_condition_mode=matched \
  trainer.generic.eval_eeg=false \
  trainer.main_model.args.personal_condition_mode=personality_only \
  trainer.model.diff_model.diffusion_decoder.args.past_l_emotion_drop_prob=0.2 \
  resume_id=personality \
  trainer.ckpt_dir=$PKG/online/adapters \
  trainer.pretrained.diffusion_decoder=$PKG/online/backbone/CausalTransformerDenoiser/checkpoint_120.pth \
  trainer.pretrained.diffusion_prior=$PKG/online/backbone/DiffusionPriorNetwork/checkpoint_120.pth \
  trainer.pretrained.eeg_head_checkpoint=$PKG/online/backbone/EEGPredictionHead/checkpoint_120.pth
```

For the `lhfb` / `both` conditions, change `resume_id` (`lhfb` or `both`) and
`personal_condition_mode` (`3dmm_only` or `3dmm_personality`) accordingly. For
the online track, keep `past_l_emotion_drop_prob=0.2` β€” it enables the
past-listener conditioning pathway and is required to reproduce the reported
numbers.

## Additional Requirements

- **Post-processor (EmotionVAE) checkpoint** β€” required for evaluation on every `stage=test` run. Obtain from the [official REACT 2026 baseline](https://github.com/reactmultimodalchallenge/baseline_react2026) and place at `pretrained_models/post_processor/checkpoint.pth`.
- **PIRender + FaceVerse** β€” needed only for FRRea (rendered-frame FID) evaluation.
- **MARS dataset** β€” obtain through the challenge organisers.

## Metrics

| Metric | Description |
|--------|-------------|
| FRCorr ↑ | Facial Reaction Correlation (CCC against GT) |
| FRDist ↓ | Facial Reaction Distance (DTW against GT) |
| FRDiv ↑ | Diversity across the 10 generated predictions (pairwise MSE) |
| FRVar ↑ | Temporal variance within a generated reaction |
| FRRea ↓ | Realism (FID on rendered frames) |
| FRSyn ↓ | Synchrony (Time-Lagged Cross-Correlation) |

## Citation

```bibtex
@article{song2023multiple,
  title={Multiple Appropriate Facial Reaction Generation in Dyadic Interaction Settings: What, Why and How?},
  author={Song, Siyang and Spitale, Micol and Luo, Yiming and Bal, Batuhan and Gunes, Hatice},
  journal={arXiv preprint arXiv:2302.06514},
  year={2023}
}

@inproceedings{song2025react,
  title={React 2025: the third multiple appropriate facial reaction generation challenge},
  author={Song, Siyang and Spitale, Micol and Kong, Xiangyu and Zhu, Hengde and Luo, Cheng and Palmero, Cristina and Barquero, German and others},
  booktitle={Proceedings of the 33rd ACM International Conference on Multimedia},
  pages={13979--13984},
  year={2025}
}
```

## Acknowledgement

- [FaceVerse](https://github.com/LizhenWangT/FaceVerse)
- [PIRender](https://github.com/RenYurui/PIRender)
- [REACT 2026 Baseline](https://github.com/reactmultimodalchallenge/baseline_react2026)

## License

MIT