  Pain monitoring is essential to the quality of care for patients undergoing a
medical procedure with sedation. An automated mechanism for detecting pain
could improve sedation dose titration. Previous studies on facial pain
detection have shown the viability of computer vision methods in detecting pain
in unoccluded faces. However, the faces of patients undergoing procedures are
often partially occluded by medical devices and face masks. A previous
preliminary study on pain detection on artificially occluded faces has shown a
feasible approach to detect pain from a narrow band around the eyes. This study
has collected video data from masked faces of 14 patients undergoing procedures
in an interventional radiology department and has trained a deep learning model
using this dataset. The model was able to detect expressions of pain accurately
and, after causal temporal smoothing, achieved an average precision (AP) of
0.72 and an area under the receiver operating characteristic curve (AUC) of
0.82. These results outperform baseline models and show viability of computer
vision approaches for pain detection of masked faces during procedural
sedation. Cross-dataset performance is also examined when a model is trained on
a publicly available dataset and tested on the sedation videos. The ways in
which pain expressions differ in the two datasets are qualitatively examined.
