A Novel Approach for the Detection and Severity Grading of Chronic Obstructive Pulmonary Disease Based on Transformed Volumetric Capnography

Chronic Obstructive Pulmonary Disease (COPD), as the third leading cause of death worldwide, is a major global health issue. The early detection and grading of COPD are pivotal for effective treatment. Traditional spirometry tests, requiring considerable physical effort and strict adherence to quality standards, pose challenges in COPD diagnosis. Volumetric capnography (VCap), which can be performed during natural breathing without requiring additional compliance, presents a promising alternative tool. In this study, the dataset comprised 279 subjects with normal pulmonary function and 148 patients diagnosed with COPD. We introduced a novel quantitative analysis method for VCap. Volumetric capnograms were converted into two-dimensional grayscale images through the application of Gramian Angular Field (GAF) transformation. Subsequently, a multi-scale convolutional neural network, CapnoNet, was conducted to extract features and facilitate classification. To improve CapnoNet’s performance, two data augmentation techniques were implemented. The proposed model exhibited a detection accuracy for COPD of 95.83%, with precision, recall, and F1 measures of 95.21%, 95.70%, and 95.45%, respectively. In the task of grading the severity of COPD, the model attained an accuracy of 96.36%, complemented by precision, recall, and F1 scores of 88.49%, 89.99%, and 89.15%, respectively. This work provides a new perspective for the quantitative analysis of volumetric capnography and demonstrates the strong performance of the proposed CapnoNet in the diagnosis and grading of COPD. It offers direction and an effective solution for the clinical application of capnography.


