An image segmentation online image lesion determination method, system and storage medium
Patent Information
- Application Number
- CN202610594710.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-30
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-04-30
AI Technical Summary
传统方式未能有效串联“通道重要性重标定”与“空间显著性定位”两个过程,导致增强后的特征图或者侧重于语义判别而丢失空间细节,或者保留了空间细节但未突出关键通道
[0060]分析本发明提供的上述一种图像分割在线影像病灶确定方法、系统及存储介质可知,在具体应用时,对输入的肺部CT序列图像进行各向同性重采样及灰度归一化处理,并利用肺野掩膜剔除肺外无关组织噪声,得到预处理后的图像,统一图像的空间尺度和灰度分布范围,并仅保留肺部主体区域,排除纵隔、胸壁、骨骼等非肺实质区域对后续特征提取的干扰信号;进一步,将预处理后的图像输入编码网络,通过连续的3×3×3卷积层与步长为2的下采样层提取多个不同分辨率的原始特征图,在浅层获得保留纹理、边缘等空间细节的高分辨率特征图,在深层获得捕获语义类别和形态特征的低分辨率特征图,构建出从浅层到深层的多尺度特征层次结构;
Smart Images

Figure CN122473103B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pulmonary nodule segmentation, and more particularly to an online image segmentation method, system, and storage medium for determining lesions in pulmonary nodules. Background Technology
[0002] Lung nodules are a key imaging feature in the early screening and diagnosis of lung cancer. Deep learning-based automatic CT image segmentation methods have become an important tool to assist doctors in locating and quantifying nodules. Traditional lung nodule segmentation methods typically employ deep convolutional neural networks with an encoder-decoder structure, such as U-Net, V-Net, and their 3D variants. These networks extract multi-scale features of the image layer by layer through the encoding path, and then gradually restore the spatial resolution and fuse shallow detail information through the decoding path, ultimately outputting a probabilistic segmentation map of the lesion. This probabilistic segmentation map is then uploaded to an app for doctors' reference.
[0003] However, traditional methods have several unresolved technical problems when dealing with pulmonary nodules in complex anatomical contexts.
[0004] First, during feature transfer between the encoder and decoder, traditional methods typically employ direct jump connections or simple attention gating, failing to differentiate the stability differences of feature maps across different regions. For example, in pleural adhesion areas (nodules closely adhering to the chest wall or mediastinum) or densely vascularized areas (nodules tightly intertwined with pulmonary vascular branches), the features extracted by the encoder exhibit drastic numerical fluctuations within their local spatial neighborhoods. Specifically, the activation value of the feature channel responsible for identifying nodule boundaries can reach 0.92 on the nodule side, but drops sharply to 0.21 on the pleural soft tissue side, separated by only one voxel, and further decays to 0.05 in the extra-pulmonary region masked by the lung field. This high variance and large gradient jumps in local feature values prevent the decoder from obtaining stable and consistent feature representations during upsampling reconstruction, leading to boundary overflow of the segmentation mask (e.g., nodules incorrectly extending into the chest wall) or internal voids (e.g., erroneous indentations caused by vascular penetration). Traditional methods lack detection and suppression mechanisms for such feature oscillations, which is one of the fundamental reasons for the decreased segmentation accuracy in difficult regions.
[0005] Secondly, traditional methods typically apply channel attention or spatial attention mechanisms independently, or simply cascade the two, when performing feature enhancement. However, in lung nodule segmentation tasks, different channels show significantly different levels of importance in response to different types of lesions (such as solid nodules and ground-glass nodules), and the spatial relationship between the nodule and its surrounding pleura and blood vessels is crucial for boundary delineation. Traditional methods fail to effectively link the two processes of "channel importance recalibration" and "spatial saliency localization," resulting in enhanced feature maps that either focus on semantic discrimination and lose spatial details, or retain spatial details but fail to highlight key channels.
[0006] Furthermore, even with the aforementioned attention enhancement techniques, feature oscillations still occur primarily in pleural adhesion areas and densely vascularized regions. Indiscriminate oscillation suppression across the entire image not only introduces unnecessary computational overhead but may also cause over-smoothing of features within smooth areas of nodules, thereby impairing segmentation accuracy. Traditional methods do not provide a technical means to accurately identify and define these critical regions. Summary of the Invention
[0007] The purpose of this invention is to provide an online image segmentation method, system, and storage medium for determining lesions in images, which solves the aforementioned technical problems pointed out in the prior art.
[0008] This invention proposes an online image segmentation method for determining lesions, comprising the following steps:
[0009] The input lung CT sequence images are subjected to isotropic resampling and grayscale normalization, and noise removal is performed using a lung field mask to obtain the preprocessed images.
[0010] The preprocessed image is input into the encoding network, and multiple original feature maps of different resolutions are extracted through successive convolutional layers and downsampling layers;
[0011] The original feature map is enhanced by pooling and spatial enhancement mask extraction to obtain the enhanced feature map;
[0012] The enhanced feature map is then processed by oscillation detection in key regions combined with oscillation suppression screening to obtain a fused feature map;
[0013] The fused feature map is sampled on the decoding network and passed through the Softmax layer to output a probability segmentation map of the lesion. The probability distribution map of the lesion is then binarized to obtain the final segmentation mask.
[0014] Preferably, the original feature map is enhanced by pooling and spatial enhancement mask extraction to obtain the enhanced feature map, including the following steps:
[0015] After performing three-dimensional global average pooling and three-dimensional global max pooling on the original feature map, the gain weight of each channel is generated through a shared fully connected layer.
[0016] The gain weights are multiplied channel by channel by the original feature map and then added element by element to the original feature map to obtain a preliminary enhanced feature map;
[0017] The average and maximum values of the preliminary enhanced feature maps are calculated in the channel dimension, and after being concatenated, they are extracted and a spatial enhancement mask is generated by a convolutional layer.
[0018] The enhanced feature map is obtained by multiplying the spatial enhancement mask pixel by pixel and then adding the enhanced feature map element by element.
[0019] Preferably, after performing three-dimensional global average pooling and three-dimensional global max pooling on the original feature map, the gain weights for each channel are generated through a shared fully connected layer, including the following steps:
[0020] Three-dimensional global average pooling and three-dimensional global max pooling are performed on the original feature map respectively to extract the average pooling channel descriptor and the max pooling channel descriptor;
[0021] The average pooled channel descriptor is input into the first fully connected layer of the shared multilayer perceptron, and the channel dimension is compressed according to a preset compression ratio to obtain the compressed average descriptor.
[0022] The max-pooled channel descriptor is input into the first fully connected layer of the shared multilayer perceptron, and the channel dimension is compressed according to the preset compression ratio to obtain the compressed max descriptor.
[0023] The compressed average descriptor is input into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels, thus obtaining the restored average descriptor;
[0024] The compressed maximum descriptor is input into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels, thus obtaining the restored maximum descriptor;
[0025] The recovered average descriptor and the recovered maximum descriptor are added element by element to obtain the weight vector after addition;
[0026] The summed weight vector is mapped to the 0-1 interval using the Sigmoid function to generate the gain weight for each channel.
[0027] Preferably, the average and maximum values of the preliminary enhanced feature maps are calculated in the channel dimension, and after concatenation, a spatial enhancement mask is extracted and generated through a convolutional layer, including the following steps:
[0028] The average value of all channels in the channel dimension is calculated for the preliminary enhanced feature map to obtain the average spatial description map of a single channel;
[0029] The maximum value of all channels in the channel dimension is calculated for the preliminary enhanced feature map to obtain the maximum spatial description map of a single channel;
[0030] The average spatial description map and the maximum spatial description map are concatenated along the channel dimension to obtain a combined feature map;
[0031] The combined feature map is convolved using a 7×7×7 convolution kernel to output a spatial feature map;
[0032] The spatial feature map is input into the Sigmoid function to generate the spatial enhancement mask.
[0033] Preferably, the enhanced feature map is processed by combining oscillation detection and oscillation suppression in key regions to obtain a fused feature map, including the following steps:
[0034] Based on the original feature map in the coding network and the lung field mask, the key region mask is obtained by analyzing the adjacency and overlap of voxels.
[0035] The enhanced feature maps of key regions are smoothed and filtered by gating signals and then stitched together to obtain fused feature maps.
[0036] Preferably, the key region mask is obtained by combining the original feature map in the coding network with the lung field mask and analyzing the adjacency and overlap of voxels, including the following steps:
[0037] Extract the feature map output by the second group of convolutional units in the encoding network, take the maximum value of the feature map in the channel dimension to obtain the single-channel response map; mark the voxels with values greater than a preset proportional threshold in the single-channel response map as high response regions to obtain a binary mask.
[0038] Perform three-dimensional connected component analysis on the binary mask to obtain multiple connected components; determine whether any connected component is adjacent to the edge of the lung field mask; if so, merge all connected components that are adjacent to the edge of the lung field mask into a candidate mask for pleural adhesion.
[0039] A pre-trained 3D U-Net blood vessel segmentation model is used to infer the blood vessel probability map from the preprocessed image. The blood vessel probability map is then binarized to obtain a blood vessel segmentation mask. The spatial overlap rate of the enhanced feature map and the blood vessel segmentation mask is calculated, and the candidate mask for dense blood vessel regions is obtained by marking the results.
[0040] The candidate mask for pleural adhesions is merged with the mask for densely vascularized areas to obtain the final key area mask.
[0041] Preferably, the enhanced feature map of the key region mask is smoothed and filtered by a gated signal, and then stitched together to obtain a fused feature map, including the following steps:
[0042] For the spatial location marked as 1 in the key region mask, obtain the enhanced feature map and decoder upsampled features of the current layer. Map the enhanced feature map and decoder upsampled features of the current layer to a unified feature subspace through 1×1×1 convolution, then add them element-wise, and generate the original gated signal map through the Sigmoid function.
[0043] Obtain the historical gated signal map from the previous level, and dynamically calculate the oscillation suppression coefficient map based on the three-dimensional standard deviation of the current level's enhanced feature map in the local region.
[0044] The smoothed gated signal diagram is calculated based on the oscillation suppression coefficient diagram, the historical gated signal diagram from the previous level, and the original gated signal diagram.
[0045] The smoothed gated signal map is multiplied element-wise with the enhanced feature map of the current level to obtain the filtered feature map;
[0046] The filtered feature map is concatenated with the decoder upsampled features along the channel dimension to obtain the fused feature map.
[0047] Preferably, the oscillation suppression coefficient map is dynamically calculated based on the three-dimensional standard deviation of the enhanced feature map of the current level in the local region, including the following steps:
[0048] Extract a local neighborhood of size 3×3×3 centered at each spatial location in the enhanced feature map, and calculate the three-dimensional standard deviation of all channels and all voxels within this local neighborhood;
[0049] Set the low contrast threshold and the high contrast threshold;
[0050] For each spatial location, when the three-dimensional standard deviation is less than the low contrast threshold, the oscillation suppression coefficient is set as the first oscillation suppression coefficient; when the three-dimensional standard deviation is greater than the high contrast threshold, the oscillation suppression coefficient is set as the second oscillation suppression coefficient; when the three-dimensional standard deviation is between the low contrast threshold and the high contrast threshold, the oscillation suppression coefficient is set as the third oscillation suppression coefficient.
[0051] Based on the oscillation suppression coefficient corresponding to each spatial location, an oscillation suppression coefficient map with the same spatial size as the enhanced feature map of the current level is output.
[0052] Accordingly, the present invention also provides an online image segmentation system for determining lesions, including a preprocessing module, an encoding module, a feature enhancement module, a fusion module, and an output module;
[0053] The preprocessing module is used to perform isotropic resampling and grayscale normalization on the input lung CT sequence image, and to perform noise removal using a lung field mask to obtain the preprocessed image.
[0054] The encoding module is used to input the preprocessed image into the encoding network and extract multiple original feature maps of different resolutions through successive convolutional layers and downsampling layers;
[0055] The feature enhancement module is used to process the original feature map through pooling enhancement and spatial enhancement mask extraction to obtain an enhanced feature map.
[0056] The fusion module is used to obtain a fused feature map by combining oscillation detection in key regions with oscillation suppression screening.
[0057] The output module is used to sample the fused feature map through a decoding network and a Softmax layer, output a probability segmentation map of the lesion, and obtain the final segmentation mask by binarizing the probability distribution map of the lesion.
[0058] In another aspect, the present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described online image segmentation method for determining lesions.
[0059] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:
[0060] Analysis of the above-mentioned online image segmentation lesion determination method, system and storage medium provided by the present invention shows that, in specific applications, isotropic resampling and gray-level normalization processing are performed on the input lung CT sequence image, and lung field mask is used to remove noise from irrelevant tissues outside the lung to obtain a preprocessed image. The spatial scale and gray-level distribution range of the image are unified, and only the main lung area is retained, excluding interference signals from non-lung parenchyma areas such as mediastinum, chest wall, and bones to the subsequent feature extraction. Furthermore, the preprocessed image is input into the encoding network, and multiple original feature maps of different resolutions are extracted through continuous 3×3×3 convolutional layers and downsampling layers with a stride of 2. High-resolution feature maps that preserve spatial details such as texture and edges are obtained in the shallow layer, and low-resolution feature maps that capture semantic categories and morphological features are obtained in the deep layer, thus constructing a multi-scale feature hierarchy structure from the shallow layer to the deep layer.
[0061] Next, channel attention enhancement (generating gain weights through global pooling and shared fully connected layers and reweighting them channel by channel) and spatial attention enhancement (generating spatial enhancement masks by calculating the mean and maximum values of the channel dimensions and multiplying them pixel by pixel) are performed sequentially on the original feature map to obtain the enhanced feature map. First, important channel responses are enhanced and irrelevant channel responses are suppressed in the channel dimension. Then, the lesion region is focused and the background region is suppressed in the spatial dimension. Finally, the enhanced feature map that has been optimized in both the channel and spatial dimensions is output.
[0062] Furthermore, at each upsampling level of the decoding network, the enhanced feature map is processed by oscillation detection and suppression in key regions (pleural adhesion areas or densely vascularized areas) to obtain a fused feature map. Only in key regions with severe feature oscillations, the oscillation intensity is quantified based on the local three-dimensional standard deviation, and the gating signal is smoothed by spatially adaptive exponential moving average. This selects stable encoder features and decoder upsampling features for fusion, effectively alleviating boundary overflow and internal hole problems. Finally, the fused feature map is processed by the decoding network for sampling and the Softmax layer outputs a lesion probability segmentation map. Then, threshold binarization, connected component volume removal, and connected component axis ratio removal are performed to obtain the final segmentation mask. The probability map is converted into a binary mask, and small artifacts and false positive connected components with branching vessels are removed according to clinical volume standards and vascular morphology statistical standards. The output segmentation result is more consistent with the clinical definition of pulmonary nodules in terms of volume and morphology. Attached Figure Description
[0063] Figure 1 A schematic diagram of the main process of an online image segmentation method for determining lesions in images;
[0064] Figure 2 A schematic diagram of lung field masking simulation in an online image segmentation method for lesion identification.
[0065] Figure 3 This is the original feature map with a resolution of 64×64 in an online image segmentation method for lesion determination.
[0066] Figure 4 This is the original feature map with a resolution of 32×32 in an online image segmentation method for lesion determination.
[0067] Figure 5 This is the original feature map at a resolution of 16×16 in an online image segmentation method for lesion identification.
[0068] Figure 6 This is the original feature map with an 8×8 resolution in an online image segmentation method for lesion determination.
[0069] Figure 7A schematic diagram of the coding network for an online image segmentation method for determining lesions;
[0070] Figure 8 This is a schematic diagram of characteristic oscillation simulation in an online image segmentation method for determining lesions.
[0071] Figure 9 This is a schematic diagram of the final segmentation mask simulation in an online image segmentation method for lesion determination.
[0072] Figure 10 This is a schematic diagram simulating the oscillation suppression coefficient in an online image segmentation method for lesion determination.
[0073] Figure 11 This is a schematic diagram of the overall architecture of an online image segmentation lesion determination method that applies the above-mentioned image segmentation method.
[0074] Reference numerals: Preprocessing module 10, encoding module 20, feature enhancement module 30, fusion module 40, output module 50. Detailed Implementation
[0075] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0076] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.
[0077] Example 1
[0078] like Figure 1 As shown, Embodiment 1 of the present invention provides an online image segmentation method for determining lesions, comprising the following steps:
[0079] Step S10: Perform isotropic resampling and grayscale normalization on the input lung CT sequence image, and use lung field mask for noise removal to obtain the preprocessed image;
[0080] It should be noted that lung field masking (such as...) Figure 2 As shown, Figure 2 In the diagram, the white area represents the background, indicating the chest wall, mediastinum, or extra-lung regions, while the black area represents the lung field. This is a binary mask generated after threshold segmentation, morphological closing operation, and connected component analysis, used to identify the main lung regions (left and right lungs). Noise removal processing removes noise from irrelevant extra-lung tissues, including interference signals from non-lung parenchymal regions such as the mediastinum, chest wall, bones, and backplate.
[0081] Step S20: Input the preprocessed image into the encoding network, and extract multiple original feature maps of different resolutions (e.g., ...) through successive convolutional layers and downsampling layers. Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, where, Figure 3 It is a raw feature map with a resolution of 64×64, which shows texture and edge features, namely the edges of lung lobules or blood vessels; Figure 4 It is the original feature map with a resolution of 32×32, which shows local features, namely small blood vessel clusters; Figure 5 It is the original feature map with a resolution of 16×16, which shows the regional features, namely the lung lobe region; Figure 6 It is the original feature map with a resolution of 8×8, which shows semantic features, i.e., lung nodules or normal tissue.
[0082] It should be noted that, as Figure 6 As shown, the above encoding network is a downsampling path of a symmetric deep convolutional network, typically containing 5 sets of convolutional units; the above consecutive convolutional layers refer to two convolutional layers with 3×3×3 convolutional kernels in each set of convolutional units, followed by a batch normalization layer and a ReLU activation function after each layer; the above downsampling layers refer to convolutional layers with a stride of 2, used to halve the spatial resolution of the feature map while doubling the number of channels; through the above processing, the encoding network captures detailed information such as texture and edges in shallow layers and captures semantic information in deep layers, constructing a feature hierarchy structure from shallow to deep layers.
[0083] Step S30: The original feature map is enhanced by pooling and spatial enhancement mask extraction to obtain the enhanced feature map;
[0084] It should be noted that in the above embodiments of this application, channel attention enhancement is achieved by generating channel gain weights through three-dimensional global pooling and a shared fully connected layer, while spatial attention enhancement is achieved by calculating the mean and maximum values of the channel dimensions and generating a spatial enhancement mask through convolution. In the process of executing this step in steps (i.e., subsequent steps S31 to S34), a cascaded channel attention and spatial attention mechanism is adopted, that is, first, steps S31-S32 are executed to reweight the channels, and then steps S33-S34 are executed to reweight the spaces.
[0085] Step S40: (At each upsampling level of the decoding network, then) the enhanced feature map is filtered by oscillation detection and oscillation suppression in key regions to obtain a fused feature map;
[0086] It should be noted that in the above embodiments of this application, the key region refers to the pleural adhesion region or the densely vascularized region; in these key regions, the cross-correlation value between the encoder features and the decoder upsampled features (the cross-correlation value refers to the encoder feature map) is... With decoder upsampled feature map pixel-by-pixel at the corresponding spatial location (here, pixel-by-pixel refers to the encoder feature map for a given spatial location) The cosine similarity is calculated between the value at that spatial location and the value of the upsampled feature map from the decoder at that spatial location. ,in ∈ For feature vectors at the same spatial location, Represents the dot product of vectors. The L2 norm (magnitude) of the vector is used for normalization. This formula calculates the cosine similarity, with a value range of [-1, 1]. Compared to directly using the dot product or Euclidean distance, cosine similarity is insensitive to the absolute intensity of features, focusing only on the consistency of direction. This is because the magnitudes of encoder and decoder features may differ significantly due to network layers, batch normalization, and other operations. However, the embodiments in this application are concerned with whether the patterns represented by the encoder feature map and the decoder upsampled feature map match (whether the directions are consistent), rather than whether the intensity is the same. Due to this characteristic of being insensitive to intensity, The value of can stably reflect the semantic consistency of two features. When the features oscillate violently in space, The direction will change rapidly, leading to The value fluctuates greatly, providing a stable and sensitive indicator for subsequent oscillation detection. Oscillations are prone to occur (i.e., the cross-correlation values of adjacent positions or adjacent iteration steps fluctuate frequently and greatly). Oscillation detection quantifies the oscillation intensity by calculating the standard deviation of the local neighborhood, while oscillation suppression screening smooths the gate signal by exponential moving average, thereby screening out stable features.
[0087] In areas of pleural adhesion or dense vascularity, the features extracted by the encoder exhibit dramatic local fluctuations in space (specifically, as shown in...). Figure 7 As shown, Figure 7In the illustration, the lung nodules are closely attached to the chest wall or mediastinum, with no clear fat gap between the nodules and the pleural soft tissue, resulting in extremely low grayscale contrast. The encoder feature fluctuations manifest as follows: at the nodule edge pixels, the activation value of a certain channel in the feature map (responsible for detecting the nodule-lung parenchyma boundary) is 0.92 (high response) on the voxel immediately adjacent to the nodule, while on the pleural side, the activation value of the same channel, spatially separated by only one voxel in the pleural soft tissue, drops sharply to 0.21 (low response). The next voxel (extrapulmonary region), due to the extrapulmonary tissue being removed using a lung field mask in step S10, may be filled with background values or have extremely low responses (e.g., 0.05). Consequently, within a 3×3×3 neighborhood centered on this edge voxel, the standard deviation of the feature values may be as high as 0.35–0.50, far exceeding the standard deviation of the smooth region within the nodule (approximately 0.05). The drastic numerical jumps (0.92 to 0.21 to 0.05) can cause ambiguity and misjudgment during decoder upsampling, leading to the segmented nodule mask overflowing onto the chest wall or adhering to the pleura. Within the local spatial neighborhood, the channel activation values of the enhanced feature map exhibit non-smooth characteristics such as high variance, large gradient, or inconsistent patterns. This scheme defines this phenomenon of drastic local fluctuations in feature values as feature oscillation. The oscillation intensity is quantified by calculating the three-dimensional standard deviation of the current enhanced feature map in the local neighborhood (e.g., 3×3×3) (see step S461 for details). The larger the three-dimensional standard deviation, the more severe the feature oscillation in that region. From the perspective of feature fusion, this local feature oscillation will manifest as frequent and large fluctuations in the cross-correlation values of the encoder features and the decoder upsampled features at corresponding positions.
[0088] During the upsampling process of the decoding network, the enhanced feature map corresponding to each layer needs to independently perform oscillation detection and suppression processing (S41-S49). The feature map output by the second group of convolutional units in the encoding network extracted in S41 is only used to determine the key region mask and does not replace the enhanced feature map in S30 as the main processing object for oscillation suppression; the main processing object is still the enhanced feature map output in S30. Steps S40 to S49 are not executed independently after the encoding network is completed, but are embedded within each upsampling layer of the decoding network. That is, for each upsampling layer of the decoding network, the decoder upsampling features of the current layer are first obtained (obtained by upsampling the fused features of the previous layer), then the enhanced feature map is obtained from the corresponding layer of the encoder, and the oscillation detection and suppression filtering (S41-S49) is performed to generate the fused feature map of the current layer, which is then sent to the next layer. Therefore, the decoder upsampling features in S45 already exist when the current layer is executed.
[0089] The oscillation detection and suppression screening process is only performed in key regions (pleural adhesion areas or densely vascular areas). The criteria for determining key regions are: regions with high response values in the shallow feature maps of the coding network (such as the first and second layers) whose boundaries intersect with the edge of the lung field mask, or regions with an overlap rate greater than 0.6 with the vascular segmentation results, are marked as key regions. The gating signal maps of other regions are directly set to 1 (i.e., no oscillation suppression is performed).
[0090] Step S50: The fused feature map is sampled on the decoding network and passed through the Softmax layer to output a probability segmentation map of the lesion. The probability distribution map of the lesion is then binarized to obtain the final segmentation mask (e.g., ...). Figure 8 (As shown).
[0091] It should be noted that in the above embodiments of this application, the probability distribution map of the lesions is binarized to obtain the final segmentation mask. Specifically, the probability value of each pixel in the probability segmentation map output by the decoding network belonging to a lung nodule is divided by a preset discrimination threshold (e.g., 0.5). The preset discrimination threshold of 0.5 is not fixed. In practical applications, the Youden index can be selected by plotting an ROC curve on the validation set. The threshold is maximized (index), or adjusted according to clinical preference for sensitivity / specificity. In the example, 0.5 is used as the default value, achieving a balance between sensitivity 0.92 and specificity 0.91 on the LIDC dataset. Pixels with a probability value greater than 0.5 are identified as nodule regions, resulting in a preliminary binary mask. Then, a three-dimensional connected component analysis is performed on the preliminary binary mask (three-dimensional connected component analysis refers to scanning each voxel in the binary mask, grouping adjacent (26-neighbor or 6-neighbor) voxels with the same label into the same connected component, calculating the total number of voxels in each connected component, and multiplying by the voxel volume to obtain the actual physical volume). This yields multiple independent connected components. The volume of each independent connected component is calculated, and components with a volume less than 30 cubic millimeters are removed (the volume threshold of 30 cubic millimeters is set according to the 2017 Fleishner Society guidelines for the management of pulmonary nodules, which recommends follow-up for non-solid nodules ≥30 mm³, and is used to remove false positives caused by extremely small microvascular cross-sections or artifacts; for example, assuming a voxel volume = 1 m³). An isolated connected region (m³, if a connected region contains 25 voxels, then the volume of the connected region is 25 mm³; if its volume is 30 cubic millimeters, then it is discarded) is considered isolated connected regions. Then, for each remaining independent connected region, the ratio of its longest axis to its shortest axis is calculated. Regions with a ratio greater than 3.0 are considered vascular branches (this ratio is used as a criterion for determining vascular branches, derived from a statistical analysis of 100 cases of pulmonary vascular 3D reconstruction: the mean axial ratio of vascular branches was 3.7 ± 1.2, while the mean axial ratio of pulmonary nodules (non-vascular) was 1). Using a threshold of 0.6 ± 0.5, and taking 3.0 as the discrimination threshold, the classification accuracy can reach 92%. The major axis of the connected component is 9.0 mm, the minor axis is 2.5 mm, the ratio is 3.6 > 3.0, and its shape is slender and tubular. It is judged as a blood vessel branch and removed. For example, if the moment of inertia of a connected component is elliptical, the major axis is 9.0 mm, the minor axis is 2.5 mm, and its ratio is 3.6. If the ratio is greater than 3.0, it is judged as a blood vessel branch and removed. Independent connected components are judged as blood vessel branches and removed from the mask to obtain the final segmentation mask.
[0092] Specifically, in step S30, the original feature map is enhanced by pooling (the pooling enhancement is a channel attention mechanism, which generates channel gain weights through global pooling and fully connected layers) and spatial enhancement mask extraction to obtain the enhanced feature map, including the following steps:
[0093] Step S31: After performing three-dimensional global average pooling and three-dimensional global max pooling on the original feature map, each channel is generated through a shared fully connected layer (a channel refers to the third dimension of the feature map (after the depth dimension). Each channel corresponds to a specific feature response map extracted by a set of convolutional kernels. Specifically, in a convolutional neural network, each channel corresponds to a learnable convolutional kernel (filter). This convolutional kernel is used to detect a specific pattern or semantic concept in the input data. For example, a shallow layer of the network (such as the first group of convolutional units in S20) has 64 channels. Channel 5 may be trained to specifically detect horizontal edges. Then, in the input CT image, any horizontal lung texture, The response value of channel 5 will be very high for locations such as the pleural line or the blood vessel wall; channel 18 may be trained to specifically detect round, high-brightness spots; therefore, in the input image, the central area of a suspected lung nodule (usually appearing as a round or near-round high-density shadow) will have a very high response value for channel 18. Conversely, the response value for background or normal lung parenchyma areas will be very low; channel 32 may be trained to specifically detect the tubular structures of blood vessels; therefore, the response value of channel 32 will remain consistently high for voxels along the direction of blood vessels. (Gain weights are scalar coefficients ranging from 0 to 1, used to measure the importance of each channel to the segmentation task; the closer the weight is to 1, the more the features of that channel should be preserved and enhanced.)
[0094] Step S32: Multiply the gain weights channel-by-channel with the original feature map (channel-by-channel multiplication means multiplying the gain weight (a scalar) of channel c with the entire channel c of the original feature map, resulting in all spatial positions within that channel being multiplied by the same scalar) and then add the result element-by-element with the original feature map (element-by-element addition means adding the values at the same positions) to obtain the preliminary enhanced feature map (the preliminary enhanced feature map is the feature map after channel attention reweighting, which retains the information of the original features (through residual connections) compared to the original feature map, while strengthening the response of important channels and suppressing the response of irrelevant channels);
[0095] Step S33: Calculate the average and maximum values of the preliminary enhanced feature map in the channel dimension (the spatial size of the preliminary enhanced feature map is consistent with the spatial size of the original feature map, and the number of channels is C). After concatenation, extract the spatial context through a convolutional layer (i.e., extract through a 7×7×7 convolutional layer) and generate a spatial enhancement mask.
[0096] It should be noted that in the above embodiments of this application, splicing refers to stacking the average spatial description map and the maximum spatial description map in the channel dimension to form a combined feature map with 2 channels; the convolutional layer here is a 7×7×7 convolutional kernel, because a larger convolutional kernel can capture a wider range of spatial context information, which helps to distinguish the spatial positional relationship between pulmonary ground-glass nodules and their surrounding blood vessels, pleura, and other tissues; spatial context relationship refers to the dependency relationship between different pixel positions in the feature map, such as the association between the edge of the nodule and the central region, the relative position of the nodule and the adjacent blood vessels, etc. Specifically, spatial context relationship represents the dependency relationship and statistical regularity between a pixel and other pixels in its surrounding neighborhood in the feature map. This relationship includes both short-distance local texture and edge consistency, as well as long-distance shape and structural layout. For example, short-distance context (distinguishing between nodules and blood vessel cross-sections) is an isolated, high-brightness circular region (which may be a nodule), whose central pixel has a high value, and the value gradually decreases as it moves from the center to the edge pixels. The distribution is as follows: A high-response pixel value is observed at the center of a blood vessel, while the edge pixels may exhibit a tail-like high response connected to adjacent vessel walls or branches. The convolutional kernel distinguishes between these two patterns by considering the spatial context within the receptive field (e.g., detecting whether the gradient direction is radial or continuous). Long-range context (confirming pleural adhesions): A bright pixel at the edge of a lung is identified as a pleural adhesion if the surrounding spatial context (e.g., 2-3 cm behind it) shows that the pixel is directly adjacent to the edge of the lung field mask (pleura), and along a certain direction, the pixel value exhibits an "island" pattern, from low (lung parenchyma) to high (lesion), then abruptly decreasing (extrapleural removal). Conversely, if the bright pixel is surrounded by continuous, low-response normal lung parenchyma, it is more likely an isolated endogenous nodule. The spatial enhancement mask is a single-channel weight map with the same spatial size as the input feature map, where the value of each pixel represents the spatial probability that the location belongs to a lesion region.
[0097] Step S34: Multiply the spatial enhancement mask by the preliminary enhancement feature map pixel by pixel (here, pixel by pixel means that for a spatial location, the value of the spatial enhancement mask at that spatial location is multiplied by the values of all channels of the preliminary enhancement feature map at that spatial location), and then add the result to the preliminary enhancement feature map element by element (here, element by element means that the values at the same position are added together) to obtain the enhanced feature map (the enhanced feature map has three-dimensional spatial dimensions D×H×W and the number of channels C. Compared with the preliminary enhancement feature map, it further integrates spatial location information, enhances the response of the spatial region where the lesion is located while suppressing the response of the background region, while maintaining the original features).
[0098] It should be noted that, in the above embodiments of this application, three-dimensional global average pooling and three-dimensional global max pooling are first performed on the original feature map, and the channel descriptors obtained from the two pooling are fed into a shared fully connected layer. Finally, the gain weight of each channel is generated after processing. Through the parallel extraction of the two pooling methods, the network captures both the global background response of each channel feature and its most salient response. These two types of information are nonlinearly fused and compressed to recover, thereby calculating a learnable importance score, i.e., gain weight, for each channel. This yields a quantified weight coefficient that can evaluate the importance of each channel in the original feature map. The higher the weight, the more the channel feature should be preserved and strengthened for the current segmentation task, providing a basis for subsequent recalibration of the channel dimension of the feature map. Then, the gain weight generated in step S31 is... The gain weights are multiplied channel-by-channel with the original feature map, and then the multiplication result is added element-by-element to the original feature map (here, element-by-element addition refers to adding values at the same position), resulting in a preliminary enhanced feature map. The gain weights are used to scale the responses of each channel in the original feature map, preserving or even highlighting the activation values of high-weight channels, while suppressing the activation values of low-weight channels, thus achieving explicit modeling and selective enhancement of channel importance. The subsequent element-by-element addition operation (here, element-by-element addition refers to adding values at the same position) (i.e., residual connection) ensures that the underlying information of the original feature map is not completely covered, enabling the network to maintain training stability and feature integrity while learning to strengthen important channels. This generates a preliminary enhanced feature map that retains the content contained in the original input feature map while significantly improving the response strength of key channels.
[0099] Furthermore, the average and maximum values of the preliminary enhanced feature maps are calculated along the channel dimension to obtain the average spatial description map and the maximum spatial description map for each channel. These two description maps are then concatenated along the channel dimension to form a combined feature map with two channels. This combined feature map is then convolved by a convolutional layer to generate the spatial enhancement mask. Calculating the average and maximum values along the channel dimension compresses the spatial saliency information distributed across each channel into two single-channel description maps. The concatenated average and maximum spatial description maps are then fed into a large-kernel convolutional layer, enabling the convolution operation to integrate the spatial contextual relationships of surrounding tissues within a larger receptive field, such as perceiving the relative positional relationship between nodules and adjacent pleura. After convolution and subsequent activation function processing, a single-channel weight map with the same spatial size as the input is output, i.e., the spatial enhancement mask. Based on the spatial saliency information compressed by the channels, a spatial attention weight map capable of initially distinguishing lesion regions from background regions is generated.
[0100] Next, the spatial enhancement mask generated in step S33 is multiplied pixel-by-pixel with the preliminary enhancement feature map, and then the multiplication result is added element-by-element to the preliminary enhancement feature map (here, element-by-element addition refers to adding values at the same position) to obtain the enhanced feature map. The pixel-by-pixel multiplication operation enables the spatial enhancement mask to reweight the spatial dimension of the preliminary enhancement feature map with pixel-level precision. That is, in the lesion area with a value close to 1 in the mask, its feature response is completely preserved or enhanced; in the background area with a value close to 0 in the mask, its feature response is significantly suppressed. The subsequent element-by-element addition operation (here, element-by-element addition refers to adding values at the same position) (residual connection) ensures that the enhancement operation does not destroy the original information structure of the feature map, avoids gradient vanishing, and maintains the stable training of the network. Based on the channel dimension enhancement completed in step S32, the spatial dimension enhancement is further completed to obtain an enhanced feature map that is optimized in both channel and spatial dimensions, and its feature response is more focused on the solid region where the lung nodule is located.
[0101] Specifically, in step S31, after performing three-dimensional global average pooling and three-dimensional global max pooling on the original feature map, the gain weight of each channel is generated through a shared fully connected layer, including the following steps:
[0102] Step S311: Perform three-dimensional global average pooling and three-dimensional global max pooling on the original feature map respectively, and extract the average pooling channel descriptor and the max pooling channel descriptor;
[0103] It should be noted that in the embodiments of this application described above, three-dimensional global average pooling refers to calculating the arithmetic mean of each channel across the entire spatial dimension (depth, height, and width) of the feature map, outputting a 1×1×1×C vector; three-dimensional global max pooling refers to calculating the maximum value of each channel across the entire spatial dimension of the feature map, outputting a vector of the same dimension. Through the above processing, the extracted average pooling channel descriptor captures the overall distribution background of each channel's features (i.e., average pooling outputs the scalar mean of each channel), possessing global statistical representativeness. For example, the average response of a channel detecting lung parenchyma texture would be a moderate value. The max pooling channel descriptor captures the most significant feature response in each channel (such as high activation values at the center of lesions), possessing local saliency. For example, the maximum response of a channel detecting nodules would be very high. The two provide complementary information. The global average indicates the general state of the original feature map, while the global max indicates whether there are abnormal highlights in the original feature map; combining the two allows the network to more comprehensively evaluate the importance of each channel.
[0104] Step S312: Input the average pooled channel descriptor into the first fully connected layer of the shared multilayer perceptron, and compress the channel dimension according to a preset compression ratio to obtain a compressed average descriptor;
[0105] It should be noted that in the above embodiments of this application, the shared multilayer perceptron is a two-layer fully connected network. The first fully connected layer is used for dimensionality reduction, and the second fully connected layer is used to restore dimensionality. The preset compression ratio is typically set to 16. This value has been experimentally verified to achieve a good balance between reducing computational complexity and maintaining the dependencies between channels (this value was determined based on the following ablation experiments: compression ratios r=2, 4, 8, 16, and 32 were tested on a validation set (such as the LIDC dataset), with Dice coefficient and parameter count as evaluation metrics. Experimental results show that when r=16, the Dice coefficient reaches 0.873, an improvement of 0.5% compared to r=8, while when r=32, the Dice coefficient decreases by 0.3%, and the parameter count reduction is not significant. Therefore, r=16 was chosen to balance performance and computational efficiency). The compressed average descriptor refers to compressing the original C-dimensional vector into a compact C / 16-dimensional representation. This process learns the nonlinear interaction relationships between channels through linear transformation, i.e. , where W1∈ This is the weight matrix of the first fully connected layer. For average pooling channel descriptors, This is the bias term for the fully connected layer; this linear transformation preserves the combinatorial relationships between channels while reducing dimensionality.
[0106] In the above embodiments of this application, the dimension of the average pooling channel descriptor is 1×1×1×C (C is the number of channels in the original feature map). Then, it is compressed according to a preset compression ratio, that is, the number of output channels of the shared multilayer perceptron is C / compression ratio. After the average pooling channel descriptor is input into the first fully connected layer, the channel dimension is compressed from C to the dimension of C / compression ratio through linear transformation to obtain the compressed average descriptor.
[0107] Step S313: Input the max-pooled channel descriptor into the first fully connected layer of the shared multilayer perceptron, and compress the channel dimension according to the preset compression ratio to obtain the compressed max descriptor;
[0108] It should be noted that in the above embodiments of this application, the compressed maximum descriptor refers to the C / 16-dimensional vector obtained by reducing the dimension of the max pooling channel descriptor (dimension 1×1×1×C) through the first fully connected layer of the same shared multilayer perceptron, which shares the same network weights as the compressed average descriptor; the compression processing of S312 and S313 in the above embodiments of this application significantly reduces the number of parameters in the subsequent second fully connected layer, and the compression process forces the network to learn the nonlinear interaction relationship between channels, rather than a simple linear combination.
[0109] Step S314: Input the compressed average descriptor into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels and obtain the restored average descriptor;
[0110] It should be noted that in the above embodiments of this application, the second fully connected layer is the output layer of a shared multilayer perceptron, with input of C / 16 dimensions and output of C dimensions, used to restore the compressed features to the original channel dimension; the original number of channels refers to the number of channels C of the original feature map; the restored average descriptor refers to the C-dimensional vector obtained by upscaling the compressed average descriptor through the second fully connected layer, which retains the global background information in the average pooling channel descriptor and incorporates the nonlinear dependencies between channels. Specifically, it is calculated using the following formula:
[0111] ;in, This is the weight matrix of the second fully connected layer. This is the bias term for the second fully connected layer. As a column vector (dimension C / 16×1), the result It is a column vector;
[0112] The above formulas for calculating the linear transformation of compression and restoration are standard fully connected layer operations used to learn linear or nonlinear (in conjunction with activation functions) combination relationships between feature channels. Projecting high-dimensional information onto a low-dimensional manifold Projecting them back into a high-dimensional space, these two layers of weights are learnable, enabling the network to automatically discover and utilize the dependencies between channels. Without compression, simply adding or concatenating the average pooling channel descriptors and the max pooling channel descriptors would not be able to learn the complex nonlinear interactions between channels, and the model's capabilities would be greatly limited. The compression-recovery bottleneck structure is key to forcing the network to perform information abstraction and redundancy removal, thereby improving the quality of attention weights.
[0113] Step S315: Input the compressed maximum descriptor into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels and obtain the restored maximum descriptor;
[0114] It should be noted that, in the above embodiments of this application, the restored maximum descriptor refers to the C-dimensional vector obtained by upscaling the compressed maximum descriptor through the second fully connected layer, which retains the significant feature point information in the max pooling channel descriptor; the restoration processing in S314 and S315 of the above embodiments of this application decompresses the compressed core information back to the original number of channels, generating an independent weight for each original channel; the restored average descriptor and restored maximum descriptor are no longer simple statistics, but high-dimensional representations rich in context that integrate all channel interaction information.
[0115] Step S316: Add the recovered average descriptor and the recovered maximum descriptor element by element (here, element by element means adding the values at the same position) to obtain the weight vector after addition;
[0116] It should be noted that the processing in the above embodiments of this application yields a weighted vector that integrates global background information and local salient feature information. Each element corresponds to the unnormalized importance score of a channel. The reason for using element-wise addition instead of concatenation or multiplication is that the average pooling branch provides the global background response, while the max pooling branch provides the local salient response. The contributions of the two to the channel importance are complementary and approximately linear.
[0117] Step S317: Map the summed weight vector (the summed weight vector obtained through the aforementioned compression and recovery process) to the 0 to 1 interval using the Sigmoid function to generate the gain weight for each channel.
[0118] It should be noted that in the embodiments of this application described above, the gain weight of each channel is a C-dimensional vector with values ranging from [0,1]. Each element represents the proportion of the corresponding channel's feature map that should be retained in subsequent calculations. Through channel-by-channel multiplication of these weights, the network can automatically enhance feature channels that are beneficial to the segmentation task and suppress irrelevant or interfering channels.
[0119] Specifically, in step S33, the average and maximum values of the preliminary enhanced feature map are calculated in the channel dimension, and after concatenation, a spatial enhancement mask is extracted and generated through a convolutional layer, including the following steps:
[0120] Step S331: Calculate the average value of all channels in the channel dimension for the preliminary enhanced feature map to obtain the average spatial description map of a single channel (the spatial size of the average spatial description map of a single channel is D×H×W×1).
[0121] Step S332: Calculate the maximum value of all channels in the channel dimension for the preliminary enhanced feature map to obtain the maximum spatial description map of a single channel (the spatial size of the maximum spatial description map of a single channel is D×H×W×1).
[0122] Step S333: Concatenate the average spatial description map and the maximum spatial description map along the channel dimension to obtain a combined feature map with 2 channels;
[0123] Step S334: Perform a convolution operation on the combined feature map using a 7×7×7 convolution kernel to output a spatial feature map (with 1 channel).
[0124] Step S335: Input the spatial feature map into the Sigmoid function to generate the spatial enhancement mask (the spatial size of the spatial enhancement mask is D×H×W×1, and the value of each pixel position is between 0 and 1).
[0125] It should be noted that, in the above embodiments of this application, the average value of all channels in the channel dimension is first calculated on the preliminary enhanced feature map to obtain the average spatial description map of a single channel. The original multi-channel feature map is then compressed along the channel direction to obtain a single-channel map. During the calculation process, the value at each spatial location is equal to the arithmetic mean of the feature values of all channels at that location, thus obtaining a description map that reflects the overall spatial distribution trend of the feature response, i.e., the average spatial description map. Areas with higher values in the map indicate that the average activation level at that spatial location is strong regardless of the specific channel, thereby converging the common spatial information of each channel. Next, the maximum value of all channels in the channel dimension is calculated on the preliminary enhanced feature map to obtain the maximum spatial description map of a single channel. The multi-channel feature map is compressed into a single-channel map, but the aggregation method used is to take the maximum value rather than the average value, thus obtaining a description map that can capture the most significant location of the feature response in space, i.e., the maximum spatial description map. Areas with higher values in the map indicate that at least one channel among many channels has produced a strong response at that spatial location, thus preserving the most discriminative spatial information among each channel.
[0126] Next, the average spatial description map and the maximum spatial description map are concatenated along the channel dimension to obtain a combined feature map with 2 channels. The two single-channel maps generated in the previous two steps are then stacked along the channel dimension to form a new feature map with two channels. This physically merges the overall distribution trend information and local salient location information at the channel level, but fusion calculation has not yet been performed. Each description map retains its independent numerical content, providing two spatial description data sources from different statistical perspectives for subsequent convolution operations. Then, a 7×7×7 convolution kernel is used to perform a convolution operation on the combined feature map, outputting a spatial feature map with 1 channel. By using a 7×7×7 large receptive field convolution kernel, convolution processing is performed on the combined feature map with 2 channels. The sliding calculation of the convolution kernel is essentially a weighted summation of the input values within the kernel coverage area, which fuses and interacts the two spatial description information that were originally just simple stacking. The contribution ratio of the average description information and the maximum description information in generating the final spatial weight is automatically determined by the learnable convolution kernel weights. Furthermore, when the 7×7×7 convolution kernel size is used for fusion calculation, the value at each output position integrates the spatial context relationship within its larger neighborhood, so that each pixel on the output spatial feature map has the receptive field information of the local region.
[0127] Finally, the spatial feature map is input into the Sigmoid function to generate the spatial enhancement mask. The Sigmoid function transforms each value on the spatial feature map, strictly compressing and mapping the spatial feature map values, which may originally be distributed in any real number range, to an open interval of 0 to 1, thereby generating the spatial enhancement mask. The mapped values have clear physical meanings, that is, the value of each pixel position represents the normalized spatial weight. The closer the value is to 1, the more likely the position is to be judged as a foreground region that needs attention, and the closer it is to 0, the more likely the position is to be judged as a background region.
[0128] Specifically, in step S40, the enhanced feature map is processed by oscillation detection and oscillation suppression in key regions to obtain a fused feature map, including the following steps:
[0129] Step S41: (When the enhanced feature map is transferred from the encoding network to the decoding network, there is an oscillation in the cross-correlation value between the encoder features and the decoder upsampled features in the pleural adhesion region or densely vascular region. An adaptive gating unit is used to suppress and filter the oscillation in the enhanced feature map, i.e., subsequent operations.) Extract the feature map output by the second group of convolutional units in the encoding network (high spatial resolution, preserving rich spatial details). Take the maximum value of this feature map in the channel dimension to obtain the single-channel response map. The response graph of a single channel will be set to a threshold value greater than a preset percentage (this percentage threshold is set to 0.6, meaning that for the current input sample, the global maximum value of the sample is calculated, and 0.6 times this maximum value is taken as the high response threshold). >0.6×max( ), for example, max( If the value is 0.92, then the global maximum response value is 0.552, which is the filtering value. Voxels with values greater than 0.552 are marked as high-response regions. The rationale for setting the proportion threshold to 0.6 is as follows: For 100 lung CT images in the training set, the proportion of the response value of voxels containing pleural adhesion regions to the global maximum response value of the sample in the shallow feature response map (output of the second group of convolutional units) was statistically analyzed. The mean of this proportion was 0.58 ± 0.12. A threshold of 0.6 can cover approximately 70% of the adhesion regions while avoiding the inclusion of excessive background noise. (This proportion can be adjusted within the range of 0.5 to 0.7) Voxels marked as high-response regions are used to obtain a binary mask. ;
[0130] Step S42: Apply a binary mask Perform 3D connected component analysis (26 neighborhoods). Before this, a binary mask needs to be applied. Perform a three-dimensional morphological closing operation (structuring element is a 3×3×3 cube) to connect adjacent high-response regions, and then perform connected component analysis to obtain multiple connected components; determine whether any connected component is adjacent to the edge of the lung field mask (i.e., the lung boundary) (the minimum Euclidean distance between the two sets is 0); if so, merge all connected components that are adjacent to the edge of the lung field mask into a candidate mask for pleural adhesions. ;
[0131] Step S43: Using a pre-trained 3D U-Net vessel segmentation model (which can be trained using public datasets such as IntrathoracicAirwaysandVessels), inference is performed on the image preprocessed in step S10 to obtain a vessel probability map. The vessel probability map is then binarized (with a threshold of 0.5) to obtain a vessel segmentation mask. The enhanced feature map is then compared with the blood vessel segmentation mask. Spatial overlap rate is calculated, and candidate masks for densely vascular regions are obtained by marking them.
[0132] It should be noted that the spatial overlap rate calculation refers to the percentage of blood vessel voxels within a 5×5×5 neighborhood centered on each spatial location (the calculation of the percentage of blood vessel voxels within the neighborhood is...). Where i, j, k are spatial offsets; where, If (d,h,w) represents the spatial location, and the value is greater than the vascular voxel percentage threshold (the vascular voxel percentage threshold, for example, 0.6, is derived from a statistical analysis of 100 lung CT images: in the region where vascular branches meet nodules, within a 5×5×5 neighborhood centered on the nodule center, the average vascular voxel percentage is 0.45±0.15; while in a region of simple vascular density (without nodules), this percentage is 0.75±0.10. Using 0.6 as the threshold can preserve the information of nodules around blood vessels while suppressing interference from pure vascular regions. This threshold can be adjusted within the range of 0.55~0.65), then the location is marked as a region of dense blood vessels, and a mask is obtained. .
[0133] Step S44: Merge the candidate mask for pleural adhesions with the mask for densely vascularized areas to obtain the final key area mask. (Critical area mask) Spatial dimensions and enhanced features of the current level Figure 1 The value of 1 indicates that oscillation detection and suppression screening are required, while the value of 0 indicates that no processing is performed (the gating signal diagram is directly set to 1).
[0134] Step S45: Masking the critical area The enhanced feature map and decoder upsampled features of the current layer are obtained from the spatial location marked as 1. The enhanced feature map and decoder upsampled features of the current layer are mapped to a unified feature subspace by 1×1×1 convolution, and then added element-wise (here, element-wise addition means adding the values at the same position). The original gated signal map is generated by the Sigmoid function. ;
[0135] Step S46: Obtain the historical gating signal diagram of the previous level. The oscillation suppression coefficient is dynamically calculated based on the three-dimensional standard deviation of the enhanced feature map at the current level in the local region. (The oscillation suppression coefficient diagram is the spatial distribution diagram output in step S423, and the value at each position is used as the adaptive coefficient in the exponential moving average in step S47, such as...) Figure 9 As shown, the smaller the oscillation suppression coefficient, the stronger the suppression.
[0136] It should be noted that in this scheme, "level" refers to the upsampling level of the decoding network. For the first upsampling level of the decoding network, Set to a tensor of all 0.5, its spatial size is the same as the enhanced features of the current level. Figure 1 To the following levels: The result of upsampling the smoothed gated signal image of the final output of the previous level to the current size.
[0137] Step S47: Based on the oscillation suppression coefficient diagram, the historical gating signal diagram of the previous level, and the original gating signal diagram. Calculate the smoothed gated signal graph ;
[0138] It should be noted that in the above embodiments of this application, since the oscillation intensity of the cross-correlation value in the key area is not uniform in space (for example, the edge of the adhesion area oscillates violently, while the inside is relatively stable), using a fixed sliding coefficient will lead to over-smoothing or under-smoothing.
[0139] Therefore, this scheme designs a spatially adaptive oscillation suppression coefficient map. A larger value indicates more reliable historical gating at that location (weaker oscillations), and more historical information should be retained; a smaller value indicates more reliable current gating (stronger oscillations), and more current observations should be considered. This exponential moving average is calculated using the formula... ;in, This indicates element-wise multiplication (where element-wise multiplication refers to multiplying values in the same position).
[0140] Specifically, the above-described embodiment of this application involves obtaining a historical gating signal map of the previous level, wherein the spatial dimensions of the historical gating signal map of the previous level and the enhanced features... Figure 1The values of each pixel are floating-point numbers between 0 and 1. Initially, all pixel values in the previous level's historical gated signal map are set to 0.5. Then, based on the current level's original gated signal map (generated by adding element-wise (meaning adding values at the same position) after 1×1×1 convolution of the current level's enhanced feature map and the decoder's upsampled features), and then by the Sigmoid function, its spatial dimensions are the same as the current level's enhanced feature map. Figure 1 (To); then, calculate for each spatial location. The smoothed gated signal diagram is then output.
[0141] Step S48: Multiply the smoothed gated signal map element-wise with the enhanced feature map of the current level (element-wise multiplication means multiplying the values at the same position) to obtain the filtered feature map;
[0142] It should be noted that the above embodiment of this application is for obtaining the smoothed gating signal diagram. Its spatial dimensions are D×H×W×1; the enhanced feature map is obtained, and its spatial dimensions are D×H×W×C; the smoothed gated signal map is... The signal is replicated along the channel dimension, expanding the number of channels to C, to obtain the gating signal diagram after broadcasting. Its dimensions are D×H×W×C; for each spatial location and each channel, perform a multiplication operation. ,in, It is the enhanced feature map, that is, the filtered feature map.
[0143] Step S49: Concatenate the filtered feature map with the decoder upsampled features along the channel dimension to obtain the fused feature map.
[0144] It should be noted that, in the above embodiments of this application, the feature map output by the second group of convolutional units in the encoding network is first extracted, and the maximum value of the feature map in the channel dimension is taken to obtain a single-channel response map. Then, voxels with values greater than a preset ratio threshold in the response map are marked as high response regions to obtain a binary mask. The operation of taking the maximum value in the channel dimension compresses the multi-channel features into a single-channel response map, retaining the spatial location information of the strongest response in the shallow features, that is, the regions that the encoding network considers to have significant edges or textures. Based on the global maximum value ratio threshold, binarization is performed, and the regions with the highest relative activation intensity are selected from the response map to obtain a binary mask that can identify the candidate location distribution of potential pleural adhesion regions or densely vascularized regions.
[0145] Furthermore, a three-dimensional morphological closing operation is first performed on the binary mask to connect adjacent high-response regions. Then, three-dimensional connected component analysis is performed to obtain multiple connected components, bridging spatially adjacent but slightly broken high-response regions to form more complete candidate region blocks, avoiding regional fragmentation caused by local fluctuations in the response map. Subsequent connected component analysis divides the binary mask into several independent, unconnected regions. By judging the adjacency with the edge of the lung field mask, regions that are close to the lung boundary (i.e., the pleural surface) are selected from the numerous high-response connected components and merged into a binary pleural adhesion candidate mask. Then, a pre-trained three-dimensional U-Net vessel segmentation model is used to infer the preprocessed image to obtain a vessel probability map, which is then binarized with a threshold of 0.5 to obtain the blood vessel probability map. The process begins by creating a segmentation mask. Then, for each spatial location, the proportion of blood vessel voxels in the neighborhood centered at that location is calculated and labeled to obtain candidate masks for densely vascular regions. The blood vessel segmentation mask output by the blood vessel segmentation model is a binary image with the same spatial size as the input image. Voxels with a value of 1 represent regions that the model determines to be blood vessel structures. Subsequent neighborhood proportion calculations extend the precise voxel-level judgment of whether a region is a blood vessel to a region-level judgment of whether it is in a densely vascular environment. When the proportion of blood vessel voxels in the neighborhood of a certain location exceeds 0.6, it indicates that there is a relatively dense distribution of blood vessels around that location, and therefore it is marked as a densely vascular region. This avoids the possibility of missed detections that may result from relying solely on precise blood vessel boundaries. The generated densely vascular region mask identifies the second type of key regions that require subsequent oscillation suppression.
[0146] Next, the pleural adhesion candidate mask obtained in step S42 and the vascular dense region mask obtained in step S43 are merged to obtain the final key region mask. The two independently determined key region candidate masks are fused into a unified binary mask, namely the key region mask. Voxels with a value of 1 on this mask represent that the location belongs to at least one of the pleural adhesion region or the vascular dense region, and are target regions that need to be subjected to subsequent oscillation detection and suppression screening; voxels with a value of 0 do not need to be processed.
[0147] For the spatial location marked as 1 in the key region mask, the enhanced feature map and decoder upsampled features of the current layer are obtained. Both are mapped to a unified feature subspace via 1×1×1 convolution, then element-wise summed. The sum is then input into the Sigmoid function to generate the original gated signal map. The 1×1×1 convolution adjusts the number of channels in the enhanced feature map and decoder upsampled features without changing the spatial dimensions, mapping them to the same feature subspace for easier subsequent fusion. The element-wise summation linearly combines the enhanced features from the encoding path with the upsampled features from the decoding path, fusing low-level spatial details with high-level semantic information. The Sigmoid function compresses the summed real value to the 0-1 range, generating the original gated signal value for each spatial location within the key region. This value reflects the matching degree or fusion confidence of the current layer's encoder and decoder features at that location.
[0148] Next, the historical gating signal map of the previous level is obtained, and the oscillation suppression coefficient map is dynamically calculated based on the three-dimensional standard deviation of the enhanced feature map in the local region of the current level. The three-dimensional standard deviation of the enhanced feature map is calculated to obtain a distribution map that reflects the spatial oscillation intensity of the feature map. Regions with large three-dimensional standard deviations correspond to positions with violent fluctuations in feature values, while regions with small three-dimensional standard deviations correspond to positions with stable features. The oscillation suppression coefficient is dynamically calculated based on this three-dimensional standard deviation, so that the coefficient value can adaptively change with the local oscillation intensity. The stronger the oscillation, the smaller the coefficient; the weaker the oscillation, the larger the coefficient. The resulting adaptive oscillation suppression coefficient map provides spatially differentiated adjustment parameters for subsequent gating signal smoothing operations.
[0149] Furthermore, based on the oscillation suppression coefficient map, the historical gating signal map of the previous level, and the original gating signal map, the smoothed gating signal map is calculated using the exponential moving average formula. The exponential moving average formula weights the historical gating signal with the current original gating signal. The oscillation suppression coefficient map determines the proportion of historical information retained; that is, the larger the coefficient, the greater the weight of the historical gating signal, and the smoother the change of the current gating signal; the smaller the coefficient, the smaller the weight of the historical gating signal, and the more inclined to adopt the current observation value, generating a gating signal map that has been smoothed over time. In spatial locations with severe characteristic oscillations, the smoothed gating signal can quickly respond to changes in observations; in locations with stable characteristics, the smoothed gating signal can maintain historical trends and avoid interference caused by random jitter.
[0150] Furthermore, the smoothed gated signal map is multiplied element-wise with the enhanced feature map of the current level to obtain the filtered feature map. The smoothed gated signal map is a single-channel spatial weight map, with values between 0 and 1 at each position. After copying and expanding this weight map in the channel dimension to the same number of channels as the enhanced feature map, element-wise multiplication is performed to perform spatial dimension weighted filtering on the enhanced feature map. In regions where the gated signal value is close to 1, the response of the enhanced feature map is almost completely preserved; in regions where the gated signal value is close to 0, the response of the enhanced feature map is suppressed. Thus, responses from non-critical regions or those affected by oscillations in the enhanced feature map are weakened, while responses from stable critical regions are preserved and propagated.
[0151] Finally, the filtered feature map is concatenated with the decoder upsampled features along the channel dimension to obtain a fused feature map. This concatenation along the channel dimension, i.e., feature map stacking, merges the encoder features filtered by oscillation suppression with the upsampled features of the decoding path into a new feature map at the channel level. This fused feature map contains both filtered low-level spatial details from the encoder and high-level semantic information from the decoder, providing a more comprehensive feature representation for subsequent upsampling and segmentation prediction.
[0152] Specifically, in step S46, the oscillation suppression coefficient map is dynamically calculated based on the three-dimensional standard deviation of the enhanced feature map of the current level in the local region, including the following steps:
[0153] Step S461: Extract a local neighborhood of size 3×3×3 centered at each spatial location in the enhanced feature map, and calculate the three-dimensional standard deviation of all channels and all voxels in the local neighborhood (here, the three-dimensional standard deviation is the quantitative index of oscillation intensity, and the larger the standard deviation, the stronger the oscillation).
[0154] It should be noted that in the above embodiments of this application, the enhanced feature map is extracted. For each spatial location (d, h, w), a 3×3×3 local neighborhood is formed. All channel values of all voxels within this neighborhood are flattened into a vector. Calculate the three-dimensional standard deviation using the following formula:
[0155] ;
[0156] ;
[0157] Where i, j, k are the spatial offsets within the local neighborhood, c is the channel index, and F is the enhanced feature map of the current layer. It is a spatial index in the directions of depth, height, and width. It is the mean of all voxel values within the local neighborhood. It represents the three-dimensional standard deviation of all voxel values within the local neighborhood; 27 represents the total number of voxels within the 3x3x3 local neighborhood. 27C is the total number of channels in the feature map, and 27C is the total number of values in all voxels and channels within the local neighborhood. The calculation of the above three-dimensional standard deviation is the most classic and direct statistical measure of the dispersion (volatility) of data. A large three-dimensional standard deviation in a region means that the feature values in that neighborhood are very different and change drastically, which is a quantitative manifestation of feature oscillation. The formula flattens all the values in the spatial neighborhood (3x3x3) and the channel dimension (C) and calculates the three-dimensional standard deviation in a unified manner, which can capture local fluctuations in both the spatial and channel dimensions.
[0158] Step S462: Set a low contrast threshold (e.g., 0.05) and a high contrast threshold (e.g., 0.15).
[0159] It should be noted that, since the value range of the enhanced feature maps at different levels may differ, before calculating the three-dimensional standard deviation, the enhanced feature map at the current level is first locally normalized to ensure that the response value of each channel is distributed within the [0,1] interval. Alternatively, an adaptive threshold related to the statistical distribution of the training set can be used. In this scheme, the 30th percentile of the standard deviation distribution of all samples in the training set is used as the low contrast threshold, and the 70th percentile is used as the high contrast threshold, instead of fixed values of 0.05 / 0.15. As an example, on the publicly available LIDC dataset, the mean standard deviation of the training set is 0.12, and 0.05 and 0.15 are taken as the 25th and 75th percentiles, respectively.
[0160] Step S463: For each spatial location, when the three-dimensional standard deviation is less than the low contrast threshold, the oscillation suppression coefficient is set to the first oscillation suppression coefficient (e.g., 0.9); when the three-dimensional standard deviation is greater than the high contrast threshold, the oscillation suppression coefficient is set to the second oscillation suppression coefficient (e.g., 0.3); when the three-dimensional standard deviation is between the low contrast threshold and the high contrast threshold (i.e., the three-dimensional standard deviation is greater than or equal to the low contrast threshold and simultaneously less than or equal to the high contrast threshold), the oscillation suppression coefficient is set to the third oscillation suppression coefficient (e.g., 0.6).
[0161] It should be noted that the first, second, and third oscillation suppression coefficients in the embodiments of this application serve to retain 90% of historical information in smooth regions and only 30% in regions with severe oscillations. The first, second, and third oscillation suppression coefficients (0.9, 0.6, and 0.3) are obtained through grid search optimization: on the validation set, the selectable values of β are set to {0.1, 0.2, ..., 0.9}, and the segmentation accuracy (Dice coefficient) is evaluated respectively. The search results show that when the standard deviation σ ≤ 0.05, β = 0.9 achieves the highest average Dice (0.891); when σ ≥ 0.15, β = 0.3 achieves the highest average Dice (0.884); when 0.05 < σ < 0.15, β = 0.6 is optimal. These values can be adjusted within ±0.05, and the network does not need to be retrained after adjustment.
[0162] Step S464: Based on the oscillation suppression coefficient corresponding to each spatial location, output an oscillation suppression coefficient map with the same spatial size as the enhanced feature map of the current level.
[0163] It should be noted that, in the above embodiment of this application, a local neighborhood of size 3×3×3 centered at each spatial location (d, h, w) is first extracted from the enhanced feature map. The values of all voxels in this neighborhood across all channels are flattened into a vector, and the three-dimensional standard deviation of this local neighborhood is calculated according to the formula. The operation of extracting the local neighborhood divides the global feature map into several overlapping small cubes, each small cube corresponding to a local receptive range at a central location. The values of all channels in the neighborhood are merged and calculated to obtain a scalar field with the same spatial size as the original feature map, i.e., the spatial distribution map of the three-dimensional standard deviation value. This three-dimensional standard deviation reflects the degree of dispersion of the feature values around their mean in each local neighborhood. Spatial locations with larger standard deviation values mean that the feature values within the 3×3×3 range are significantly different and fluctuate violently. Locations with smaller standard deviation values indicate that the feature values tend to be stable and consistent.
[0164] Furthermore, setting low-contrast and high-contrast thresholds essentially involves dividing the three-dimensional standard deviation into three intervals: a low-value region (less than the low-contrast threshold), a middle region (between the two thresholds), and a high-value region (greater than the high-contrast threshold). By first normalizing the local response of the feature map, the standard deviation values of different levels and different input samples are made comparable. The thresholds are determined using the statistical percentiles of the training set, enabling the thresholds to adapt to the overall distribution characteristics of the dataset. A numerical scale is established for subsequent classification of oscillation intensity. The scale's scale is determined by the statistical regularity of the dataset itself, not by manually set fixed values.
[0165] Next, for each spatial location, its three-dimensional standard deviation is compared with the two thresholds set in step S462 to obtain the first oscillation suppression coefficient, the second oscillation suppression coefficient, and the third oscillation suppression coefficient. The conditional judgment and assignment operation maps the continuous standard deviation values to discrete three-level oscillation suppression coefficients, assigning a specific suppression coefficient value to each spatial location in the feature map. This value has an inverse relationship with the local oscillation intensity. Regions with weaker oscillations (smaller standard deviations) are assigned higher suppression coefficients (e.g., 0.9), which means that historical information will be given higher retention weight in subsequent moving average calculations. Regions with stronger oscillations (larger standard deviations) are assigned lower suppression coefficients (e.g., 0.3), which means that more current observations will be accepted.
[0166] Furthermore, based on the oscillation suppression coefficient assigned to each spatial location, an oscillation suppression coefficient map with the same spatial size as the enhanced feature map of the current level is output. The oscillation suppression coefficients calculated position by position in step S463 are arranged into a two-dimensional (or three-dimensional) array with the same size as the feature map according to the spatial location, forming a well-structured weight parameter map that participates in subsequent pixel-level operations, namely the oscillation suppression coefficient map. Each element value of this map corresponds one-to-one with the corresponding spatial location on the enhanced feature map.
[0167] Example 2
[0168] like Figure 10 As shown, this second embodiment is based on the online image segmentation lesion determination method provided in the first embodiment of the invention, and also provides an online image segmentation lesion determination system, including a preprocessing module 10, an encoding module 20, a feature enhancement module 30, a fusion module 40 and an output module 50;
[0169] The preprocessing module 10 is used to perform isotropic resampling and grayscale normalization on the input lung CT sequence image, and to perform noise removal using a lung field mask to obtain the preprocessed image.
[0170] The encoding module 20 is used to input the preprocessed image into the encoding network and extract multiple original feature maps of different resolutions through successive convolutional layers and downsampling layers;
[0171] The feature enhancement module 30 is used to process the original feature map through pooling enhancement and spatial enhancement mask extraction to obtain an enhanced feature map.
[0172] The fusion module 40 is used to obtain a fused feature map by combining oscillation detection and oscillation suppression screening in key regions of the enhanced feature map.
[0173] The output module 50 is used to sample the fused feature map through the decoding network and the Softmax layer, output the probability segmentation map of the lesion, and obtain the final segmentation mask by binarizing the probability distribution map of the lesion.
[0174] Example 3
[0175] On the other hand, this third embodiment, based on the online image segmentation lesion determination method provided in the first embodiment of the invention, also provides a storage medium storing a computer program. When the computer program is executed by a processor, it implements the online image segmentation lesion determination method disclosed in the first embodiment of any combination of the above-described embodiments.
[0176] In summary, the online image segmentation method, system, and storage medium proposed in this invention introduce an adaptive gated oscillation suppression mechanism for key regions during the decoder upsampling process. This allows for the fusion of stable encoder features with decoder features, resulting in segmentation results with clear boundaries and no overflow or holes in difficult areas such as pleural adhesions and dense blood vessels. Simultaneously, the cascaded attention enhancement and post-processing steps further focus on the lesion region and eliminate false positive connected components.
[0177] In the specific execution process, selective enhancement of the channel dimension is completed first, followed by focusing on the lesion area in the spatial dimension. Finally, an enhanced feature map that has been optimized in both channel response and spatial location is obtained. Its feature response is more concentrated in the parenchymal region of the lung nodule, providing a high-quality feature basis for subsequent oscillation suppression.
[0178] Furthermore, by extracting global background response and local salient response in parallel and performing nonlinear fusion, a learnable importance score that integrates global distribution and local peaks is calculated for each channel, enabling the channel gain weights to more comprehensively evaluate the contribution of each channel to the segmentation task.
[0179] Furthermore, it simultaneously preserves the overall distribution trend information and the most salient local location information of the feature responses, and integrates the spatial contextual relationships of a larger neighborhood (such as the relative positions of nodules and pleura and blood vessels) through a large receptive field convolution kernel, thereby generating a spatial weight map that can more accurately distinguish between lesion areas and background areas.
[0180] Furthermore, the oscillation suppression processing is precisely limited to the pleural adhesion area and the vascularized area where the characteristic fluctuations are most intense, avoiding unnecessary intervention in the stable area; at the same time, the spatially adaptive oscillation suppression coefficient is used to achieve differentiated smoothing for areas with different oscillation intensities, quickly responding to observed changes in areas of intense oscillation and maintaining historical stability in areas of weak oscillation, thereby effectively alleviating the problems of boundary overflow and internal voids.
[0181] By precisely quantifying the characteristic oscillation intensity of each spatial location using local three-dimensional standard deviation, and mapping continuous standard deviation values to discrete adaptive suppression coefficients, subsequent gating smoothing can achieve spatial differentiation adjustment. That is, a lower suppression coefficient is given to areas with strong oscillations for a fast response, while a higher suppression coefficient is given to areas with weak oscillations to maintain stability, thus solving the problem that fixed coefficients cannot adapt to spatial non-uniform oscillations.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; those skilled in the art can modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for online image segmentation to determine lesions, characterized in that, The following steps are included: The input lung CT sequence images are subjected to isotropic resampling and grayscale normalization, and noise removal is performed using a lung field mask to obtain the preprocessed images. The preprocessed image is input into the encoding network, and multiple original feature maps of different resolutions are extracted through successive convolutional layers and downsampling layers; The original feature map is enhanced by pooling and spatial enhancement mask extraction to obtain the enhanced feature map; The enhanced feature map is then processed by oscillation detection and oscillation suppression in key regions to obtain a fused feature map, including the following steps: Based on the original feature map in the coding network and the lung field mask, the key region mask is obtained by analyzing the adjacency and overlap of voxels. The enhanced feature maps of key regions, after being masked and combined, are smoothed and filtered by a gated signal, and then stitched together to obtain a fused feature map. The steps include the following: Extract the feature map output by the second group of convolutional units in the encoding network, take the maximum value of the feature map in the channel dimension to obtain the single-channel response map; mark the voxels with values greater than a preset proportional threshold in the single-channel response map as high response regions to obtain a binary mask. Perform three-dimensional connected component analysis on the binary mask to obtain multiple connected components; determine whether any connected component is adjacent to the edge of the lung field mask; if so, merge all connected components that are adjacent to the edge of the lung field mask into a candidate mask for pleural adhesion. A pre-trained 3D U-Net blood vessel segmentation model is used to infer the blood vessel probability map from the preprocessed image. The blood vessel probability map is then binarized to obtain a blood vessel segmentation mask. The spatial overlap rate between the enhanced feature map and the blood vessel segmentation mask is calculated, and candidate masks for dense blood vessel regions are identified and labeled. The candidate mask for pleural adhesions is merged with the mask for densely vascularized areas to obtain the final key area mask; The fused feature map is sampled on the decoding network and passed through the Softmax layer to output a probability segmentation map of the lesion. The probability distribution map of the lesion is then binarized to obtain the final segmentation mask.
2. The online image segmentation method for determining lesions according to claim 1, characterized in that, The original feature map is enhanced by pooling and spatial enhancement mask extraction to obtain the enhanced feature map, including the following steps: After performing three-dimensional global average pooling and three-dimensional global max pooling on the original feature map, the gain weight of each channel is generated through a shared fully connected layer. The gain weights are multiplied channel by channel by the original feature map and then added element by element to the original feature map to obtain a preliminary enhanced feature map; The average and maximum values of the preliminary enhanced feature maps are calculated in the channel dimension, and after being concatenated, they are extracted and a spatial enhancement mask is generated by a convolutional layer. The enhanced feature map is obtained by multiplying the spatial enhancement mask pixel by pixel and then adding the enhanced feature map element by element.
3. The online image segmentation method for determining lesions according to claim 2, characterized in that, After performing 3D global average pooling and 3D global max pooling on the original feature map, the gain weights for each channel are generated through a shared fully connected layer, including the following steps: Three-dimensional global average pooling and three-dimensional global max pooling are performed on the original feature map respectively to extract the average pooling channel descriptor and the max pooling channel descriptor; The average pooled channel descriptor is input into the first fully connected layer of the shared multilayer perceptron, and the channel dimension is compressed according to a preset compression ratio to obtain the compressed average descriptor. The max-pooled channel descriptor is input into the first fully connected layer of the shared multilayer perceptron, and the channel dimension is compressed according to the preset compression ratio to obtain the compressed max descriptor. The compressed average descriptor is input into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels, thus obtaining the restored average descriptor; The compressed maximum descriptor is input into the second fully connected layer of the shared multilayer perceptron to restore the original number of channels, thus obtaining the restored maximum descriptor; The recovered average descriptor and the recovered maximum descriptor are added element by element to obtain the weight vector after addition; The summed weight vector is mapped to the 0-1 interval using the Sigmoid function to generate the gain weight for each channel.
4. The online image segmentation method for determining lesions according to claim 3, characterized in that, The average and maximum values of the preliminary enhanced feature maps are calculated in the channel dimension, and after concatenation, a spatial enhancement mask is extracted and generated through a convolutional layer, including the following steps: The average value of all channels in the channel dimension is calculated for the preliminary enhanced feature map to obtain the average spatial description map of a single channel; The maximum value of all channels in the channel dimension is calculated for the preliminary enhanced feature map to obtain the maximum spatial description map of a single channel; The average spatial description map and the maximum spatial description map are concatenated along the channel dimension to obtain a combined feature map; The combined feature map is convolved using a 7×7×7 convolution kernel to output a spatial feature map; The spatial feature map is input into the Sigmoid function to generate the spatial enhancement mask.
5. The online image segmentation method for determining lesions according to claim 4, characterized in that, The enhanced feature maps of key regions, after being masked and combined, are smoothed and filtered by a gated signal, and then stitched together to obtain a fused feature map. The steps include the following: For the spatial location marked as 1 in the key region mask, obtain the enhanced feature map and decoder upsampled features of the current layer. Map the enhanced feature map and decoder upsampled features of the current layer to a unified feature subspace through 1×1×1 convolution, then add them element-wise, and generate the original gated signal map through the Sigmoid function. Obtain the historical gated signal map from the previous level, and dynamically calculate the oscillation suppression coefficient map based on the three-dimensional standard deviation of the current level's enhanced feature map in the local region. The smoothed gated signal diagram is calculated based on the oscillation suppression coefficient diagram, the historical gated signal diagram from the previous level, and the original gated signal diagram. The smoothed gated signal map is multiplied element-wise with the enhanced feature map of the current level to obtain the filtered feature map; The filtered feature map is concatenated with the decoder upsampled features along the channel dimension to obtain the fused feature map.
6. The online image segmentation method for determining lesions according to claim 5, characterized in that, The oscillation suppression coefficient map is dynamically calculated based on the enhanced feature map of the current level in the local region using the three-dimensional standard deviation, including the following steps: Extract a local neighborhood of size 3×3×3 centered at each spatial location in the enhanced feature map, and calculate the three-dimensional standard deviation of all channels and all voxels within this local neighborhood; Set the low contrast threshold and the high contrast threshold; For each spatial location, when the three-dimensional standard deviation is less than the low contrast threshold, the oscillation suppression coefficient is set as the first oscillation suppression coefficient; when the three-dimensional standard deviation is greater than the high contrast threshold, the oscillation suppression coefficient is set as the second oscillation suppression coefficient; when the three-dimensional standard deviation is between the low contrast threshold and the high contrast threshold, the oscillation suppression coefficient is set as the third oscillation suppression coefficient. Based on the oscillation suppression coefficient corresponding to each spatial location, an oscillation suppression coefficient map with the same spatial size as the enhanced feature map of the current level is output.
7. An online image segmentation system for lesion identification, characterized in that, It includes a preprocessing module, an encoding module, a feature enhancement module, a fusion module, and an output module; The preprocessing module is used to perform isotropic resampling and grayscale normalization on the input lung CT sequence image, and to perform noise removal using a lung field mask to obtain the preprocessed image. The encoding module is used to input the preprocessed image into the encoding network and extract multiple original feature maps of different resolutions through successive convolutional layers and downsampling layers; The feature enhancement module is used to process the original feature map through pooling enhancement and spatial enhancement mask extraction to obtain an enhanced feature map. The fusion module is used to obtain a fused feature map by combining oscillation detection and oscillation suppression screening in key regions of the enhanced feature map. Specifically, it is used for: Based on the original feature map in the coding network and the lung field mask, the key region mask is obtained by analyzing the adjacency and overlap of voxels. The enhanced feature maps of key regions, after being masked and combined, are smoothed and filtered using a gated signal, and then stitched together to obtain a fused feature map, which is specifically used for: Extract the feature map output by the second group of convolutional units in the encoding network, take the maximum value of the feature map in the channel dimension to obtain the single-channel response map; mark the voxels with values greater than a preset proportional threshold in the single-channel response map as high response regions to obtain a binary mask. Perform three-dimensional connected component analysis on the binary mask to obtain multiple connected components; determine whether any connected component is adjacent to the edge of the lung field mask; if so, merge all connected components that are adjacent to the edge of the lung field mask into a candidate mask for pleural adhesion. A pre-trained 3D U-Net blood vessel segmentation model is used to infer the blood vessel probability map from the preprocessed image. The blood vessel probability map is then binarized to obtain a blood vessel segmentation mask. The spatial overlap rate between the enhanced feature map and the blood vessel segmentation mask is calculated, and candidate masks for dense blood vessel regions are identified and labeled. The candidate mask for pleural adhesions is merged with the mask for densely vascularized areas to obtain the final key area mask; The output module is used to sample the fused feature map through a decoding network and a Softmax layer, output a probability segmentation map of the lesion, and obtain the final segmentation mask by binarizing the probability distribution map of the lesion.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the online image segmentation method for determining lesions as described in any one of claims 1-6.
Citation Information
Patent Citations
Pneumoconiosis lung field segmentation and region division method and system and storage medium
CN119992090A
Medical CT image super-resolution method based on Mama framework
CN120953070A