Deep Learning-Based Analysis of the Effect of Cardiac Color Ultrasound on Chronic Obstructive Pulmonary Disease under Mask Region

*is study was developed to analyze the application effect of cardiac ultrasound (CUS) in chronic obstructive pulmonary disease (COPD) patients. A mask region-based convolutional neural network (Mask R-CNN) algorithm was constructed for lung disease detection based on deep learning algorithms, and it was compared with the RetinaNet algorithm for lung disease detection. *e results showed that the sensitivity, specificity, accuracy, and running time of the Mask R-CNN algorithm were statistically greater than those of the RetinaNet algorithm (P< 0.05). A total of 92 cases confirmed with lung diseases by pathology were set as experimental group, including 23 cases of COPD classification for level I, II, III, and IV. In addition, 20 cases of healthy adults were selected as control group.*e experimental group was compared with the control group, as the lung function decreased, the right atrium diameter (RAD), right ventricle diameter (RVD), and the right ventricular anterior wall thickness (RVAW) increased, the right ventricular ejection fraction (RVEF) gradually decreased, and the AWT-RV, the interventricular septal thickness (IVST), and right ventricular end-diastole volume (RVEDV) changed greatly in the lung function classification (P< 0.01). It was concluded that the CUS based on the Mask R-CNN algorithm could show the changes in bronchial lumen volume at all levels and could detect and evaluate the lung function diseases.


Introduction
Chronic obstructive pulmonary disease (COPD) is a respiratory disease that can be prevented and treated. e main pathological features of COPD are persistent respiratory symptoms and pulmonary ventilation dysfunction caused by tracheal airflow limitation [1,2]. e main cause is the abnormal lung inflammation caused by the inhalation of harmful gases or the continuous inhalation of particulate matter [3,4]. COPD is composed of chronic bronchitis and emphysema, and the incomplete reversibility of airflow is the most important clinical feature of COPD [5]. As the condition of COPD patients continues to deteriorate, pulmonary artery pressure (PAP) will gradually increase, right ventricular pressure load will gradually increase, RAVW is thickened, RVEDV and right atrium and right ventricle compensatory increase, and the lung function will gradually decrease. e earlier the intervention for COPD, the greater the benefit of the patient, so the early detection of lung disease has important clinical significance [6,7].
Lung function measurement (LFM) is a gold indicator for evaluating lung function. LFM can objectively and accurately reflect the patient's ventilation function, thereby guiding the patient's clinical treatment. Forced expiratory volume in one second (FEV1) and forced vital capacity (FVC) are important predictors of mortality, hospitalization, or other critical clinical outcomes. After inhaling bronchodilators in COPD patients, FEV1/ FVC < 70% is the diagnostic standard. However, the current pulmonary function examination for the diagnosis of COPD is subject to more interference, which will affect the diagnosis results, and its specificity and accuracy are low [8][9][10]. CUS (cardiac ultrasound) is a kind of echocardiography. e working principle is a noninvasive examination method that uses ultrasonic echo to explore the anatomical structure and functional status of the heart and large blood vessels. With the continuous development of technology in recent years, new cardiac imaging diagnostic technology has been applied to the clinic, which can measure the right atrium transverse diameter (RATD), right ventricular anterior wall (RVAW), interventricular septal thickness (IVST), right ventricular end-diastolic volume (RVEDV), right ventricular end-systolic volume (RVESV), right ventricular artery diameter (RVAD), pulmonary artery pressure (PAP), and right ventricular ejection fraction (RVEF). Compared with the traditional indexes, focal adhesion complex (FAC), and RVEF for evaluating the right ventricular function, it has a good correlation with the overall strain of the right ventricle, which can examine and evaluate all chambers and heart function and analyze the lung function, lung morphological changes, and heart morphological changes of patients with COPD [11] so as to provide reference for the early prevention and diagnosis of COPD.
At present, artificial intelligence (AI) deep learning technology has occupied an increasingly important position in the medical field. e application of AI deep learning technology to the diagnosis of CUS can not only assist doctors in diagnosis but also save many lives [12]. Lung diseases are prone to misdiagnosis and missed diagnosis due to the lack of experience of doctors. When large amounts of image data are compared and analyzed, the workload is heavy and energy and time demand are high. e application of deep learning technology to image analysis can greatly reduce the work of doctors and improve the work efficiency [13]. e mask region convolutional neural network (MASK R-CNN) model proposed in this study based on deep learning technology was a two-stage model algorithm that integrated classification, detection, and segmentation. e proposed algorithm removed the segmented branches and adjusted the network structure so that only the detection and classification were performed; in addition, the training method was adjusted to enable better observation and classification of lung lesions, improving the accuracy of lung disease detection greatly.
In this study, MASK R-CNN was innovatively introduced into cardiac color Doppler ultrasound for graphic analysis of images, so as to facilitate the description of patients' key imaging diagnosis and treatment sites, so as to assist physicians in the diagnosis of chronic obstructive pulmonary disease and improve the clinical diagnosis efficiency and accuracy of COPD. In this study, 92 patients diagnosed with COPD and 20 healthy adults were selected as the research objects. Color Doppler echocardiography based on the detection of the MASK R-CNN algorithm was used for diagnosis, and the changes of the two observation indexes were, respectively, discussed to verify their clinical value.

