Skip to content

Original Research

Frontiers in Imaging ·

Volume 5 - 2026 | https://doi.org/10.3389/fimag.2026.1795278

Deep learning based thermal foot segmentation with probability inversion post-processing for automated epidural block assessment

  • Sungjoon Hong1
  • Milan Toma1*corresponding author
  1. Algorithmic Medicine Laboratory, Department of Osteopathic Manipulative Medicine, College of Osteopathic Medicine, New York Institute of Technology, Old Westbury, NY, United States
Article metrics0 viewsView details

Abstract

Epidural analgesia represents the gold standard for labor pain management, yet clinical failure occurs in approximately 9 to 12 percent of cases, adversely affecting maternal well-being and necessitating additional interventions. Current assessment methods rely on subjective sensory tests that depend on patient feedback, which may be unreliable during active labor. Infrared thermography offers objective monitoring of sympathetic blockade through peripheral temperature changes, but clinical adoption has been limited by the absence of automated analysis tools requiring manual region-of-interest delineation by clinicians. This study introduces an automated deep learning pipeline utilizing a U-Net convolutional neural network trained on thermal images from 30 pregnant women to segment foot regions and quantify surface temperatures for epidural analgesia assessment. A principal technical challenge emerged from severe class imbalance, where the foot region occupies substantially less image area than background space. To address this limitation, a probability inversion strategy was implemented during post-processing, optimizing the model to prioritize complete thermal region capture over geometric boundary precision. The system achieved a global accuracy of 82.08 percent with foot-class sensitivity of 71.83 percent, successfully segmenting foot regions despite indistinct thermal gradients characteristic of infrared imagery. Automated temperature quantification enabled objective measurement of mean surface temperature within the segmented region. The proposed automated pipeline offers a non-invasive, objective, and real-time alternative to subjective manual assessment methods, with potential to improve clinical decision-making in obstetric analgesia monitoring and pain management settings. This approach addresses the critical need for standardized, operator-independent evaluation of neuraxial blockade efficacy in high-volume clinical environments.

Keywords

1. Introduction

Epidural analgesia represents the gold standard for labor pain management and is widely recognized as the most effective method in modern obstetric care (Anim-Somuah et al., 2011; Leighton and Halpern, 2002). Despite its established efficacy, clinical failure persists as a significant challenge, occurring in approximately 9–12% of cases (Hermanides et al., 2012; Pan et al., 2004; Thangamuthu et al., 2013). Such unsuccessful attempts adversely impact maternal well-being, necessitate additional interventions, and diminish overall patient satisfaction (Agaram et al., 2009). Consequently, establishing reliable methods for early and objective assessment of neuraxial blockade efficacy remains essential for ensuring safe and effective pain relief during labor (Fettes et al., 2009).

Physiological basis of sympathetic blockade assessment

Successful neuraxial anesthesia induces sympathetic blockade in the lower extremities, resulting in peripheral vasodilation and increased cutaneous blood flow (Chamberlain and Chamberlain, 1986; Bruins et al., 2018; Hermanns et al., 2018). This physiological response produces a measurable elevation in skin temperature, particularly evident at distal sites such as the feet. Clinical evidence indicates that this temperature increase typically manifests within 10–20 minutes following epidural drug administration, establishing it as a reliable early indicator of effective sympathetic denervation (Kim et al., 2003; Bouvet et al., 2019; Uematsu, 1985).

Limitations of conventional assessment methods

Current clinical practice relies predominantly on subjective sensory evaluation techniques, including ice application and pinprick testing, to determine the extent of neuraxial blockade (Curatolo et al., 2000; Ousley et al., 2012). These assessment methods depend critically on patient feedback, which may be unreliable or unobtainable during active labor or periods of maternal distress (Zhang et al., 2023). Furthermore, repeated sensory testing may cause patient discomfort and fails to provide continuous monitoring capability.

Infrared thermography (IRT) presents a promising non-invasive alternative by objectively visualizing the thermal patterns generated by vasodilation (Murphy et al., 2022; Stevens et al., 2006). Multiple studies have confirmed the correlation between peripheral foot warming and successful epidural analgesia, establishing IRT's potential as an enhanced diagnostic modality (Helmy et al., 2025; Miglani et al., 2025). However, clinical integration of thermographic assessment has been limited by the absence of automated analysis systems.

Technical barriers to clinical implementation

Although IRT demonstrates substantial diagnostic potential, its routine clinical application remains constrained by reliance on manual region-of-interest (ROI) delineation performed by clinicians (Kütük and Algan, 2022). This manual segmentation process is not only time-intensive and labor-demanding but also introduces inter-evaluator variability that compromises standardization (Jones, 1998; Zhao et al., 2024). The absence of automated analysis tools precludes real-time monitoring in high-volume obstetric units where rapid clinical decision-making is paramount (Yang et al., 2025). Development of a reliable, automated segmentation system is therefore necessary to enable widespread clinical adoption.

Deep learning advances in medical image analysis

