Enhancing cross-domain facial expression recognition with expression relationship contrastive learning in a source-free setting
摘要
Facial expression recognition (FER) encounters significant challenges under domain shifts caused by dataset bias and demographic variations. Existing cross-domain FER (CD-FER) methods typically rely on labeled source data, which may be restricted due to privacy concerns. To address this, we propose EERCL (Embedding Expression Relationship Contrastive Learning), a novel source-free CD-FER framework that adapts to target domains using only a pre-trained source model. By constructing an expression relationship matrix from source classifier weights, we design two novel loss functions: an expression relationship embedded class-aware contrastive loss (ER-CACo) and an expression relationship embedded instance discrimination contrastive loss (ER-IDCo). These losses enable effective adaptation without source data. Extensive experiments on multiple benchmark datasets demonstrate that EERCL outperforms existing source-free CD-FER methods and achieves competitive performance against state-of-the-art CD-FER approaches, with an average recognition accuracy of 66.84% across five target datasets. Our code and more details are available at https://github.com/Liusixone/EERCL_in_Source-Free.git.