A method, device, and electronic equipment for hierarchical and quantitative assessment of lesion characteristics in CT images of high-altitude pulmonary edema.
By using a 3D classification convolutional neural network and class activation mapping technology, the problem of quantitative assessment of diffuse high-altitude pulmonary edema lesions was solved, achieving high-precision 3D spatial localization and quantitative assessment, and reducing data annotation costs and the number of model parameters.
Patent Information
- Application Number
- CN202611270916.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies struggle to accurately and quantitatively assess diffuse high-altitude pulmonary edema lesions. The lack of clear boundaries leads to high noise in segmentation network training labels, resulting in high pixel-level annotation costs. CAM technology has low positioning accuracy and cannot directly process 3D CT volume data. Multi-scene hierarchical models have a large number of parameters and low training efficiency.
A three-dimensional classification convolutional neural network is used to identify the presence of lesions. The discrimination signal is back-mapped to three-dimensional space through class activation mapping. Combined with hierarchical partitioning and weight sharing strategies, quantifiable lesion region masks and quantitative parameters are generated, reducing data annotation costs and improving localization accuracy and training efficiency.
It achieves three-dimensional spatial localization and quantitative assessment of diffuse lesions. The CAM localization accuracy surpasses that of dedicated segmentation networks, the Dice coefficient reaches 0.82, the number of parameters is reduced by 68%, and the training time is shortened by 50%.
Smart Images