Introduction
Chronic Obstructive Pulmonary Disease (COPD) is a respiratory disease characterized by limited airflow [1].As one of the major chronic diseases in the world, COPD has brought a significant healthcare burden, particularly in developing countries [2].According to a World Health Organization (WHO) survey, COPD led to 3.3 million deaths in 2019 [3].Since it is incurable, early diagnosis and treatment are essential for patients.
Spirometry is considered the gold standard for the initial assessment of COPD, as endorsed by the Global Initiative for Chronic Obstructive Lung Disease (GOLD, 2023) [4].The diagnosis of COPD is confirmed when the ratio of forced expiratory volume in one second (FEV1) to forced vital capacity (FVC) after the administration of a bronchodilator is less than 0.7, indicating airflow limitation.Furthermore, the FEV1 percentage of predicted normal values (FEV1% predicted) is utilized to grade the severity of airflow limitation in COPD patients.However, forced spirometry tests have stringent performance and interpretation criteria, requiring patients to forcefully and rapidly expel all air from their lungs within a brief timeframe [5].It is difficult for individuals with impaired respiratory function to perform forced spirometry adequately, especially for the elderly, young children, and patients with severe respiratory distress or neurological conditions that impede their ability to understand or perform the test.
Given the limitations of spirometry, volumetric capnography (VCap) has emerged as a promising alternative.Owing to its non-invasiveness and minimal patient cooperation requirement, VCap has garnered significant interest among researchers.Volumetric capnography, which measures the CO 2 concentration throughout the entire exhalation, offers detailed insights into both gas exchange and lung ventilation dynamics across different lung volumes [6].Unlike spirometry, volumetric capnography can be effortlessly performed during natural breathing, making it particularly suitable for vulnerable populations such as infants, the elderly, and those with significant pulmonary impairment.The interpretation of volumetric capnography waveforms currently depends heavily on visual analysis by healthcare professionals, leading to potential misinterpretations.The integration of advanced computational techniques could standardize and enhance the accuracy of waveform analysis.
Many studies have used morphological and statistical features-such as variations in slope and angle, peak values, and averages-to achieve VCap quantitative analyses that are indicative of underlying pulmonary function and pathology [7][8][9].Distinct waveform patterns observed in volumetric capnography have been instrumental in differentiating between obstructive and restrictive lung diseases.Pertzov et al. used the waveform features of capnography to establish a regression model of FEV1 to assess lung function in patients with COPD and asthma [10].These researches emphasize extracting predefined statistical parameters from the waveforms and finding their correlations with FEV1 and FVC.Studies have shown that waveform characteristics of volumetric capnography provide significant evidence for discriminating diseases like COPD, asthma, and heart failure [10][11][12].Typically, capnograms are considered as one-dimensional waveform data.Considering capnograms as one-dimensional waveform data facilitates their integration into machine learning models by allowing for the systematic extraction of temporal features, which is crucial for diagnosing and classifying respiratory conditions.Some researchers have extracted key features for use as inputs to machine learning classifiers to achieve disease diagnosis and classification [13,14].Mieloszyk, R., et al. have attempted to construct end-to-end models, inputting raw volumetric capnography data directly into the network to differentiate COPD-normal and COPD-CHF [15].Quantitative analysis methods of capnography based on artificial intelligence technologies offer crucial insights for the diagnosis and assessment of respiratory diseases.The advancement of artificial intelligence, especially through deep learning techniques, has revolutionized the field of medical diagnostics.With the advancement of artificial intelligence, particularly deep learning, substantial potential has been demonstrated in disease diagnosis, such as cardiovascular diseases [16][17][18][19] and cancer diagnosis [20][21][22].Deep learning, particularly Convolutional Neural Networks (CNN), stands out for its proficiency in image-based analysis, adept at deciphering complex patterns and extracting meaningful insights from high-dimensional data.
This study focused on optimizing the application of VCap in the diagnosis of Chronic Obstructive Pulmonary Disease, aiming to overcome the limitations of traditional pulmonary function tests, especially for vulnerable populations such as the elderly, children, and patients with severe respiratory distress.The primary scientific problem is to assess the effectiveness and reliability of VCap in COPD assessment .We proposed converting VCap into two-dimensional images and embedding them into a deep learning framework.Firstly, a novel quantitative analysis method for capnography was proposed, where volumetric capnography sequences were transformed into two-dimensional images using the Gramian Angular Field (GAF).To enrich the dataset and enhance the model's generalizability, two data augmentation strategies were implemented: gaussian noise addition and elastic transformation.Lastly, CapnoNet was designed with multi-scale convolutional layers to interpret the complex information encoded in the transformed volumetric capnography images.In our findings, CapnoNet achieved an F1 score of 95.45% for COPD detection.For the task of COPD severity grading, the model demonstrated an F1 score of 89.15%.
This work presented a novel approach for the detection and severity grading of COPD using transformed volumetric capnography.The contributions of this study are as follows: (1) A novel quantitative analysis method was proposed, transforming volumetric capnography into two-dimensional grayscale images using the Gramian Angular Field (GAF) transformation.
(2) CapnoNet, a multi-scale convolutional neural network, was developed to classify and grade the severity of COPD from the transformed capnograms.(3) Data augmentation techniques, including the incorporation of Gaussian noise and elastic transformation, were employed to enhance the model's robustness and generalizability across diverse clinical scenarios.(4) The proposed approach demonstrated a diagnostic accuracy of 95.83% in detecting COPD and an accuracy of 96.36% in grading the severity of the disease.
The structure of this manuscript is organized as follows: Section 2 describes the methodology, including data collection, preprocessing, and the development of our convolutional neural network, CapnoNet.Section 3 presents the results of our model's performance in detecting and grading COPD.Section 4 discusses the implications of these findings, potential limitations, and future research directions.Finally, Section 5 concludes with a summary of our contributions and their significance to the field of respiratory diagnostics.

Data Acquisition
In previous work [23], we designed and implemented a portable sensing device to accurately collect volumetric capnography data.This device primarily consists of a differential pressure sensor and a carbon dioxide concentration sensor based on non-dispersive infrared (NDIR) technology.To advance the device's capabilities, we incorporated a Bluetooth communication module, enabling wireless data transmission.Additionally, we developed dedicated client software to facilitate efficient signal collection and management, providing a seamless user experience.The chosen differential pressure sensor, SDP32 from Sensirion (Stäfa, Switzerland), offers a measurement range of ±125 Pa.This range is optimal for recording the gas flow rate in real-time, capturing subtle pressure changes as the exhaled gas passes through a throttling device, which is critical for accurate volumetric analysis.The carbon dioxide concentration sensor (SprintIR ® -W, Shenzhen, China) monitors and analyzes concentration changes in carbon dioxide non-invasively during respiration.The NDIR sensor operates by exploiting the unique absorption characteristics of carbon dioxide molecules at specific infrared wavelengths.This method is highly effective for carbon dioxide sensing because it allows for precise quantification based on the reduction in light intensity, directly correlating with the gas's concentration.Prior to data collection, we undertake rigorous preparation steps, including a thorough check of the device's airway integrity to prevent any sampling errors.Additionally, we calibrate the sensors to ensure their accuracy and reliability throughout the data collection process.Strict guidelines are established for patients during the data acquisition process.These guidelines instruct patients to avoid actions like coughing or obstructing the mouth, which could lead to incomplete or abnormal waveforms.

