Fully-attentive and interpretable: vision and video vision transformers for pain detection

Giacomo Fiorentini, Itir Onal Ertugrul, Albert Ali Salah
10/27/2022
cs.CV
transformer-attention

Official code: IPDTFE/ViT-McMaster (2 stars, Jupyter Notebook, last commit 2022-10-25).

Abstract

Pain is a serious and costly issue globally, but to be treated, it must first be detected. Vision transformers are a top-performing architecture in computer vision, with little research on their use for pain detection.

Show full abstract

In this paper, we propose the first fully-attentive automated pain detection pipeline that achieves state-of-the-art performance on binary pain detection from facial expressions. The model is trained on the UNBC-McMaster dataset, after faces are 3D-registered and rotated to the canonical frontal view. In our experiments we identify important areas of the hyperparameter space and their interaction with vision and video vision transformers, obtaining 3 noteworthy models. We analyse the attention maps of one of our models, finding reasonable interpretations for its predictions. We also evaluate Mixup, an augmentation technique, and Sharpness-Aware Minimization, an optimizer, with no success. Our presented models, ViT-1 (F1 score 0.55 +- 0.15), ViViT-1 (F1 score 0.55 +- 0.13), and ViViT-2 (F1 score 0.49 +- 0.04), all outperform earlier works, showing the potential of vision transformers for pain detection. Code is available at https://github.com/IPDTFE/ViT-McMaster

View on arXivView PDF

Code Implementations(1)

20Jupyter NotebookOct 25, 20224 years ago

Similar Papers

Cite this paper

@article{fiorentini2022fullyattentive,
  title  = {Fully-attentive and interpretable: vision and video vision transformers for pain detection},
  author = {Giacomo Fiorentini and Itir Onal Ertugrul and Albert Ali Salah},
  year   = {2022},
  eprint = {2210.15769},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.15769}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.15769.svg)](https://codeofpaper.com/paper/2210.15769)

Discussion