Figure CN123120260A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical image processing and artificial intelligence-assisted diagnosis technology, specifically a method, device and electronic equipment for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema. Background Technology
[0002] High-altitude pulmonary edema (HAPE) is a severe idiopathic disease of high altitude, characterized on CT imaging by diffuse, ground-glass opacities with no clear anatomical boundary between the lesions and normal lung tissue, exhibiting an asymmetrical distribution. Quantitative assessment of HAPE on CT images is crucial for determining the severity of the condition and for monitoring treatment follow-up.
[0003] In existing technologies, the quantitative assessment of lesions in CT images typically employs the following approach: first, the lesion is segmented at the pixel or voxel level using a fully supervised segmentation network, such as U-Net and its 3D variants; then, quantitative parameters such as volume and density are calculated based on the segmentation results. This approach relies on two prerequisites: (1) the lesion has clear boundary features that the segmentation network can learn from; and (2) there is a sufficient amount of pixel-level labeled data for training the segmentation network.
[0004] However, for diffuse lesions such as high-altitude pulmonary edema, both of the above prerequisites are difficult to meet. First, there is no clear anatomical boundary between diffuse lesions and normal tissue, and the consistency of lesion boundary annotation among different radiologists is low, resulting in significant noise in the training labels of fully supervised segmentation networks. Second, pixel-level annotation of 3D medical images is costly, and layer-by-layer annotation is extremely time-consuming, limiting the scale of annotated data. Therefore, the segmentation accuracy of existing fully supervised segmentation networks on diffuse lesions is insufficient to meet the needs of clinical quantitative assessment.
[0005] Class activation mapping (CAM) is a commonly used visualization tool in classification convolutional neural networks, used to interpret the image regions on which classification decisions are based. Existing technologies have attempted to use CAM for lesion localization in medical images, such as a CAM-based interpretable joint classification and segmentation system for lung nodules, and a Grad-CAM-based method for pneumonia lesion segmentation. However, existing CAM technologies have the following limitations: (1) CAM outputs are typically two-dimensional activation maps, making them difficult to directly use for voxel-level spatial localization in three-dimensional medical images; (2) The localization accuracy of CAM is generally considered to be far lower than that of dedicated segmentation networks. Therefore, existing technologies only use CAM as a visualization tool and do not use it to replace segmentation networks for quantitative assessment of lesions; (3) Existing CAM technologies only output qualitative attention distribution maps and do not convert their outputs into quantifiable three-dimensional spatial parameters.
[0006] In summary, a technological bias exists in this field: it is believed that accurate quantitative assessment of lesions must rely on high-precision, fully supervised segmentation networks, while classification networks' CAM (Computed Tomography Algorithm) can only provide coarse attention regions and lacks the precision for quantitative measurement; its localization accuracy is far lower than that of dedicated segmentation networks. Influenced by this bias, those skilled in the art generally lack the motivation to upgrade CAM from a visualization tool to a spatial localization and quantification tool, and even less the motivation to use CAM to replace segmentation networks in addressing the quantitative assessment of diffuse lesions. Therefore, how to overcome the technological bias that CAM's localization accuracy is lower than that of segmentation networks while maintaining the advantages of weak supervision of classification networks, and thus enable its application to the three-dimensional spatial localization and quantitative assessment of diffuse lesions, has become a pressing technical challenge in this field. Summary of the Invention
[0007] To address the above problems, this invention provides a method, device, and electronic device for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema, which solves the following technical problems: (1) Existing fully supervised segmentation networks cannot achieve accurate localization due to the lack of clear boundaries in diffuse lesions; (2) Existing CAM technology is only used as a qualitative visualization tool and fails to quantify its spatial localization information; (3) Existing CAM technology is limited to two-dimensional space and cannot effectively process three-dimensional CT volume data; (4) Existing hierarchical models suffer from large parameter quantities and low training efficiency due to independent training in multiple scenarios.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0009] The first aspect of this application provides a method for hierarchical partitioning and quantitative evaluation of lesion features in CT images of high-altitude pulmonary edema. The method includes: acquiring a two-dimensional CT slice sequence of CT images of high-altitude pulmonary edema of a target object, and reconstructing the two-dimensional CT slice sequence into three-dimensional volume data; inputting the three-dimensional volume data into a hierarchical partitioning feature extraction model, wherein the hierarchical partitioning feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region serves as the input of the specific discrimination region; receiving a target scene identifier, invoking the weight branch of the specific discrimination region bound to the target scene identifier, and combining the general feature extraction... The shared weights of the regions are used for forward propagation to output a binary probability value indicating the presence of the target lesion. In response to the classification result indicating the presence of the target lesion based on the binary probability value, the feature map of the last feature extraction layer in the hierarchical partition feature extraction model is extracted. Combined with the weights of the fully connected layers in the hierarchical partition feature extraction model, the weighted sum of each channel of the feature map is calculated to generate class activation map volume data reflecting the three-dimensional spatial distribution of the target lesion. Based on the class activation map volume data, a lesion region mask is determined. Based on the lesion region mask and the voxel spatial resolution of the three-dimensional volume data, at least one quantitative evaluation parameter of the target lesion is calculated.
[0010] A second aspect of this application provides a device for hierarchical partitioning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema. The device includes: a data reconstruction module for acquiring a two-dimensional CT slice sequence of CT images of high-altitude pulmonary edema of a target object and reconstructing the two-dimensional CT slice sequence into three-dimensional volumetric data; a feature extraction and hierarchical discrimination module for inputting the three-dimensional volumetric data into a hierarchical partitioning feature extraction model, wherein the hierarchical partitioning feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region serves as the input of the specific discrimination region; receiving a target scene identifier, calling the weight branch of the specific discrimination region bound to the target scene identifier, and combining the shared weights of the general feature extraction region. A forward propagation is performed to output a binary probability value indicating the presence of a target lesion. A class activation map generation module, in response to the classification result indicating the presence of the target lesion based on the binary probability value, extracts the feature map of the last feature extraction layer in the hierarchical partitioning feature extraction model, combines the weights of the fully connected layers of the hierarchical partitioning feature extraction model, calculates the weighted sum of each channel of the feature map, and generates class activation map volume data reflecting the three-dimensional spatial distribution of the target lesion. A lesion region determination module is used to determine a lesion region mask based on the class activation map volume data. A quantitative parameter calculation module is used to calculate at least one quantitative evaluation parameter of the target lesion based on the lesion region mask and the voxel spatial resolution of the three-dimensional volume data.
[0011] A third aspect of this application provides an electronic device, comprising: a processor; and a memory for storing one or more programs that, when executed by the processor, cause the processor to perform the method described above.
[0012] Compared with the prior art, the technical effects of the present invention are as follows:
[0013] (1) It breaks through the dependence on pixel-level annotation and solves the problem that the segmentation network cannot be effectively trained due to the blurred boundaries of diffuse lesions.
[0014] The technical approach adopted in this invention differs fundamentally from existing technologies. Existing technologies follow the conventional approach of segmentation followed by quantification, which presupposes that the lesions possess clear boundary features for the segmentation network to learn from. However, diffuse lesions such as high-altitude pulmonary edema lack clear anatomical boundaries with normal tissue, and pixel-level annotations themselves exhibit significant inter-observer variability, resulting in noisy training labels for the fully supervised segmentation network and limiting segmentation accuracy. This invention abandons the aforementioned conventional approach, employing a reverse technical path: first, a 3D classification convolutional neural network is used to determine the presence of lesions; then, class activation mapping is used to reverse-map the classification signal back to 3D space for lesion localization; finally, quantitative parameters are calculated based on the localization results. Since the training of the 3D classification convolutional neural network only requires image-level labels—that is, whether the CT image contains lesions—and does not require pixel-level annotation, it fundamentally avoids the annotation noise problem caused by blurred boundaries in diffuse lesions, while also significantly reducing data annotation costs.
[0015] (2) The class activation mapping is upgraded from a qualitative visualization tool to a quantitative measurement tool, which solves the problem that the existing CAM technology can only output heat maps and cannot provide quantifiable indicators.
[0016] In existing technologies, Class Activation Mapping (CAM) is merely used as an auxiliary interpretation tool for classification networks. Its output is a color heatmap, allowing doctors to visually observe the image regions upon which classification decisions are based. This falls under the category of qualitative display and cannot directly serve clinical quantitative assessment. This invention uses the output of Class Activation Mapping as an intermediate result rather than the final output for lesion spatial localization. Through adaptive threshold segmentation, the Class Activation Mapping volume data is transformed into a quantifiable lesion region mask. Then, based on this mask and the voxel spatial resolution of the 3D volume data, quantitative parameters such as lesion volume and average lesion density are automatically calculated. Therefore, in this invention, CAM is no longer just a visualization tool showing where the model focuses, but a quantitative measurement tool for measuring lesion size and density, achieving a leap from qualitative to quantitative analysis and providing referable quantitative indicators for precise clinical assessment.
[0017] (3) Extending class activation mapping from two-dimensional space to three-dimensional space solves the problem that existing CAM technology cannot directly process three-dimensional CT volume data.
[0018] Existing CAM technology is geared towards two-dimensional image design, such as X-ray films or single CT slices. The activation maps generated are two-dimensional planar responses and cannot be directly applied to three-dimensional CT volumetric data. If two-dimensional CAM is applied layer by layer to each slice of a three-dimensional CT and then stacked, the spatial continuity between slices will be destroyed, introducing inter-slice localization errors. This invention extracts the three-dimensional feature map output from the last three-dimensional convolutional layer of a three-dimensional classification convolutional neural network, and calculates the weighted sum of each channel by combining the weights of the fully connected layers. This directly generates three-dimensional class activation mapping volumetric data with the same spatial dimension as the input three-dimensional volumetric data. This allows the discrimination signal of the classification network to be directly mapped to each voxel position in three-dimensional space, maintaining spatial consistency in the depth direction. This effectively solves the problem of spatial information loss when extending two-dimensional CAM to three dimensions, providing spatially aligned input for subsequent voxel-level lesion localization and quantitative calculation.
[0019] (4) By using a hierarchical partitioning and weight sharing strategy, the problem of large number of parameters and low training efficiency of multi-scenario hierarchical models is solved.
[0020] Existing technologies, when handling multiple clinical grading scenarios, such as normal vs. mild, mild vs. moderate, and moderate vs. severe, typically train a complete model independently for each scenario. This results in a linear increase in the total number of parameters with the number of scenarios, leading to a doubling of training time and deployment resource requirements. This invention employs a hierarchical partitioned feature extraction model, dividing the network into a general feature extraction region and a specific discrimination region: the general feature extraction region shares parameters across all scenarios, extracting cross-scenario common features; the specific discrimination region sets independent weight branches according to each scenario, extracting scenario-specific discriminative features. During the inference phase, this invention further receives the target scenario identifier and dynamically calls the weight branches bound to that scenario, combining them with shared weights for forward propagation. This mechanism allows for coverage of all scenarios with only one set of shared parameters and multiple sets of small-scale branch parameters. The number of parameters is reduced from approximately 165 million in independently trained five complete models to approximately 53 million in this invention, a reduction of approximately 68%; training time is shortened from approximately 50 hours of independent training to approximately 25 hours of pre-training plus fine-tuning, a reduction of approximately 50%, significantly reducing the resource requirements for model training and deployment.
[0021] (5) A comparative experiment was conducted on a high-altitude pulmonary edema CT image test set. The experimental conditions were as follows: the test set included HAPE CT images of four levels: normal, mild, moderate, and severe. The lesion regions were independently annotated by two or more senior radiologists, and the intersection was taken as the gold standard. The comparison methods included: CAM localization of the conventional 3D U-Net fully supervised segmentation network and the standard 3D ResNet classification network, i.e., without the hierarchical partitioning and weight sharing optimization of this invention. The experimental results showed that the CAM localization result of this invention reached a Dice coefficient of 0.82 compared with manually annotated data, while the Dice coefficient of 3D U-Net was only 0.71, and the Dice coefficient of the standard 3D ResNet was 0.74. This invention is the first to achieve CAM localization accuracy of the classification network surpassing that of the dedicated segmentation network. Attached Figure Description
[0022] Figure 1 A flowchart of a method for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema provided by the present invention;
[0023] Figure 2 The flowchart for reconstructing two-dimensional CT slice sequences into three-dimensional volume data in the method for hierarchical partitioning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema provided by the present invention;
[0024] Figure 3 The flowchart of calling the specific discrimination region weight branch bound to the target scene identifier in the lesion feature hierarchical partitioning and quantitative evaluation method of CT images of high-altitude pulmonary edema provided by the present invention;
[0025] Figure 4 The flowchart of the two-stage training of the hierarchical partitioning feature extraction model in the hierarchical partitioning and quantitative assessment method of CT images of high-altitude pulmonary edema provided by the present invention;
[0026] Figure 5 The flowchart for determining the lesion region mask based on class activation map volume data in the hierarchical partitioning and quantitative assessment method of lesion features in CT images of high-altitude pulmonary edema provided by the present invention;
[0027] Figure 6 The flowchart for calculating the total volume of lesions in the method for hierarchical zoning and quantitative assessment of lesion characteristics in CT images of high-altitude pulmonary edema provided by the present invention;
[0028] Figure 7 A block diagram of a device for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema provided by the present invention;
[0029] Figure 8 The schematic diagram illustrates a module diagram of an electronic device according to an exemplary embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the technical solution, the present invention will be described in detail below with reference to embodiments. The description in this part is only exemplary and explanatory, and should not be used to limit the scope of protection of the present invention in any way.
[0031] like Figure 1 The diagram shows a flowchart of a method for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema, provided by an embodiment of the present invention. The method includes:
[0032] Step S110: Obtain the two-dimensional CT slice sequence of the high-altitude pulmonary edema CT image of the target object, and reconstruct the two-dimensional CT slice sequence into three-dimensional volume data.
[0033] This step aims to convert the raw medical imaging data into a tensor format suitable for processing by a 3D deep learning model. The high-altitude pulmonary edema CT images of the target subject are typically stored in DICOM (Digital Imaging and Communications in Medicine) format, containing a series of two-dimensional slice images arranged continuously along the Z-axis (the long axis of the human body). By stacking this series of two-dimensional slice images along the Z-axis according to their spatial location information, a three-dimensional data structure with length, width, and height—that is, 3D volumetric data—is constructed. This 3D volumetric data not only preserves the anatomical structure information of the lungs but also fully retains the continuous distribution characteristics of the lesions in three-dimensional space.
[0034] For example, by parsing the pixel spacing and layer thickness information in the DICOM file header, the slice images can be resampled to a unified physical coordinate system for stacking; or they can be logically stacked directly according to the slice number, and the resolution can be unified in subsequent processing. Using a 3D convolutional neural network to process this 3D volumetric data can capture the spatial contextual information of pulmonary edema lesions.
[0035] Specifically, such as Figure 2 As shown, this embodiment of the invention provides a flowchart for reconstructing a two-dimensional CT slice sequence into three-dimensional volume data. The method includes:
[0036] Step S210: Resample the two-dimensional CT slice sequence to a preset fixed number of layers to obtain resampled volume data.
[0037] Obtain the sorted and filtered 2D CT slice sequences of the target objects. Due to the influence of different CT equipment scanning protocols or differences in patient body size, the number of slices in the original slice sequences often fluctuates, resulting in inconsistencies in the Z-axis dimension of the data input into the 3D convolutional neural network. To eliminate the impact of dimensional differences on model memory usage and computational graph stability, the original slice sequences need to be standardized to a uniform spatial dimension.
[0038] A preset fixed number of slices is used as a key preprocessing parameter, determined based on a balance between the range of routine clinical chest CT scans and the computational efficiency of the 3D network. In practice, this preset fixed number of slices can be set to, for example, 64 slices. For routine clinical CT scans with a slice thickness of 5mm, the typical number of slices covering the lung apex to the lung base is usually between 50 and 70 slices. 64 slices is in the middle of this range, which can preserve the integrity of the anatomical structure to the greatest extent. For high-precision scans with a thinner slice thickness, such as 1.25mm, although the original number of slices can reach more than 200 slices, downsampling to 64 slices can significantly reduce the computational complexity of the subsequent 3DResNet-18 model, while effectively preserving the three-dimensional morphological features of the lesions through interpolation algorithms.
[0039] A linear interpolation algorithm is used to calculate and generate new slice pixel values between adjacent original slices, thereby reconstructing a sequence with any original layer number N into resampled volume data with a preset fixed layer number M (i.e., 64). The shape of this resampled volume data can be represented as (M, H, W), where H and W correspond to the length and width of the CT image, respectively, typically 512 pixels. The resulting resampled volume data has a uniform Z-axis resolution, providing a standardized input basis for subsequent 3D feature extraction.
[0040] Step S230: Based on the preset density window of the target tissue, the resampled volume data is truncated and linearly normalized to obtain three-dimensional volume data.
[0041] To address the issue of excessively wide dynamic range and the inclusion of a large amount of irrelevant information in CT values (Hunsfield Units, HU), which hinders neural network convergence, a preset density window is introduced to constrain the resampled volumetric data. The preset density window is a numerical range defined based on the distribution characteristics of CT values in the lungs and related soft tissues. Its purpose is to eliminate extremely low-density gas background and extremely high-density metallic artifacts or bone structures that do not contribute to the diagnosis of high-altitude pulmonary edema, thereby focusing on the effective density range of the lung parenchyma, blood vessels, and edematous lesions.
[0042] In this embodiment, the preset density window can be set to, for example, -700 HU to 1500 HU. The lower limit of -700 HU roughly corresponds to the lower limit of CT value of lung parenchyma, which can effectively exclude extrapulmonary gas; the upper limit of 1500 HU roughly corresponds to the upper limit of density of bone cortex, which can cover intrapulmonary blood vessels, soft tissues and possible calcifications, while shielding the extremely high value artifacts generated by metal implants.
[0043] The process iterates through each voxel in the resampled volumetric data. If the CT value of a voxel is less than the lower limit of a preset density window (less than -700 HU), it is forcibly assigned the lower limit value. If the CT value of a voxel is greater than the upper limit of the preset density window (greater than 1500 HU), it is forcibly assigned the upper limit value. If the voxel value is within the window range, it remains unchanged. Through truncation, the dynamic range of the input data is compressed to an effective range for medical imaging diagnosis.
[0044] Based on this, linear normalization is performed, mapping the truncated CT values from the [−700, 1500] interval to a numerical interval more easily handled by the neural network model, such as [0, 1]. This mapping process can be formally represented as:
[0045] (1)
[0046] In the formula, This represents the CT value of the truncated voxel. This indicates the lower limit of the preset density window (-700). This indicates that the upper limit of the preset density window is 1500. This represents the normalized output value. After the above truncation and linear normalization, the final three-dimensional volumetric data suitable for model input is obtained. This three-dimensional volumetric data not only eliminates the influence of differences in brightness gain between different CT devices, but also highlights the feature responses of high-altitude pulmonary edema lesions, ground-glass opacities, and typical values of approximately -500 HU to -200 HU, effectively improving the accuracy of subsequent 3D convolutional neural network extraction of lesion features and the convergence speed of the model.
[0047] Through the aforementioned resampling and normalization operations, the original, chaotic 2D CT slice sequence was transformed into standardized, numerically normalized 3D volumetric data. The preset fixed number of slices eliminated uncertainty in the Z-axis dimension, ensuring the robustness of the model's inference structure; the introduction of a preset density window, through numerical truncation and linear transformation, eliminated irrelevant noise and enhanced the density characteristics of the target tissue. These two steps worked closely together to construct high-quality model input data, laying a solid data foundation for accurate hierarchical zoning and quantitative assessment of high-altitude pulmonary edema lesions.
[0048] In the specific implementation process, the pydicom library can be used to read the raw DICOM file of the target object's high-altitude pulmonary edema CT images, and the sequence with SOPClassUID 1.2.840.10008.5.1.4.1.1.2 (CT Image Storage) can be filtered. The images are then sorted by the Z-coordinate of either InstanceNumber or ImagePositionPatient. The number of slices is verified; if the number of slices is less than 40 or greater than 70, a warning is issued and logged, but processing is allowed to continue. All slices are stacked into a numpy.ndarray with a shape of (N, 512, 512), where N is the number of slices.
[0049] Then, SimpleITK.Resample is used to interpolate N to a fixed 64 layers using linear interpolation, resulting in an output shape of (64, 512, 512). The CT values are clipped to [-700HU, 1500HU] and then linearly normalized to the [0,1] interval.
[0050] Step S130: Input the three-dimensional volume data into the hierarchical partition feature extraction model, wherein the hierarchical partition feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region is used as the input of the specific discrimination region; receive the target scene identifier, call the weight branch of the specific discrimination region bound to the target scene identifier, combine the shared weight of the general feature extraction region for forward propagation, and output a binary classification probability value indicating whether the target lesion exists.
[0051] In this step, the preprocessed 3D volumetric data is input into a hierarchical partitioned feature extraction model. This model employs a deep neural network architecture to automatically extract features related to high-altitude pulmonary edema from the 3D volumetric data and perform grading discrimination. The model uses a partitioned network structure, specifically including a general feature extraction region and a specific discrimination region. The general feature extraction region is responsible for extracting basic image features that are common across different scenarios from the input data, such as low-level features like edge responses, local texture patterns, and density gradient distributions in the images. The specific discrimination region is used to further extract discriminative features closely related to specific clinical grading scenarios based on the general features. The output of the general feature extraction region serves as the input to the specific discrimination region, and the two are cascaded to form a complete feature extraction chain.
[0052] In this partitioning structure, the general feature extraction region consists of multiple consecutive convolutional layers at the front of the model, whose weight parameters are shared across different scenarios, thus ensuring that the model can learn robust general feature representations. The specificity discrimination region is located at the back of the model and contains multiple parallel weight branches. Each weight branch is bound to a specific target scene identifier, corresponding to different binary classification tasks, such as multiple binary classification scenarios like abnormal vs. normal, mild vs. moderate, etc.
[0053] The target scenario identifier indicates the specific grading scenario to be executed. During inference, the system receives the target scenario identifier and, based on this identifier, calls the corresponding weight branch to load it into the specific discrimination region. When the data flows through the general feature extraction region, shared weights are used to calculate general features. Subsequently, in the specific discrimination region, the currently invoked weight branch is used to further process these features, finally outputting a binary classification probability value through a fully connected layer and activation function. This binary classification probability value indicates the probability of the target lesion's existence in the current grading scenario. Through this structure combining sharing and branching, the model can flexibly adapt to various clinical grading scenarios while ensuring general feature extraction capabilities.
[0054] In practical applications, multiple feature extraction layers in the hierarchical partitioning feature extraction model are all three-dimensional basic residual blocks. These three-dimensional basic residual blocks are the fundamental computational units for constructing the hierarchical partitioning feature extraction model. Unlike traditional two-dimensional convolutional networks, this structure uses 3D convolutional kernels to directly process three-dimensional volume data, enabling it to capture the continuous topological relationships and volumetric features of lung lesions in space. Each basic residual block contains cross-layer connections, directly adding the input features to the output features after convolutional transformation, forming a residual mapping of F(x)+x. This design allows the network to learn the residual mapping rather than directly learning the target mapping, effectively mitigating the gradient vanishing or degradation problem caused by increasing network depth, and ensuring the ability of deep networks to model complex HAPE lesion features.
[0055] Specifically, the general feature extraction region contains the first N feature extraction layers in the hierarchical partitioning feature extraction model, which are used to extract general features across scenarios.
[0056] The general feature extraction region constitutes the main part of the model responsible for low-level perception and general feature encoding. This region aggregates all network layers from the input layer to the Nth feature extraction layer. These layers focus on extracting basic anatomical structures and pathological morphologies of HAPE that do not change with specific scene levels, such as lung texture orientation, lobe boundaries, and basic texture patterns of lesions. By sharing multi-scene training data as input to this region for pre-training, the general feature extraction region can learn robust cross-scene general feature representations, providing stable high-dimensional feature inputs for subsequent scene-specific discrimination, and avoiding the waste of computational resources caused by repeatedly training the low-level feature extractor for each scene.
[0057] The specific discrimination region includes the remaining feature extraction layers in the hierarchical partitioning feature extraction model, excluding the first N feature extraction layers, and is used to extract scene-specific discrimination features.
[0058] The specific discrimination region is a functional module that executes the logic for specific binary classification tasks. Located after the general feature extraction region, this region receives the general feature map output by the former as input and performs further nonlinear transformations and feature fusion on it. For different binary classification scenarios, such as normal vs. mild, mild vs. moderate, the network parameters in this region are configured independently for each scenario. This allows the model to learn and extract highly discriminative scenario-specific features based on the decision boundaries of a specific task. This partitioned structure enables the model to share general visual knowledge while flexibly adapting to different clinical grading standards.
[0059] The first N feature extraction layers are the first 13 layers of the hierarchical partition feature extraction model, and the remaining feature extraction layers are the 14th layer and subsequent network layers of the hierarchical partition feature extraction model.
[0060] This step specifically defines the physical boundary between the general feature extraction region and the specific discrimination region in the 3D ResNet-18 network architecture. Specifically, the first 13 layers encompass all weighted layers from the initial convolutional layer conv1 through layer1, layer2, and ending at layer3. These layers constitute the shared backbone network for feature extraction, with parameters fixed and reused across all scenarios. Layer 14 and subsequent layers, i.e., layer 4, contain four convolutional layers and the final fully connected layer fc, forming the specific discrimination region. In actual operation, the weight parameters of the first 13 layers are frozen, and only the 14th layer and subsequent layers undergo independent fine-tuning training and inference computation. Through this structural division, the number of model parameters is reduced by approximately 68% compared to independently training five complete models, and the training time is shortened by approximately 50%, significantly improving the deployment and iteration efficiency of the model while maintaining hierarchical accuracy.
[0061] In this embodiment, a three-dimensional residual network is used as the basic framework of the hierarchical partitioning feature extraction model. Specifically, the three-dimensional residual network includes a conv1 convolutional layer (7×7×7 convolutional kernel), a bn1 batch normalization layer, a ReLU activation layer, a maxpooling layer (3×3×3 pooling kernel), and four _make_layer structures (layer1 to layer4). Each _make_layer contains multiple three-dimensional basic residual blocks (BasicBlock3D). The general feature extraction region consists of conv1, bn1, ReLU, maxpool, and layers1 to 3, and its weight parameters are shared across all binary classification scenarios. The specific discrimination region consists of layer4 and a fully connected layer, and its weight parameters are set independently according to the scenario.
[0062] In this embodiment of the invention, the target scenario identifier serves as the logical entry point for model inference scheduling, indicating the specific clinical discrimination dimension targeted by the current inference task. This target scenario identifier corresponds to five binary classification scenarios for high-altitude pulmonary edema: normal vs. abnormal, normal vs. mild, normal vs. severe, mild vs. moderate, and moderate vs. severe. These five scenarios constitute the core decision-making path covering the entire clinical diagnostic process: the normal vs. abnormal scenario is used for initial screening to exclude healthy individuals; the normal vs. mild and normal vs. severe scenarios are used for early identification and risk stratification; and the mild vs. moderate and moderate vs. severe scenarios are used for disease assessment and treatment monitoring.
[0063] Each binary classification scenario corresponds to an independent weight branch in the specific discrimination region. Within the specific discrimination region of the model architecture, each of the five scenarios has its own independent set of network parameters. These weight branches, based on the shared features output from the general feature extraction region, further learn the discrimination boundary for specific contrast dimensions. For example, the weight branches for normal and mild scenarios focus on capturing subtle feature differences in early ground-glass opacities, while the weight branches for moderate and severe scenarios focus on quantifying the proportion and distribution density of real regions.
[0064] By establishing a one-to-one mapping between scenarios and weight branches, the system can accurately load the corresponding independent weight branch when it receives a specific target scenario identifier, thereby outputting the optimal classification result for that specific scenario. This configuration method allows a single model architecture to flexibly adapt to diverse clinical grading needs, ensuring reliable auxiliary diagnostic evidence at each key stage from initial screening to severe case assessment.
[0065] In one alternative implementation, such as Figure 3 As shown, this embodiment of the invention also provides a specific implementation mechanism for invoking the weighted branch of the specific discrimination region bound to the target scene identifier. The method includes:
[0066] Step S310: Keep the shared weight parameters of the general feature extraction region resident in memory.
[0067] Shared weight parameters can refer to the neural network layer parameters contained in the general feature extraction region of a hierarchical partitioned feature extraction model. These parameters remain fixed across multiple binary classification scenarios and are used to extract lung CT image features that are common to multiple scenarios. During system initialization or the first model loading phase, the shared weight parameter file corresponding to the general feature extraction region is loaded from persistent storage media, such as an encrypted hard disk file, to the high-speed memory of the computing device, such as video memory or RAM.
[0068] The loading process is accomplished through tensor copying or memory mapping operations, ensuring that the shared weight parameters reside on the physical storage medium. This resident state remains valid throughout system operation, guaranteeing that these parameters are always located in a directly accessible high-speed storage area during subsequent inference processes for different scenarios, avoiding the need for repeated input / output (I / O) read operations each time a scene is switched. The physical significance of maintaining residency lies in eliminating the time overhead and hardware bandwidth consumption of repeatedly loading large parameter matrices, such as 3D convolutional kernel weights, thereby providing a zero-latency data access foundation for high-frequency multi-scene switching.
[0069] Step S330: In response to receiving the target scene identifier, the current weight branch of the specific discrimination region is replaced with the target weight branch corresponding to the target scene identifier, and the shared weight parameters remain unchanged during the replacement process.
[0070] The specific discriminant region can refer to the network layer in a hierarchical partitioning feature extraction model responsible for extracting scene-specific discriminant features. Its weight parameters are independent for different binary classification scenarios. The target scene identifier is a unique identifier triggered by user input or system scheduling commands, used to specify the type of binary classification task to be performed, such as Scene 1: Normal vs. Abnormal, or Scene 2: Mild vs. Moderate. Weight branches can refer to independent sets of parameters corresponding one-to-one with a specific scene identifier. Each branch stores the optimal weight matrix of each layer in the specific discriminant region for that scene.
[0071] Upon receiving a target scene identifier, the system parses the identifier and locates the target weight branch file matching that identifier in the parameter storage pool according to a pre-defined mapping relationship. This mapping relationship can be stored using a hash table or a key-value pair structure, where the key is the scene identifier and the value is the storage path or memory offset of the weight file. Subsequently, memory allocation and parameter copying are performed. A parameter buffer is reallocated in video memory for the specific discrimination region, and the numerical data from the target weight branch is loaded into this buffer. During this process, the video memory space occupied by the current weight branch is released or marked as overwriteable, thus completing a physical replacement. Finally, a pointer reference is established between the model computation graph and the newly generated weight buffer, allowing subsequent forward propagation calculations to directly read the parameter values from the target weight branch.
[0072] The key constraint of this replacement process is that the shared weight parameters of the general feature extraction region remain unchanged in value and storage location throughout the entire replacement cycle. A memory isolation mechanism ensures that weight update operations for the specific discrimination region are strictly limited to the memory address range of that region; no write or copy instructions may touch the physical address where the general feature extraction region is located.
[0073] This isolation mechanism can be implemented, for example, by strictly managing the reference count of tensor objects within the deep learning framework, or by explicitly specifying the target pointer offset in the memory operations of the underlying unified computing device architecture. This mechanism enables a static backbone and dynamic header model runtime architecture, allowing a single model instance to switch between different scenarios with minimal data exchange (only the parameters of the specific discrimination region) without reloading shared parts, significantly reducing system resource consumption and improving response speed.
[0074] By maintaining the memory residency of the general feature extraction parameters and dynamically replacing the branches of the specific discrimination region, the high-altitude pulmonary edema CT image evaluation system can seamlessly support rapid switching between multiple binary classification scenarios within the same memory space. The constant residency of shared weight parameters eliminates repetitive I / O loading latency, while the targeted branch replacement mechanism ensures discrimination accuracy under different scenarios. This synergistic effect allows the system to maintain a constant level of video memory usage and millisecond-level scene switching response speed when facing batch, multi-type CT image evaluation tasks, thereby effectively improving overall workflow efficiency and equipment resource utilization.
[0075] Furthermore, such as Figure 4 As shown, this embodiment of the invention also provides a training process for a hierarchical partitioning feature extraction model, which includes two-stage training. Specifically, it includes:
[0076] Step S410: In the first stage, the training data of all binary classification scenarios are merged, and the basic model is pre-trained using a multi-task learning approach, so that the shared layer of the general feature extraction area learns the general feature representation across scenarios.
[0077] The core objective of this stage is to construct a general feature extraction basis with strong generalization capabilities. The input data covers training samples from all pre-defined binary classification scenarios. First, the CT image data corresponding to each scenario are merged to construct a unified comprehensive training set. The pre-trained base model is trained using a multi-task learning approach, that is, the loss function for multiple binary classification tasks is optimized simultaneously in the same network.
[0078] In this process, the general feature extraction region, i.e., the shared layer, such as the first 13 layers of 3D ResNet-18, is responsible for extracting general anatomical features from the input CT volume data that are independent of specific scene-specific discrimination boundaries. These features include lung texture orientation, vascular distribution patterns, lung lobe anatomical boundaries, and basic edema density distribution patterns. By jointly training on a large amount of diverse data, the shared layer is forced to learn cross-scene general feature representations that can characterize the essential features of high-altitude pulmonary edema CT images, thus laying a solid parameter foundation for subsequent scene-specific fine-tuning.
[0079] Step S430: In the second stage, freeze the parameters of the shared layer, and fine-tune the independent layers of the specific discrimination region using the training data corresponding to each scenario to obtain the weight branches corresponding to each scenario.
[0080] The second stage focuses on adapting to specific discrimination logic in different scenarios while retaining the general knowledge learned in the first stage. First, a parameter freezing operation is performed, fixing the parameters of all shared layers in the general feature extraction region obtained in the first stage training. This means that gradient updates will not be performed on these layers in subsequent training. This freezing mechanism ensures that the model does not compromise its learned general feature representation capabilities when focusing on optimization for specific scenarios.
[0081] Subsequently, for each independent binary classification scene, scene-specific training data is loaded, and fine-tuning is performed only on the independent layers of the specific discrimination region. During this fine-tuning process, the general feature map output from the general feature extraction region is input into the specific discrimination region. The independent layer adjusts its weight parameters according to the specific discrimination requirements of the current scene, such as specific density thresholds or morphological differences to distinguish between mild and moderate edema, thereby forming a weight branch bound to the target scene identifier. After fine-tuning, the specific discrimination region of each scene has refined discrimination capabilities for specific classification tasks, while the general feature extraction region maintains effective extraction of general features across scenes, ultimately obtaining the weight branches corresponding to each scene.
[0082] Through the two-stage training process described above, this invention achieves an organic combination of general feature learning and scene-specific discrimination. The first stage, large-scale multi-task learning, ensures the model's thorough understanding of the basic pathological features of high-altitude pulmonary edema CT images, effectively improving the model's generalization ability and robustness. The second stage's parameter freezing and fine-tuning strategy enables the model to quickly adapt to the refined discrimination needs of different clinical scenarios with low computational cost, avoiding the huge resource consumption and overfitting risks associated with training a complete model separately for each scenario. This hierarchical partitioning training mechanism allows the final hierarchical partitioning feature extraction model to output high-precision binary classification probability values while maintaining efficient inference, providing a reliable model foundation for subsequent lesion localization and quantitative assessment.
[0083] Step S150: In response to the classification result indicating the presence of the target lesion based on the binary classification probability value, extract the feature map of the last feature extraction layer in the hierarchical partition feature extraction model, combine the weights of the fully connected layers of the hierarchical partition feature extraction model, calculate the weighted sum of each channel of the feature map, and generate class activation mapping data that reflects the three-dimensional spatial distribution of the target lesion.
[0084] When the binary classification probability value indicates the presence of the target lesion, that is, when the positive confidence score output by the model is higher than the classification decision threshold, it indicates that the image contains high-altitude pulmonary edema lesions, and at this time, the spatial localization process of the lesion is initiated. Specifically, this invention uses CAM technology to reverse-localize the distribution area of the lesion in three-dimensional space using the discriminative signal of the classification network.
[0085] First, the feature map of the last feature extraction layer in the hierarchical partitioning feature extraction model is extracted. In this embodiment, the last feature extraction layer is a convolutional layer located before the fully connected classification layer in the network. The feature map output by this layer retains the structural information of the input 3D volume data in the spatial dimension, while aggregating high-level semantic features. This feature map consists of multiple channels, each corresponding to a specific feature detector that responds to different texture, shape, or density patterns in the input data.
[0086] Secondly, obtain the weight vector corresponding to the lesion presence category in the fully connected layer. Each element in the vector represents the degree of contribution of the corresponding feature channel to the classification decision of lesion presence.
[0087] Finally, the weighted sum of each channel in the feature map is calculated to generate the class activation map volume data. Specifically, the 3D spatial distribution map of each channel in the feature map is multiplied by the corresponding weight scalar, and then all weighted channels are summed along the channel dimension to generate a 3D heatmap with the same spatial size as the input 3D volume data, i.e., the class activation map volume data. Each voxel value in this data represents the contribution intensity of that location to the model's determination of lesion presence; the higher the value, the greater the probability that the location belongs to a lesion region. This process can be formally represented as:
[0088] (2)
[0089] in, Representing coordinates The class activation mapping value at that location, Indicates the first The weights of the fully connected layer corresponding to each feature channel Indicates the first Each feature channel in The characteristic response value at that location.
[0090] In the CAM generation process, this invention uses 3D feature maps to directly calculate 3D activation response volume data, instead of first generating a 2D CAM and then interpolating it to 3D. This difference ensures that the 3D activation response volume data maintains continuous spatial consistency in the depth direction, avoiding the discontinuity errors that occur between layers during 2D CAM interpolation, and providing more accurate localization information for subsequent lesion area mask determination.
[0091] Step S170: Determine the lesion region mask based on class activation map data.
[0092] The lesion region mask is a binarized or probabilistic 3D matrix with the same size as the original 3D volume data, used to accurately mark the spatial extent occupied by the lesion. The process of determining the lesion region mask is the process of transforming the aforementioned continuously generated class activation map volume data into discrete region identifiers.
[0093] Specifically, the system processes the activation map data, classifying regions with high activation values as lesion interiors and regions with low activation values as background. For example, by setting a global threshold or an adaptive threshold algorithm, voxel values above the threshold in the activation map data are set to 1 to represent lesions, and voxel values below the threshold are set to 0 to represent background, thus obtaining a binarized lesion region mask. Alternatively, interactive segmentation algorithms such as graph cut or random walk can be used, with the activation map data as a prior probability map, to optimize and obtain a lesion region mask with smoother edges. By determining the lesion region mask, the ambiguous regions of interest to the model can be transformed into explicit geometric masks, providing an accurate statistical range for subsequent volume and density calculations.
[0094] In one alternative implementation, such as Figure 5 The diagram shows a flowchart of a method for determining a lesion region mask based on class activation map volume data, according to an embodiment of the present invention. Specifically, it includes:
[0095] Step S510: Normalize the class activation mapping data to obtain a normalized mapping graph.
[0096] After acquiring the class activation map data reflecting the three-dimensional spatial distribution of the target lesion, the numerical range of this data is uniformly mapped to a standard interval, such as [0, 1], thereby eliminating the problem of inconsistent numerical scales caused by differences in input image brightness or fluctuations in model response intensity among different cases. This normalized map characterizes the relative strength distribution of the probability that each voxel position in the input data belongs to the target lesion. Through this processing, it is ensured that the threshold determination criteria in subsequent steps have consistent physical meaning among different patients, improving the robustness of the algorithm.
[0097] Step S530: Use an adaptive thresholding algorithm to perform binarization segmentation on the normalized mapping map to obtain an initial binarized image.
[0098] Each voxel value in the normalized mapping map reflects the probability that the location belongs to a lesion region. Its numerical distribution is continuous, requiring conversion into a binary spatial segmentation result. Therefore, this step employs an adaptive thresholding algorithm to automatically calculate the optimal segmentation threshold. This algorithm takes the normalized mapping map as input, traverses all possible grayscale thresholds, and divides voxels into two categories: lesion regions and normal tissue regions. It then calculates the degree to which voxels of each category cluster around their grayscale mean, i.e., the inter-class variance. When a certain threshold maximizes the separation between lesion regions and normal tissue regions in terms of grayscale distribution, the inter-class variance reaches its maximum value. This threshold is the optimal segmentation threshold, and binary segmentation is performed using this threshold as the boundary.
[0099] The advantage of this method is that it eliminates the need for manually setting a fixed threshold. Instead, it automatically adjusts the segmentation criteria based on the differences in lesion density distribution among different cases, thereby adapting to segmentation needs under varying severity and image contrast. This avoids the problem of over-segmentation or under-segmentation of lesion areas caused by fixed thresholds. Since the class activation map data of this invention has the characteristics of relatively concentrated grayscale distribution and significant grayscale differences between lesion and background areas, this method can stably determine the optimal segmentation threshold, enabling the generated initial binarized image to accurately reflect the true spatial range of the lesion area.
[0100] In an optional implementation, the aforementioned adaptive thresholding algorithm can employ the Otsu algorithm, a method for determining an adaptive threshold based on maximizing inter-class variance. It automatically searches for the optimal segmentation point in the image histogram using statistical principles. Based on the image's inherent grayscale distribution characteristics, it calculates the grayscale value that maximizes the inter-class variance between the background and lesion classes, using this value as the optimal segmentation threshold. This method effectively highlights the differences in grayscale features between the lesion and background regions, closely aligning with the grayscale statistical characteristics of the class activation map data of this invention. It can effectively suppress threshold fluctuations caused by uneven lesion density distribution in different cases, ensuring accurate segmentation boundaries.
[0101] Step S550: Perform morphological processing on the initial binarized image to obtain a lesion region mask.
[0102] Since the initial binarized image may contain geometric defects such as small holes inside the lesion area, burrs on the edge of the lesion, and isolated noise in the background, this step corrects and optimizes the topological structure of the initial binarized image based on mathematical morphology principles to generate the final lesion area mask.
[0103] In this embodiment of the invention, the morphological processing specifically includes: performing a closing operation on the initial binarized image to remove holes, and performing an opening operation to remove isolated noise points.
[0104] The closing operation, a sequence of operations that first dilates and then erodes, fills the tiny holes within the lesion area and connects adjacent fractured regions. This causes spatially close but incorrectly separated lesion pixels to merge into a complete connected region, eliminating false voids generated during binarization due to density differences within the lesion. The opening operation, a sequence of operations that first erodes and then dilates, removes isolated noise bright spots or edge burrs in the background while maintaining the shape of the lesion, smoothing the lesion boundary. Through the cascaded combination of these closing and opening operations, the integrity of the internal structure is repaired before external interference is filtered out, effectively suppressing artifacts caused by threshold fluctuations. Ultimately, a lesion area mask with a complete topological structure and clear boundaries is obtained, laying a pixel-level boundary foundation for subsequent quantitative parameter calculations.
[0105] Step S190: Based on the voxel spatial resolution of the lesion area mask and three-dimensional volume data, calculate at least one quantitative assessment parameter of the target lesion.
[0106] Quantitative assessment parameters refer to numerical indicators used to objectively describe the size, density, and proportion of lesions in the lungs, which are of great significance for assessing the severity of the disease and monitoring treatment efficacy. Voxel spatial resolution refers to the actual size represented by a single voxel in physical space in three-dimensional volumetric data. It is usually defined by pixel pitch and slice thickness. Pixel pitch is the resolution in the X and Y axes, and slice thickness is the resolution in the Z axis. The unit is usually millimeters.
[0107] In this embodiment of the invention, the quantitative evaluation parameters include at least the total lesion volume, the average lesion density, and the lesion percentage.
[0108] The total lesion volume is obtained by multiplying the total number of voxels with a value of 1 in the lesion area mask by the volume of a single voxel. The volume of a single voxel is the product of the pixel pitch and the slice thickness. The total lesion volume reflects the overall size of the lesion burden. The average lesion density is obtained by extracting the CT values of all voxels within the corresponding lesion mask area from the 3D volumetric data and calculating their arithmetic mean, in HU, and is used to assess the solidity of the lesion. The lesion proportion is obtained by calculating the ratio of the total lesion volume to the total volume of both lungs, and is used to assess the degree of lung function impairment.
[0109] In one alternative implementation, such as Figure 6 As shown, this embodiment of the invention provides a specific process for calculating the total volume of the lesion, including:
[0110] Step S610: Obtain the pixel spacing and layer thickness of the 3D volume data.
[0111] By parsing raw medical image files, such as DICOM format medical image files, the spatial resolution parameters are recorded in their header information. Pixel spacing includes row and column spacing in a two-dimensional plane, representing the physical distance between the centers of adjacent pixels on the same CT slice slice; slice thickness represents the vertical physical distance between two adjacent CT slice slices. Accurately obtaining these parameters ensures that subsequent calculations can convert voxel-based statistical results into physical units that conform to clinical standards.
[0112] Step S630: Calculate the volume of a single voxel based on the pixel pitch and layer thickness.
[0113] The volume of a single voxel, as the basic unit of measurement in three-dimensional space, is uniquely determined by the spatial resolution parameter. Based on the cuboid geometry of the voxel, the row spacing and column spacing in the pixel spacing are defined as the length and width of the cuboid, respectively, and the layer thickness is defined as the height of the cuboid. By calculating the product of these three, the actual spatial volume represented by a single CT voxel can be determined.
[0114] Step S650: Multiply the number of voxels in the lesion area mask by the volume of a single voxel, and use the total volume of the lesion as the total volume of the lesion.
[0115] Based on the lesion region mask generated by the aforementioned steps, the total number of effective voxels marked as lesions within the mask area is counted, i.e., all voxel units with a value of 1 or other logical identifiers representing lesions are counted. Subsequently, this total number of voxels is multiplied by the calculated volume of a single voxel, and the total volume of the target lesion is obtained by summing the physical volumes of all lesion voxels. This voxel integral-based calculation method is not limited by the irregular shape of the lesion and can objectively and accurately reflect the size of the lesion in the actual anatomical structure, providing a quantifiable volume indicator for assessing the severity of clinical conditions.
[0116] By organically combining the above image processing algorithms with physical parameter calculations, lesion features that are difficult to quantify intuitively are transformed into volume values with clear physical meaning, providing reliable data support for the auxiliary diagnosis and efficacy evaluation of high-altitude pulmonary edema.
[0117] The embodiments of this invention were experimentally validated on a test set of CT images of high-altitude pulmonary edema, including four levels: normal, mild, moderate, and severe. The images were independently labeled by two or more senior radiologists, and the intersection was used as the gold standard. The evaluation results of the method of this invention are as follows:
[0118] Among the above evaluation metrics, accuracy reflects the proportion of correct overall judgments by the model; precision reflects the proportion of samples that the model judges as positive but are actually positive; recall reflects the proportion of actual positive samples that are correctly detected by the model; the F1 score is the harmonic mean of precision and recall, which comprehensively measures the model's discrimination accuracy and is suitable for scenarios with imbalanced positive and negative samples; specificity reflects the proportion of actual negative samples that are correctly excluded by the model.
[0119] As shown in Table 1, the present invention performs best in both the normal and abnormal, and normal and severe scenarios, with an accuracy of 0.958, indicating that the model has a strong ability to distinguish the presence of lesions and severe lesions. In the normal and mild, and mild and moderate scenarios, the accuracy is 0.917, indicating that the model also has a high ability to detect mild lesions and distinguish between adjacent grades. The accuracy in the moderate and severe scenarios is 0.708, which is relatively low. This is likely because the differences in imaging manifestations between moderate and severe cases are small, with some feature overlap. However, this accuracy is still higher than random guessing, indicating that the model still has effective discrimination ability in this most challenging scenario. All the above indicators show that the grading accuracy of the present invention in each scenario meets the needs of clinical auxiliary assessment.
[0120] Regarding consistency with the results of manual grading by radiologists, the Cohen's Kappa coefficient for the majority consensus (the gold standard) of the grading results of this invention and the independent grading results of three senior radiologists on the test set is 0.85, indicating that the system has a high degree of consistency with expert diagnosis.
[0121] In terms of segmentation accuracy compared to non-HAPE optimized general models, on the same test set, the Dice coefficient for lesion segmentation using CAM weakly supervised localization in this invention is 0.82, while the Dice coefficient for the standard U-Net (3D) fully supervised segmentation network is 0.71, and the Dice coefficient for CAM localization in the standard 3D ResNet classification network is 0.74. This invention significantly outperforms the aforementioned general models.
[0122] Regarding parameter count and training efficiency, through the weight sharing strategy, a single base model can be adapted to five binary classification scenarios with fine-tuning. The total number of parameters for independently training five complete 3D ResNet-18 models is 5 × approximately 33 million = 165 million. In the weight sharing scheme of this invention, the number of parameters in the shared layer is approximately 28 million, and the total number of parameters in the five independent branches is approximately 5 × 5 million = 25 million, for a total of approximately 53 million parameters, representing a reduction of approximately 68%. In terms of training time, independently training five models would require approximately 50 hours. Using a single RTX 3080 GPU, the pre-training + fine-tuning scheme of this invention requires approximately 25 hours, reducing training time by approximately 50%.
[0123] The experimental results above demonstrate that for the localization and quantitative assessment of diffuse lesions, the weakly supervised approach of "classification network + CAM reverse localization" not only avoids the dependence on pixel-level annotation and annotation noise problems of fully supervised segmentation networks, but also achieves better localization accuracy than dedicated segmentation networks, while reducing the number of parameters by 68% and shortening the training time by 50%. This proves the effectiveness of the technical approach of this invention for diffuse lesions and verifies the advanced nature of the technical solution of this invention.
[0124] The specific working principle of this invention is as follows: The raw DICOM image data acquired from chest CT scans first passes through a preprocessing module. After reading the DICOM file, the system sorts and verifies the number of slices, with a range of 40-70 slices. If the range is exceeded, a warning is issued but the process is allowed to continue. Then, all slices are uniformly resampled to 64 slices through linear interpolation to ensure that CT data from different sources are consistent in spatial dimension. Next, the CT values are cropped to the range of [-700HU, 1500HU] to highlight the density range of lung tissue and lesions and eliminate irrelevant artifacts. Then, the values are linearly normalized to the range of [0,1] to obtain three-dimensional volume data with a shape of (64,512,512).
[0125] The preprocessed 3D volumetric data is input into a hierarchical partitioned feature extraction model. This model employs a 3D residual network architecture. The general feature extraction region (layers 1-13) shares parameters and is responsible for extracting general image features across scenes. The specific discrimination region (layers 14 and onwards) has independent parameters and is responsible for extracting scene-specific discrimination features. During inference, the system receives the target scene identifier specified by the user, calls the corresponding weight branch, combines the shared weights for forward propagation, and outputs a binary classification probability value. If the probability value indicates the presence of a lesion, the lesion localization and quantification process is triggered.
[0126] The spatial localization of lesions is achieved through 3D class activation mapping. The system extracts the 3D feature map of the last convolutional layer of the model, combines it with the weights of the "lesion presence" category in the fully connected layer, calculates the weighted sum of each channel, and directly generates 3D class activation mapping volume data with the same spatial dimension as the input 3D volume data. This method maintains the spatial continuity in the depth direction and avoids the inter-layer errors introduced by layer-by-layer interpolation in 2D CAM. Subsequently, this 3D activation response volume data is subjected to adaptive threshold segmentation, and the Otsu algorithm is preferred to generate an initial binarized image. Then, morphological closing operations are used to remove holes and opening operations are used to remove isolated noise points to obtain a complete lesion region mask.
[0127] Finally, the system calculates quantitative evaluation parameters based on the voxel spatial resolution of the lesion area mask and 3D volume data. The number of voxels within the mask is counted and multiplied by the volume of a single voxel to obtain the total lesion volume, where the volume of a single voxel is determined by the product of pixel spacing and slice thickness. The CT values of all voxels within the mask area are extracted and their arithmetic mean is calculated to obtain the average lesion density. The ratio of the total lesion volume to the total lung volume is calculated to obtain the lesion percentage.
[0128] The entire processing flow achieves end-to-end automated calculation from the input of DICOM raw data to the output of grading results and quantitative parameters, without the need for manual intervention.
[0129] Furthermore, an exemplary embodiment of the present invention also provides a device for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema.
[0130] Figure 7 A block diagram illustrating a device for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema, according to an exemplary embodiment of the present invention, is shown. (Reference) Figure 7 According to an exemplary embodiment of the present invention, the device 700 for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema may include: a data reconstruction module 710, a feature extraction and hierarchical discrimination module 730, a class activation mapping generation module 750, a lesion region determination module 770, and a quantitative parameter calculation module 790.
[0131] Specifically, the data reconstruction module 710 is used to acquire two-dimensional CT slice sequences of CT images of high-altitude pulmonary edema of the target object and reconstruct the two-dimensional CT slice sequences into three-dimensional volume data; the feature extraction and hierarchical discrimination module 730 is used to input the three-dimensional volume data into a hierarchical partition feature extraction model, wherein the hierarchical partition feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region serves as the input of the specific discrimination region; it receives the target scene identifier, calls the weight branch of the specific discrimination region bound to the target scene identifier, performs forward propagation in combination with the shared weights of the general feature extraction region, and outputs an indication of the presence of the target lesion. The binary classification probability value; the class activation map generation module 750, in response to the classification result indicating the presence of the target lesion based on the binary classification probability value, extracts the feature map of the last feature extraction layer in the hierarchical partition feature extraction model, combines the weights of the fully connected layers of the hierarchical partition feature extraction model, calculates the weighted sum of each channel of the feature map, and generates class activation map volume data reflecting the three-dimensional spatial distribution of the target lesion; the lesion region determination module 770, used to determine the lesion region mask based on the class activation map volume data; and the quantitative parameter calculation module 790, used to calculate at least one quantitative evaluation parameter of the target lesion based on the voxel spatial resolution of the lesion region mask and the three-dimensional volume data.
[0132] Since the functional modules of the lesion feature hierarchical zoning and quantitative assessment device for high-altitude pulmonary edema CT images in this embodiment of the invention are the same as those in the above-described method embodiments, they will not be repeated here.
[0133] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above-described method is also provided.
[0134] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations including firmware, microcode, etc., or implementations combining hardware and software aspects, collectively referred to herein as circuits, modules, or systems.
[0135] The following reference Figure 8 To describe an electronic device 800 according to this embodiment of the present invention. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0136] like Figure 8 As shown, the electronic device 800 is presented in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components, including the storage unit 820 and the processing unit 810, and a display unit 840.
[0137] The storage unit 820 stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 810 can perform the method steps shown in the figure, etc.
[0138] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0139] The storage unit 820 may also include a program / utility 8204 having a set of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0140] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0141] Electronic device 800 can also communicate with one or more external devices 870, such as keyboards, pointing devices, Bluetooth devices, etc., and with one or more devices that enable users to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices, such as routers, modems, etc. This communication can be performed through input / output interface 850. Furthermore, electronic device 800 can also communicate with one or more networks, such as local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet, via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0142] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product. This software product can be stored on a non-volatile storage medium, such as a CD-ROM, USB flash drive, portable hard drive, or network, and includes several instructions to cause a computing device, such as a personal computer, server, terminal device, or network device, to execute the methods according to the embodiments of the present invention.
[0143] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the present invention. These examples are merely for the purpose of helping to understand the method and core ideas of the present invention. The above descriptions are only preferred embodiments of the present invention. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or variations without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, variations, or combinations, or the direct application of the concept and technical solution of the present invention to other situations without modification, should all be considered within the scope of protection of the present invention.
Claims
1. A method for hierarchical zoning and quantitative assessment of lesion characteristics in CT images of high-altitude pulmonary edema, characterized in that, The method includes: Two-dimensional CT slice sequences of high-altitude pulmonary edema CT images of the target object are obtained, and the two-dimensional CT slice sequences are reconstructed into three-dimensional volume data. The three-dimensional volume data is input into a hierarchical partition feature extraction model, wherein the hierarchical partition feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region is used as the input of the specific discrimination region; a target scene identifier is received, the weight branch of the specific discrimination region bound to the target scene identifier is called, and forward propagation is performed in combination with the shared weight of the general feature extraction region to output a binary probability value indicating whether the target lesion exists; In response to the classification result indicating the presence of the target lesion based on the binary classification probability value, the feature map of the last feature extraction layer in the hierarchical partition feature extraction model is extracted. Combined with the weights of the fully connected layer in the hierarchical partition feature extraction model, the weighted sum of each channel of the feature map is calculated to generate class activation mapping data that reflects the three-dimensional spatial distribution of the target lesion. The lesion region mask is determined based on the aforementioned class activation mapping data; Based on the lesion region mask and the voxel spatial resolution of the three-dimensional volume data, at least one quantitative evaluation parameter of the target lesion is calculated.
2. The method according to claim 1, characterized in that, The process of reconstructing the two-dimensional CT slice sequence into three-dimensional volume data includes: The two-dimensional CT slice sequence is resampled to a preset fixed number of layers to obtain resampled volume data; The resampled volume data is truncated and linearly normalized based on a preset density window of the target organization to obtain the three-dimensional volume data.
3. The method according to claim 2, characterized in that, The preset fixed number of layers is 64; The preset density window is -700HU to 1500HU; The hierarchical partitioning feature extraction model consists of multiple feature extraction layers that are three-dimensional basic residual blocks. The general feature extraction region includes the first N feature extraction layers in the hierarchical partition feature extraction model, which are used to extract general features across scenes. The specific discrimination region includes the remaining feature extraction layers in the hierarchical partitioning feature extraction model, excluding the first N feature extraction layers, and is used to extract scene-specific discrimination features; The first N feature extraction layers are the first 13 layers of the hierarchical partition feature extraction model, and the remaining feature extraction layers are the 14th layer and subsequent network layers of the hierarchical partition feature extraction model.
4. The method according to claim 1, characterized in that, The process of determining the lesion region mask based on the class activation map data includes: The class activation mapping data is normalized to obtain a normalized mapping graph; An adaptive thresholding algorithm is used to perform binarization segmentation on the normalized mapping map to obtain an initial binarized image; Morphological processing is performed on the initial binarized image to obtain the lesion region mask.
5. The method according to claim 4, characterized in that, The adaptive threshold algorithm is the Otsu algorithm; The morphological processing includes: performing a closing operation on the initial binarized image to remove holes, and performing an opening operation to remove isolated noise. The quantitative assessment parameters include total lesion volume, average lesion density, and lesion percentage. The calculation of at least one quantitative assessment parameter of the target lesion based on the voxel spatial resolution of the lesion region mask and the three-dimensional volume data includes: Obtain the pixel spacing and layer thickness of the three-dimensional volume data; The volume of a single voxel is calculated based on the pixel spacing and the layer thickness. The total volume of the lesion is the product of the number of voxels within the mask of the lesion area and the volume of each voxel.
6. The method according to claim 1, characterized in that, The invocation of the weighted branch of the specific discrimination region bound to the target scene identifier includes: The shared weight parameters of the general feature extraction region are kept in memory; In response to receiving the target scene identifier, the current weight branch of the specific discrimination region is replaced with the target weight branch corresponding to the target scene identifier, and the shared weight parameter remains unchanged during the replacement process.
7. The method according to claim 1, characterized in that, The training process of the hierarchical partitioning feature extraction model includes two stages: In the first stage, the training data of all binary classification scenarios are merged, and the basic model is pre-trained using a multi-task learning approach, so that the shared layer of the general feature extraction area learns the general feature representation across scenarios. In the second stage, the parameters of the shared layer are frozen, and the independent layers of the specific discrimination region are fine-tuned using the training data corresponding to each scenario to obtain the weight branches corresponding to each scenario.
8. The method according to claim 1, characterized in that, The target scene identifier corresponds to five binary categories of high-altitude pulmonary edema, which include normal and abnormal, normal and mild, normal and severe, mild and moderate, and moderate and severe. Each binary classification scenario corresponds to an independent weighted branch of the specific discrimination region.
9. A device for hierarchical zoning and quantitative assessment of lesion features in CT images of high-altitude pulmonary edema, characterized in that, The device includes: The data reconstruction module is used to acquire two-dimensional CT slice sequences of high-altitude pulmonary edema CT images of the target object and reconstruct the two-dimensional CT slice sequences into three-dimensional volume data. The feature extraction and hierarchical discrimination module is used to input the three-dimensional volume data into the hierarchical partition feature extraction model, wherein the hierarchical partition feature extraction model includes a general feature extraction region and a specific discrimination region, and the output of the general feature extraction region is used as the input of the specific discrimination region; it receives the target scene identifier, calls the weight branch of the specific discrimination region bound to the target scene identifier, performs forward propagation in combination with the shared weight of the general feature extraction region, and outputs a binary classification probability value indicating whether the target lesion exists; The class activation map generation module is used to extract the feature map of the last feature extraction layer in the hierarchical partition feature extraction model in response to the classification result indicating the existence of the target lesion by the binary classification probability value, and to calculate the weighted sum of each channel of the feature map by combining the weights of the fully connected layer of the hierarchical partition feature extraction model, thereby generating class activation map volume data that reflects the three-dimensional spatial distribution of the target lesion. The lesion region determination module is used to determine the lesion region mask based on the class activation map data; The quantitative parameter calculation module is used to calculate at least one quantitative evaluation parameter of the target lesion based on the voxel spatial resolution of the lesion area mask and the three-dimensional volume data.
10. An electronic device, characterized in that, include: processor; A memory for storing one or more programs, which, when executed by the processor, cause the processor to implement the method as described in any one of claims 1 to 8.
