face-mtl-eval
Distribution Matching for Heterogeneous Multi-Task Learning: a Large-scale Face Study — Kollias et al. (2021) (arXiv:2105.03790, 2021)
What this evaluates
Evaluates a multi-task learning framework for face analysis across heterogeneous tasks including valence-arousal estimation, action unit detection, expression classification, and face recognition. It probes the model's ability to jointly learn from diverse, in-the-wild and lab-controlled facial datasets while mitigating negative transfer through distribution matching.
Datasets
- Aff-Wild — total 1250000; splits: train (1000000), test (216000)
- AffectNet — total 1000000; splits: train (321000), val (5000)
- RAF-DB — total 15200; splits: train (12200), test (3000)
- DISFA — total 130515; splits: train (-1), test (-1)
- GFT — total 130000; splits: train (108000), test (24500)
- BP4D — total 223000; splits: train (75600), val (71200), test (75700)
- CelebA — total 202600; splits: train (160000), val (20000), test (20000)
Metrics
CCC (primary) — range: [-1, 1]
- Concordance Correlation Coefficient measuring the agreement between predicted and ground-truth continuous values (valence/arousal). It combines precision and accuracy of the prediction relative to the line of identity.
F1 score (primary) — range: [0, 1]
- Harmonic mean of precision and recall, computed per action unit or emotion category and averaged across classes.
Mean diagonal of confusion matrix — range: [0, 1]
- Sum of correctly classified samples divided by total samples, equivalent to overall classification accuracy.
AFA Score — range: [0, 1]
- Average of the F1 score and accuracy across all action units or emotion categories.
Input / output format
Input: Cropped and aligned facial images resized to 112x112x3 pixels with intensity values normalized to [-1, 1].
Output: Continuous predictions for valence and arousal (range [-1, 1]), binary/multi-class predictions for action units and expressions, and attribute/identity labels.
Scoring recipe
def compute_metrics(pred, gold, task_type):
if task_type == 'continuous':
mu_p, mu_g = np.mean(pred), np.mean(gold)
var_p, var_g = np.var(pred), np.var(gold)
cov = np.cov(pred, gold)[0, 1]
return 2 * cov / (var_p + var_g + (mu_p - mu_g)**2)
elif task_type == 'classification':
cm = confusion_matrix(gold, pred)
diag = np.trace(cm) / cm.sum()
f1 = f1_score(gold, pred, average='macro')
return {'accuracy': diag, 'f1': f1, 'afa': (diag + f1) / 2}
Common pitfalls
- AffectNet, BP4D, and BP4D+ do not release official test sets; the protocol uses the validation set for testing, which may inflate generalization estimates.
- Video datasets like Aff-Wild contain temporally correlated frames, but the CNN processes frames independently; median filtering of frame-level predictions is required to match challenge protocols.
- AffectNet has overlapping/inconsistent annotations between valence-arousal and discrete expressions; strict data cleaning (e.g., radius checks for neutral/sad) is mandatory before training.
Evidence (verbatim from paper)
We use: i) the CCC for Aff-Wild and Aff-Wild2 (CCC was the evaluation criterion of the respective Challenges), Affectnet and AFEW-VA, ii) the mean diagonal value of the confusion matrix for RAF-DB (this criterion was selected for evaluating the performance on this database by [[34]]); the accuracy for AffectNet, iii) the F1 score for DISFA, GFT, BP4D and BP4D+ (this metric was the evaluation criterion of the FERA 2015 and 2017 Challenges); for AU detection in EmotioNet the Challenge’s metric was the average between: a) the mean (across all AUs) F1 score and b) the mean (across all AUs) accuracy; for the expression classification, it was the average between: a) the average (across all emotions) F1 score and b) the unweighted average recall (UAR) over all emotion categories, iv) the total accuracy and average F1 score for the attributes and ids in CelebA.
Citation
@misc{kollias2021distribution,
title={Distribution Matching for Heterogeneous Multi-Task Learning: a Large-scale Face Study},
author={Kollias et al. (2021)},
year={2021},
note={arXiv:2105.03790}
}
1---2name: face-mtl-eval3description: Evaluates a multi-task learning framework for face analysis across heterogeneous tasks including valence-arousal estimation, action unit detection, expression classification, and face recognition. It probes the model's ability to jointly learn from diverse, in-the-wild and lab-controlled facial datasets while mitigating negative transfer through distribution matching. Use when the user wants to benchmark on Aff-Wild, AffectNet, RAF-DB, DISFA, GFT, BP4D, CelebA, or asks about evaluating this task. Reports CCC, F1 score.4---56# face-mtl-eval78> Distribution Matching for Heterogeneous Multi-Task Learning: a Large-scale Face Study — Kollias et al. (2021) (arXiv:2105.03790, 2021)910## What this evaluates1112Evaluates a multi-task learning framework for face analysis across heterogeneous tasks including valence-arousal estimation, action unit detection, expression classification, and face recognition. It probes the model's ability to jointly learn from diverse, in-the-wild and lab-controlled facial datasets while mitigating negative transfer through distribution matching.1314## Datasets1516- **Aff-Wild** — total 1250000; splits: train (1000000), test (216000)17- **AffectNet** — total 1000000; splits: train (321000), val (5000)18- **RAF-DB** — total 15200; splits: train (12200), test (3000)19- **DISFA** — total 130515; splits: train (-1), test (-1)20- **GFT** — total 130000; splits: train (108000), test (24500)21- **BP4D** — total 223000; splits: train (75600), val (71200), test (75700)22- **CelebA** — total 202600; splits: train (160000), val (20000), test (20000)2324## Metrics2526- `CCC` **(primary)** — range: [-1, 1]27 - Concordance Correlation Coefficient measuring the agreement between predicted and ground-truth continuous values (valence/arousal). It combines precision and accuracy of the prediction relative to the line of identity.28- `F1 score` **(primary)** — range: [0, 1]29 - Harmonic mean of precision and recall, computed per action unit or emotion category and averaged across classes.30- `Mean diagonal of confusion matrix` — range: [0, 1]31 - Sum of correctly classified samples divided by total samples, equivalent to overall classification accuracy.32- `AFA Score` — range: [0, 1]33 - Average of the F1 score and accuracy across all action units or emotion categories.3435## Input / output format3637**Input**: Cropped and aligned facial images resized to 112x112x3 pixels with intensity values normalized to [-1, 1].3839**Output**: Continuous predictions for valence and arousal (range [-1, 1]), binary/multi-class predictions for action units and expressions, and attribute/identity labels.4041## Scoring recipe4243```python44def compute_metrics(pred, gold, task_type):45 if task_type == 'continuous':46 mu_p, mu_g = np.mean(pred), np.mean(gold)47 var_p, var_g = np.var(pred), np.var(gold)48 cov = np.cov(pred, gold)[0, 1]49 return 2 * cov / (var_p + var_g + (mu_p - mu_g)**2)50 elif task_type == 'classification':51 cm = confusion_matrix(gold, pred)52 diag = np.trace(cm) / cm.sum()53 f1 = f1_score(gold, pred, average='macro')54 return {'accuracy': diag, 'f1': f1, 'afa': (diag + f1) / 2}55```5657## Common pitfalls5859- AffectNet, BP4D, and BP4D+ do not release official test sets; the protocol uses the validation set for testing, which may inflate generalization estimates.60- Video datasets like Aff-Wild contain temporally correlated frames, but the CNN processes frames independently; median filtering of frame-level predictions is required to match challenge protocols.61- AffectNet has overlapping/inconsistent annotations between valence-arousal and discrete expressions; strict data cleaning (e.g., radius checks for neutral/sad) is mandatory before training.6263## Evidence (verbatim from paper)6465> We use: i) the CCC for Aff-Wild and Aff-Wild2 (CCC was the evaluation criterion of the respective Challenges), Affectnet and AFEW-VA, ii) the mean diagonal value of the confusion matrix for RAF-DB (this criterion was selected for evaluating the performance on this database by [[34]]); the accuracy for AffectNet, iii) the F1 score for DISFA, GFT, BP4D and BP4D+ (this metric was the evaluation criterion of the FERA 2015 and 2017 Challenges); for AU detection in EmotioNet the Challenge’s metric was the average between: a) the mean (across all AUs) F1 score and b) the mean (across all AUs) accuracy; for the expression classification, it was the average between: a) the average (across all emotions) F1 score and b) the unweighted average recall (UAR) over all emotion categories, iv) the total accuracy and average F1 score for the attributes and ids in CelebA.6667## Citation6869```bibtex70@misc{kollias2021distribution,71 title={Distribution Matching for Heterogeneous Multi-Task Learning: a Large-scale Face Study},72 author={Kollias et al. (2021)},73 year={2021},74 note={arXiv:2105.03790}75}76```7778- arXiv: 2105.03790