Study Sample and
Grouping. 92 patients with lung disease who were admitted to our hospital from January 20, 2019, to February 15, 2020, were selected as the experimental group of subjects and were classified into four grades (I, II, III, and IV) according to the different grades of COPD, with 23 cases in grades. 20 normal healthy adults were included in the control group. In addition, 20 cases of healthy adults were selected as control group. e experimental group and control group adopted the MASK R-CNN model, and COPD patients were analyzed and classified by CUS. e study had been approved by the Medical Ethics Committee of hospital. e patients and their families had understood the research situation and signed the informed consents.
e inclusion criteria were defined as follows: patients who were diagnosed with pulmonary disease through clinical pathology; patients who were voluntarily undergoing various examinations; and patients who had clear consciousness and were able to cooperate with the research normally.
e exclusion criteria were defined as follows: patients with acute COPD and other complications; patients with left ventricular insufficiency; and patients who withdrew from the experiment due to their own reasons.

Research Methods.
Philips IE33 was adopted for CUS examination, the probe was S5-1, frequency was 1-5 MHz, and two-dimensional image frame rate was 50 frames/s. e patient under examination was required to take the right decubitus position and connected to the synchronous lead electrocardiogram.
e RT-3DE probe was adopted for three-dimensional imaging of heart structure, and the image segmentation and rotation technology were combined to acquire the real-time three-dimensional images of right ventricle in full volume. e sizes of right atrium and ventricular cavity were measured, and the heart chamber volume was measured rapidly. e right heart volume automatic analysis software was started to trace the apical fourchamber view, the left ventricular short-arm view at the level of the mitral valve, and the right ventricular end-systolic and end-diastolic endocardial limbus in the right ventricular outflow tract view. e images were imported into a random workstation for postprocessing, so as to construct a threedimensional model of the right ventricle.

Construction of MASK R-CNN Model.
Mask R-CNN is a two-stage detection model. e proposals were generated in the first stage, and the classification and generation of bounding boxes and masks were realized in the second stage. It included three branches: classification branch, regression branch, and segmentation branch. Because the labeling of the lung chest radiograph image was a detection labeling format and could not be segmented, the segmentation module and segmentation loss function were directly subtracted in the construction of this calculation [14].
As shown in Figure 1, after the image was inputted into the network, its features were extracted by the Backbone network firstly to obtain a labeled map. Each mapping point of the image could form a lot of anchors, which were processed with the image classification and regression analysis. If the shape and size of the image at this time were inconsistent, it would be unable to connect with the subsequent full connection. erefore, the labeled map could enter a Roi align module for normalization using the bilinear difference. e normalized labeled map could be linked with the classification and regression loss function by full connection, and finally the prediction result could be obtained.
Loss function of the algorithm consisted of two parts. e first part was the loss function of the PRN layer, which was the loss function of the first stage of the model; the second part referred to the loss function after the full connection, which was the loss function of the second stage of the model. e total loss function was the sum of the loss functions of the first and second stage, and it could be written as follows: (1) In the above equation, A 1 refers to the loss function in the first stage and A 2 is the loss function in the second stage. In the two stages of the algorithm, there was a nonstandard loss function and a regression loss function. e equation of loss function in each stage was as follows: e algorithm could generate a large number of anchors in the first stage. e loss function in the first stage classified and regressed these anchors, which was the normalization after the first classification and regression. After the Roi align operation, it entered the second stage. e total loss function of the stage was the adjustment of the results of the first stage, and the results of the second stage and retrograde classification and regression would be more accurate. e classification loss function here referred to the cross-entropy loss function, equation of which was given as follows: In equation (3), y i � y z , y x , y c , y s is a vector, which represented the 4 parameterized coordinates of the predicted value defender; y * i represents the coordinate vector of the true coordinates corresponding to the predicted value encasing box; and T is the loss function of smooth A1 , which is expressed as follows: e setting of the loss function smooth A1 could make loss more robust to outliers, so that it was not sensitive to outliers and abnormal values, causing that it was difficult to run away during training. Compared with the single-stage RetinaNet algorithm, there were two additional parts for the model algorithm: image classification and regression function comparison. e algorithm greatly improved the accuracy of diagnosis.