Recent advances in deep learning, particularly convolutional neural networks (CNNs), have revolutionized medical imaging analysis across diverse clinical domains (Litjens et al., 2017; Long et al., 2015). The U-Net architecture has emerged as the benchmark for biomedical image segmentation, demonstrating exceptional performance even with limited training datasets (Ronneberger et al., 2015). However, direct application of these models to thermal imaging presents unique challenges arising from reduced thermal contrast and ambiguous boundaries between anatomical structures and background regions (Minaee et al., 2021; Sudre et al., 2017).

Study objectives and contributions

This study introduces an automated deep learning pipeline designed to segment foot regions and quantify surface temperatures for objective assessment of epidural analgesia efficacy. We utilized the publicly available thermal imaging dataset “Mamitas Only Subjects,” comprising infrared scans from 30 pregnant women (Castaño, 2023). A principal technical challenge emerged from severe class imbalance, wherein the foot region occupies a substantially smaller proportion of the image compared to background space. To address this limitation, we implemented a probability inversion strategy during post-processing, optimizing sensitivity for ROI extraction while maintaining clinically relevant accuracy. This approach enables objective, automated monitoring of physiological indicators associated with successful sympathetic blockade, offering a practical alternative to subjective manual assessment methods in obstetric and pain management settings.

2. Materials and methods

Figure 1 presents an overview of the proposed automated thermographic analysis system, illustrating the complete workflow from raw thermal image acquisition to clinical temperature output. The methodology integrates three core components: a deep learning-based segmentation framework for region of interest delineation, a post-processing module designed to address the inherent challenges of class imbalance in thermal imagery, and an automated temperature extraction algorithm for objective quantification of sympathetic blockade indicators.

The approach leverages thermal infrared imagery from pregnant women undergoing epidural analgesia monitoring, employing a fully convolutional neural network architecture specifically adapted for medical image segmentation. A critical innovation of this pipeline is the integration of a probability inversion strategy during inference, which counteracts the tendency of deep learning models to under-segment minority classes in highly imbalanced datasets. This strategic modification ensures detailed capture of the thermal footprint, prioritizing clinical sensitivity over geometric boundary precision, i.e., a design decision informed by the requirements of anesthesia monitoring where incomplete thermal data could compromise clinical decision-making.

The following subsections detail the dataset characteristics, architectural configuration, training protocol, post-processing methodology, temperature quantification procedure, and performance evaluation metrics employed to validate the system.

Dataset and preprocessing

The study utilized infrared thermographic imagery from the publicly available “Mamitas Only Subject” dataset, which comprises thermal scans of 30 pregnant women acquired during epidural analgesia monitoring. To prevent data leakage, the dataset was first partitioned into three non-overlapping subsets prior to any preprocessing operations: training, validation, and testing cohorts. Specifically, the total of 416 images from 30 subjects were partitioned strictly at the subject level to prevent any data leakage: 18 subjects (342 images) for the training set, 6 subjects (37 images) for the validation set, and 6 subjects (37 images) for the test set. This ensures that no images from the same patient were present in more than one set. This sequencing ensures complete isolation of the test set, preventing any information transfer that could artificially inflate performance metrics. The validation set was specifically employed to monitor learning dynamics in real-time and generate convergence curves, while the test set remained completely unseen during the training phase to provide an unbiased performance assessment.

Following dataset partitioning, preprocessing operations were applied independently to each split. All thermal images were resized to a standardized spatial resolution of 512 × 512 pixels to maintain consistency across the dataset and accommodate computational memory constraints. The corresponding ground truth segmentation masks were processed as binary pixel-level annotations, containing two semantic classes: “Background” (Class 0, pixel intensity = 0) and “Feet” (Class 1, pixel intensity = 255). This binary classification scheme was chosen to directly address the clinical objective of isolating the region of interest for temperature quantification. The preprocessing pipeline ensured uniform data representation across all experimental phases, thereby minimizing variability introduced by heterogeneous image dimensions.

Network architecture

The segmentation task was addressed using the U-Net architecture, a fully convolutional neural network originally developed for biomedical image segmentation. U-Net has become the benchmark architecture in medical imaging due to its ability to achieve precise localization with limited training data, which is particularly relevant given the modest sample size of 30 subjects in this study. The network architecture consists of a contracting path (encoder) that captures contextual information through successive convolutional and pooling operations, and an expansive path (decoder) that enables precise localization through upsampling and concatenation with high-resolution features from the encoder.

The implemented U-Net was configured to accept three-channel input tensors of dimension 512 × 512 × 3, corresponding to the standardized RGB representation of thermal images. The output layer was designed for binary pixel-wise classification, producing probability maps for each semantic class. The architecture's skip connections between corresponding encoder and decoder layers facilitate the recovery of fine-grained spatial details, which is critical for accurately delineating the foot boundaries in thermal imagery where contrast may be subtle.

Training strategy and optimization

