In this study, we developed and validated a real-time FPAS that integrates parallel processing of facial geometry (Action Units) and emotion recognition, individual baseline calibration, temporal stabilization, and standardized data logging. The system demonstrated a strong correlation (r = 0.74) and acceptable agreement (ICC = 0.71) with patient self-reported VAS scores. It achieved moderate performance in categorical emotion classification (overall accuracy 56%, Cohen’s kappa = 0.43), with pain-related emotion classes (sad, angry, fear) showing reasonable sensitivity. Both methods exhibited a significant decrease in pain intensity over time (P < 0.001), with no significant time × method interaction (P = 0.11), indicating that the system captured the temporal pain trajectory similarly to patient self-report.
The performance of our system (r = 0.74, ICC = 0.71) is comparable to that of previously reported automated pain assessment tools. Aydın and Özyazıcıoğlu, using OpenFace for facial action unit analysis in pediatric postoperative patients, reported that machine-predicted pain scores were closest to child self-reported pain among all raters (child, mother, nurse, observer) (
9).
Their study demonstrated the feasibility of automated facial expression analysis for pain assessment, although specific correlation coefficients were not reported. In a prospective study of critically ill patients, Wu et al. developed a deep learning-based pain classifier using convolutional neural network (CNN) models and reported dichotomous classification accuracies of 0.7668 for pain vs. no-pain discrimination and 0.8593 for pain vs. severe pain classification (
13). However, their study focused on binary classification rather than continuous pain intensity estimation across the full pain spectrum. The discrepancy in performance metrics between our study and Wu et al. likely arises from differences in outcome definitions: We evaluated correlation with continuous VAS-like outputs, whereas Wu et al. assessed categorical classification accuracy (
13). Furthermore, our study enrolled postoperative patients in the PACU, a setting in which pain levels are generally lower and more variable than in the intensive care unit (ICU), potentially contributing to differences in observed performance. The EDi Pain model, a deep learning-based instance-appraisable model for pain estimation from facial videos, reported a Pearson correlation coefficient of 0.63 on the UNBC-McMaster dataset and 0.22 on a prospective emergency department dataset of 931 patients (
10).
Our correlation coefficient of 0.74 exceeds the EDi Pain model’s performance on the UNBC dataset and substantially exceeds its prospective validation performance. This difference may be explained by several factors. First, our system incorporates individual baseline calibration, which accounts for inter-individual differences in facial morphology and baseline expression patterns, a feature absent in the EDi Pain model. Second, our emotion modulation layer, which applies emotion-specific weighting to pain intensity estimates, may have improved sensitivity to pain-related expressions by reducing false positives from non-pain facial movements. Third, our temporal smoothing and stabilization mechanisms likely reduced frame-to-frame noise, enhancing signal stability. Finally, the lower correlation in the EDi Pain prospective validation (r = 0.22) suggests that performance degrades substantially when moving from controlled to real-world clinical settings, highlighting the importance of validation in representative clinical populations, such as our PACU cohort. The Dual-Attention CNN (DA-CNN) framework achieved a test accuracy of 90.19% ± 0.94% on clinically annotated datasets, with an F1 score of 0.90 and Cohen’s κ = 0.876, demonstrating robust discrimination across five pain intensity levels (
8).
This performance substantially exceeds our system’s categorical classification metrics (overall accuracy 56%, κ = 0.43). Several factors may account for this discrepancy. The DA-CNN model was trained and validated on a clinically annotated dataset in which ground-truth labels were likely derived from expert-coded PSPI scores or structured clinical assessments, providing a more objective and reliable reference standard than our physician VAS ratings, which are inherently subjective. Additionally, the DA-CNN framework employed multi-head spatial attention and triple-pooling channel attention to localize pain-relevant facial regions, representing a more sophisticated architecture than our weighted AU approach. The DA-CNN was also trained on larger, more standardized datasets (such as the UNBC-McMaster Shoulder Pain Expression Archive Database), whereas our system was developed and validated on a relatively smaller clinical dataset. The higher performance reported for DA-CNN reflects laboratory-controlled conditions, whereas our system was evaluated in a live clinical PACU setting with real-time video capture, where lighting, camera angles, and patient movement are less controlled. These differences highlight the well-recognized challenge of translating high-performing laboratory models to real-world clinical environments (
14).
The weighted facial expression analysis model proposed by the 2025 study achieved an average accuracy of 92.72% using a weighted pain level estimation model, compared with 83.37% with conventional approaches, on a dataset of 4084 facial images from 25 individuals (
11). This high accuracy, similar to that reported for the DA-CNN framework, reflects controlled experimental conditions. Our system’s moderate categorical classification accuracy (56%) and Cohen’s kappa = 0.43 are more consistent with real-world clinical validation studies. A systematic review of AI-based pain assessment via facial expression recognition (2015 - 2025) found that accuracy in pain detection varied between approximately 70% and > 90%, with higher performance observed in deep learning and multimodal frameworks, but noted that evidence remains limited by small sample sizes, methodological heterogeneity, and scarce external validation (
14). Our findings align with this systematic review’s observation that performance degrades when moving from controlled laboratory settings to live clinical environments.
In terms of temporal analysis, repeated-measures ANOVA in our study revealed a significant decrease in pain scores over time for both methods (P < 0.001), with no significant time × method interaction (P = 0.11). This suggests that the system captured the expected postoperative pain trajectory (highest immediately after surgery with gradual decline) similarly to physician assessment. The absence of a significant interaction supports the clinical validity of the system’s dynamic pain monitoring capability. This finding is clinically important because it demonstrates that the system can detect not only static pain levels but also meaningful changes in pain intensity over time, a requirement for effective postoperative pain management.
The system’s categorical emotion classification performance (overall accuracy 56%, κ = 0.43, moderate agreement) warrants discussion. The highest agreement was observed for the "neutral" class (sensitivity 72%, specificity 85%), whereas the "happy" class showed no correct classifications (sensitivity 0%). Pain-related emotion classes (sad, angry, fear) achieved moderate sensitivity (44 - 58%). The poor performance for "happy" likely reflects class imbalance—only two observations of happy expressions in the dataset—rather than a genuine system limitation. The moderate sensitivity for pain-related emotions suggests that, while the system can detect some aspects of pain expression, there remains room for improvement in distinguishing pain from similar negative emotions. This is consistent with the literature, which notes that pain expressions can overlap with other negative affective states, making discrimination challenging (
11).
Clinically, the relatively low sensitivity for severe pain detection (44%) is a notable limitation that warrants explicit discussion. Failure to identify severe pain cases may limit the current clinical applicability of the system, particularly in settings where prompt identification of high-intensity pain is critical for patient safety and timely intervention. This performance gap suggests that the system, in its current form, should be considered a supplementary screening tool rather than a replacement for clinical judgment. Nurses and physicians should not rely solely on the FPAS to detect severe pain but should use it as an adjunct to comprehensive clinical assessment.
Several limitations of this study should be acknowledged. First, the relatively small sample size limited our ability to perform stratified analyses and subgroup comparisons and precluded external validation on an independent dataset, thereby restricting generalizability. The reference standard—physician VAS ratings—was inherently subjective, and although a single rater ensured consistency, future studies should incorporate multiple raters with an inter-rater reliability assessment. The study was conducted exclusively in the PACU of a single hospital, potentially limiting applicability to other settings such as ICUs, emergency departments, or long-term care facilities. The system’s emotion classification performance was only moderate, and the weighted Action Unit approach, although literature grounded, may not fully capture the complexity and cultural variability of spontaneous facial pain expressions. The dataset contained relatively few severe pain events (VAS > 7), limiting assessment of system sensitivity to high-intensity pain. Technical factors, including camera resolution, frame rate, lighting, and patient positioning, were not systematically controlled or reported, which may have influenced performance. Finally, the data logging protocol, although standardized for research, may require adaptation for routine clinical use, where workflow integration and real-time alerting are paramount.
5.1. Conclusions
This study demonstrates that a real-time automated pain detection system (FPAS) based on facial expression analysis, incorporating parallel processing of action units and emotion recognition with individual baseline calibration, can achieve strong correlation and acceptable agreement with patient self-reported VAS assessments in postoperative PACU patients. These results support the potential utility of automated facial analysis as a supplementary tool for pain monitoring, particularly in patients who cannot verbally communicate.
The system should be considered a promising research tool and screening adjunct rather than a fully validated clinical instrument ready for routine implementation. Future work should focus on improving severe pain detection, validating the system in diverse clinical populations and settings, and integrating the system into nursing workflows with appropriate clinical decision support.