Lung function and respiratory muscle function measuring method, system and equipment
Through the combination of deep learning and MRI dynamic images, the UNet segmentation model is constructed, which solves the problem that the existing technology is difficult to identify respiratory myopathy early and comprehensively evaluate respiratory muscle function, and realizes quantitative evaluation of lung function and respiratory muscle function, which is suitable for a variety of patient groups.
Patent Information
- Application Number
- CN202411688241.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing pulmonary function instruments are difficult to identify patients with mild respiratory myopathy early, and cannot comprehensively evaluate respiratory muscle function, especially when patients with poor lung function cannot cooperate with the examination.
A deep learning method combined with MRI dynamic images was used to construct a UNet segmentation model. By pre-processing and segmenting the MR images, parameters such as diaphragm length, lung volume and movement area were calculated to achieve quantitative evaluation of lung function and respiratory muscle function.
It has achieved early identification and comprehensive evaluation of respiratory muscle function, made up for the shortcomings of pulmonary function instruments, can be suitable for patients with poor lung function, and provides reliable measurement indicators for the treatment of patients with end-stage renal disease.
Smart Images

Figure CN119723236A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical detection technology, and in particular to a method, system and equipment for measuring lung function and respiratory muscle function. Background Art
[0002] The importance of respiratory function to the human body is self-evident. Respiratory movement not only directly affects lung function, but also affects the hemodynamics of the heart, thereby affecting cardiac function. At present, the functional status of respiratory muscles has not received enough attention for its important role in the human body. The main reason is that clinical evaluation methods are limited. At present, the clinical evaluation method for lung function is spirometry. The evaluation of respiratory muscle strength and function includes: maximum inspiratory pressure, transdiaphragmatic pressure measurement, electromyography, and ultrasound. Among them, spirometry measures lung function and mainly focuses on understanding the overall situation of lung function. The quality of this examination is closely related to the patient's cooperation in the examination, and the examination results are affected by airway lesions; maximum inspiratory pressure is a classic method for testing the strength of spontaneous inspiratory muscles. Its measurement is to make the maximum inspiratory effort in a closed airway environment and take the maximum sustained oral pressure lasting for 1 second; the transdiaphragmatic pressure is measured by placing a balloon catheter through the nose in the esophagus and lower stomach, measuring the gastric pressure and esophageal pressure. The difference between the two is the transdiaphragmatic pressure, which is currently considered to be the gold standard for evaluating respiratory muscle strength. It generates transdiaphragmatic pressure through electrical or magnetic stimulation of the cervical phrenic nerve, eliminating the effects of the subject's respiratory effort and method of exertion on the transdiaphragmatic pressure; electromyography can be used to distinguish between respiratory muscle weakness caused by neurological and muscular causes; ultrasound is convenient to examine, has good repeatability, is radiation-free, non-traumatic, low-cost, and the technology is easy to widely promote, etc., and is a commonly used examination method in clinical practice.
[0003] However, the pulmonary function test using a spirometry instrument cannot identify patients with mild respiratory muscle lesions and compensatory lung function at an early stage. Patients with poor lung function cannot cooperate with the test and their lung function cannot be monitored and followed up. For patients whose lung function is decreased as indicated by the spirometry test, the test cannot indicate the location of respiratory muscle lesions. Therefore, we propose a method, system and equipment for measuring lung function and respiratory muscle function. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and equipment for measuring lung function and respiratory muscle function to solve the problems raised in the above background technology.
[0005] According to the first aspect of the present invention, in order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for measuring lung function and respiratory muscle function, specifically comprising the following steps:
[0006] Receiving MR image data, preprocessing the MR image data, and screening out MR image data with high image quality to form an image data set;
[0007] The image dataset is divided into training set, validation set and test set according to 5:2:1;
[0008] A UNet segmentation model is constructed and trained using an image dataset. The UNet segmentation model is based on a UNet network, an ADN module is introduced after each convolutional layer, and a plurality of residual modules are introduced into the network.
[0009] The trained UNet segmentation model is used to process the original MR images to obtain the lung Label file in nifti format;
[0010] According to the coordinate information in the Label file, the maximum diaphragm length, minimum diaphragm length, maximum C-Cdiameter1, minimum CC diameter1, maximum CC diameter2, minimum C-Cdiameter2, maximum A-Pdiamter, minimum AP diamter, diaphragm motion area, thoracic motion area and lung volume are calculated.
[0011] Furthermore, the MR image data is acquired by scanning with a 3.0T superconducting MR scanner, as follows:
[0012] (1) Under normal breathing conditions, the subjects were scanned during tidal breathing, and the chest was scanned with two-dimensional cine MRI. Each subject was scanned along two axial planes, namely, the level of the upper edge of the aortic arch and the level of the upper edge of the right atrium, a sagittal plane, namely, the cross-section of the right lung along the midclavicular line, and a coronal plane, namely, the level of the lung apex;
[0013] (2) Take a deep breath, inhale deeply and hold your breath, then perform a full lung scan; take a deep breath, hold your breath, then perform a full lung scan.
[0014] Furthermore, the MR image data is preprocessed as follows:
[0015] (1) Use MRICron to convert all Dicom format image data into Nifti format;
[0016] (2) Slicer 5.1.0 software was used to evaluate the signal-to-noise ratio of the image:
[0017] The subcutaneous muscle (pectoral muscle) tissue ROI was selected as the ROI for signal-to-noise ratio evaluation. The ROI was outlined in the Slicer software, and the image enhancement mean and standard deviation of the ROI were extracted. The signal-to-noise ratio (SNR) is the ratio of the ROI image enhancement mean (Mean) to the standard deviation (SD), and the calculation formula is: SNR = Mean / SD;
[0018] (3) Slicer 5.1.0 software was used to repeatedly outline the lung contours of the whole lung cross section in the image. For patients with pleural effusion, the pleural effusion part was included in the outlined ROI, and the average Dice index of the outlined ROI was calculated. The image with a high Dice index was selected as the standard image.
[0019] Furthermore, after dividing the image dataset into training set, validation set and test set, it is also necessary to use the RandCropByPosNegLabeld and RandRotate90d functions in monai.transforms to amplify the training images.
[0020] Further, the ADN module includes an instance normalization function, a Dropout function and a PReLU activation function;
[0021] The instance normalization function is used to keep the model stable during training, the Dropout function is used to prevent overfitting, and the PReLU function is used to provide a nonlinear activation function.
[0022] Furthermore, the residual modules are set to be multiple, each residual module includes two convolution operations, and the residual paths of some residual modules are set to be identical mapping.
[0023] Furthermore, in the UNet segmentation model, upsampling is achieved by transposed convolution, and downsampling is achieved by increasing the step size of the convolution layer.
[0024] Furthermore, according to the coordinate information in the Label file, the maximum diaphragm length, minimum diaphragm length, maximum CC diameter1, minimum CC diameter1, maximum CC diameter2, minimum CC diameter2, maximum AP diamter, minimum AP diamter, diaphragm motion area, thoracic motion area and lung volume are calculated:
[0025] (1) Use Python's nibabel package to read the generated nifti format lung label file, find the coordinate of the point with the maximum Y coordinate in the label, which is the lung vertex, record the point with the lowest Y coordinate in the label from front to back according to the X coordinate, record the coordinate array of each point of the diaphragm top lung bottom curve, find the point with the largest Y value in the coordinate array of the diaphragm top lung bottom curve, which is the highest point of the diaphragm top lung bottom, find the minimum X coordinate and the maximum X coordinate with the same Y value in the horizontal direction of the highest point of the diaphragm top lung bottom, the line connecting these two points is the horizontal tangent line AP Line1 of the highest point of the diaphragm top lung bottom, and the difference of the X coordinates of the two points multiplied by the horizontal length of the voxel is A-Pdiameter;
[0026] (2) Find the minimum and maximum points of the X value in the coordinate array of the diaphragm top and lung base curves. The horizontal distance line between the two points is AP Line2, and the difference of the X coordinates of the two points multiplied by the horizontal length of the voxel is AP diameter2;
[0027] (3) Draw a perpendicular line CC line from the lung apex to the horizontal tangent of the highest point of the diaphragmatic top and lung base. The difference between the Y coordinates of the lung apex and the tangent line multiplied by the vertical length of the voxel is CC diameter1;
[0028] (4) Calculate the CC diameter1 of each lung label in the image data set and record it in the C-Cdiameter array. Observe the fluctuation of CC diameter over time and find the maximum and minimum values of the array, which are the maximum deep inspiration phase and the maximum deep exhalation phase, respectively. Then calculate the number of all voxels whose coordinates are below the diaphragm top and lung base curve of the maximum abdominal deep exhalation phase label. Multiply the number of voxels by the voxel area to obtain the lung base-diaphragm motion area.
[0029] (5) The diaphragm top and lung base curves of the maximum abdominal deep inspiration phase Label and the minimum abdominal deep inspiration phase Label were fitted using the polynomial fitting method, and the length of the diaphragm top and lung base curves of the maximum inspiration phase and the maximum expiration phase was calculated using the integral method, which is the maximum lung base diaphragm length and the minimum lung base diaphragm length:
[0030] (6) Calculate the AP diameter of each lung label in the image data set and record it in the A-Pdiameter array. Observe the fluctuation of AP diameter over time and find the maximum and minimum values of the array, which are the maximum thoracic deep inspiration phase and the maximum thoracic deep exhalation phase, respectively. Record the coordinates of the lung anterior boundary curve at the minimum point of the X coordinate of each row of voxels to obtain a coordinate array. Calculate the number of all voxels whose coordinates are located above the diaphragm top and lung base curve of the maximum thoracic deep exhalation phase label and in front of the lung anterior boundary curve. The number of voxels obtained multiplied by the voxel area is the thoracic motion area.
[0031] (7) Using the label file of the segmented whole lung cross section, calculate the total number of voxels whose values are not 0, and then multiply it by the volume of a single voxel to obtain the whole lung volume.
[0032] According to a second aspect of the present invention, the present invention provides a lung function and respiratory muscle function measurement system for implementing the above-mentioned lung function and respiratory muscle function measurement method, which specifically includes the following:
[0033] A preprocessing module is used to receive MR image data, preprocess the MR image data, and screen out MR image data with high image quality to form an image data set;
[0034] A partitioning module is used to partition the image dataset into a training set, a validation set, and a test set according to a ratio of 5:2:1.
[0035] A construction module is used to construct a UNet segmentation model and use an image dataset for training. The UNet segmentation model is based on a UNet network, an ADN module is introduced after each convolutional layer, and a plurality of residual modules are introduced into the network;
[0036] The output module is used to process the original MR image using the trained UNet segmentation model to obtain the lung Label file in nifti format;
[0037] The calculation module is used to calculate the maximum diaphragm length, the minimum diaphragm length, the maximum CC diameter1, the minimum CC diameter1, the maximum CC diameter2, the minimum CC diameter2, the maximum AP diamter, the minimum AP diamter, the diaphragm motion area, the thoracic motion area and the lung volume according to the coordinate information in the Label file, calculate the mean absolute error of the corresponding parameters according to the above parameters, and determine the lung function and respiratory muscle function according to the mean absolute error.
[0038] According to the third aspect of the present invention, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the above-mentioned lung function and respiratory muscle function measurement method is adopted.
[0039] The present invention has at least the following beneficial effects:
[0040] 1. The present invention innovatively uses deep learning chest MRI dynamic images to comprehensively evaluate the diaphragm structure and function indicators of hemodialysis patients to quantify the diaphragm function status of this population, making up for the shortcomings of pulmonary function meters that cannot identify patients with mild respiratory muscle lesions and compensatory lung function at an early stage, the shortcomings of pulmonary function meters that cannot indicate the location of respiratory muscle lesions, the shortcomings of patients with poor lung function who cannot cooperate to complete pulmonary function meter examinations and thus cannot monitor lung function, and the shortcomings of diaphragm ultrasound examinations that are too dependent on the operator's professional level and cannot fully reflect the activity of the entire diaphragm. At the same time, it also provides a reliable measurement indicator for the results of future treatment trials for patients with end-stage renal disease.
[0041] 2. The present invention can accurately evaluate the patient's lung function, the structure and function of the respiratory muscles. The examination process is comfortable and can be completed as long as there are no contraindications to MRI examination. The movement of the respiratory muscles and lungs can be objectively, comprehensively and visually displayed, and the temporal and spatial changes of the intercostal muscles, diaphragm and lung tissues with respiratory movement can be distinguished. It is not only non-invasive and painless, but also further expands the applicable population, allowing more patients to benefit, and helps clinicians understand the impact of their respiratory muscle function status on the patient's lung function.
[0042] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a schematic diagram of the process of the method described in Example 1 of the present invention;
[0044] Figure 2 Schematic diagram of the architecture of the UNet segmentation model of the first embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of CC line and AP line of lungs in the first embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the change of AP diameter over time in the first embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the diaphragm movement area according to the first embodiment of the present invention;
[0048] Figure 6 This is a schematic diagram of fitting the diaphragm top and lung bottom curves according to the first embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of the maximum chest movement area according to the first embodiment of the present invention;
[0050] Figure 8 This is a schematic diagram showing a significant correlation between lung volume change and FVC during deep breathing according to Example 1 of the present invention;
[0051] Fig. 9 This is a schematic diagram showing a significant correlation between lung volume change and FEV1 during deep breathing according to Example 1 of the present invention;
[0052] Fig.10 This is a schematic diagram showing a significant correlation between lung volume change and MVV during deep breathing in Example 1 of the present invention;
[0053] Fig.11 This is a schematic diagram showing the significant correlation between lung volume changes during deep inspiration and quiet expiration and IC in Example 1 of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0055] The present invention has achieved a breakthrough in magnetic resonance imaging (MRI) whole lung scanning, and has produced an MRI dynamic movie, which is combined with a computer deep learning method based on a convolutional neural network to evaluate the patient's lung function, respiratory muscle structure and function. The examination process is comfortable and can be completed as long as there are no contraindications to MRI examination. The movement of the respiratory muscles and lungs is objectively, comprehensively and visually displayed, and the temporal and spatial changes of the intercostal muscles, diaphragm and lung tissues with respiratory movement can be distinguished. Not only is it non-invasive and painless, but it also further expands the applicable population, allowing more patients to benefit, and helps clinicians understand the impact of their respiratory muscle function status on the patient's lung function.
[0056] Deep learning is a complex multi-layer neural network structure that automatically learns data representation by converting input information into multi-layer abstractions. It is currently the most advanced machine learning method. Computer-aided medical image analysis based on deep learning has been widely used in disease diagnosis, feature description, disease staging, treatment response evaluation, disease recurrence monitoring, and guiding interventional treatment, surgery, and radiotherapy. The purpose of computer-aided diagnosis (CAD) is to help radiologists accurately and quickly analyze a large number of multimodal images. It was officially approved by the FDA in 1998 as a reference for radiologists to diagnose breast mammography. In recent years, research results in this field have steadily increased. CAD developers use image processing and feature extraction techniques based on domain knowledge to extract image features that can distinguish different states. The extracted features are then used as classifier input predictors, and the weights of the prediction model are adjusted based on the statistical characteristics of a set of training samples to estimate the probability that the image belongs to one of the states. Studies have used deep learning methods to reliably identify the contours of the diaphragm and lung tissue, and to evaluate chest movement, changes in lung area, and the length, movement, and contractility of the diaphragm. However, previous literature has not yet achieved full lung scanning, and only one layer can be scanned, which is of limited value. The breakthrough in MRI whole lung scanning technology will enable a more comprehensive assessment of lung function and the spatiotemporal changes of respiratory muscles under different breathing patterns. It can also distinguish the effects of intercostal muscles and diaphragm on lung function.
[0057] Embodiment 1:
[0058] See also Figure 1-Figure 11 The present invention provides a technical solution: a method for measuring lung function and respiratory muscle function, which specifically comprises the following steps:
[0059] S1. receiving MR image data, preprocessing the MR image data, and screening out MR image data with high image quality to form an image data set;
[0060] S1.1 For the technical solution of this embodiment, the image data is obtained by scanning on a 3.0T superconducting MR scanner (SIEMENSMAGNETOM Vida-XT-64Numaris / X VA20A-04N2), using an 18-unit torso phased array coil as follows:
[0061] (S1.11) Under normal breathing (not deep breathing), the subjects were scanned during tidal breathing, and a two-dimensional movie MRI scan of the chest was performed. Each subject was scanned along two axial planes (the upper edge of the aortic arch and the upper edge of the right atrium), one sagittal plane (the right lung cross-section along the midclavicular line), and one coronal plane (the lung apex level). The MRI movie was recorded for 19 seconds, and the average time difference between each frame was 0.11 seconds. The balanced steady-state free precession sequence and compressed sensing imaging acceleration (total factor = 5) were used to obtain real-time movie images; the sequence parameters were repetition time 109.9 ms, echo time 1.3 ms, excitation flip angle 46°, slice thickness 6 mm, field of view 380×340 mm 2 ;
[0062] (S1.12) In the case of deep breathing, take a deep breath and hold your breath, then scan the whole lung; take a deep breath and hold your breath, then scan the whole lung. The sequence parameters are repetition time 4.0msec, double echo time 1.29msec and 2.52msec, gradient echo sequence length 48, excitation flip angle 9°, slice thickness 3.5mm, field of view 360×270mm 2 ;
[0063] S1.2 According to the technical solution of this embodiment, the MR image data is preprocessed as follows:
[0064] (S1.21) Use MRICron to convert all Dicom format image data into Nifti format;
[0065] (S1.22) The signal-to-noise ratio of the image was evaluated using Slicer 5.1.0 software:
[0066] Since the lungs contain a large amount of gas, which will cause the loss of MR signals, the lungs are not suitable as ROIs for evaluating the signal-to-noise ratio. The subcutaneous muscle (pectoral muscle) tissue ROI is selected as the ROI for signal-to-noise ratio evaluation. The ROI is outlined in the Slicer software, and the image enhancement mean and standard deviation of the ROI are extracted. The signal-to-noise ratio SNR is the ratio of the ROI image enhancement mean Mean to the standard deviation SD, and the calculation formula is: SNR = Mean / SD;
[0067] It should be noted that, in this example, a total of 30 healthy volunteers were included as the image signal-to-noise ratio evaluation group;
[0068] (S1.23) Slicer 5.1.0 software was used to repeatedly outline the lung contours of the whole lung cross section in the image. For patients with pleural effusion, the pleural effusion part was included in the outlined ROI, and the average Dice index of the outlined ROI was calculated. The image with the highest Dice index was selected as the standard image.
[0069] S2. Divide the image dataset into training set, validation set and test set according to the ratio of 5:2:1;
[0070] S3. Construct a UNet segmentation model and use the image dataset for training, wherein the UNet segmentation model is based on the UNet network, an ADN module is introduced after each convolutional layer, and the network introduces multiple residual modules;
[0071] Specifically, in the Python 3.9 environment, the MONAI package (Version 0.8.1) was used to build the UNet segmentation model framework. The operating system was Win10 22H2, the GPU was NVIDIA 3090, and the RandCropByPosNegLabeld and RandRotate90d functions in monai.transforms were used to amplify the training images. A total of 25 subjects' images were included for training, 10 subjects' images were used as validation sets, and 5 subjects' images were used as test sets. Each subject contained 143 sagittal images, 171 coronal images, and 143 cross-sectional images. Sagittal movie images were mainly included for segmentation training.
[0072] The UNet network starts with a convolutional layer that maintains the spatial size (128x128) and extracts features by changing the channel depth. Each convolutional layer is followed by an ADN module, which includes instance normalization (InstanceNorm2d), Dropout function, and PReLU activation function. Instance normalization helps the model remain stable during training, Dropout function is to prevent overfitting, and PReLU provides a nonlinear activation function.
[0073] The UNet network uses multiple residual units, each of which contains two convolution operations. These residual units help solve the gradient vanishing problem that may occur in the training process of deep networks while retaining the important features of the input data.
[0074] The UNet network gradually reduces and restores the image size by alternating downsampling and upsampling operations. Downsampling is achieved by increasing the step size of the convolution layer, which helps the model capture a wider range of contextual information. Upsampling is usually achieved through transposed convolution (ConvTranspose2d) to restore the original size of the image for detailed pixel-level prediction. In some residual units, the residual path is set to an identity mapping, which means that the path only passes the input without any modification. This helps maintain the integrity of the features and prevents information loss during training.
[0075] S4. Use the trained UNet segmentation model to process the original MR image and obtain the lung label file in nifti format;
[0076] Specifically, the UNet network uses the residual unitsAdam optimizer with a learning rate of 0.01. The network diagram is shown in Figure 1 , according to the probability threshold of 0.4, the output probability Figure 2 The value was calculated, and the FillHoles function was used to fill the internal gaps of the ROI and retain the largest continuous ROI component. The automatically generated Label file was saved in Nifti format. The final DICE coefficient of the 2D movie sequence in the Testing group was 0.984, and the average DICE coefficient of the whole lung cross-sectional sequence was 0.937;
[0077] S5. According to the coordinate information in the Label file, the maximum diaphragm length, minimum diaphragm length, maximum CC diameter1, minimum CC diameter1, maximum CC diameter2, minimum C-Cdiameter2, maximum A-Pdiamter, minimum AP diamter, diaphragm motion area, thoracic motion area and lung volume are calculated. The above parameters are strongly correlated with the results of spirometry and are used to indirectly evaluate lung function and respiratory muscle function.
[0078] (S5.1) Use Python's nibabel package to read the generated nifti format lung Label file, find the coordinate of the point with the maximum Y coordinate in the Label, which is the lung vertex, record the lowest Y coordinate point in the Label from front to back according to the X coordinate, record the coordinate array of each point of the diaphragm top lung bottom curve, find the point with the largest Y value in the coordinate array of the diaphragm top lung bottom curve, which is the highest point of the diaphragm top lung bottom, find the minimum X coordinate and the maximum X coordinate with the same Y value in the horizontal direction of the highest point of the diaphragm top lung bottom, and the line connecting these two points is the horizontal tangent line AP Line1 ( Figure 3 red line), the difference between the X coordinates of the two points multiplied by the horizontal length of the voxel is the AP diameter;
[0079] (S5.2) Find the minimum and maximum X-value points in the coordinate array of the diaphragm top and lung base curves. The horizontal distance line between the two points is AP Line2 ( Figure 3 Dark blue line), the difference in the X coordinates of the two points multiplied by the horizontal length of the voxel is the AP diameter2;
[0080] (S5.3) Draw a perpendicular line CC line from the apex of the lung to the horizontal tangent of the highest point of the diaphragm and lung base. Figure 3 Light blue line), the difference between the Y coordinates of the lung vertex and the tangent line multiplied by the vertical length of the voxel is CC diameter1;
[0081] (S5.4) Calculate the CC diameter1 of each lung label in the movie sequence, record it into the C-Cdiameter array, and observe the fluctuation of CC diameter over time ( Figure 4 ), the horizontal axis is the number of frames, a total of 143 frames, the peak is the end of inspiration, the trough is the end of expiration, find the maximum and minimum values of the array, which are the maximum deep inspiration phase and the maximum deep expiration phase, respectively, calculate the number of all voxels whose coordinates are below the diaphragm top and lung base curve of the maximum abdominal deep expiration phase Label, and the number of voxels obtained multiplied by the voxel area is the lung base-diaphragm motion area ( Figure 5 ), the maximum abdominal inspiration phase Label and the maximum abdominal expiration phase Label are superimposed in the figure. The blue-green area is the maximum abdominal expiration phase Label, and the yellow area below the diaphragm top and lung bottom curve of the maximum abdominal expiration phase Label is the maximum diaphragm movement area;
[0082] (S5.5) Use the polynomial fitting method to fit the diaphragm top and lung base curves of the maximum abdominal deep inspiration phase Label and the minimum abdominal deep inspiration phase Label, and use the integral method to calculate the diaphragm top and lung base lengths of the two phases, that is, the maximum diaphragm length and the minimum diaphragm length, such as Figure 6As shown, the horizontal axis in the figure is the X coordinate in the original image, the vertical axis is the inverted Y coordinate (MaxY-Y), the blue line is the original curve, and the red line is the fitting curve. The length of the diaphragm top and lung bottom curve in the maximum inspiratory phase and the maximum expiratory phase is calculated, that is, the maximum lung bottom diaphragm length and the minimum lung bottom diaphragm length. Here is an inverted image;
[0083] (S5.6) Calculate the AP diameter of each lung label in the movie sequence and record it into the A-Pdiameter array. Observe the fluctuation of AP diameter over time, find the maximum and minimum values of the array, which are the maximum thoracic deep inspiration phase and the maximum thoracic deep exhalation phase, respectively. Record the coordinates of the lung anterior boundary curve according to the minimum value of the X coordinate of each row of voxels to obtain a coordinate array. Calculate the number of all voxels in the maximum thoracic deep inspiration phase Label whose coordinates are above the diaphragm top and lung base curve of the maximum thoracic deep exhalation phase Label and in front of the lung anterior boundary curve. The obtained number of voxels multiplied by the voxel area is the thoracic motion area, such as Figure 7 As shown, the C-Cdiameter array is used to find the maximum thoracic inspiratory phase Label and the maximum thoracic expiratory phase Label. After the two phase images are superimposed, the blue-green area is the maximum expiratory phase Label, and the yellow area above the diaphragm top and lung bottom curve of the maximum expiratory phase Label and in front of the maximum expiratory phase Label is the maximum thoracic movement area;
[0084] (S5.7) Using the label file of the segmented whole lung cross section, calculate the total number of voxels whose value is not 0, and multiply it by the volume of a single voxel to obtain the whole lung volume;
[0085] The automatically calculated maximum diaphragm length, minimum diaphragm length, maximum CC diameter1, minimum C-Cdiameter1, maximum CC diameter2, minimum CC diameter2, maximum AP diamter, minimum A-Pdiamter, diaphragm motion area, thoracic motion area, and lung volume were evaluated for accuracy, and the corresponding parameter MAE (Mean Absolute Error Loss) was calculated.
[0086] Next, the technical solution of the present invention is further described in conjunction with specific embodiments:
[0087] 1. Screening of study population
[0088] Thirty healthy volunteers aged 18 ≤ ≤ 75 years were selected. All participants were fully informed of the project and signed informed consent before enrollment. Inclusion criteria: 1) aged 18-75 years; 2) voluntarily signed informed consent; Exclusion criteria: 1) history of mechanical ventilation; 2) history of cardiovascular and cerebrovascular diseases; 3) FEV1 < 70% predicted value, and / or currently using drugs for treating lung diseases: such as β2 receptor agonists, M receptor blockers, glucocorticoids, leukotriene receptor modulators, antihistamines; 4) pulmonary fibrosis; 5) patients receiving immunosuppressive therapy; 6) patients with clear diaphragmatic paralysis; 7) history of malignant tumors in the past 5 years; 8) liver failure: Child-Pugh B, C; 9) pregnancy; 10) patients who are not suitable for chest MRI examination after surgery of exogenous implants; 11) patients with mental disorders, cognitive dysfunction, etc. who cannot cooperate with the examination; 12) patients who participated in other clinical studies in the past 3 months.
[0089] 2. Prospective collection of required clinical data
[0090] Baseline data of patients were collected, including: gender, age, height, weight, medical history, medication history, smoking history, and lung function within 1 month of chest MRI examination;
[0091] 3. Chest MRI
[0092] All scans were performed on a 3.0T superconducting MR scanner (SIEMENS MAGNETOM Vida-XT-64Numaris / XVA20A-04N2) using an 18-element torso phased array coil;
[0093] ①. Under normal breathing (not deep breathing), the subjects were scanned during tidal breathing, and the chest was scanned with two-dimensional movie MRI. Each subject was scanned along two axial planes (the upper edge of the aortic arch and the upper edge of the right atrium), one sagittal plane (the right lung cross-section along the midclavicular line), and one coronal plane (the lung apex level). The MRI movie was recorded for 19 seconds, and the average time difference between each frame was 0.11 seconds. The balanced steady-state free precession sequence and compressed sensing imaging acceleration (total factor = 5) were used to obtain real-time movie images. The sequence parameters were repetition time 109.9 ms, echo time 1.3 ms, excitation flip angle 46°, slice thickness 6 mm, and field of view 380×340 mm 2 ;
[0094] ②. In the case of deep breathing, take a deep breath and hold your breath, then scan the whole lung; take a deep breath and hold your breath, then scan the whole lung. The sequence parameters are repetition time 4.0msec, double echo time 1.29msec and 2.52msec, gradient echo sequence length 48, excitation flip angle 9°, slice thickness 3.5mm, field of view 360×270mm2 ;
[0095] 4. Post-processing of MR data
[0096] Through the above steps S1-S5, the maximum diaphragm length, the minimum diaphragm length, the maximum C-Cdiameter1, the minimum CC diameter1, the maximum CC diameter2, the minimum CC diameter2, the maximum A-Pdiamter, the minimum AP diamter, the diaphragm motion area, the thoracic motion area and the total lung volume (end of inspiration and end of expiration) are calculated;
[0097] 5. Statistical analysis
[0098] ①. Sample size estimation: Use PASS software to estimate the sample size, select Pearson correlation test, assume H1: ρ0≠ρ1, set the test power to 0.9, α=0.05, ρ0=0.0, ρ1=0.7, and calculate that the required sample size is at least 17 cases;
[0099] ② The mean, standard deviation, median, 25th and 75th quantiles, maximum and minimum values were used to describe the distribution characteristics of the measurement data. According to the results of inter-group variance homogeneity, the t or t′ test was selected to analyze the inter-group differences of the measurement data that conformed to the normal distribution, and the Wilcoxon test or Mann-Whitney Utest was used to analyze the inter-group differences of the continuous variables with non-normal distribution;
[0100] 6. Results
[0101] ① General information of 30 healthy subjects
[0102]
[0103] like Figure 8-Figure 11 As shown, there are schematic diagrams showing the significant correlation between lung volume changes during deep breathing and FVC, schematic diagrams showing the significant correlation between lung volume changes during deep breathing and FEV1, schematic diagrams showing the significant correlation between lung volume changes during deep breathing and MVV, and schematic diagrams showing the significant correlation between lung volume changes during deep inhalation and quiet exhalation and IC. The above results show that there is a strong correlation between MRI data and pulmonary function tests, indicating that MR whole lung scans can more accurately evaluate patients' lung function, respiratory muscle structure and function.
[0104] In summary, the technical solution of this embodiment innovatively uses deep learning chest MRI dynamic images to comprehensively evaluate the diaphragm structure and function indicators of hemodialysis patients to quantify the diaphragm function status of this population. It makes up for the shortcomings of the pulmonary function meter that cannot identify patients with mild respiratory muscle lesions and compensatory lung function at an early stage, the shortcomings of the pulmonary function meter examination that cannot indicate the location of respiratory muscle lesions, the shortcomings of patients with poor lung function who cannot cooperate to complete the pulmonary function meter examination and thus cannot monitor lung function, and the shortcomings of diaphragm ultrasound examination that is too dependent on the operator's professional level and cannot fully reflect the activity of the entire diaphragm. At the same time, it also provides a reliable measurement indicator for the results of future treatment trials for patients with end-stage renal disease.
[0105] Embodiment 2:
[0106] The present invention provides a lung function and respiratory muscle function measurement system for implementing the above-mentioned lung function and respiratory muscle function measurement method, which specifically includes the following:
[0107] A preprocessing module is used to receive MR image data, preprocess the MR image data, and screen out MR image data with high image quality to form an image data set;
[0108] A partitioning module is used to partition the image dataset into a training set, a validation set, and a test set according to a ratio of 5:2:1.
[0109] A construction module is used to construct a UNet segmentation model and use an image dataset for training. The UNet segmentation model is based on a UNet network, an ADN module is introduced after each convolutional layer, and a plurality of residual modules are introduced into the network;
[0110] The output module is used to process the original MR image using the trained UNet segmentation model to obtain the lung Label file in nifti format;
[0111] The calculation module is used to calculate the maximum diaphragm length, the minimum diaphragm length, the maximum CC diameter1, the minimum CC diameter1, the maximum CC diameter2, the minimum CC diameter2, the maximum AP diamter, the minimum AP diamter, the diaphragm motion area, the thoracic motion area and the lung volume according to the coordinate information in the Label file, calculate the mean absolute error of the corresponding parameters according to the above parameters, and determine the lung function and respiratory muscle function according to the mean absolute error.
[0112] Specifically, the above-mentioned preprocessing module, division module, construction module, output module and calculation module can be embedded in a computer processing system. The computer calls the above-mentioned modules to complete the task of measuring lung function and respiratory muscle function according to the above-mentioned lung function and respiratory muscle function measurement method; the above-mentioned preprocessing module, division module, construction module, output module and calculation module can perform operations according to the specific steps given in the above-mentioned lung function and respiratory muscle function measurement method.
[0113] It should be noted that it should be understood that the division of the various modules of the above system is only the division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated, and these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the preprocessing module can be a separately established processing element, or it can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0114] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0115] Embodiment three:
[0116] The present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The memory stores a computer program capable of running on the processor. When the processor loads and executes the computer program, the lung function and respiratory muscle function measurement method in Example 1 is adopted.
[0117] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses.
[0118] Furthermore, the processor may adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. may also be adopted. The general-purpose processor may adopt a microprocessor or any conventional processor, etc., and the present application does not impose any restrictions on this.
[0119] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0120] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a centered element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for illustrative purposes and are not intended to be the only implementation method.
[0121] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0122] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
Claims
1. A method for measuring lung function and respiratory muscle function, characterized in that: The specific steps include: Receiving MR image data, preprocessing the MR image data, and screening out MR image data with high image quality to form an image data set; The image dataset is divided into training set, validation set and test set according to 5:2:1; A UNet segmentation model is constructed and trained using an image dataset. The UNet segmentation model is based on a UNet network, an ADN module is introduced after each convolutional layer, and a plurality of residual modules are introduced into the network. The trained UNet segmentation model is used to process the original MR images to obtain the lung Label file in nifti format; According to the coordinate information in the Label file, the maximum diaphragm length, minimum diaphragm length, maximum C-Cdiameter1, minimum CC diameter1, maximum CC diameter2, minimum C-Cdiameter2, maximum A-Pdiamter, minimum AP diamter, diaphragm motion area, thoracic motion area and lung volume are calculated.
2. The method for measuring lung function and respiratory muscle function according to claim 1, characterized in that: The MR image data is acquired by scanning with a 3.0T superconducting MR scanner, as follows: (1) Under normal breathing conditions, the subjects were scanned during tidal breathing, and the chest was scanned with two-dimensional cine MRI. Each subject was scanned along two axial planes, namely, the level of the upper edge of the aortic arch and the level of the upper edge of the right atrium, a sagittal plane, namely, the cross-section of the right lung along the midclavicular line, and a coronal plane, namely, the level of the lung apex; (2) Take a deep breath, inhale deeply and hold your breath, then perform a full lung scan; take a deep breath, hold your breath, then perform a full lung scan.
3. The method for measuring lung function and respiratory muscle function according to claim 1, characterized in that: The MR image data is preprocessed as follows: (1) Use MRICron to convert all Dicom format image data into Nifti format; (2) Slicer 5.1.0 software was used to evaluate the signal-to-noise ratio of the image: The subcutaneous muscle (pectoral muscle) tissue ROI was selected as the ROI for signal-to-noise ratio evaluation. The ROI was outlined in the Slicer software, and the image enhancement mean and standard deviation of the ROI were extracted. The signal-to-noise ratio (SNR) is the ratio of the ROI image enhancement mean (Mean) to the standard deviation (SD), and the calculation formula is: SNR = Mean / SD; (3) Slicer 5.1.0 software was used to repeatedly outline the lung contours of the whole lung cross section in the image. For patients with pleural effusion, the pleural effusion part was included in the outlined ROI, and the average Dice index of the outlined ROI was calculated. The image with a high Dice index was selected as the standard image.
4. The method for measuring lung function and respiratory muscle function according to claim 3, characterized in that: After dividing the image dataset into training, validation, and test sets, the training images need to be augmented using the RandCropByPosNegLabeld and RandRotate90d functions in monai.transforms.
5. The method for measuring lung function and respiratory muscle function according to claim 4, characterized in that: The ADN module includes an instance normalization function, a Dropout function, and a PReLU activation function; The instance normalization function is used to keep the model stable during training, the Dropout function is used to prevent overfitting, and the PReLU function is used to provide a nonlinear activation function.
6. The method for measuring lung function and respiratory muscle function according to claim 5, characterized in that: The residual modules are set to be multiple, each residual module includes two convolution operations, and the residual paths of some residual modules are set to be identical mapping.
7. The method for measuring lung function and respiratory muscle function according to claim 6, characterized in that: In the UNet segmentation model, upsampling is achieved by transposed convolution, and downsampling is achieved by increasing the step size of the convolution layer.
8. The method for measuring lung function and respiratory muscle function according to claim 1, characterized in that: According to the coordinate information in the Label file, the maximum diaphragm length, the minimum diaphragm length, the maximum CC diameter1, the minimum C-Cdiameter1, the maximum CC diameter2, the minimum C-Cdiameter2, the maximum AP diamter, the minimum AP diamter, the diaphragm motion area, the thoracic motion area and the lung volume are calculated: (1) Use Python's nibabel package to read the generated nifti format lung label file, find the coordinates of the point with the maximum Y coordinate in the label, which is the lung vertex, record the point with the lowest Y coordinate in the label from front to back according to the X coordinate, record the coordinate array of each point of the diaphragm top lung bottom curve, find the point with the largest Y value in the coordinate array of the diaphragm top lung bottom curve, which is the highest point of the diaphragm top lung bottom, find the minimum X coordinate and the maximum X coordinate with the same Y value in the horizontal direction of the highest point of the diaphragm top lung bottom, the line connecting these two points is the horizontal tangent line AP Line1 of the highest point of the diaphragm top lung bottom, and the difference of the X coordinates of the two points multiplied by the horizontal length of the voxel is A-Pdiameter; (2) Find the minimum and maximum points of the X value in the coordinate array of the diaphragm top and lung base curves. The horizontal distance line between the two points is A-PLine2, and the difference of the X coordinates of the two points multiplied by the horizontal length of the voxel is AP diameter2; (3) Draw a perpendicular line CC line from the lung apex to the horizontal tangent of the highest point of the diaphragmatic top and lung base. The difference between the Y coordinates of the lung apex and the tangent line multiplied by the vertical length of the voxel is CC diameter1; (4) Calculate the CC diameter1 of each lung label in the image data set and record it in the C-Cdiameter array. Observe the fluctuation of CC diameter over time and find the maximum and minimum values of the array, which are the maximum deep inspiration phase and the maximum deep exhalation phase, respectively. Then calculate the number of all voxels whose coordinates are below the diaphragm top and lung base curve of the maximum abdominal deep exhalation phase label. Multiply the number of voxels by the voxel area to obtain the lung base-diaphragm motion area. (5) The diaphragm top and lung base curves of the maximum abdominal deep inspiration phase Label and the minimum abdominal deep inspiration phase Label were fitted using the polynomial fitting method, and the length of the diaphragm top and lung base curves of the maximum inspiration phase and the maximum expiration phase was calculated using the integral method, which is the maximum lung base diaphragm length and the minimum lung base diaphragm length: (6) Calculate the AP diameter of each lung label in the image data set and record it in the A-Pdiameter array. Observe the fluctuation of AP diameter over time and find the maximum and minimum values of the array, which are the maximum thoracic deep inspiration phase and the maximum thoracic deep exhalation phase, respectively. Record the coordinates of the lung anterior boundary curve according to the minimum value of the X coordinate of each row of voxels to obtain a coordinate array. Calculate the number of all voxels whose coordinates are located above the diaphragm top and lung base curve of the maximum thoracic deep exhalation phase label and in front of the lung anterior boundary curve. The number of voxels obtained multiplied by the voxel area is the thoracic motion area. (7) Using the label file of the segmented whole lung cross section, calculate the total number of voxels whose values are not 0, and then multiply it by the volume of a single voxel to obtain the whole lung volume.
9. A system for measuring lung function and respiratory muscle function, used to implement the method for measuring lung function and respiratory muscle function according to any one of claims 1 to 8, characterized in that: The details include: A preprocessing module is used to receive MR image data, preprocess the MR image data, and screen out MR image data with high image quality to form an image data set; A partitioning module is used to partition the image dataset into a training set, a validation set, and a test set according to a ratio of 5:2:
1. A construction module is used to construct a UNet segmentation model and use an image dataset for training. The UNet segmentation model is based on a UNet network, an ADN module is introduced after each convolutional layer, and a plurality of residual modules are introduced into the network; The output module is used to process the original MR image using the trained UNet segmentation model to obtain the lung Label file in nifti format; The calculation module is used to calculate the maximum diaphragm length, the minimum diaphragm length, the maximum CC diameter1, the minimum CC diameter1, the maximum CC diameter2, the minimum CC diameter2, the maximum AP diamter, the minimum AP diamter, the diaphragm motion area, the thoracic motion area and the lung volume according to the coordinate information in the Label file.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the lung function and respiratory muscle function measurement method according to any one of claims 1 to 8 is adopted.
Citation Information
Patent Citations
Orthotopic chest radiography cardiothoracic ratio measuring method and device
CN113450399A
Diaphragm motion display method and device, electronic equipment and storage medium
CN116894854A
External respiration function estimation method
RU2358649C1