Model training was conducted using the Adam optimization algorithm, which provides adaptive learning rate adjustment and has demonstrated superior convergence properties in deep learning applications. The initial learning rate was set to 1 × 10 −3, balancing convergence speed with training stability. Training proceeded for 10 epochs, which was empirically determined to be sufficient for convergence while avoiding excessive computational overhead.

A critical consideration in the training configuration was the selection of mini-batch size. Given the high spatial resolution of the input images and hardware memory limitations, a mini-batch size of 1 was employed. While this approach reduces the statistical efficiency of gradient estimation compared to larger batch sizes, it provides two important advantages in the context of high-resolution medical image segmentation: (1) preservation of full spatial context during each gradient update, and (2) compatibility with standard clinical workstation hardware that may have limited GPU memory.

To mitigate overfitting and monitor generalization performance, the model was validated every 100 iterations using the held-out validation set. Algorithm 1 summarizes the complete training pipeline with validation monitoring. This frequent validation enabled real-time tracking of both training and validation loss curves, allowing for early detection of potential overfitting behavior. The validation patience parameter was set to infinity to allow observation of the complete learning trajectory across all epochs, ensuring that the reported performance metrics reflect the model's behavior after full convergence.

Training configuration and hyperparameters

The complete configuration of hyperparameters and training settings employed throughout the automated thermal segmentation pipeline is summarized in Table 1. These parameters were selected based on computational constraints, dataset characteristics, and the clinical requirements of epidural block assessment. The network architecture parameters define the input-output dimensions and segmentation task structure, while the training configuration specifies the optimization strategy and convergence monitoring approach. Post-processing parameters reflect the probability inversion strategy designed to address class imbalance, and temperature calibration parameters correspond to the thermal camera's calibrated measurement range used in the original dataset acquisition. All hyperparameters were held constant across all experimental phases to ensure reproducibility and fair performance comparison.

The final configuration was not chosen arbitrarily but was determined through empirical testing to find the optimal balance between training stability and validation performance. After evaluating alternative learning rates, an initial learning rate of 1 × 10 −3 with an Adam optimizer was selected, as it yielded the lowest validation loss without early signs of overfitting. Furthermore, addressing class imbalance directly during this model optimization phase (e.g., via heavily weighted loss functions) was avoided, as it aggressively suppressed the background and eroded the boundary pixels of the foot. Therefore, we deliberately addressed the imbalance exclusively through the probability inversion post-processing.

Addressing class imbalance: probability inversion strategy

One of the principal technical challenges encountered in this study was the severe class imbalance inherent in thermal foot segmentation, where the background region occupies approximately 95–98% of the total image area. Traditional deep learning approaches typically employ a classification threshold of 0.5, where pixels with predicted class probability exceeding this value are assigned to the positive class. However, in the presence of extreme class imbalance, this standard threshold often leads to conservative predictions that favor the majority class, resulting in systematic under-segmentation of the region of interest.

To address this limitation, a probability inversion strategy was integrated into the post-processing pipeline. Rather than directly thresholding the predicted probability of the “Feet” class, the approach leverages the complementary probability of the “Background” class. Specifically, for a given pixel p, let P BG (p) denote the predicted probability that the pixel belongs to the background. The inverted foot probability is then computed as:

Subsequently, an optimized sensitivity threshold τ = 0.2 was applied to this inverted probability map. Pixels satisfying P Feet inv (p) > 0. 2 were classified as belonging to the foot region. Algorithm 2 details this probability inversion post-processing procedure. This lowered threshold was determined through empirical analysis of validation set performance, prioritizing high sensitivity to ensure complete capture of the thermal footprint. The rationale for this approach stems from the clinical requirement that no significant thermal data should be excluded from the region of interest, as incomplete segmentation would compromise the accuracy of mean temperature calculations used for epidural block assessment.

The probability inversion strategy represents a deliberate clinical trade-off. While it may result in slight over-segmentation at the boundary between the foot and surrounding air (reducing Intersection over Union scores), it provides superior recall of the complete thermal region. In the context of medical thermography for anesthesia monitoring, capturing the entire thermal signature is paramount, as even partial exclusion of the foot could lead to systematic underestimation of mean temperature and potentially erroneous clinical conclusions.

Automated temperature quantification

Following successful delineation of the foot region, the system performs automated quantification of mean surface temperature, which serves as the primary clinical indicator for sympathetic blockade. The thermal camera employed in the original dataset acquisition was calibrated to a specific temperature range, with maximum and minimum recorded values of T max = 33. 0 • C and T min = 22. 2 • C, respectively. These calibration parameters define the dynamic range of the infrared sensor and enable conversion from normalized pixel intensities to absolute temperature values.

The temperature extraction procedure begins by converting the segmented thermal image to grayscale intensity values in the range [0, 1]. For all pixels p within the identified foot region (where M (p) = 1), the normalized intensity I norm (p) is computed. The mean normalized intensity across the region of interest is then calculated as:

Subsequently, this mean normalized intensity is linearly mapped to the calibrated temperature scale using the relationship:

