  Pain is a common occurrence among patients admitted to Intensive Care Units.
Pain assessment in ICU patients still remains a challenge for clinicians and
ICU staff, specifically in cases of non-verbal sedated, mechanically
ventilated, and intubated patients. Current manual observation-based pain
assessment tools are limited by the frequency of pain observations administered
and are subjective to the observer. Facial behavior is a major component in
observation-based tools. Furthermore, previous literature shows the feasibility
of painful facial expression detection using facial action units (AUs).
However, these approaches are limited to controlled or semi-controlled
environments and have never been validated in clinical settings. In this study,
we present our Pain-ICU dataset, the largest dataset available targeting facial
behavior analysis in the dynamic ICU environment. Our dataset comprises 76,388
patient facial image frames annotated with AUs obtained from 49 adult patients
admitted to ICUs at the University of Florida Health Shands hospital. In this
work, we evaluated two vision transformer models, namely ViT and SWIN, for AU
detection on our Pain-ICU dataset and also external datasets. We developed a
completely end-to-end AU detection pipeline with the objective of performing
real-time AU detection in the ICU. The SWIN transformer Base variant achieved
0.88 F1-score and 0.85 accuracy on the held-out test partition of the Pain-ICU
dataset.