Data Preprocessing
The volumetric capnogram is divided into three essential phases, as shown in Figure 1.Phase I is the baseline, representing the exhalation of gas from anatomical dead space that contains minimal to no carbon dioxide; Phase II is the ascending branch, characterized by the mixing and exhalation of gas from both dead space and alveoli, resulting in an increasing carbon dioxide concentration; Phase III is the plateau, representing alveolar gas with a high concentration of CO 2 .This phase is nearly horizontal in individuals without respiratory pathology, although its slope can reveal valuable clinical information.
guidelines are established for patients during the data acquisition process.These guidelines instruct patients to avoid actions like coughing or obstructing the mouth, which could lead to incomplete or abnormal waveforms.

Data Preprocessing
The volumetric capnogram is divided into three essential phases, as shown in Figure 1.Phase I is the baseline, representing the exhalation of gas from anatomical dead space that contains minimal to no carbon dioxide; Phase II is the ascending branch, characterized by the mixing and exhalation of gas from both dead space and alveoli, resulting in an increasing carbon dioxide concentration; Phase III is the plateau, representing alveolar gas with a high concentration of CO2.This phase is nearly horizontal in individuals without respiratory pathology, although its slope can reveal valuable clinical information.To obtain a complete VCap waveform, the raw signals were preprocessed.Figure 2 demonstrates the signal preprocessing procedure.The raw signals, collected by the device, include sequences of carbon dioxide concentration and flow rate.Through interpolation, these sequences are temporally aligned, allowing for the integration of CO2 concentration data with corresponding flow rates to produce paired values of carbon dioxide concentration and exhaled volume.Subsequently, the data are resampled at 200 Hz, a rate chosen to balance detail and processing efficiency.A third-order Butterworth low-pass filter is then applied to diminish power frequency interference, a common type of noise in electronic signal collection, while retaining the essential features of the respiratory signal.To acquire standardized VCap waveforms, long-term respiratory signals are segmented.After identifying a natural and calm respiratory cycle, the peaks and troughs of the signal are detected, and the exhalation phase signal is extracted as a valid record.The segmented VCap curves are subsequently simplified through Piecewise Aggregate Approximation (PAA), a technique that condenses long sequences into shorter, representative segments.This process involves standardizing the length of the record to 224 samples, a strategy designed to maintain the original data trends and minimize the loss of critical diagnostic information.To obtain a complete VCap waveform, the raw signals were preprocessed.Figure 2 demonstrates the signal preprocessing procedure.The raw signals, collected by the device, include sequences of carbon dioxide concentration and flow rate.Through interpolation, these sequences are temporally aligned, allowing for the integration of CO 2 concentration data with corresponding flow rates to produce paired values of carbon dioxide concentration and exhaled volume.Subsequently, the data are resampled at 200 Hz, a rate chosen to balance detail and processing efficiency.A third-order Butterworth low-pass filter is then applied to diminish power frequency interference, a common type of noise in electronic signal collection, while retaining the essential features of the respiratory signal.To acquire standardized VCap waveforms, long-term respiratory signals are segmented.After identifying a natural and calm respiratory cycle, the peaks and troughs of the signal are detected, and the exhalation phase signal is extracted as a valid record.The segmented VCap curves are subsequently simplified through Piecewise Aggregate Approximation (PAA), a technique that condenses long sequences into shorter, representative segments.This process involves standardizing the length of the record to 224 samples, a strategy designed to maintain the original data trends and minimize the loss of critical diagnostic information.

Gramian Angular Visualization of Volumetric Capnography
The Gramian Angular Field (GAF) represents time series data as a two-dimensional matrix, offering an image-based method [24].In this study, we transformed volumetric capnography waveforms into grayscale images by GAF to improve the detection of respiratory abnormalities and aiding in clinical diagnostics.