This linear transformation assumes a uniform relationship between pixel intensity and physical temperature across the sensor's operating range, which is a standard assumption for calibrated thermal imaging systems. The complete automated temperature extraction procedure is presented in Algorithm 3. The resulting mean temperature T mean provides a quantitative metric that can be monitored longitudinally to assess the progression of sympathetic blockade following epidural administration.

Performance evaluation

Model performance was quantitatively assessed using standard semantic segmentation metrics computed on the held-out test set of 37 images. The primary metrics included global accuracy, which measures the proportion of correctly classified pixels across all classes, and mean Intersection over Union (mIoU), which provides a balanced measure of segmentation quality by computing the average overlap between predicted and ground truth regions across all classes. Additionally, class-specific metrics including sensitivity (recall), specificity, and precision were computed separately for both the background and foot classes to provide detailed insight into the model's performance characteristics, particularly with respect to the minority class of interest.

The confusion matrix was visualized to provide an intuitive representation of pixel-level classification performance, explicitly showing the distribution of true positives, false positives, true negatives, and false negatives. This analysis enabled verification that the probability inversion strategy successfully achieved the intended outcome of maximizing sensitivity for the foot class, even at the expense of some specificity.

3. Results

Model convergence and training dynamics

The U-Net model was trained for 10 epochs with real-time validation monitoring conducted every 100 iterations. Figure 2 presents the training and validation accuracy and loss trajectories throughout the learning process. The training accuracy demonstrated consistent improvement, reaching approximately 86% by the final epoch, while the validation accuracy closely tracked the training performance, indicating effective generalization without substantial overfitting. The loss curves exhibited steady monotonic decline for both training and validation sets, converging to stable values by epoch 10. The proximity of training and validation metrics throughout the learning trajectory confirmed that the model achieved robust convergence without memorizing training-specific patterns. The validation frequency of 100 iterations enabled fine-grained monitoring of the model's generalization behavior, providing confidence that the final model parameters reflected genuine pattern recognition rather than dataset-specific artifacts.

Quantitative segmentation performance

Quantitative evaluation was performed on the independent test set comprising 37 thermal images that remained completely unseen during both training and validation phases. Table 2 summarizes the comprehensive performance metrics obtained through semantic segmentation evaluation. The model achieved a global accuracy of 82.1%, indicating that approximately four out of every five pixels were correctly classified across both semantic classes. The mean Intersection over Union (mIoU) across all classes was 62.7%, reflecting the combined geometric overlap between predicted and ground truth regions.

Class-specific analysis revealed distinct performance characteristics aligned with the clinical priorities of this application. For the background class, which constitutes the overwhelming majority of pixels in each image, the model achieved high sensitivity of 85.0%, indicating successful identification of background regions. The background class specificity reached 71.8%, with a notably high precision of 91.5%, reflecting minimal false positive errors when predicting background pixels. The background IoU of 78.8% demonstrates strong geometric overlap for this majority class.

For the minority foot class, which represents the critical region of interest for clinical temperature assessment, the model achieved a sensitivity of 71.8%. This sensitivity metric is particularly significant as it quantifies the proportion of true foot pixels successfully detected by the automated system. The foot class specificity was 85.0%, indicating effective discrimination when identifying non-foot regions. However, the foot class precision of 57.2% reveals the intentional trade-off inherent in the probability inversion strategy: the model accepts additional false positive predictions at foot boundaries to ensure complete thermal region capture. The foot class IoU of 46.7% reflects this deliberate over-segmentation tendency, which must be interpreted in the context of severe class imbalance and the clinical priority favoring sensitivity over boundary precision.

The Boundary F1 (BF) scores provide additional insight into the model's edge localization performance. The background class achieved a BF score of 0.63, while the foot class yielded a notably lower score of 0.34, resulting in a mean BF score of 48.35%. These relatively modest boundary scores, particularly for the foot class, quantitatively confirm the intentional over-segmentation behavior introduced by the probability inversion strategy. While standard segmentation approaches optimize for precise boundary alignment, this study deliberately prioritized complete thermal region capture over geometric boundary precision. The low BF score for the foot class explicitly demonstrates that the model includes peripheral regions at the foot-background interface, ensuring no thermal data is excluded from the region of interest. In medical thermography for anesthesia monitoring, capturing the entire thermal signature is paramount, as incomplete segmentation would compromise mean temperature calculations and potentially lead to erroneous clinical assessments. The BF scores thus validate that the system successfully implements the intended clinical design philosophy: maximizing sensitivity for complete data inclusion rather than optimizing for boundary sharpness.

Confusion matrix analysis

Figure 3 presents the pixel-level confusion matrix aggregated across all 37 test images, providing detailed insight into the classification behavior of the probability inversion strategy. The confusion matrix quantifies the distribution of predictions across all pixels in the test set, explicitly delineating true positives, false positives, true negatives, and false negatives for each class. The model correctly classified approximately 1.52 million pixels as belonging to the foot region (Class 1 true positives), representing successful detection of the thermal footprint. This substantial true positive count validates the effectiveness of the probability inversion strategy in recovering the complete region of interest despite severe class imbalance.

