Idiopathic pulmonary fibrosis CT feature quantification method, device, equipment, medium and program product
By combining deep learning and linear regression models, efficient segmentation and quantification of imaging features of idiopathic pulmonary fibrosis are achieved, solving the problems of low diagnostic reliability and low processing efficiency in existing technologies, and providing objective clinical diagnosis and disease monitoring basis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI RUIWEI YINGZHI INFORMATION TECHNOLOGY SERVICE CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies for the diagnosis of idiopathic pulmonary fibrosis (IPF) suffer from low reproducibility of visual assessment, low processing efficiency, and limited generalization ability of existing automated quantitative algorithms, which are unable to accurately segment complex and variable features and lack correlation analysis between imaging subtype classification and pulmonary function parameters.
A deep learning-based feature segmentation model combined with a linear regression model is used to generate the volume proportion of imaging features through lung parenchyma segmentation and imaging feature extraction. The pre-generated linear regression model is then used to predict functional impairment values, thereby realizing the correlation analysis between imaging features and lung function indicators.
It improves the efficiency of identifying imaging features and calculating volume proportions in idiopathic pulmonary fibrosis, providing objective evidence for clinical diagnosis and disease monitoring, and enhancing the reliability of diagnosis and processing efficiency.
Smart Images

Figure CN121788535B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and program product for quantifying CT features of idiopathic pulmonary fibrosis. Background Technology
[0002] Lung CT images are a series of continuous cross-sectional image layers obtained through computed tomography (CT) scans. By using image processing techniques to locate and segment lung lesions on CT scans, radiologists can obtain image visualization and quantitative analysis results, thereby aiding in clinical diagnosis and disease detection.
[0003] The clinical diagnosis and assessment of idiopathic pulmonary fibrosis (IPF) rely primarily on the subjective visual evaluation of HRCT images by radiologists. This visual evaluation is influenced by the physician's experience, and the results vary significantly between different observers and even among multiple evaluations by the same observer, leading to low reproducibility of diagnostic results and extremely low processing efficiency.
[0004] To overcome the limitations of visual assessment, various automated quantitative algorithms based on traditional image processing (such as histograms or texture analysis) have emerged. However, these methods still have significant shortcomings when applied to IPF: firstly, their generalization ability is limited, their segmentation accuracy for the complex and variable features of IPF is insufficient, and they rely on specific datasets; secondly, their functions are limited, with most tools failing to integrate simultaneous and accurate segmentation and classification of key radiological subtypes (such as inflammation and fibrosis), and lacking correlation analysis with lung function parameters.
[0005] In recent years, deep learning (such as the nnU-Net framework) has shown potential in medical image segmentation, but its application in the field of IPF is still limited by challenges such as the high cost of obtaining high-quality labeled data and insufficient model optimization for IPF features.
[0006] Therefore, there is an urgent need in this field for an automated CT feature quantification solution that can overcome the above-mentioned shortcomings, is specifically designed for IPF, and has high accuracy and strong generalization capabilities. Summary of the Invention
[0007] Therefore, it is necessary to provide a method, device, equipment, medium, and program product for quantifying idiopathic pulmonary fiber CT features that can improve processing efficiency in response to the above-mentioned technical problems.
[0008] In a first aspect, this application provides a method for quantitative analysis of idiopathic pulmonary fibrosis CT features, the method comprising:
[0009] Acquire medical images of the lungs to be processed;
[0010] The lung parenchyma is segmented from the medical images of the lungs to be processed to obtain the bilateral lung regions and the total lung volume;
[0011] The bilateral lung regions are segmented to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and the volume proportions corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis are determined based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume.
[0012] Based on a pre-generated linear regression model, the predicted functional impairment values corresponding to the volume proportions of the multiple idiopathic pulmonary fibrosis-related imaging features are determined. The linear regression model is used to represent the volume proportions of the multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of each lung function index.
[0013] In one embodiment, the step of segmenting the lung parenchyma of the lung medical image to be processed to obtain the bilateral lung regions and total lung volume includes:
[0014] The lung parenchyma was segmented from three consecutive slices to obtain the bilateral lung regions and total lung volume corresponding to each slice.
[0015] The segmentation of the bilateral lung regions yields multiple imaging features associated with idiopathic pulmonary fibrosis, including:
[0016] Based on the bilateral lung regions corresponding to each slice, determine the neighboring pixels corresponding to each central pixel in the intermediate layer;
[0017] A comprehensive constraint condition is generated based on each of the central pixels and their corresponding neighboring pixels.
[0018] The lung regions corresponding to each slice are simultaneously input into a pre-generated feature segmentation model, and multiple imaging features related to idiopathic pulmonary fibrosis are obtained under the comprehensive constraints.
[0019] In one embodiment, the step of generating comprehensive constraint conditions based on each of the center pixels and their corresponding neighbor pixels includes:
[0020] Determine the first feature distribution result corresponding to each of the center pixels, the second feature distribution result corresponding to each of the neighbor pixels corresponding to the center pixels, and the average feature distribution result of the second feature distribution result corresponding to each of the neighbor pixels. Based on the first feature distribution result and the second feature distribution result, obtain the spatial consistency constraint condition. Based on the first feature distribution result and the average feature distribution result, obtain the category consistency constraint condition.
[0021] Based on the spatial consistency parameter corresponding to the spatial consistency constraint and the category consistency parameter corresponding to the category consistency constraint, a comprehensive constraint is obtained, wherein the spatial consistency parameter is greater than the category consistency parameter.
[0022] In one embodiment, the training method of the feature segmentation model includes:
[0023] Obtain the first batch of manually labeled sample data and other batches of unlabeled sample data;
[0024] The feature segmentation model was trained based on the first batch of sample data;
[0025] Input the unlabeled sample data from other batches in the current batch into the currently trained feature segmentation model to obtain the segmentation result of the current sample;
[0026] The system receives the current annotation result for the current sample segmentation result, and retrains the currently trained feature segmentation model based on the current annotation result. It then obtains the unlabeled sample data from the next batch as the unlabeled sample data from the current batch, and continues to input the unlabeled sample data from the current batch into the currently trained feature segmentation model to obtain the current sample segmentation result. This process continues until the training stop condition is met, resulting in a fully trained feature segmentation model.
[0027] In one embodiment, the training method for the feature segmentation model further includes:
[0028] The parameters of the feature segmentation model are initialized using the Kaiming algorithm;
[0029] The parameters of the feature segmentation model are optimized using the stochastic gradient descent momentum method. The learning rate is halved at the 10th and 20th training epochs. Training is stopped at the 30th training epoch or when the loss function determines that the segmentation result of the feature segmentation model has no performance improvement.
[0030] In one embodiment, the method for generating the linear regression model includes:
[0031] Determine the lung function indicators corresponding to each sample data and the volume proportion corresponding to multiple imaging features related to idiopathic pulmonary fibrosis;
[0032] A linear regression model is generated based on the lung function indicators corresponding to each sample data and the volume proportions corresponding to multiple imaging features related to idiopathic pulmonary fibrosis.
[0033] Secondly, this application also provides a device for quantifying CT features of idiopathic pulmonary fibrosis, the device comprising:
[0034] The medical image acquisition module is used to acquire lung medical images to be processed.
[0035] The lung parenchyma segmentation module is used to segment the lung parenchyma in the medical image of the lung to be processed, so as to obtain the bilateral lung regions and the total lung volume;
[0036] The feature segmentation module is used to segment the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and to determine the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume.
[0037] The prediction module is used to determine the predicted functional impairment value corresponding to the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features based on a pre-generated linear regression model. The linear regression model is used to represent the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of each lung function index.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.
[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0041] The aforementioned method, device, equipment, medium, and program product for quantifying CT features of idiopathic pulmonary fibrosis acquires medical images of the lungs to be processed; segments the lung parenchyma in the medical images to be processed to obtain bilateral lung regions and total lung volume; segments the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and determines the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume; and determines the predicted value of functional impairment corresponding to the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis based on a pre-generated linear regression model. The linear regression model is used to represent the correlation between the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis and various lung function indicators. In this way, the features of the medical images of the lungs to be processed are segmented and quantified, realizing the identification and volume proportion calculation of multiple imaging features related to idiopathic pulmonary fibrosis, improving processing efficiency, and providing objective basis for clinical diagnosis, disease monitoring, and efficacy evaluation. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a schematic diagram of a computer vision-based assessment system for idiopathic lung disease in one embodiment;
[0044] Figure 2 This is a flowchart illustrating a method for quantifying idiopathic pulmonary fibrosis in one embodiment;
[0045] Figure 3 This is a schematic diagram of several imaging features associated with idiopathic pulmonary fibrosis in some optional embodiments;
[0046] Figure 4 This is a flowchart of the model training steps in one embodiment;
[0047] Figure 5 This is a structural block diagram of a device for quantifying idiopathic pulmonary fibrosis CT features in one embodiment;
[0048] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0049] The deployment and operation of this system require a hardware environment that supports CUDA parallel computing. Preferred configurations include an NVIDIA GPU (≥8GB VRAM, such as an RTX 4080 Super), an Intel i9-level multi-core processor, and at least 16GB of RAM. The system is preferably deployed on an Ubuntu Linux operating system using Docker containerization.
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0052] The method for quantifying idiopathic pulmonary fibrosis CT features provided in this application embodiment can be applied to, for example... Figure 1 The illustrated computer vision-based assessment system for idiopathic lung disease includes a terminal 102 that communicates with a medical image acquisition system 104 via a network.
[0053] Terminal 102 can acquire lung images to be processed acquired by medical image acquisition system 104, and then perform lung parenchymal segmentation on the lung images to be processed to obtain bilateral lung regions and total lung volume; the bilateral lung regions are segmented to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and the volume proportions corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume are determined; based on a pre-generated linear regression model, the functional impairment prediction values corresponding to the volume proportions of the multiple imaging features related to idiopathic pulmonary fibrosis are determined, and the linear regression model is used to represent the volume proportions of the multiple imaging features related to idiopathic pulmonary fibrosis and the correlation of each lung function index.
[0054] The medical image acquisition system can be a system for acquiring HRCT medical images (HRCT: High Resolution CT, which is an examination technique that uses thin-slice (1-2mm) scans and high-resolution algorithms to reconstruct images). In other embodiments, the medical imaging system can be other medical imaging systems, and no specific limitations are made here.
[0055] In one exemplary embodiment, such as Figure 2 As shown, a quantitative method for idiopathic pulmonary fibrosis is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps S202 to S208. Wherein:
[0056] S202: Acquire medical images of the lungs to be processed.
[0057] The lung medical images to be processed were acquired by a medical imaging acquisition system, which can be HRCT medical images.
[0058] S204: Perform lung parenchyma segmentation on the lung medical images to be processed to obtain the bilateral lung regions and total lung volume.
[0059] Lung parenchyma segmentation is the process of segmenting lung medical images to be processed to identify the foreground region, namely the lung parenchyma region (bi-lung region). Lung parenchyma segmentation can be a fully automated segmentation method, such as segmenting the lung medical images to be processed using a pre-trained lung parenchyma segmentation model to obtain the lung parenchyma region, and then obtaining the lung volume based on the lung parenchyma region.
[0060] S206: Multiple imaging features related to idiopathic pulmonary fibrosis were obtained by segmenting the bilateral lung regions, and the volume proportions corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume were determined.
[0061] The bilateral lung region is segmented to reduce the influence of other non-lung regions, allowing for the extraction of multiple imaging features related to idiopathic pulmonary fibrosis. In some optional embodiments, after segmenting the bilateral lung region, to ensure the accuracy of idiopathic pneumonia feature identification, the bilateral lung contour is first determined based on the segmented bilateral lung region, and then this bilateral lung contour is extended outward by a certain number of pixels, for example, by 5 pixels, to avoid losing part of the lung region during segmentation.
[0062] The bilateral lung regions were then input into a feature segmentation model to obtain multiple imaging features related to idiopathic pulmonary fibrosis. These features included at least one of ground-glass opacity, consolidation, reticular opacity, and honeycomb opacity.
[0063] The volume percentage of multiple idiopathic pulmonary fibrosis-related imaging features is determined based on the total lung volume. This includes: first, determining the volume of multiple idiopathic pulmonary fibrosis-related imaging features, and then determining the volume percentage of multiple idiopathic pulmonary fibrosis-related imaging features based on the volume of multiple idiopathic pulmonary fibrosis-related imaging features and the total lung volume.
[0064] In some other alternative embodiments, information on intrapulmonary bronchi and blood vessels can be extracted based on the lung parenchyma segmentation results and lung volume for display purposes.
[0065] Therefore, the system corresponding to the idiopathic pulmonary fibrosis quantification method in this application may include a lung parenchyma segmentation and lung volume quantification module, used to perform fully automatic lung parenchyma segmentation on the input idiopathic lung disease HRCT images and calculate lung volume (TLV); an IPF (idiopathic lung disease) pattern segmentation and quantification module, based on the IPF pattern recognition model of the supervised learning nnU-Net network, to identify and segment ground-glass opacities (GGO), consolidation (CD), reticular opacities (RP), and honeycomb changes (HC) using IPF features, quantify the volume proportion of each IPF feature, and classify and statistically analyze the total volume proportion of inflammatory lesions (GGO+CD) and fibrotic lesions (RP+HC); and an intrapulmonary bronchus and vessel extraction module, used to extract intrapulmonary bronchus and vessel information from high-resolution CT images.
[0066] In some optional embodiments, the feature segmentation model trained through supervised learning obtains multiple imaging features related to idiopathic pulmonary fibrosis and their corresponding volume proportions based on the lung parenchyma segmentation results and lung volume. This includes: gradually reducing the spatial resolution of the lung parenchyma segmentation results and increasing the number of feature channels through convolution and pooling operations of the encoder; determining an abstract feature representation based on the lung parenchyma segmentation results through a bottleneck layer; gradually restoring the spatial resolution of the image through the decoder and reducing the number of feature channels, and connecting the feature map corresponding to the encoder to the feature map of the corresponding layer of the decoder through skip connections; converting the feature map corresponding to the decoder into a segmentation mask through the output layer, and obtaining multiple imaging features related to idiopathic pulmonary fibrosis and their corresponding volume proportions based on the segmentation mask.
[0067] In this embodiment, the input medical image is first feature extracted by the encoder. During training using nn-Unet, data fingerprints are initially used to identify specific features the network needs to adapt to. Subsequently, rule-based parameters are dynamically adjusted based on feedback received during training to improve network performance. Simultaneously, fixed parameters ensure the stability and consistency of the network structure. At each stage of the encoder, the spatial resolution of the image is progressively reduced through convolution and pooling operations while increasing the number of feature channels. At the bottleneck layer, the network captures the most abstract feature representation. Then, the spatial resolution of the image is progressively restored through the decoder while reducing the number of feature channels. Skip connections enhance the predictive power of the decoder by directly connecting the encoder's feature map to the corresponding layer of the decoder. Finally, the output layer typically uses a softmax activation function to convert the decoder's feature map into a segmentation mask for multi-class segmentation.
[0068] The validation of the trained model may include the following steps:
[0069] First, validation set data was obtained from a prospective study, including 51 cases of idiopathic pneumonia (IPAF) with autoimmune features and 14 cases of idiopathic pulmonary fibrosis (IPF). Demographic and pulmonary function test (PFT) data were collected for all patients, and PFTs and HRCT scans were completed within 7 days. Specific limitations for the validation set data can be found above.
[0070] Secondly, a visual evaluation was conducted. Specifically, before automated computer quantification, one radiologist and one pulmonologist specializing in idiopathic lung disease independently performed a visual evaluation of the validation set HRCT. Prior to evaluating the validation set, visual training was performed using an additional 10 non-study cases, and the results were reviewed and judged by a senior thoracic radiologist.
[0071] All images were viewed with optimized window settings for assessing lung parenchyma (window width 1200 HU; window level -650 HU). The visual assessment methodology was as follows: CT images were scored by region using a continuous scoring scale. Each lung was divided into three regions (upper, middle, and lower), demarcated at the level of the tracheal carina and the right lower pulmonary vein. Within each region, the IPF range was estimated to the nearest 5% and classified into four patterns according to the Fleschner Institute Chest Imaging Terminology: ground-glass opacity, consolidation, reticular formation, and honeycomb. The total IPF range and the range for each pattern were obtained by summing the abnormalities for each lung region and then dividing by 6. The average of two readers was used as the visual assessment result.
[0072] Finally, statistical analysis was performed, with indicators including segmentation accuracy and clinical relevance. The method presented in this application has been validated for effective segmentation and quantification of image data. The overall lesion extent of idiopathic pulmonary fibrosis (IPF) obtained through quantification showed a high degree of consistency with the results of expert visual assessment.
[0073] Regarding clinical relevance, the quantitative results of this application's method show a significant positive correlation with visual assessment results, particularly in the consistency of quantitative determination of fibrotic lesion characteristics. Furthermore, the various lesion extents measured by this application's method also show a meaningful negative correlation with key pulmonary function indicators (such as DLCO%), with a correlation strength comparable to or better than visual assessment. This demonstrates that the objective quantitative results provided by this application's method can effectively reflect the degree of physiological functional impairment in patients and possess clear clinical assessment value.
[0074] S208: Based on a pre-generated linear regression model, determine the predicted functional impairment values corresponding to the volume proportions of multiple idiopathic pulmonary fibrosis-related imaging features. The linear regression model is used to represent the volume proportions of multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of various lung function indicators.
[0075] In one optional embodiment, the volume percentage of fibrosis can be obtained first based on the volume percentage of each idiopathic lung disease pattern; the degree of impairment of lung diffusion function can be predicted based on the volume percentage of fibrosis; and a longitudinal trend of change for evaluating the efficacy of antifibrotic therapy can be generated based on the segmentation results of the idiopathic lung disease pattern.
[0076] In this embodiment, the idiopathic lung disease pattern includes four specific IPF features: ground-glass opacity (GGO), consolidation (CD), reticular opacity (RP), and honeycomb opacity (HC).
[0077] The segmentation results are quantified as the ratio of a specific abnormal volume to the total lung volume, classifying the range of IPF as follows: Total IPF range (%): Represents the overall range of IPF. Subcategories: Ground-glass opacity (GGO), consolidation (CD), reticular opacity (RP), and honeycomb opacity (HC). The total IPF range is further subdivided into inflammatory (GGO+CD) and fibrotic (RP+HC) changes.
[0078] Specifically, this application can determine the predicted value of functional impairment corresponding to the volume proportion of multiple imaging features related to idiopathic pulmonary fibrosis based on the linear regression model of Predictor, that is, determine the predicted value of functional impairment corresponding to each inflammation and fibrosis. In this way, a longitudinal trend graph can be generated based on the predicted value of functional impairment at different times to evaluate the efficacy of anti-fibrotic treatment.
[0079] In this embodiment, ground-glass opacity (GGO), consolidation (CD), reticular opacity (RP), and honeycomb opacity (HC) are simultaneously segmented, and the proportion of inflammation (GGO+CD) and fibrosis (RP+HC) subclasses is calculated. The degree of impairment of lung diffusion capacity (DLCO%) can be predicted based on the volume proportion of fibrotic lesions (RP+HC).
[0080] The above-described method for quantifying idiopathic pulmonary fibrosis involves acquiring medical images of the lungs to be processed; segmenting the lung parenchyma in the images to obtain bilateral lung regions and total lung volume; segmenting the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis; and determining the volume percentage corresponding to each of these features based on the total lung volume; and using a pre-generated linear regression model to determine the predicted functional impairment value corresponding to the volume percentage of each feature. The linear regression model represents the correlation between the volume percentage of each feature and various lung function indicators. This method segments and quantifies the features of the lung images to be processed, enabling the identification and volume percentage calculation of multiple imaging features related to idiopathic pulmonary fibrosis, improving processing efficiency, and providing objective evidence for clinical diagnosis, disease monitoring, and efficacy evaluation.
[0081] In some optional embodiments, lung parenchyma segmentation is performed on the lung medical image to be processed to obtain the bilateral lung regions and total lung volume, including: segmenting the lung parenchyma on three consecutive slices to obtain the bilateral lung regions and total lung volume corresponding to each slice. In this application, in order to introduce three-dimensional features, the lung medical image to be processed includes a single-channel grayscale image of three consecutive CT slices (3×512×512) to enhance spatial context awareness.
[0082] Therefore, combined Figure 3 As shown, Figure 3 This is a schematic diagram illustrating several imaging features associated with idiopathic pulmonary fibrosis in some optional embodiments; wherein, segmentation of the bilateral lung regions yields several imaging features associated with idiopathic pulmonary fibrosis, including:
[0083] S302: Determine the neighboring pixels corresponding to each central pixel in the intermediate layer based on the bilateral lung regions corresponding to each slice.
[0084] The center pixel refers to each pixel in the middle layer of a three-layer continuous CT slice. The neighboring pixels of the center pixel include itself and six face-adjacent voxels (top, bottom, left, right, front, and back). This can limit the local range, balance computational efficiency and spatial context information capture, calculate the similarity of features (such as depth features and RGB values) of voxels within the seven-neighborhood, and normalize them into weights, which are then used as regularization terms to constrain the model to learn locally smooth prediction results.
[0085] S304: Generate comprehensive constraint conditions based on each center pixel and its corresponding neighboring pixels.
[0086] The comprehensive constraints include spatial consistency constraints and class consistency parameters.
[0087] In some optional embodiments, a comprehensive constraint condition is generated based on each center pixel and its corresponding neighboring pixels, including: determining the first feature distribution result corresponding to each center pixel, the second feature distribution result corresponding to each neighboring pixel corresponding to the center pixel, and the average feature distribution result of the second feature distribution result corresponding to each neighboring pixel; obtaining a spatial consistency constraint condition based on the first feature distribution result and the second feature distribution result; obtaining a category consistency constraint condition based on the first feature distribution result and the average feature distribution result; and obtaining a comprehensive constraint condition based on the spatial consistency parameter corresponding to the spatial consistency constraint condition and the category consistency parameter corresponding to the category consistency constraint condition, wherein the spatial consistency parameter is greater than the category consistency parameter.
[0088] For ease of understanding, regarding the spatial consistency parameter—that adjacent pixels should have similar predicted probability distributions—we iterate through each of its 7 neighbors, `j`, for each pixel `i`. We calculate the difference between the probability distribution `P(i)` of the center pixel `i` and the probability distribution `P(j)` of its neighbor `j`. A commonly used loss is the KL divergence or mean squared error (MSE), which is the spatial consistency parameter. If the predicted probability vectors of two adjacent pixels are exactly the same, this loss is 0; the greater the difference, the larger the loss value.
[0089] The class consistency parameter, i.e., the prediction of a pixel itself, should remain unchanged after being influenced by its neighbors. This is a self-regulation that prevents the model's originally correct predictions from being overly distorted during the smoothing process. In this embodiment, for each pixel i, its original prediction P(i) is compared with the average predictions of its neighbors. First, the average probability distribution P_avg(i) of all neighbors (including itself) within the 7-neighborhood of pixel i is calculated. Then, the difference between P(i) and P_avg(i) is calculated. Optionally, the loss can also be calculated using KL divergence or mean squared error (MSE). Finally, the losses of all pixels are summed or averaged.
[0090] The comprehensive constraint is derived from the spatial consistency constraint and the category consistency parameter corresponding to the category consistency constraint. The weight λs of the spatial consistency parameter is 1.0, and the weight λc of the category consistency parameter is 0.2. Giving the spatial consistency constraint a high weight indicates that the model highly values the spatial smoothness of the prediction results. The category consistency constraint is given a relatively low weight, serving as an auxiliary, regularizing constraint.
[0091] S306: Simultaneously input the bilateral lung regions corresponding to each slice into the pre-generated feature segmentation model, and obtain multiple imaging features related to idiopathic pulmonary fibrosis under comprehensive constraints.
[0092] Subsequently, under comprehensive constraints, multiple imaging features related to idiopathic pulmonary fibrosis were obtained, thus ensuring accuracy.
[0093] For ease of understanding, the comprehensive constraint conditions are explained below. In order to further improve the model’s segmentation accuracy of key radiological features of idiopathic pulmonary fibrosis (IPF), especially the reticular and honeycomb shadows distributed in the subpleural and basal regions, this application introduces a comprehensive constraint condition consisting of spatial consistency constraint and class consistency constraint as part of the loss function during the model training process.
[0094] This comprehensive constraint applies to the middle layer of a three-layer CT slice. For each pixel in the middle layer (called the center pixel i), a set N(i) of its neighboring pixels in a 7-neighborhood system is defined, which includes the center pixel itself and the voxels adjacent to it in the six directions of up, down, left, right, front, and back.
[0095] Let P(i) be the probability distribution vector predicted by the model for the center pixel i (e.g., ), where P(j) is the probability distribution vector predicted for neighboring pixel j. Let GGO be the probability distribution for the center pixel i. Let CD be the probability distribution for predicting the center pixel i. Let be the probability distribution for predicting RP as the center pixel i. Let be the probability distribution for predicting center pixel i as HC. The probability distribution for predicting the center pixel i as the background.
[0096] The core idea of spatial consistency constraints is that physically adjacent pixels are likely to belong to the same organizational category, and therefore their predicted probability distributions should be similar. This constraint is achieved by minimizing the difference between the predicted distributions of the center pixel and its neighboring pixels.
[0097] In this embodiment, Kullback-Leibler (KL) divergence is used to measure the difference between two probability distributions. The spatial consistency loss Ls for the center pixel i is calculated as follows:
[0098] Ls(i)=(1 / |N(i)|)*Σ{j∈N(i)}[D_KL(P(i)||P(j))]
[0099] Where D_KL(P(i)||P(j))=Σ_cP_c(i)*log(P_c(i) / P_c(j), c represents the category (e.g., GGO, CD, RP, HC, background). |N(i)| is the number of pixels in the neighborhood (7 in this embodiment). The smaller this loss value, the smoother and more consistent the prediction results of the pixels in the neighborhood are in space.
[0100] The core idea of the class consistency constraint is that a pixel's own prediction, after considering its local context, should not drift drastically, in order to prevent excessive distortion of the model's originally correct predictions during the optimization of spatial consistency. This constraint is achieved by encouraging the prediction of the central pixel to be consistent with the average prediction of its local neighborhood.
[0101] First, calculate the average probability distribution Pavg(i) of all pixels in the 7-neighborhood (including the center pixel itself): Pavg(i)=(1 / |N(i)|)*Σ{j∈N(i)}P(j).
[0102] Then, the KL divergence between the center pixel prediction P(i) and the average prediction Pavg(i) is calculated as the class consistency loss Lc: Lc(i)=D_KL(P(i)||P_avg(i)).
[0103] The final comprehensive constraint L_prior is the weighted sum of the losses from the two constraints mentioned above, and its calculation formula for the entire training batch is as follows:
[0104] Lprior=(1 / N)*Σi[λ_s*Ls(i)+λ_c*Lc(i)]
[0105] Where: N represents the total number of center pixels in a training batch. λ_s is the weight of the spatial consistency parameter, which is set to 1.0 in a preferred embodiment of this application. λ_c is the weight of the class consistency parameter, which is set to 0.2 in a preferred embodiment of this application.
[0106] The meaning and strategy selection of weight parameters: Setting λ_s > λ_c (1.0 > 0.2 in this embodiment) is a key strategy. This indicates that the model focuses more on ensuring the spatial continuity and smoothness of the segmentation results, which is crucial for eliminating isolated noise points that are common in IPF feature (such as celluloid) segmentation and do not conform to anatomical facts. At the same time, a relatively small class consistency constraint acts as an effective regularization term, preventing the model from erasing real detailed features for excessive smoothing. This comprehensive constraint Lprior will be combined with the main loss function of the segmentation task (such as Dice loss or cross-entropy loss) Lmain to jointly guide the optimization of the model: total loss L_total = L_main + L_prior.
[0107] By introducing this comprehensive constraint, the method described in this application can significantly improve the segmentation accuracy of IPF fibrosis features (reticular shadows, honeycomb shadows) with blurred boundaries and complex morphology, and in particular improve the feature recognition ability in complex areas such as the subpleural region that are easily affected by surrounding tissues.
[0108] In some optional embodiments, the training method of the feature segmentation model includes: acquiring a first batch of manually labeled sample data and other batches of unlabeled sample data; training the feature segmentation model based on the first batch of sample data; inputting the unlabeled other batches of sample data from the current batch into the currently trained feature segmentation model to obtain the current sample segmentation result; receiving the current labeling result for the current sample segmentation result, and retraining the currently trained feature segmentation model based on the current labeling result, acquiring the next batch of unlabeled other batches of sample data as the current batch of unlabeled other batches of sample data, and continuing to execute the step of inputting the unlabeled other batches of sample data from the current batch into the currently trained feature segmentation model to obtain the current sample segmentation result, until the performance index of the model on the validation set no longer improves, or reaches the preset maximum number of training iterations, to obtain the trained feature segmentation model.
[0109] For ease of understanding, the following is combined Figure 4 As shown, Figure 4 This is a flowchart of the model training steps in one embodiment. In this embodiment, sample data is first obtained, where the sample data corresponding to the model is the training set data, and validation set data also needs to be prepared for the model.
[0110] The training set included 83 ILD patients (21 of whom had IPF, meeting the 2018 IPF diagnostic guidelines) and 20 non-ILD controls, covering the typical (subpleural honeycomb) and atypical (diffuse ground-glass opacity) manifestations of IPF.
[0111] The validation set included 14 IPF patients (including 5 atypical cases of "possible UIP"), combined with one-year follow-up data (such as cases that progressed to definite PPF) to validate the model's ability to monitor disease progression.
[0112] The annotation process involved five experienced radiologists (3-5 years of experience) who performed layer-by-layer annotation (GGO / CD / RP / HC), followed by review by a senior expert (20 years of experience). To ensure a balanced workload and a sufficient amount of labeled data, a hybrid approach was used to iteratively optimize the model.
[0113] First, the training data is divided into multiple batches, such as five batches (other numbers may be used in other embodiments; no specific limitation is made here). Each batch contains 15-25 additional cases to enhance the learning effect of the model in each iteration. The first batch of sample data is manually labeled to lay the foundation for the model. Subsequent batches are segmented using the pre-trained model and then manually adjusted. This iterative method enables fine-grained labeling and model retraining.
[0114] Specifically, the feature segmentation model is trained based on the first batch of sample data. Then, the unlabeled sample data from other batches in the current batch are input into the currently trained feature segmentation model to obtain the current sample segmentation result. The current sample segmentation result is then output, allowing experts to annotate based on the current sample segmentation result to obtain the current annotation result. This greatly reduces the workload of experts and improves efficiency. Then, the currently trained feature segmentation model is retrained based on the current annotation result until the training stopping condition is met, resulting in a fully trained feature segmentation model.
[0115] In this embodiment, a hybrid approach is used to iteratively optimize the model, ensuring a balanced workload and a sufficient amount of labeled data.
[0116] To facilitate understanding, a training example is provided. To achieve efficient training of a high-precision feature segmentation model while significantly reducing reliance on large-scale, manually labeled data, this application employs an innovative iterative semi-automatic annotation process to train the feature segmentation model. The core of this method lies in efficiently injecting human expert knowledge into the model through iterative correction. This training method specifically includes the following steps:
[0117] S1: Initial model training.
[0118] We obtained the first batch of sample data, which was manually annotated layer by layer by radiologists. We used this first batch of sample data to perform initial training on the feature segmentation model, resulting in a basic pre-trained model.
[0119] S2: Iterative optimization loop.
[0120] Subsequently, the iterative optimization phase begins, with each iteration comprising the following sub-steps:
[0121] S2.1: Model Inference and Initial Segmentation. Obtain the sample data of the current batch that has not been manually labeled (i.e., new HRCT images). Input this batch of data into the latest version of the training model (initially the pre-trained model obtained in S1), and the model will automatically perform inference to generate the initial segmentation results.
[0122] S2.2: Manual Correction of Error Areas. Radiologists do not need to start annotation from scratch. Instead, they review and correct the initial segmentation results generated by the model based on their expertise and the Fleschner Institute glossary. Correction is only performed on areas where the model segmentation has errors (e.g., correcting areas where blood vessels are misidentified as ground-glass opacities, or completing unrecognized honeycomb changes), without affecting areas that have been correctly segmented by the model. This step greatly improves annotation efficiency.
[0123] S2.3: Automatic Training Set Augmentation and Model Retraining. The high-quality labeled data, manually corrected in step S2.2, is automatically added to and augmented into the training dataset. Subsequently, the updated, larger training dataset is used to retrain or fine-tune the current model, resulting in a more powerful next-generation model.
[0124] S3: Loop termination.
[0125] Repeat steps S2.1 to S2.3 to obtain the next batch of unlabeled data and perform a new round of iterations. When the preset training stopping conditions are met (e.g., the model's performance metrics on the independent validation set, such as the Dice coefficient, no longer show significant improvement; or the preset maximum number of iterations has been reached), terminate the training and output the final trained feature segmentation model.
[0126] Through the aforementioned iterative semi-automatic annotation process, this application achieves an optimal balance between annotation workload and model performance. As the number of iterations increases, the model's segmentation ability continuously improves, generating increasingly accurate initial segmentation results. This leads to a gradual reduction in the areas and effort required for manual correction in subsequent batches, thus achieving semi-automation of the annotation process. Furthermore, this process endows the model with high adaptability and growth potential: even when faced with difficult cases with initially unsatisfactory segmentation, simply manually correcting the case and incorporating it into training allows the model to improve its ability to handle similar cases in subsequent iterations.
[0127] This training process, together with the comprehensive constraints (spatial consistency and class consistency) proposed in this application, ensures the high accuracy and robustness of the model in complex IPF image feature segmentation.
[0128] In the above embodiments, an iterative semi-automatic annotation process is adopted, combining a pre-trained model with manual correction, which significantly reduces the workload of annotation. The manually corrected results of the test data in each iteration are re-incorporated into the training dataset, continuously optimizing the model. As the number of training iterations increases, the segmentation results gradually approach the level of manual annotation, thereby reducing the amount of data requiring manual modification and achieving semi-automatic annotation. Furthermore, the manually corrected results of the test set (other batches of sample data) in each iteration are re-incorporated into the training set, and as the number of iterations increases, the segmentation results gradually approach the level of manual annotation. In addition, the model has high adaptability; even if the segmentation results are not ideal, cases can still be manually modified, and training iterations can continue to improve the model's performance and accuracy.
[0129] In some optional embodiments, the training method for the feature segmentation model further includes: initializing the parameters of the feature segmentation model using the Kaiming algorithm; optimizing the parameters of the feature segmentation model using the stochastic gradient descent momentum method, halving the learning rate at the 10th and 20th training epochs, and stopping training at the 30th training epoch or when the segmentation result of the feature segmentation model is determined to have no performance improvement based on the loss function.
[0130] In this application, the model is initialized using the Kaiming method for better convergence and optimized using stochastic gradient descent with momentum (SGDM) with an initial learning rate of 0.001. The learning rate is halved at the 10th and 20th training epochs to facilitate fine-tuning. To reduce the risk of overfitting, an early stopping mechanism is implemented; if no performance improvement is observed during validation, training is terminated at 30 epochs.
[0131] For ease of understanding, a specific embodiment is provided in which the training process of the feature segmentation model adopts a carefully designed optimization strategy. These specific constraints on the training process are the key to ensuring that the model can ultimately segment IPF features with high accuracy.
[0132] Parameter Initialization: To address the vanishing or exploding gradient problem during deep network training and to promote faster and more stable model convergence, this application employs the Kaiming initialization method to initialize model parameters. This method is particularly suitable for ReLU-type activation functions, effectively maintaining the variance stability of the data flow during training.
[0133] Algorithm and Learning Rate Scheduling: The model optimization employs stochastic gradient descent momentum. The introduction of a momentum term helps accelerate convergence and suppress oscillations, making it easier to escape local minima. The initial learning rate is set to 0.001 to maintain stable gradient descent in the early stages of training. To further improve model performance and prevent oscillations near the optimal solution, this embodiment designs a step-by-step learning rate scheduling strategy: the learning rate is halved at the 10th and 20th training epochs. This "step-by-step" descent strategy helps the model to be fine-tuned in the later stages of training, thereby achieving better generalization ability.
[0134] Training Termination Mechanism: To effectively prevent model overfitting, this application introduces an early stopping mechanism. Specifically, the model's performance on the independent validation set is continuously monitored during training. If the validation set performance does not show a significant improvement over several consecutive training epochs (e.g., up to the 30th epoch), training is terminated early. This mechanism ensures that we obtain the model version with the strongest generalization ability, rather than simply the version that best fits the training data.
[0135] In summary, this application constructs an efficient and stable model training framework by collaboratively designing and constraining key aspects of the training process, including model initialization, optimization algorithms, dynamic learning rate scheduling, and termination conditions. This framework is an indispensable component for achieving the superior segmentation performance of this application. Specifically, in this application, the loss function, combined with the Dice coefficient and comprehensive constraints, focuses on optimizing the segmentation accuracy of cellular shadows (HC) and reticular shadows (RP) to improve overall accuracy.
[0136] In some optional embodiments, the method for generating the linear regression model includes: determining the lung function index corresponding to each sample data and the volume proportion corresponding to multiple imaging features related to idiopathic pulmonary fibrosis; and generating a linear regression model based on the lung function index corresponding to each sample data and the volume proportion corresponding to multiple imaging features related to idiopathic pulmonary fibrosis.
[0137] In this application, a plot can be drawn based on the lung function index corresponding to each sample data and the volume proportion corresponding to multiple idiopathic pulmonary fibrosis-related imaging features. For example, the volume proportion corresponding to multiple idiopathic pulmonary fibrosis-related imaging features can be used as the horizontal axis and the lung function index corresponding to each sample data can be used as the vertical axis to draw the corresponding lines. Then, points with large deviations can be removed, and finally, a linear regression model can be generated based on the remaining points. Subsequently, after determining the volume proportion corresponding to multiple idiopathic pulmonary fibrosis-related imaging features, the corresponding functional impairment prediction value can be obtained based on the linear regression model.
[0138] To facilitate understanding, the method for generating this linear regression model is used to establish a quantitative relationship between imaging features of idiopathic pulmonary fibrosis (IPF) and pulmonary function parameters, thereby enabling pulmonary function prediction based on CT quantitative results. The specific steps are as follows:
[0139] Data preparation: Collect lung function indicators (such as DLCO%, FVC%, FEV1%) and their corresponding volume percentages for various idiopathic lung features (obtained by system segmentation and quantification) from sample data (from the training set or independent cohorts). Volume percentages include, but are not limited to, total ILD range, percentage of inflammatory lesions (GGO+CD), and percentage of fibrotic lesions (RP+HC).
[0140] Model generation: Linear regression analysis was used, with the proportion of imaging feature volume as the independent variable (X) and lung function indicators as the dependent variable (Y), to fit a linear equation. Where β is the regression coefficient and ε is the error term. Model parameters are determined using optimization algorithms such as the least squares method, resulting in a pre-trained linear regression model. During model generation, variable selection or regularization can be performed to optimize generalization ability.
[0141] Model validation: The performance of the linear regression model was evaluated using validation set data, and its reliability was ensured by metrics such as R², mean squared error (MSE), or correlation with visual evaluation (as shown in Table 2 of the paper).
[0142] Applications and Outputs: In clinical use, the volume percentage obtained from segmenting new HRCT images is input into this pre-trained model, directly outputting the corresponding predicted lung function values (such as DLCO% predicted values). Furthermore, by comparing the predicted values of the same patient at different time points, a longitudinal trend graph is automatically generated, providing physicians with an objective tool for efficacy assessment and disease progression monitoring.
[0143] This method links imaging quantification with physiological function, realizing an automated process from "imaging features" to "functional prediction," overcoming the subjectivity of visual assessment, and providing a quantifiable endpoint indicator for evaluating the efficacy of antifibrotic treatment.
[0144] In the above embodiments, longitudinal HRCT comparison is supported, and a fibrosis progression trend map is automatically generated, providing an objective endpoint indicator for evaluating the efficacy of antifibrotic treatment.
[0145] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0146] Based on the same concept of this application, embodiments of this application also provide an idiopathic pulmonary fibrosis quantification device for implementing the aforementioned idiopathic pulmonary fibrosis quantification method. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the idiopathic pulmonary fibrosis quantification device provided below can be found in the limitations of the idiopathic pulmonary fibrosis quantification method described above, and will not be repeated here.
[0147] In one exemplary embodiment, such as Figure 5 As shown, a device for quantifying CT features of idiopathic pulmonary fibrosis is provided, comprising: a medical image acquisition module 501, a lung parenchyma segmentation module 502, a feature segmentation module 503, and a prediction module 504, wherein:
[0148] The medical image acquisition module 501 is used to acquire lung medical images to be processed.
[0149] The lung parenchyma segmentation module 502 is used to segment the lung parenchyma in the medical image of the lung to be processed, so as to obtain the bilateral lung regions and the total lung volume;
[0150] The feature segmentation module 503 is used to segment the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and to determine the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume.
[0151] The prediction module 504 is used to determine the predicted value of functional impairment corresponding to the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features based on a pre-generated linear regression model. The linear regression model is used to represent the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of each lung function index.
[0152] In some optional embodiments, the lung parenchyma segmentation module 502 is specifically used to segment the lung parenchyma of three consecutive slices respectively to obtain the bilateral lung regions and total lung volume corresponding to each slice.
[0153] The aforementioned feature segmentation module 503 is specifically used to determine each neighboring pixel corresponding to each central pixel in the intermediate layer based on the bilateral lung regions corresponding to each slice; generate comprehensive constraint conditions based on each central pixel and its corresponding neighboring pixels; simultaneously input the bilateral lung regions corresponding to each slice into the pre-generated feature segmentation model, and obtain multiple imaging features related to idiopathic pulmonary fibrosis under the comprehensive constraint conditions.
[0154] In some optional embodiments, the feature segmentation module 503 is specifically used to determine the first feature distribution result corresponding to each of the center pixels, the second feature distribution result corresponding to each of the neighbor pixels corresponding to the center pixels, and the average feature distribution result of the second feature distribution result corresponding to each of the neighbor pixels; to obtain spatial consistency constraints based on the first feature distribution result and the second feature distribution result; to obtain category consistency constraints based on the first feature distribution result and the average feature distribution result; and to obtain comprehensive constraints based on the spatial consistency parameter corresponding to the spatial consistency constraints and the category consistency parameter corresponding to the category consistency constraints, wherein the spatial consistency parameter is greater than the category consistency parameter.
[0155] In some optional embodiments, the above apparatus further includes: a training module, configured to acquire manually labeled first batch of sample data and unlabeled batches of sample data; train a feature segmentation model based on the first batch of sample data; input unlabeled batches of sample data from the current batch into the currently trained feature segmentation model to obtain a current sample segmentation result; receive a current labeling result for the current sample segmentation result, and retrain the currently trained feature segmentation model based on the current labeling result, acquire the next batch of unlabeled batches of sample data as the current batch of unlabeled batches of sample data, and continue to execute the steps of inputting the current batch of unlabeled batches of sample data into the currently trained feature segmentation model to obtain a current sample segmentation result, until the model's performance metrics on the validation set no longer improve, or the preset maximum number of training iterations is reached, thereby obtaining a trained feature segmentation model.
[0156] In some optional embodiments, the training module is further configured to initialize the parameters of the feature segmentation model using the Kaiming algorithm; optimize the parameters of the feature segmentation model using the stochastic gradient descent momentum method; halve the learning rate at the 10th and 20th training epochs; and stop training at the 30th training epoch or when the loss function determines that the segmentation result of the feature segmentation model has no performance improvement.
[0157] In some optional embodiments, the above apparatus further includes: a linear regression model generation module, used to determine the lung function index corresponding to each sample data and the volume proportion corresponding to multiple idiopathic pulmonary fibrosis-related imaging features; and to generate a linear regression model based on the lung function index corresponding to each sample data and the volume proportion corresponding to multiple idiopathic pulmonary fibrosis-related imaging features.
[0158] Each module in the aforementioned idiopathic pulmonary fibrosis quantification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0159] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a quantitative method for idiopathic pulmonary fibrosis. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0160] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0161] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0162] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0163] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for quantifying CT features of idiopathic pulmonary fibrosis, characterized by, The method includes: Acquire medical images of the lungs to be processed; The lung parenchyma is segmented from the medical images of the lungs to be processed to obtain the bilateral lung regions and the total lung volume; The bilateral lung regions are segmented to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and the volume proportions corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis are determined based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume. Based on a pre-generated linear regression model, the predicted functional impairment value corresponding to the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features is determined. The linear regression model is used to represent the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of each lung function index. The feature segmentation model used to segment the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis is pre-trained, and the feature segmentation model introduces a comprehensive constraint L_prior during training. The comprehensive constraint L_prior is combined with the main loss function L_main of the segmentation task to jointly guide the optimization of the model: L_total = L_main + L_prior. The comprehensive constraint L_prior applies to the middle layer of the three consecutive slices. For the center pixel i in the middle layer, a set N(i) of neighbor pixels in the 7-neighborhood system is defined. The set includes the center pixel itself and the voxels adjacent to it in the six directions of up, down, left, right, front, and back. Let P(i) be the probability distribution vector predicted by the model for the center pixel i, and P(j) be the probability distribution vector predicted for the neighbor pixel j: L_prior=(1 / N)*Σi[λ_s*Ls(i)+λ_c*Lc(i)]; Where N represents the total number of center pixels in a training batch, λ_s is the weight of the spatial consistency parameter, and λ_c is the weight of the class consistency parameter. Set λ_s > λ_c. The Kullback-Leibler divergence, abbreviated as KL, is used to measure the difference between the two probability distributions. The spatial consistency loss Ls is calculated for the center pixel i as follows: Ls(i)=(1 / |N(i)|)*Σ{j∈N(i)}[D_KL(P(i)||P(j))] |N(i)| is the number of pixels in the neighborhood, D_KL(P(i)||P(j))=Σ_cP_c(i)*log(P_c(i) / P_c(j)), where c represents the category; Calculate the KL divergence between the center pixel prediction P(i) and the average prediction Pavg(i), and use it as the class consistency loss Lc: Lc(i) = D_KL(P(i)||P_avg(i)); Pavg(i) is the average probability distribution of all pixels within a 7-neighborhood, including the center pixel itself. Pavg(i)=(1 / |N(i)|)*Σ{j∈N(i)}P(j).
2. The method of claim 1, wherein, The step of segmenting the lung parenchyma in the medical image of the lung to be processed to obtain the bilateral lung regions and total lung volume includes: The lung parenchyma was segmented from three consecutive slices to obtain the bilateral lung regions and total lung volume corresponding to each slice. The segmentation of the bilateral lung regions yields multiple imaging features associated with idiopathic pulmonary fibrosis, including: The lung regions corresponding to each slice are simultaneously input into a pre-generated feature segmentation model to obtain multiple imaging features related to idiopathic pulmonary fibrosis.
3. The method of claim 2, wherein, The comprehensive constraint conditions generated based on each of the center pixels and their corresponding neighbor pixels include: Determine the first feature distribution result corresponding to each of the center pixels, the second feature distribution result corresponding to each of the neighbor pixels corresponding to the center pixels, and the average feature distribution result of the second feature distribution result corresponding to each of the neighbor pixels. Based on the first feature distribution result and the second feature distribution result, obtain the spatial consistency constraint condition. Based on the first feature distribution result and the average feature distribution result, obtain the category consistency constraint condition. Based on the spatial consistency parameter corresponding to the spatial consistency constraint and the category consistency parameter corresponding to the category consistency constraint, a comprehensive constraint is obtained, wherein the spatial consistency parameter is greater than the category consistency parameter.
4. The method according to claim 2, characterized in that, The training method for the feature segmentation model includes: Obtain the first batch of manually labeled sample data and other batches of unlabeled sample data; The feature segmentation model was trained based on the first batch of sample data; Input the unlabeled sample data from other batches in the current batch into the currently trained feature segmentation model to obtain the segmentation result of the current sample; The system receives the current annotation result for the current sample segmentation result, and retrains the currently trained feature segmentation model based on the current annotation result. It obtains the next batch of unlabeled sample data as the current batch of unlabeled sample data, and continues to execute the step of inputting the current batch of unlabeled sample data into the currently trained feature segmentation model to obtain the current sample segmentation result, until the model's performance index on the validation set no longer improves, or the preset maximum number of training iterations is reached, and the trained feature segmentation model is obtained.
5. The method according to claim 4, characterized in that, The training method for the feature segmentation model also includes: The parameters of the feature segmentation model are initialized using the Kaiming algorithm; The parameters of the feature segmentation model are optimized using the stochastic gradient descent momentum method. The learning rate is halved at the 10th and 20th training epochs. Training is stopped at the 30th training epoch or when the loss function determines that the segmentation result of the feature segmentation model has no performance improvement.
6. The method according to claim 4, characterized in that, The method for generating the linear regression model includes: Determine the lung function indicators corresponding to each sample data and the volume proportion corresponding to multiple imaging features related to idiopathic pulmonary fibrosis; A linear regression model is generated based on the lung function indicators corresponding to each sample data and the volume proportions corresponding to multiple imaging features related to idiopathic pulmonary fibrosis.
7. A device for quantifying CT features of idiopathic pulmonary fibrosis, characterized in that, The device includes: The medical image acquisition module is used to acquire lung medical images to be processed. The lung parenchyma segmentation module is used to segment the lung parenchyma in the medical image of the lung to be processed, so as to obtain the bilateral lung regions and the total lung volume; The feature segmentation module is used to segment the bilateral lung regions to obtain multiple imaging features related to idiopathic pulmonary fibrosis, and to determine the volume proportion corresponding to the multiple imaging features related to idiopathic pulmonary fibrosis based on the multiple imaging features related to idiopathic pulmonary fibrosis and the total lung volume. The prediction module is used to determine the predicted value of functional impairment corresponding to the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features based on a pre-generated linear regression model. The linear regression model is used to represent the volume proportion of the multiple idiopathic pulmonary fibrosis-related imaging features and the correlation of each lung function index. The feature segmentation module uses a pre-trained feature segmentation model, and the feature segmentation model introduces a comprehensive constraint L_prior during training. The comprehensive constraint L_prior is combined with the main loss function L_main of the segmentation task to jointly guide the optimization of the model: L_total = L_main + L_prior. The comprehensive constraint L_prior applies to the middle layer of the three consecutive slices. For the center pixel i in the middle layer, a set N(i) of neighbor pixels in the 7-neighborhood system is defined. The set includes the center pixel itself and the voxels adjacent to it in the six directions of up, down, left, right, front, and back. Let P(i) be the probability distribution vector predicted by the model for the center pixel i, and P(j) be the probability distribution vector predicted for the neighbor pixel j: L_prior=(1 / N)*Σi[λ_s*Ls(i)+λ_c*Lc(i)]; Where N represents the total number of center pixels in a training batch, λ_s is the weight of the spatial consistency parameter, and λ_c is the weight of the class consistency parameter. Set λ_s > λ_c. The Kullback-Leibler divergence, abbreviated as KL, is used to measure the difference between the two probability distributions. The spatial consistency loss Ls is calculated for the center pixel i as follows: Ls(i)=(1 / |N(i)|)*Σ{j∈N(i)}[D_KL(P(i)||P(j))] |N(i)| is the number of pixels in the neighborhood, D_KL(P(i)||P(j))=Σ_cP_c(i)*log(P_c(i) / P_c(j)), where c represents the category; Calculate the KL divergence between the center pixel prediction P(i) and the average prediction Pavg(i), and use it as the class consistency loss Lc: Lc(i) = D_KL(P(i)||P_avg(i)); Pavg(i) is the average probability distribution of all pixels within a 7-neighborhood, including the center pixel itself. Pavg(i)=(1 / |N(i)|)*Σ{j∈N(i)}P(j).
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.