Gramian Angular Visualization of Volumetric Capnography
The Gramian Angular Field (GAF) represents time series data as a two-dimensional matrix, offering an image-based method [24].In this study, we transformed volumetric capnography waveforms into grayscale images by GAF to improve the detection of respiratory abnormalities and aiding in clinical diagnostics.
Assuming the preprocessed sequence of volumetric capnography is represented as X = (x 1 , x 2 , . . . ,x n ), where n is the number of data samples, the initial sequence is normal- ized to [−1, 1], which is usually achieved through the following formula:

∼
x i is the normalized signal sequence, x i is the original sequence.Subsequently, each data point is converted to polar coordinates with the inverse cosine function, where θ i denotes the angle and r i represents the radius. (2) This conversion to polar coordinates encodes the carbon dioxide volume sequence without loss.Among them, θ i preserves numerical relationships, and r i ensures temporal consistency.
GAF is categorized into two types based on distinct inner product calculations: the Gramian Angular Summation Field (GASF) and the Gramian Angular Difference Field (GADF).
GASF calculates the inner product as x i , x j = cos ϕ i + ϕ j , where the inner product of two data points is the cosine of the sum of their polar angles, in the form of: Conversely, GADF determines the inner product x i , x j = sin ϕ i − ϕ j , where each element is the sine of the difference between two angles, resulting in a two-dimensional matrix as follows: When the exhaled carbon dioxide concentration varies with exhaled gas volume, GAF preserves the correlation between data points and the trend of waveform changes.
Both the GASF and the GADF are bijective functions, meaning they establish a oneto-one correspondence between pairs of data points, ensuring that each point in one set is paired with exactly one point in another set, and vice versa.For clarity, the volumetric capnography transformed via the GASF and GADF methods will be referred to as GASF-VCap and GADF-VCap, respectively.As time progresses, the representations in the GASF-VCap and GADF-VCap matrices transition from the upper left to the lower right corner, effectively capturing and illustrating the temporal progression and dynamics of the original volumetric capnography signal within this two-dimensional space (as shown in Figure 3).This transformation not only elucidates specific inherent data characteristics, such as cyclic patterns and trends over time, but also aids in further modeling efforts by providing a structured, two-dimensional representation of complex temporal relationships.

𝐺𝐴𝐷𝐹
sin     ⋅ Both the GASF and the GADF are bijective functions, meaning they establish a oneto-one correspondence between pairs of data points, ensuring that each point in one set is paired with exactly one point in another set, and vice versa.For clarity, the volumetric capnography transformed via the GASF and GADF methods will be referred to as GASF-VCap and GADF-VCap, respectively.As time progresses, the representations in the GASF-VCap and GADF-VCap matrices transition from the upper left to the lower right corner, effectively capturing and illustrating the temporal progression and dynamics of the original volumetric capnography signal within this two-dimensional space (as shown in Figure 3).This transformation not only elucidates specific inherent data characteristics, such as cyclic patterns and trends over time, but also aids in further modeling efforts by providing a structured, two-dimensional representation of complex temporal relationships.

Data Augmentation Strategy
Data augmentation is an effective strategy for enhancing the performance of deep learning models by generating new data samples to increase the diversity of the dataset.In our study, two data augmentation strategies were employed: gaussian noise addition and elastic transformation.The addition of Gaussian noise is achieved by introducing random noise that follows a Gaussian distribution into the original data, with the mean and variance set to control the noise distribution.This method simulates the noise commonly encountered in actual data collection processes, thereby enhancing the model's robustness