The confusion matrix reveals a moderate number of false positives, where background pixels were incorrectly classified as feet. This over-segmentation tendency, while reducing the geometric IoU metric, represents a deliberate clinical design choice. In the context of epidural analgesia monitoring, false negatives (missed foot pixels) pose a greater clinical risk than false positives, as incomplete thermal data could lead to underestimation of mean temperature and potentially erroneous assessment of sympathetic blockade. The probability inversion strategy with the optimized threshold of 0.2 successfully prioritized sensitivity, ensuring comprehensive capture of the thermal signature at the acceptable expense of including some peripheral pixels at the foot-background boundary. The confusion matrix thus demonstrates that the model's classification behavior aligns with the clinical requirement for complete thermal data inclusion rather than strict geometric boundary precision.

Qualitative segmentation and temperature extraction

Figure 4 presents a representative example of the automated segmentation and temperature quantification pipeline applied to a test image. The visualization demonstrates the model's capability to accurately delineate foot boundaries despite the inherent challenges of thermal imaging, including subtle contrast gradients and indistinct edges characteristic of infrared thermography. The predicted segmentation mask, overlaid on the original thermal image as a yellow boundary contour, demonstrates precise localization of both feet within the image frame. The segmentation successfully captured the complete thermal footprint, including peripheral regions where temperature gradients transition gradually to background levels.

Following successful region of interest extraction, the automated temperature quantification algorithm calculated the mean surface temperature by integrating normalized pixel intensities within the segmented mask and mapping them to the calibrated thermal scale. For the representative case shown in Figure 4, the system computed a mean surface temperature of 28.40°C. This automated temperature metric provides an objective, quantitative indicator of peripheral vasodilation resulting from sympathetic blockade. The ability to extract standardized temperature values without manual intervention represents a significant advancement toward real-time clinical monitoring, enabling continuous assessment of epidural analgesia efficacy through non-invasive thermal imaging. The yellow boundary overlay confirms that the segmentation encompasses the full extent of the thermal signature, ensuring that the calculated mean temperature reflects the complete physiological response rather than a partial sampling of the foot region.

The integrated visualization in Figure 4 validates the end-to-end functionality of the proposed automated pipeline, from raw thermal image acquisition through deep learning-based segmentation to clinical temperature metric extraction. The system demonstrates robust performance across the complete workflow, successfully addressing the technical challenges of class imbalance through the probability inversion strategy while maintaining clinically relevant accuracy in both spatial localization and temperature quantification. These results establish the feasibility of deploying automated thermal analysis for objective, real-time monitoring of epidural analgesia efficacy in clinical obstetric settings.

To further validate the automated temperature quantification, a direct comparison was conducted against manual region-of-interest (ROI) extraction. The analysis yielded a Mean Absolute Error (MAE) of 0.92 °C between the automated (28.46 °C) and manual (27.54 °C) mean temperature measurements. Notably, even when attempting to manually trace the exact foot contours using the AI-generated boundary as a visual guide, the manual tracing captured significantly fewer pixels (18,488 px) compared to the automated segmentation (79,201 px), demonstrating high subjective variability in manual ROI delineation.

4. Discussion

Learning dynamics

In the absence of a truly external testing dataset, the detailed analysis of learning dynamics becomes critical for establishing model credibility and generalizability. Every machine learning classification study in healthcare must include learning curve analysis to demonstrate that reported performance metrics reflect genuine predictive capability rather than algorithmic artifacts (Toma, 2026). High aggregate metrics such as accuracy and precision are necessary but insufficient validation; any algorithm can be manipulated to yield deceptively high values through methodological shortcuts including data leakage, overfitting, hyperparameter tuning on test data, or selective reporting of favorable data subsets.

The stakes in healthcare applications require honesty. When diagnostic algorithms impact clinical decisions and patient outcomes, it is our ethical responsibility to support all claims of high performance with transparent evidence of healthy learning dynamics (Toma, 2025, 2026). The reliability of these systems in real-world settings can impact lives, making it imperative to demonstrate that models have learned generalizable patterns, not just memorized training-specific noise.

Healthy learning dynamics exhibit characteristic signatures that are readily apparent in well-constructed learning curves (Toma, 2025, 2026). Both training and validation curves should demonstrate clear evolution over training iterations, e.g., initial improvement followed by gradual convergence to stable plateau values. The training and validation accuracy curves should track in parallel, with validation positioned slightly below training, while loss curves should show the opposite pattern with validation slightly above training. This narrow gap indicates effective generalization. Critically, the curves must plateau together rather than diverge, as widening train-validation gaps signal overfitting and compromised generalization capability.

Figure 2 demonstrates these hallmarks of healthy learning. The training and validation accuracy curves evolved consistently throughout 10 epochs, converging to approximately 86% with minimal separation. The loss trajectories declined monotonically for both sets and stabilized in tandem, with validation loss remaining slightly elevated relative to training loss, i.e., the expected and desirable pattern. The proximity of these curves throughout training, monitored at 100-iteration intervals, provides confidence that the model achieved robust generalization without memorizing dataset-specific patterns. This transparent presentation of learning dynamics validates that the reported test set performance reflects genuine pattern recognition capability that should extend to prospective clinical deployment.

