BreathAI: Transfer Learning-Based Thermal Imaging for Automated Breathing Pattern Recognition

Hamza Kheddar 1 , Yassine Himeur 2 , Abbes Amira 3,4 · 2026

Read BreathAI: Transfer Learning-Based Thermal Imaging for Automated Breathing Pattern Recognition by Hamza Kheddar 1 , Yassine Himeur 2 , Abbes Amira 3,4 (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-17442.txt.

Introduction

Kheddar, Himeur, and Amira present BreathAI, a thermal-imaging system that reads breathing patterns without microphones. Their model mixes layered feature extraction, multi-thresholding, distillation fine-tuning, and contrastive learning to split inhalation from exhalation. It reached nearly 99 percent accuracy, well ahead of leading rivals, while staying efficient to run. The authors point to sleep apnea and asthma monitoring among its clinical uses.

Catalog record

CREATORHamza Kheddar 1 , Yassine Himeur 2 , Abbes Amira 3,4
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE20627
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.17442

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

BreathAI: Transfer Learning-Based Thermal Imaging for Automated Breathing Pattern Recognition Hamza Kheddar 1 , Yassine Himeur 2 , Abbes Amira 3,4 Abstract This study presents an Adaptive Transfer Learning and Thresholding-based Deep Learning Model (ATL-TDLM) for automated breathing pattern recognition using thermal imaging. Unlike conventional methods that rely on sound-based respiratory data, our approach leverages hierarchical deep feature extraction and adaptive multi-thresholding (AMT) to enhance feature segmentation. The model integrates knowledge distillation-based fine-tuning (KD-FT) to optimize learning transfer and contrastive representation learning (CRL) to improve inter-class separability between inhalation (INH) and exhalation (EXH) phases. The ATL-TDLM framework achieves an accuracy of 98.8%, significantly outperforming state-of-the-art models while ensuring computational efficiency. This approach has potential applications in respiratory disorder detection, including sleep apnea and asthma monitoring. I Introduction Breathing disorders encompass a range of conditions affecting the respiratory system, hindering normal breathing processes. Conditions like sleep apnea disrupt regular breathing patterns during sleep, leading to intermittent pauses [ 13 ] . Asthma involves recurrent airway inflammation, causing wheezing and shortness of breath. Chronic obstructive pulmonary disease (COPD) includes conditions like chronic bronchitis and emphysema, resulting in persistent airflow limitation. Additionally, pneumonia, characterized by lung inflammation due to infection, impairs efficient breathing. These disorders vary in severity and symptoms but commonly share the disruption of normal respiratory functions, underscoring the importance of timely diagnosis and management for optimal respiratory health [ 14 ] . Subjective experience significantly impacts medical image analysis, often introducing variability in respiratory disorder assessments. While computed tomography (CT) imaging serves as a valuable diagnostic tool [ 5 ] , its application in breathing disorder detection remains limited due to cost, accessibility, and radiation exposure concerns. Additionally, existing deep learning (DL)-based approaches for respiratory monitoring predominantly rely on sound recordings or sensor-based techniques [ 11 , 15 , 7 ] , which may be susceptible to ambient noise interference and require specialized equipment. To address these limitations, we propose an Adaptive Transfer Learning and Thresholding-based Deep Learning Model (ATL-TDLM), designed to enhance breathing pattern recognition through thermal imaging analysis. Our method introduces key innovations that overcome challenges in respiratory phase differentiation, particularly between mid-inhalation (mid-INH) and mid-exhalation (mid-EXH) states. The main contributions of this study are as follows: • Thermal Imaging for Contactless Breathing Detection: Unlike sound-based or sensor-dependent methods, our approach leverages infrared thermal images (TIs) to capture temperature variations in inhalation (INH) and exhalation (EXH), enabling real-time, non-contact monitoring. • Advanced Feature Extraction and Adaptation: We integrate Adaptive Multi-Thresholding (AMT) for dynamic edge detection and data augmentation, along with multi-stage feature extraction (MSFE) using ResNet50 to enhance representation while reducing overfitting and computation. • Robust Classification and Learning Strategies: We employ Knowledge Distillation Fine-Tuning (KD-FT) for domain adaptation, Contrastive Representation Learning (CRL) to refine feature separability, and a hybrid classification approach (SVM and RF) for improved accuracy and interpretability. The remainder of the paper is structured as follows: Section II provides a summary of the most relevant related work, as well as existing breathing assessment techniques. Section III comprehensively explores the proposed approach. Experiments and research findings will be detailed in Section IV . The paper concludes with a summary in Section V . II Related work Breathing disorders significantly impact human health, prompting extensive research on their prediction and detection. Various studies utilize deep learning (DL) and machine learning (ML) techniques for improved diagnosis. Salih et al. [ 13 ] developed a CNN-LSTM model for asthma and bronchitis classification in preschoolers, enhancing diagnostic efficiency. Qin et al. [ 11 ] evaluated small airway function in asthmatic children using CT data and DL, showing oral corticosteroids’ efficacy over inhalation therapy via a ResNet model. Yahyaoui et al. [ 17 ] explored ML models for asthma and pneumonia detection, achieving 95% accuracy with KNN and 94.3% with DNN. Bhat et al. [ 2 ] introduced a smartphone-based asthma risk prediction system integrating multiple sensors. Alsaad et al. [ 1 ] highlighted the interpretability of DL models in asthma prediction using electronic health records. Topaloglu et al. [ 15 ] proposed an attention network with ML for precise asthma detection, utilizing Grad-CAM for explainability. For sleep apnea detection, Li et al. [ 10 ] employed a ResNet model on EEG and airflow signals, achieving 87.7% accuracy. Wang et al. [ 16 ] compared four neural network models, finding 1D-CNN-LSTM and 2D-CNN-LSTM superior, with accuracy exceeding 83%. Breathing assessment methods vary. Respiratory belts and spirometry are common, but studies on precise inhalation (INH) and exhalation (EXH) timing remain limited [ 3 ] . Techniques like bioacoustics, strain gauge belts, and respiratory inductive plethysmography (RIP) offer accurate measurements but have practical limitations [ 8 ] . ECG-based respiration monitoring is susceptible to movement artifacts [ 12 ] . Shakhih et al. [ 14 ] proposed infrared thermal imaging (ITI) for tracking three breathing patterns, but distinguishing sub-states like mid-INH and mid-EXH remains a challenge. Fig. 1 : Example of used ITIs encompassing status INH, mid INH, mid EXH, and EXH: (a) Original ITIs (b) Thresholded ITIs. III Proposed Detection Method The ATL-TDLM framework efficiently classifies breathing patterns, focusing on the challenging mid-INH and mid-EXH states. It aims to enhance classification accuracy by reducing misclassifications, avoiding random guessing, and mitigating model bias. The model integrates Multi-Stage Feature Extraction, utilizing hierarchical deep features from pre-trained convolutional layers. Adaptive Multi-Thresholding (AMT) dynamically refines edge detection, improving inhalation and exhalation clarity. Knowledge Distillation-Based Fine-Tuning (KD-FT) minimizes inter-class ambiguity by optimizing knowledge transfer. Contrastive Representation Learning (CRL) enhances feature separability, preventing confusion between mid-states. Together, these techniques improve generalization and classification accuracy, making ATL-TDLM a robust, scalable, and efficient thermal imaging-based breathing pattern recognition solution. The proposed method follows a structured pipeline, illustrated in Figure 2 , and consists of the following key stages. Fig. 2 : Illustration of the proposed ATL-TDLM framework. III-A Preprocessing and Data Augmentation To optimize feature representation, the input images undergo multi-level preprocessing: • Gray-Scale Transformation: Images X_{i} are converted to single-channel intensity matrices G(X_{i}) with values p_{x,y}\in[0,255] . • Adaptive Multi-Thresholding (AMT): An adaptive thresholding function T(F_{\text{low}},F_{\text{high}}) is applied for robust edge detection: \text{Pixel}_{(x,y)}=\begin{cases}1,&\text{if }G(X_{i})\geq F_{\text{high}}\\ 0,&\text{if }G(X_{i})<F_{\text{low}}\\ \text{Edge},&\text{otherwise}\end{cases} (1) • Data Augmentation: Each preprocessed image is transformed into K augmented versions using rotation, scaling, and brightness adjustments: X_{i}^{(k)}=\mathcal{T}_{k}(X_{i}),\quad k\in\{1,2,\dots,K\} (2) where \mathcal{T}_{k} represents a transformation function applied to the original image. III-B Hierarchical Feature Extraction with Adaptive Transfer Learning Deep hierarchical feature extraction is performed using a Multi-Level Convolutional Feature Extractor (MCFE), which combines feature maps from different layers of a pre-trained model \mathbb{M}_{S} (ResNet50) with a target model \mathbb{M}_{T} . III-B 1 Knowledge Distillation-Based Fine-Tuning The feature transfer function is defined as: \mathbb{F}_{T}(W_{S})=MW_{S}+b (3) where: • W_{S} represents the source model’s trained parameters. • M is an adaptation matrix learned via Knowledge Distillation (KD). • b is a bias term accounting for domain adaptation. The optimal parameters for fine-tuning are found by minimizing: \min_{W_{T}}\sum_{i=1}^{N}\ell(f(W_{T};X_{i}),Y_{i})+\lambda\|W_{T}-MW_{S}\|^{2} (4) where \ell(\cdot) is the classification loss function (categorical cross-entropy), and \lambda is a regularization parameter. III-B 2 Contrastive Representation Learning (CRL) To ensure high separability of features between INH and EXH , a contrastive loss function is incorporated: \mathcal{L}_{\text{CRL}}=\sum_{(X_{i},X_{j})\in\mathcal{P}}d(f(X_{i}),f(X_{j}))-\sum_{(X_{i},X_{k})\in\mathcal{N}}e^{-\alpha d(f(X_{i}),f(X_{k}))} (5) where: • \mathcal{P} represents positive pairs (same class), • \mathcal{N} represents negative

Read the complete text