Data Augmentation Strategy
Data augmentation is an effective strategy for enhancing the performance of deep learning models by generating new data samples to increase the diversity of the dataset.In our study, two data augmentation strategies were employed: gaussian noise addition and elastic transformation.The addition of Gaussian noise is achieved by introducing random noise that follows a Gaussian distribution into the original data, with the mean and variance set to control the noise distribution.This method simulates the noise commonly encountered in actual data collection processes, thereby enhancing the model's robustness to random perturbations.On the other hand, elastic distortion is used to mimic signal deformations in real-world scenarios.Elastic distortion involves adjusting parameters to control the degree of transformation.These include deformation intensity (which affects the magnitude of the distortions), displacement field smoothness (determining the spatial coherence of the distortions), and affine transformation intensity (adjusting the scale, rotation, and shear transformations).Through random and local non-linear transformations, elastic distortion simulates the possible morphological changes in capnography due to differences in respiratory patterns in the real world, thereby improving the model's adaptability to shape variations.By combining these two methods, the training data were augmented to three times their original size, a factor determined through preliminary experiments to optimally balance between increasing dataset diversity and maintaining computational efficiency.Figure 4 displays the feature maps before and after applying data augmentation, showcasing how Gaussian noise and elastic distortion contribute to increased data variability.This visual comparison highlights the effectiveness of our data augmentation strategy in simulating real-world data variation.
mented to three times their original size, a factor determined through preliminary experiments to optimally balance between increasing dataset diversity and maintaining computational efficiency.Figure 4 displays the feature maps before and after applying data augmentation, showcasing how Gaussian noise and elastic distortion contribute to increased data variability.This visual comparison highlights the effectiveness of our data augmentation strategy in simulating real-world data variation.

Neural Network Architecture
The proposed model, CapnoNet, utilizes a Convolutional Neural Network (CNN) structure for the detection and grading of COPD.CapnoNet is designed with a compact, multi-scale convolutional backbone, centered on a foundational convolutional block and enhanced by the integration of two inception modules.Each inception module consists of

Neural Network Architecture
The proposed model, CapnoNet, utilizes a Convolutional Neural Network (CNN) structure for the detection and grading of COPD.CapnoNet is designed with a compact, multi-scale convolutional backbone, centered on a foundational convolutional block and enhanced by the integration of two inception modules.Each inception module consists of four parallel processing branches, with the convolutional kernels sized at 1 × 1, 3 × 3, 5 × 5, and 7 × 7, respectively.In the architecture of the neural network, a Batch Normalization (BN) layer is incorporated subsequent to each convolutional layer.BN is a mechanism designed to enhance the stability and performance of neural networks.It achieves this by normalizing the inputs of each layer during the training process.This normalization helps to mitigate the internal covariate shift, thereby expediting the training process.This configuration allows for the extraction and refinement of features at multiple scales.To refine the feature representation, a 2 × 2 max pooling layer with a stride of 2 is integrated.This strategic design enables CapnoNet to effectively interpret capnography data by processing various kernel sizes simultaneously.The architecture is detailed in Figure 5, demonstrating the processing of 224 × 224 dimensional images.These images are generated from capnography signals transformed via the GAF method.The network begins with an initial 3 × 3 convolutional layer for preliminary feature extraction.This is followed by the application of two successive inception modules to deepen the feature analysis.Subsequently, a global average pooling layer prepares the extracted features for the final classification stage in the fully connected layer.To prevent overfitting, a dropout mechanism with a rate of 0.4 is applied after the fully connected layer.Additionally, all convolutional layers are designed with zero-padding to maintain the spatial dimensions of the input through each processing stage, ensuring that the network preserves the integrity of spatial resolution throughout its architecture.

Evaluation Metric
We use accuracy, precision, recall, and F1 score to evaluate the performance of models thoroughly.Accuracy indicates the rates of all samples are correctly classified.The formula is as follows: Recognizing the limitations of the accuracy metric in the context of unbalanced classes, we also evaluated our model using precision, recall, and the F1 score.These metrics are essential for a holistic assessment of model performance, especially in medical diagnostics where the cost of false negatives can be significant.

Evaluation Metric
We use accuracy, precision, recall, and F1 score to evaluate the performance of models thoroughly.Accuracy indicates the rates of all samples are correctly classified.The formula is as follows: Recognizing the limitations of the accuracy metric in the context of unbalanced classes, we also evaluated our model using precision, recall, and the F1 score.These metrics are essential for a holistic assessment of model performance, especially in medical diagnostics where the cost of false negatives can be significant.
Precision indicates the rates of positive samples are correctly classified among positive predictions.The formula is as follows: Recall indicates the rates of positive samples are correctly classified among samples that are truly positive.The formula is as follows: where TP = true positive, which is the number of correctly classified positive samples; FP = false positive, incorrectly classified negative samples; TN = true negative, correctly classified negative samples, and FN = false negative, incorrectly classified positive samples.
Regarding the models' composite performance, we used F1 scores for inter-indicator trade-offs and calculated them similarly for each task.