Quantitative metrics

The quantitative metrics presented in Section 3.2 must be interpreted within the specific clinical context of epidural analgesia monitoring. The foot class sensitivity of 71.8% indicates that the automated system successfully detects approximately seven out of every ten true foot pixels. This performance level has direct implications for the reliability of automated temperature quantification. Because mean temperature calculation depends on complete thermal region capture, the 71.8% sensitivity represents the system's ability to avoid systematic underestimation of the thermal footprint.

The deliberate trade-off between sensitivity and precision reflected in the metrics (71.8% sensitivity versus 57.2% precision for the foot class) aligns with established clinical priorities in anesthesia monitoring. In epidural block assessment, false negatives pose greater clinical risk than false positives. Missed foot pixels would result in incomplete thermal data, potentially leading to underestimation of peripheral warming and erroneous conclusions about sympathetic blockade adequacy. Conversely, inclusion of peripheral background pixels at the foot-air interface (reflected in the lower precision) minimally affects mean temperature calculations, as these regions typically exhibit temperatures only slightly below the true foot surface.

The automated system's global accuracy of 82.1% and mean IoU of 62.7% suggest that deployment in clinical settings would require appropriate validation protocols. While these metrics demonstrate proof-of-concept feasibility, clinical implementation would benefit from prospective validation studies comparing automated temperature outputs against manual expert annotations. The probability inversion strategy successfully addresses the technical challenge of class imbalance, but the resulting over-segmentation tendency (evidenced by the low boundary F1 score of 0.34 for the foot class) indicates that the system prioritizes data completeness over geometric precision.

Pixel-level classification errors

The confusion matrix aggregated across 37 test images reveals distinct error patterns with direct implications for clinical deployment. The false negative rate of 28.2% indicates that approximately 600,000 foot pixels were misclassified as background, representing incomplete thermal region capture in specific image areas. These missed pixels could theoretically result in systematic underestimation of mean foot temperature if concentrated in warmer regions. However, the spatial distribution of false negatives typically occurs at peripheral foot margins where temperatures approach ambient levels, minimizing their impact on calculated mean values. The false positive rate of 15.0%, corresponding to 1.14 million background pixels incorrectly included in the foot region, primarily affects boundary precision rather than temperature quantification accuracy. Because false positives typically occur in the immediate vicinity of the true foot boundary where background temperatures are similar to peripheral foot temperatures, their inclusion introduces minimal bias to the mean temperature calculation used for sympathetic blockade assessment.

From a clinical monitoring perspective, the 1.52 million true positive pixels demonstrate that the automated system successfully detects the majority of the thermal footprint across diverse patient presentations. The observed error rates must be evaluated against the practical requirements of epidural block monitoring, where temperature changes of 1-2°C are considered clinically significant for confirming adequate sympathetic blockade. Given that false positives and false negatives tend to occur in temperature transition zones rather than in regions of maximum thermal contrast, their competing effects may partially cancel during mean temperature calculation.

The comparison between automated and manual temperature extraction further underscores the clinical necessity of automated pipelines. While the temperature difference (MAE of 0.92 °C) falls well within the acceptable hardware error margin of thermal cameras, the vast discrepancy in captured pixel area (79,201 px vs. 18,488 px) exposes the inherent limitations of manual delineation. Manual ROI extraction is highly subjective, prone to inter-operator variability, and systematically omits portions of peripheral thermal data. By consistently capturing the complete thermal footprint without human bias, automated systems guarantee the objective reproducibility that is relevant for reliable epidural block assessment in clinical settings.

Visual segmentation verification

The qualitative visualization presented in Figure 4 provides clinical validation that extends beyond quantitative metrics alone. The yellow boundary overlay enables direct visual verification of segmentation accuracy, allowing clinicians to assess whether the automated system has correctly identified the thermal footprint in each individual case. This transparency is vital for clinical acceptance, as healthcare providers must understand and trust algorithmic decisions before incorporating them into patient care workflows. The representative case demonstrates that the system successfully captures both feet despite the inherent ambiguity of thermal imagery, where temperature transitions occur gradually rather than at discrete anatomical boundaries. However, the visual inspection also reveals the practical limitation that segmentation boundaries extend slightly beyond anatomical foot margins, consistent with the probability inversion strategy's emphasis on sensitivity over precision. Clinicians utilizing this automated system must recognize that the calculated mean temperature of 28.40°C reflects thermal data from the complete foot region plus a small peripheral zone, rather than a strictly anatomically constrained measurement. This over-inclusive approach ensures comprehensive thermal capture but requires clinical interpretation that accounts for minor boundary imprecision.

Conclusion