Evaluation Indicators of the Algorithm.
e Mask R-CNN algorithm was adopted, and its performance was evaluated based on accuracy, sensitivity, specificity, and running time, which could be calculated with the following equations: In equations (5)- (7), Y True represents the number of cases with correct predictions, Total represents the total number of cases, TP represents true positives, TN represents true negatives, FP represents false positives, and FN refers to false negatives.

Statistical Methods.
e research data processing adopts SPSS19.0 version statistical software analysis and measurement data using the mean ± standard deviation (x + s), and count data are expressed in percentage (%). e general clinical data of male and female patients were pairwise compared, and one-way ANOVA was performed. In this paper, the least significant difference (LSD) method will be used to analyze the difference between the two groups of diagnostic data, and the result is expressed as F. e difference was statistically significant at P < 0.05. Scientific Programming higher sensitivity, specificity, and accuracy, and shorter running time compared with the RetinaNet algorithm, with statistical differences (P < 0.05).

Basic Data of Patients.
ere were 92 standard patients included in this study, including 60 male patients (65.22%) and 32 female patients (34.78%) (as illustrated in Figure 4). e patients were 28∼60 years old, and the average ages of male and female patients were 46.43 ± 10.19 years and 42.19 ± 12.34 years, respectively. e average weights of male and female patients were 71.55 ± 10.19 kg and 60.41 ± 9.78, respectively. e average heights of male and female patients were 177.12 ± 10.51 cm and 160.72 ± 6.23 cm, respectively ( Figure 5).
According to the diagnosis results, there was no statistical significance between gender and height and weight (P > 0.05). Figure 6 shows the CUS manifestations of a male patient with lung disease (61 years old). CUS showed that the overall heart was enlarged (the size of the right ventricle was still within the normal range), and the wall motion of the left ventricle was not reduced but was obviously enhanced. e heart function was 71%, the heart rate was about 70 beats, and the mitral valve cusps were separated with a space of approximately 4 mm.

Detection Results of Lung Function for Patients in Different Grades of COPD.
e detection results of lung function of patients with different grades of COPD are compared and shown in Figure 7. It revealed that as the lung function decreased, the patient's FEV1 (F � 6.982; P < 0.001) and FEV1/FVC (F � 67.19; P < 0.001) showed both decreasing trend while the residual volume/total lung capacity (RV/ TLC) (F � 127.028; P < 0.001) showed an increasing trend. Figures 8 and 9 show the morphological changes of the right atrium and right ventricle of patients in different groups. In contrast to the subjects with normal lung function, the RVAW and diastolic IVST showed obvious increase for patient at grade I (P < 0.05); the RAD and RVD increased dramatically at grades 2 and 3 (P < 0.05). ere were statistical differences among different groups.

Analysis on CUS Manifestations of Patients in Two Groups.
As the lung function of the patient decreased, the patient's RAD (F � 13.89 and P < 0.01), RVD (F � 29.82 and P < 0.01), RVAW (F � 9.17 and P < 0.01), and IVST (F � 6.02 and P < 0.01) showed gradual increasing trends, so they all had morphological changes (as illustrated in Figure 10).
In Figures 11 and 12, RVEDV, RVESV, and RPAD of all patients show gradual increasing trend compared with those of subjects with normal lung function. In addition, RPAD increased greatly at grade IV (t � 4.04∼7.02 and P < 0.01); RVEDV and RVESV increased obviously in the early stage of COPD and showed observable differences in grades 1 and 2, with statistically meaningful differences (P < 0.01). RPAD and EF changed greatly in the middle and late stages of the patient's lung disease, showing remarkable differences between the grade 2 and grade 3 (P < 0.01). With the decrease in lung function of patients, the EF of patients showed a gradual downward trend as shown in Figure 12, which was statistically and greatly different in contrast to other groups (F � 37.02 and P < 0.01).