Subjects
In this study, a total of 1007 participants were enrolled.The assessments took place at the China-Japan Friendship Hospital, where participants underwent spirometry and volumetric capnography collection.Following the GOLD guidelines, a diagnosis of COPD was confirmed in individuals exhibiting a post-bronchodilator FEV1/FVC ratio of less than 0.7.The grading of airway obstruction was determined based on the ratio of actual to predicted FEV1 values, as detailed in Table 1.
Table 1.GOLD grades and severity of airflow obstruction in COPD (based on post-bronchodilator FEV1).

Severity Airflow Obstruction
Very Severe FEV1 < 30% predicted Subjects demonstrating abnormal pulmonary functions underwent bronchodilator inhalation to assess the reversibility of airflow limitation, adhering strictly to clinical standards for Pulmonary Function Tests (PFTs).Records not meeting the established criteria were excluded from the study.Table 2 presents a descriptive analysis of the study participants, categorized into a total group (n = 1007), a normal group (n = 279), and a COPD group (n = 148).The COPD group was further divided into mild (n = 58), moderate (n = 51), severe (n = 34), and very severe (n = 5) subgroups based on their condition's severity.During the capnography collection process, participants were instructed to breathe naturally and calmly.After identifying three natural breathing cycles, the formal signal collection commenced for a specified duration, repeated three times to ensure the consistency and reliability of the data collected.

Experimental Environment
The proposed model was developed using Python 3.11.7 and PyTorch 2.2.1, and all experimental validations were conducted on a system running Ubuntu 18.04, powered by an NVIDIA GeForce RTX 3090 GPU with 24 GB of RAM.

Evaluation of the Proposed Model on COPD Detection
After preprocessing, the volumetric capnograms were transformed by GASF and GADF.These transformed data were then fed into CapnoNet for feature extraction, leveraging the network's capability to identify significant patterns.The model employed the Adam optimizer to update network parameters and used the cross-entropy function as the loss function.Grid searching was utilized to find the optimal hyperparameters.The initial learning rate was set at 0.001, and the batch size at 32. Ten-fold cross-validation with stratified sampling was used to ensure that each fold of the dataset accurately represents the class distribution found in the entire dataset.
The two-dimensional matrices obtained from GADF or GASF transformations (GADF-VCap or GASF-VCap) were used as inputs to CapnoNet, maintaining the same data preprocessing and model training procedures.
Table 3 illustrates the performance on CapnoNet in detecting COPD.It is observed to effectively identify the COPD disease state and differentiate it from a healthy state.The model, when utilizing GASF-VCap as the input achieved its optimal performance, with an accuracy of 95.83%, a precision of 95.21%, a recall of 95.70%, and an F1 score of 95.45%.In the context of disease diagnosis, recall (or sensitivity) and the F1 score are of paramount importance as they indicate the model's ability to correctly identify positive cases without missing those with the disease.Compared to using GADF-VCap as the input, it is observed that using GASF-VCap as the input improves the model's performance in terms of recall and F1 score by 2.48% and 2.70%, respectively.This improvement is visually corroborated by the confusion matrix depicted in Figure 6, which illustrates GASF-VCap capability in recognizing both healthy subjects and those with COPD.

Evaluation of the Proposed Model on COPD Grading
Table 4 shows the results on COPD grading.The accuracy, precision, recall, and F1 score of the proposed model are 96.36%,88.49%, 89.99%, and 89.15%, respectively.Figure

Evaluation of the Proposed Model on COPD Grading
Table 4 shows the results on COPD grading.The accuracy, precision, recall, and F1 score of the proposed model are 96.36%,88.49%, 89.99%, and 89.15%, respectively.Figure 7 presents a confusion matrix to visually demonstrate the model's accuracy across the different COPD severity levels.It is particularly noteworthy that CapnoNet exhibited good ability in identifying severe and very severe COPD patients.Additionally, when differentiating the more challenging mild COPD cases, CapnoNet managed to capture the subtle variations between different COPD stages.However, the model's relatively lower performance in accurately identifying moderate COPD cases suggests a need for further refinement.

Evaluation of Data Augmentation Strategies
To assess the effectiveness of the proposed data augmentation strategies, GASF-VCap was employed as the source data input into the CapnoNet model for an ablation experiment.Gaussian noise was added to GASF-VCap, and elastic transformations were applied.Following data augmentation, the original training dataset was expanded to three times its size.Specifically, Gaussian noise with a mean of 0 and a variance of 15 was added to increase variability, and elastic transformations, which simulate natural variations in the data by stretching and distorting the input images, were applied with the pa-