This study presented an automated deep learning pipeline for thermal foot segmentation and temperature quantification to support objective assessment of epidural analgesia efficacy. The U-Net-based system, trained on thermal images from 30 pregnant women, successfully addressed the critical challenge of severe class imbalance through a probability inversion post-processing strategy that prioritized complete thermal region capture over geometric boundary precision. The system achieved 82.08% global accuracy with 71.83% sensitivity for foot region detection, enabling automated extraction of mean surface temperature as a quantitative indicator of sympathetic blockade. While the approach demonstrates proof-of-concept feasibility for non-invasive, operator-independent monitoring in obstetric anesthesia settings, clinical deployment will require prospective validation studies to establish diagnostic thresholds and assess real-world reliability across diverse patient populations. Future work should focus on expanding the training dataset to improve generalization, investigating temporal analysis of sequential thermal images to capture the dynamic progression of sympathetic blockade, and conducting clinical trials to validate the correlation between automated temperature metrics and patient-reported analgesia outcomes. This automated thermal analysis framework addresses a critical gap in epidural block assessment, offering the potential to enhance clinical decision-making and improve maternal care quality in high-volume obstetric environments.

Statements

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Funding

The author(s) declared that financial support was not received for this work and/or its publication.

Data availability

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

Author contributions

SH: Investigation, Software, Conceptualization, Methodology, Writing – review & editing, Visualization, Formal analysis, Writing – original draft, Validation, Data curation. MT: Project administration, Writing – original draft, Methodology, Formal analysis, Data curation, Validation, Supervision, Investigation, Conceptualization, Software, Visualization, Funding acquisition, Writing – review & editing, Resources.