Discussion
Lung is a particularly important organ in the respiratory system. COPD is the most common and frequent chronic disease in the respiratory system. Choosing a fast, convenient, and time-saving method for disease detection can greatly improve the efficiency of COPD diagnosis and treatment [15]. e deep learning methods were adopted to research and design the target detection algorithm for lung diseases because the Mask R-CNN algorithm showed strong practicability, high disease diagnosis accuracy, and short diagnosis time.
e results showed that the sensitivity, specificity, accuracy, and running time of the Mask R-CNN algorithm were 97.67%, 90.72%, 95.71%, and 10.72 ± 4.87 seconds, showing higher sensitivity, specificity, accuracy, and shorter running time in contrast to the RetinaNet algorithm with notable differences in statistical view (P < 0.05). It indicated that the algorithm proposed had a better performance in improving the diagnostic effect of CUS, which was similar to the research results of Zhang et al. [16]. It suggested that the proposed algorithm could not only * *  improve the diagnosis effect but also shorten the calculation time and improve the overall diagnosis efficiency. e detection results for lung function of patients with different grades of COPD showed that the FEV1/FVC and FEV1 showed decreasing trends, while the RV/TLC of the patient showed upward trends with the decrease in lung function. It indicated that as the worse the disease, lung function gradually showed a downward trend, and early diagnosis and prevention were required. e Mask R-CNN algorithm was applied to the CUS of COPD. e morphological changes of the right atrium and right ventricle of patients with different grades of COPD indicated that compared with normal lung function of patients, RVAW * * *   and diastolic IVST were increased visibly at grade I (P < 0.05) and RAD and RVD increased obviously at grades 2 and 3 (P < 0.05). In addition, RAD (F � 13.89 and P < 0.01), RVD (F � 29.82 and P < 0.01), RVAW (F � 9.17 and P < 0.01), and IVST (F � 6.02 and P < 0.01) of patients gradually increased. With the decrease in lung function, RAD, RVD, RVAW, and IVST all showed morphological changes, and RVEDV, RVESV, and RPAD all showed gradual increase trends. RPAD showed great increase at grade IV (t � 4.04∼7.02 and P < 0.01). RVEDV and RVESV showed obvious increase in the early stage of COPD, showing remarkable differences between grade 2 and grade 1 (P < 0.01). e RPAD and EF changed hugely in the middle and late stages of the patient's lung disease, and there were observable differences between grade 2 and grade 3 (P < 0.01). e results showed that CUS could well reflect the patient's lung disease, which was helpful for doctors to diagnose. is was similar to the results of Davis et al. [17], indicating that CUS analysis of COPD could greatly improve the diagnosis accuracy of the disease and improve the efficiency of diagnosis and treatment.

Conclusion
e Mask R-CNN algorithm for lung disease detection was constructed based on deep learning algorithms, and it was compared with the RetinaNet algorithm.
e research conclusions showed that the use of the Mask R-CNN algorithm to detect and diagnose patients with CUS could effectively improve the speed and efficiency of COPD diagnosis and treatment. e RAD, RVD, RVAW, IVST, RVEDV, RVESV, RPAD, PAP, and EF of the patients with different grades of lung function were better than those of the control group. Experiments had proved that CUS on COPD patients based on the Mask R-CNN algorithm could effectively improve the diagnosis efficiency of the disease and greatly save labor costs. It could well assist the medical staff to identify and detect the disease and had a high clinical promotion value and significance.
However, the selected patient sample size was small, which could cause certain deviation. In addition, the restrictions on test time and equipment use could affect the results to a certain degree. erefore, the scope of application of the research results was relatively small. In subsequent studies, the sample size of patients will be increased and the scope of the study will be expanded to further explore the treatment of COPD. In short, the results of this article provided a reliable reference and significance for the treatment of COPD.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.   Figure 11: Comparison of morphological changes for heart of patients. Note: * means t � 2.03 and P < 0.01 in contrast to the control group; * indicates t � 3.32∼7.56 and P < 0.01, and * * suggests t � 3.02∼5.81 and P < 0.01 in contrast to the patient at grade I.  Scientific Programming