Evaluation of Data Augmentation Strategies
To assess the effectiveness of the proposed data augmentation strategies, GASF-VCap was employed as the source data input into the CapnoNet model for an ablation experiment.
integrity and the detailed pattern information emerge as crucial for the effective diagnosis and grading of COPD.
Furthermore, the evaluation of CapnoNet's training and computational complexity, quantified by measuring its parameter size and floating-point operation (FLOP) requirementscomprising 1.02 million parameters and necessitating only 0.23 GFLOPs per forward passunderscores the model's potential for deployment in resource-constrained environments, enhancing its applicability in real-world scenarios.This aspect highlights the model's suitability for widespread clinical use, especially in settings where computational resources are limited.
Nevertheless, this study has limitations.Firstly, our dataset was derived from a single center, lacking validation from out-of-hospital subjects, which may affect the external validity of the results.Secondly, the distribution of COPD patients of varying severity levels was uneven in our outpatient-based study population, particularly with fewer severe and very severe cases, limiting the model's generalizability across a broader population.Moreover, although the CapnoNet network demonstrated potential in preliminary studies, as a relatively simplified deep learning architecture, it still has room for improvement and optimization.Given the potential of deep learning technology in handling complex medical data, future research will aim to expand the sample size, incorporate external validation sets, and further refine the network architecture to enhance the model's accuracy and generalizability.

Conclusions
To the best of the authors' knowledge, this study represents the first instance of volumetric capnography (VCap) data being analyzed through imaging techniques for quantitative analysis.A novel method was introduced for diagnosing and grading COPD using image-based capnography.By applying GAF transformation, capnography images are converted into two-dimensional grayscale images, and accurate COPD diagnosis and airway obstruction grading are achieved through a cascading CNN-Inception network.Furthermore, an image enhancement algorithm incorporating gaussian noise and elastic distortion is utilized to mitigate the variability of respiratory fluctuations, with ablation studies confirming the effectiveness of this strategy.The results on our own dataset demonstrate that the proposed CapnoNet model exhibits excellent classification performance, accurately distinguishing between COPD patients and healthy individuals and identifying different patterns of airway obstruction.In conclusion, this study is the first to transform traditional capnography data into image format, providing a new perspective for the quantitative analysis of VCap.The proposed CapnoNet model provides an effective tool for the early diagnosis and treatment of COPD.This work adeptly tackles the challenges that existed previously in COPD diagnosis.This advancement enables the enhanced remote monitoring and management of COPD patients, significantly contributing to improved healthcare delivery.

Figure 2 .
Figure 2. The diagram of data preprocessing.

Figure 6 .
Figure 6.The confusion matrixes of the CapnoNet model on COPD detection.(a) The confusion matrix with GADF-VCap as model input; (b) The confusion matrix with GASF-VCap as model input.

Figure 6 .
Figure 6.The confusion matrixes of the CapnoNet model on COPD detection.(a) The confusion matrix with GADF-VCap as model input; (b) The confusion matrix with GASF-VCap as model input.

Figure 7 .
Figure 7.The confusion matrixes of the CapnoNet model on COPD grading.(a) The confusion matrix with GADF-VCap as model input; (b) The confusion matrix with GASF-VCap as model input.

Figure 7 .
Figure 7.The confusion matrixes of the CapnoNet model on COPD grading.(a) The confusion matrix with GADF-VCap as model input; (b) The confusion matrix with GASF-VCap as model input.

Table 2 .
Description of subjects.

Table 3 .
Performance of the proposed model in COPD detection.

Table 4 .
Performance of the proposed model in COPD grading.
16oengineering 2024, 11, x FOR PEER REVIEW 12 of167 presents a confusion matrix to visually demonstrate the model's accuracy across the different COPD severity levels.It is particularly noteworthy that CapnoNet exhibited good ability in identifying severe and very severe COPD patients.Additionally, when differentiating the more challenging mild COPD cases, CapnoNet managed to capture the subtle variations between different COPD stages.However, the model's relatively lower performance in accurately identifying moderate COPD cases suggests a need for further refinement.

Table 4 .
Performance of the proposed model in COPD grading.