Contactless Estimation of Respiratory Frequency Using 3D-CNN on Thermal Images
Authors: Federica Gioia, Filippo Pura, Alberto Greco, Dario Piga, Arcangelo Merla, Marco Forgione
Organizations: Department of Information Engineering, University of Pisa, Italy · SUPSI-DTI-IDSIA, Dalle Molle Institute for Artificial Intelligence, Lugano-Viganello, Switzerland · Department of Engineering and Geology, University “G. d’Annunzio” Chieti-Pescara, Pescara, Italy · Next2U s.r.l., Pescara, Italy
Monitoring physiological parameters such as respiratory rate (fR) is essential for diagnosing and managing various pathological conditions. Thermal imaging offers a promising contactless alternative to traditional methods, which often rely on partially invasive sensors or obtrusive wearable systems. However, existing approaches for fR estimation from thermal signals typically require extensive pre-processing and manual or semi-automatic region-of-interest (ROI) tracking, limiting their practical applicability. This study proposes a deep learning-based method for estimating fR directly from thermal videos, eliminating the need for complex pre-processing and ROI tracking. A 3D Convolutional Neural Network (3D-CNN) is developed to operate on raw thermal video data. To address challenges related to small datasets, the model is trained using data augmentation and transfer learning from synthetic datasets. Experimental results demonstrate that the proposed approach achieves a validation R2 score of approximately 0.61 on both pre-processed and raw thermal videos. By simplifying the workflow, this method holds promise for enhancing the feasibility of thermal imaging in real-world applications, such as remote healthcare and driver monitoring in automotive applications.
Figures & tables
Figure 1: Experimental timeline showing the succession of 5-min tasks administered to each subject. After an initial acclimatization period (dashed line), participants underwent a baseline resting phase, followed by a Stroop test (cognitive stress induction), a second resting period, and an emotional elicitation task using affective images.
Figure 2: Overview of the experimental setup. The participant was seated in a thermally controlled room, facing a FLIR T640 thermal camera positioned at a 1-meter distance. The thermal camera acquired infrared facial images, while a chest belt connected to a BIOPAC MP150 system recorded the reference respiratory signal. The setup ensured synchronized acquisition of both contactless and ground-truth respiratory data.
Figure 3: Sequence of four consecutive unprocessed IR frames downsampled to 60×80 pixels.
Figure 4: Sequence of four consecutive pre-processed IR frames. A mask is applied to suppress the background and the eye region.
Figure 5: The 3D-CNN architecture used in this study. Each 3D convolutional layer employs a 3×3×3 kernel with stride and padding set to 1 , while max pooling layers use a 2×2×2 kernel. ReLU activation functions are applied after each convolutional and dense layer, except for the final dense layer with output dimension of 1 , which directly outputs the frequency prediction. The dimensions of the network’s input, output, and intermediate activations are indicated below each corresponding block.
Figure 6: Augmented frames from the unprocessed IR dataset. The RandAugment algorithm is applied to the frames in Fig. 3 .
Figure 7: Frames extracted from the synthetic dataset. Pulsating circles around the nostril region simulate the respiratory activity.
Figure 8: R2 score in training (left) and validation (right) over the training epochs using the base training setup on the unprocessed dataset.
Figure 9: True and predicted values of the model trained on the unprocessed dataset, for all non-overlapping 150-frame segments of the validation split.
Figure 10: Confusion matrix of the model’s predictions on the validation dataset. Labels are obtained by dividing the frequency range into ten equally spaced intervals. The concentration of values along the main diagonal indicates consistent predictive performance.
Base setup
Augmentation
Synthetic TL
Augm. + Synthetic TL
Dataset
MSE
R2
MSE
R2
MSE
R2
MSE
R2
Unprocessed IR
0.752
0.045
0.789
0.000
0.403
0.488
0.312
0.604
Pre-processed IR
0.619
0.212
0.736
0.065
0.378
0.521
0.304
0.614
Table 1: Validation MSE and R2 obtained on the unprocessed and pre-processed IR datasets with the different training strategies. Best results in bold.
Figure 11: Activations of the second convolutional layer for the trained 3D-CNN (top panel) and for the 3D-CNN at initialization (bottom panel). The 8 rows correspond to the channel depth of the layer, and the 37 columns correspond to the reduced time dimension. In the trained network, several neurons focus on the nostril region, whereas the untrained network shows little to no response in this area.
Figure 12: Results of 6-fold cross-validation on the unprocessed dataset, with training performed via augmented synthetic transfer learning. The mean validation loss ( 0.297 ) and mean validation R2 score ( 0.663 ) across the splits are consistent with the results from the simpler validation setting reported in Table 1 ( 0.312 and 0.604 , respectively).
Institute of Automation, Chinese Academy of Sciences · School of Artificial Intelligence, University of Chinese Academy of Sciences · State Key Laboratory of Brain Cognition and Brain-inspired Intelligence Technology +1