References

  1. Agaram R., Douglas M. J., McTaggart R. A., Gunka V. (2009). Inadequate pain relief with labor epidurals: a multivariate analysis of associated factors. Int. J. Obstet. Anesthesia 18, 10 – 14. doi: doi:10.1016/j.ijoa.2007.10.008
  2. Anim-Somuah M., Smyth R. M. D., Jones L. (2011). Epidural versus non-epidural or no analgesia in labour. Cochrane Database System. Rev. 7: CD000331. doi: doi:10.1002/14651858.CD000331.pub3
  3. Bouvet L. (2019). Infrared thermography to assess dermatomal levels of labor epidural analgesia with ropivacaine plus sufentanil: a prospective cohort study. Int. J. Obstet. Anesthesia 41, 53 – 58. doi: doi:10.1016/j.ijoa.2019.08.006
  4. Bruins A. A., Kistemaker K. R. J., Boom A., Klaessens J. H. G. M., Verdaasdonk R. M., Boer C. (2018). Thermographic skin temperature measurement compared with cold sensation in predicting the efficacy and distribution of epidural anesthesia. J. Clini. Monitor. Comp. 32, 335 – 341. doi: doi:10.1007/s10877-017-0026-y
  5. Castaño F. (2023). Mamitas Only Subject: Thermographic Images of Feet in Pregnant Women. San Francisco: Kaggle Dataset.
  6. Chamberlain D. P., Chamberlain B. D. L. (1986). Changes in the skin temperature of the trunk and their relationship to sympathetic blockade during spinal anesthesia. Anesthesiology 65, 139 – 143. doi: doi:10.1097/00000542-198608000-00002
  7. Curatolo M., Petersen-Felix S., Arendt-Nielsen L. (2000). Sensory assessment of regional analgesia in humans: a review of methods and applications. Anesthesiology 93, 1517 – 1530. doi: doi:10.1097/00000542-200012000-00025
  8. Fettes P. D. W., Jansson J.-R., Wildsmith J. A. W. (2009). Failed spinal anaesthesia: mechanisms, management, and prevention. Br. J. Anaesthesia 102, 739 – 748. doi: doi:10.1093/bja/aep096
  9. Helmy M. A., Mohamed I. H., Mostafa M., Hasanin A., Mahmoud M., Elsonbaty M., Kamel M. M. (2025). The ability of infrared thermography to detect successful caudal block in children undergoing infra-umbilical surgery. Paediatric Anaesthesia. 36, 234 – 239. doi: doi:10.1111/pan.70092
  10. Hermanides J., Hollmann M. W., Stevens M. F., Lirk P. (2012). Failed epidural: causes and management. Br. J. Anaesthesia 109, 144 – 154. doi: doi:10.1093/bja/aes214
  11. Hermanns H., Werdehausen R., Hollmann M. W., Stevens M. F. (2018). Assessment of skin temperature during regional anaesthesia–what the anaesthesiologist should know. Acta Anaesthesiol. Scandinavica 62, 1332 – 1345. doi: doi:10.1111/aas.13176
  12. Jones B. F. (1998). A reappraisal of the use of infrared thermal image analysis in medicine. IEEE Trans. Med. Imag. 17, 1019 – 1027. doi: doi:10.1109/42.746635
  13. Kim Y. C., Bahk J. H., Lee S. C., Lee Y. W. (2003). Infrared thermographic imaging in the assessment of successful block on lumbar sympathetic ganglion. Yonsei Med. J. 44, 119 – 124. doi: doi:10.3349/ymj.2003.44.1.119
  14. Kütük Z., Algan G. (2022). “Semantic segmentation for thermal images: a comparative survey,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops (New Orleans, LA: IEEE), 286 – 295.
  15. Leighton B. L., Halpern S. H. (2002). The effects of epidural analgesia on labor, maternal, and neonatal outcomes: a systematic review. Am. J. Obstet. Gynecol. 186, S69 – S77. doi: doi:10.1016/S0002-9378(02)70182-8
  16. Litjens G., Kooi T., Bejnordi B. E., Setio A. A., Ciompi F., Ghafoorian M.. (2017). A survey on deep learning in medical image analysis. Med. Image Analysis 42, 60 – 88. doi: doi:10.1016/j.media.2017.07.005
  17. Long J., Shelhamer E., Darrell T. (2015). “Fully convolutional networks for semantic segmentation,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (Boston, MA: IEEE), 3431 – 3440.
  18. Miglani A., Borkowska A., Murphy B., O'Flaherty D., McCaul C. (2025). Infrared thermographic assessment of cutaneous temperature changes during labour epidural analgesia initiation: An observational pilot study. Int. J. Obstetric Anesthesia 62: 104304. doi: doi:10.1016/j.ijoa.2024.104304
  19. Minaee S. (2021). Image segmentation using deep learning: a survey. IEEE Trans. Pattern Analysis Mach. Intellig. 44, 3523 – 3542. doi: doi:10.1109/TPAMI.2021.3059968
  20. Murphy B., McCaul C. L., O'Flaherty D. (2022). Infrared thermographic assessment of spinal anaesthesia-related cutaneous temperature changes during caesarean section. Int. J. Obstetric Anesthesia 49: 103245. doi: doi:10.1016/j.ijoa.2021.103245
  21. Ousley R., Egan C., Dowling K., Cyna A. M. (2012). Assessment of block height for satisfactory spinal anaesthesia for caesarean section. Anaesthesia 67, 1356 – 1363. doi: doi:10.1111/anae.12034
  22. Pan P. H., Bogard T. D., Owen M. D. (2004). Incidence and characteristics of failures in obstetric neuraxial analgesia and anesthesia: a retrospective analysis of 19,259 deliveries. Int. J. Obstetric Anesthesia 13, 227 – 233. doi: doi:10.1016/j.ijoa.2004.04.008
  23. Ronneberger O., Fischer P., Brox T. (2015). “U-Net: Convolutional networks for biomedical image segmentation,” in International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI) (Cham: Springer), 234 – 241.
  24. Stevens M. F., Werdehausen R., Hermanns H., Lipfert P. (2006). Skin temperature during regional anesthesia of the lower extremity. Anesthesia Analgesia 102, 1247 – 1251. doi: doi:10.1213/01.ane.0000198627.16144.77
  25. Sudre C. H., Li W., Vercauteren T., Ourselin S., Cardoso M. J.. (2017). “Generalised dice overlap as a deep learning loss function for highly unbalanced segmentations,” in Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support (Cham: Springer), 240 – 248.
  26. Thangamuthu A., Russell I. F., Purva M. (2013). Epidural failure rate using a standardised definition. Int. J. Obstetric Anesthesia 22, 310 – 315. doi: doi:10.1016/j.ijoa.2013.04.013
  27. Toma M. (2025). AI-Assisted Medical Diagnostics: A Clinical Guide to Next-Generation Diagnostics. New York, NY: Dawning Research Press. Available online at: (Accessed March 24, 2026).
  28. Toma M. (2026). Diagnosing AI: Evaluation of AI in Clinical Practice. New York, NY: Dawning Research Press. Available online at: (Accessed March 24, 2026).
  29. Uematsu S. (1985). Symmetry of skin temperature comparing one side of the body to the other. Thermology 1, 4 – 7.
  30. Yang Z., Yu H., Zhang J., Tang Q., Mian A. (2025). Deep learning based infrared small object segmentation: challenges and future directions. Inform. Fusion 118: 103007. doi: doi:10.1016/j.inffus.2025.103007
  31. Zhang E. W., Jones L. E., Whitburn L. Y. (2023). Tools for assessing labour pain: a comprehensive review. Pain 164, 2642 – 2652. doi: doi:10.1097/j.pain.0000000000003004
  32. Zhao J., Wang R., Wu Y. Zhao. C Qi Y., Li S.. (2024). From characteristics to practical applications of skin temperature in thermal comfort research–a comprehensive review. Build. Environm. 262: 111820. doi: doi:10.1016/j.buildenv.2024.111820

Citation

Hong, S. & Toma, M. (2026). Deep learning based thermal foot segmentation with probability inversion post-processing for automated epidural block assessment. Frontiers in Imaging, Volume 5. https://doi.org/
Received
Accepted
Published
Volume
5 - 2026

Copyright

Copyright © 2026 Hong and Toma.

License: https://creativecommons.org/licenses/by/4.0/

*Correspondence: Milan Toma

Article metrics

Views
0
Downloads
0
Citations
0
Shares
0