Method and device for segmenting high-heterogeneity tumor image in lung cancer CT image and medium

By using an improved FR-CNN region of interest extraction network and SRA-Net segmentation network, combined with techniques such as structure-aware loss function and multi-scale encoder, the problem of low segmentation accuracy of highly heterogeneous tumors in lung cancer CT images was solved, achieving more efficient tumor region segmentation and stronger robustness.

CN121811036APending Publication Date: 2026-04-07SHANGHAI UNIV OF ENG SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing techniques for segmenting highly heterogeneous tumors in lung cancer CT images suffer from low segmentation accuracy and poor robustness, especially when dealing with low-contrast, small targets, and highly heterogeneous tumors, making it difficult to achieve efficient and reliable segmentation.

Method used

An improved FR-CNN region of interest extraction network is combined with an SRA-Net segmentation network. By introducing a structure-aware loss function, a multi-scale encoder, a dual-path bottleneck layer and a decoder, and utilizing selective convolutional modules, channel attention mechanisms and coordinate attention mechanisms, the accuracy of feature extraction and segmentation is improved.

Benefits of technology

It significantly improves the segmentation accuracy and robustness of highly heterogeneous tumors in lung cancer CT images, provides more complete and accurate tumor region localization, enhances the feature extraction capability for complex morphological structures and fuzzy boundaries, and improves the reliability and accuracy of the segmentation method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811036A_ABST
    Figure CN121811036A_ABST
Patent Text Reader

Abstract

The invention relates to a segmentation method and device for a high-heterogeneity tumor image in a lung cancer CT image and a medium, and the method comprises the steps: carrying out the detection of a target organ region of an input lung CT image through employing an improved FR-CNN region-of-interest extraction network, obtaining a unified external rectangular frame comprising a target region, and carrying out the cutting, and obtaining a region-of-interest image; inputting the region-of-interest image into an SRA-Net segmentation network to perform precise segmentation of a tumor region, wherein the SRA-Net segmentation network comprises a multi-scale encoder, a dual-path bottleneck layer and a decoder; wherein the multi-scale encoder comprises a selective convolution module and a channel attention mechanism, the dual-path bottleneck layer comprises a spatial pyramid feature extraction path and a deep semantic feature fusion path, and the decoder introduces jump connection of a coordinate attention mechanism; and performing size reduction on a segmentation result, and outputting a final segmentation mask. Compared with the prior art, the method has the advantages of high precision, high reliability, high robustness and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, device and medium for segmenting highly heterogeneous tumor images in lung cancer CT images. Background Technology

[0002] Lung cancer, a common type of malignant tumor, relies heavily on accurate segmentation of the tumor region in lung CT images for early diagnosis and precise treatment. In clinical practice, efficient and reliable tumor segmentation helps physicians assess the condition, develop radiotherapy plans, and conduct imaging-genomic association analyses, thus providing important evidence for personalized treatment.

[0003] Traditional lung tumor segmentation relies primarily on manual delineation by physicians. This method is not only time-consuming and labor-intensive but also heavily influenced by physician experience and subjective judgment, resulting in poor reproducibility of annotation results and failing to meet the needs of large-scale clinical screening and standardized processing. Therefore, automated segmentation technology has gradually become a research hotspot. Early automated segmentation methods were mostly based on traditional image processing algorithms, such as thresholding, region growing, active contour models, and graph cut methods. While these methods have achieved automation to some extent, they still have significant limitations: thresholding is sensitive to gray-level overlap areas and struggles to distinguish tumors from surrounding normal tissue; region growing and active contour models require manual setting of initial parameters, are highly dependent on initial positions, and struggle to accurately capture invasive boundaries; graph cut and level set methods are computationally complex, require high levels of prior knowledge, and have limited generalization ability.

[0004] With the development of deep learning, models such as convolutional neural networks have shown great potential in medical image segmentation. In particular, encoder-decoder structures like U-Net achieve multi-scale feature fusion through skip connections, significantly improving segmentation accuracy. However, a series of challenges remain when dealing with tumor segmentation in lung cancer CT images: the contrast between tumors and surrounding tissues in medical images is often low, making automatic detection difficult; the tumor region occupies a small proportion of the entire image, causing data class imbalance and affecting model robustness; in addition, lung cancer tumors often exhibit high heterogeneity, such as cystic degeneration, necrosis, and calcification, resulting in blurred segmentation boundaries and irregular shapes, further increasing the difficulty of accurate segmentation. Therefore, how to effectively improve the segmentation accuracy and robustness of low-contrast, small-target, and highly heterogeneous lung cancer tumors while maintaining high segmentation efficiency is a technical problem that needs to be solved. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method, device and medium for segmenting highly heterogeneous tumor images in lung cancer CT images. By introducing a structure-aware loss function that integrates the physical features of CT images into the training of the improved FR-CNN region of interest extraction network, the network can learn the inherent physical characteristics of organs and lesions in medical images, thereby obtaining more accurate tumor candidate region localization and improving the overall segmentation accuracy and robustness for low-contrast, highly heterogeneous lung cancer tumors.

[0006] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for segmenting highly heterogeneous tumor images in lung cancer CT images is provided, the specific steps of which include: S1. For the input lung CT image, use the improved FR-CNN region of interest extraction network to detect the target organ region and obtain a uniform bounding box including the target region. S2. Based on the circumscribed rectangle, crop the original CT image to obtain the region of interest image; S3. Input the region of interest image into the SRA-Net segmentation network for accurate segmentation of the tumor region. The SRA-Net segmentation network includes a multi-scale encoder, a dual-path bottleneck layer, and a decoder. The multi-scale encoder includes a selective convolution module and a channel attention mechanism. The dual-path bottleneck layer includes a spatial pyramid feature extraction path and a deep semantic feature fusion path. The decoder introduces a skip connection with a coordinate attention mechanism. S4. Restore the size of the segmentation result obtained in S3 to make the size of the segmentation result consistent with the size of the original input CT image, and output the final segmentation mask.

[0007] Furthermore, the improved FR-CNN region of interest extraction network in S1 includes a feature extraction backbone network, a region proposal network, and a target classification and regression module. Specifically, the target organ region detection includes: The input lung CT image is fed into a feature extraction backbone network to extract multi-level convolutional features. These multi-level convolutional features are then fed into a region proposal network, generating multiple candidate regions using preset anchor boxes of different scales and aspect ratios. Preliminary foreground / background classification and bounding box regression are performed on these candidate regions. A target classification and regression module is used to spatially align the features corresponding to the candidate regions, resulting in a fixed-size feature map. The fixed-size feature map is then fine-tuned for classification and bounding box regression, outputting organ region bounding boxes with confidence scores. Based on all output organ region bounding boxes, a minimum bounding rectangle covering all bounding boxes is constructed as the unified bounding rectangle.

[0008] Furthermore, the improved FR-CNN region of interest extraction network uses a joint loss function during training. Including classification loss Bounding box regression loss and structure-aware loss term The expression is: , , , , in, This indicates the predicted probability that the candidate region is the target. These are the corresponding real labels, where 1 represents the foreground and 0 represents the background; These are the parameters for the predicted bounding box; For the corresponding actual border parameters, The offset corresponding to the center coordinates, These are scaling factors for width and height, respectively; The HU density value is a voxel. For density gradient; Boundary ambiguity is expressed as local entropy or local variance; , , This is the adjustment coefficient.

[0009] Furthermore, in the multi-scale encoder of S3, the region of interest image is processed to obtain an output feature map. The specific steps of each encoding unit include: processing the input feature image through dilated convolution paths with a first dilation rate and a second dilation rate to obtain a first feature map and a second feature map; weighting and fusing the first feature map and the second feature map through a dynamic gating mechanism to obtain a fused feature map; adding the residuals of the fused feature map and the input feature image to obtain the output feature map of the encoding unit; the weights generated by the dynamic gating mechanism are obtained by processing the first feature map and the second feature map through convolution and activation functions, and adaptively weighting the first feature map and the second feature map; the residual branch where the residual addition operation is located integrates a channel attention mechanism to reweight the feature channels before fusion.

[0010] Furthermore, the input feature images of each coding unit of the multi-scale encoder are obtained through a selective convolution module. The selective convolution module inputs the region of interest image into the basic convolutional layer to obtain an initial feature image; the initial feature image is then input into the first convolutional kernel and the second convolutional kernel and subjected to convolution processing to obtain a first branch feature map and a second branch feature map; the first branch feature map and the second branch feature map are concatenated and global average pooling is performed, followed by a fully connected layer and a Softmax function to generate a first weight and a second weight; the first weight and the second branch feature map are weighted and summed using the first weight and the second weight to obtain the output feature map of the selective convolution module, which serves as the input feature map of the coding unit.

[0011] Furthermore, the steps performed by the spatial pyramid feature extraction path in the dual-path bottleneck layer include: performing parallel convolution processing on the feature map output by the multi-scale encoder using a set of dilated convolution kernels with different dilation rates; concatenating the feature maps output by each parallel path in the channel dimension; performing 1×1 convolution dimensionality reduction on the concatenated feature map and performing residual connection with the feature map output by the multi-scale encoder to obtain the output features of the spatial pyramid feature extraction path. The steps of the deep semantic feature fusion path in the dual-path bottleneck layer include: performing element-wise multiplication on two deep feature maps from the multi-scale encoder to enhance semantic collaboration; concatenating the multiplication result with one of the deep feature maps in the channel dimension to obtain fused features; inputting the fused features into the spatial attention module for modulation to obtain the output features of the path; the deep feature map is the output feature map of the last two downsampling stages in the multi-scale encoder.

[0012] Furthermore, the decoder introduces a skip connection with a coordinate attention mechanism. Global average pooling is performed on the shallow feature map from the encoder along both the horizontal and vertical directions to obtain horizontal and vertical feature representations. These horizontal and vertical feature representations are then concatenated and subjected to one-dimensional convolution to generate position-sensitive attention weights. These attention weights are decomposed into horizontal and vertical attention maps, which are then reweighted on the shallow feature map to obtain an enhanced feature map used for feature fusion with the decoder. The shallow feature map is the output feature map of the encoder's first or second stage.

[0013] Furthermore, the SRA-Net segmentation network uses a loss function that is a weighted sum of binary cross-entropy loss and Dice loss during training.

[0014] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.

[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention trains an improved FR-CNN region of interest extraction network by designing a joint loss function that includes a structure-aware loss term. The structure-aware loss term explicitly introduces physical feature constraints of CT images, such as density gradient and boundary ambiguity, thereby guiding the network to strengthen the learning of density transition features and irregular contours of lung organ regions during training. This enables the network to generate more complete and accurate bounding boxes of target organ regions, providing higher quality and less interference-free region of interest input for subsequent segmentation stages, thereby improving the accuracy and reliability of the entire tumor segmentation process from the source. (2) The SRA-Net segmentation network constructed in this invention integrates selective convolution modules and channel attention mechanisms in its multi-scale encoder, and adopts a dynamic gated fusion path based on dilated convolution with different dilation rates, enabling the network to adaptively fuse features under multi-scale receptive fields and enhance the feature response of key channels. This effectively enhances the encoder's ability to extract and represent features of complex and variable morphological structures and blurred boundaries of lung tumors, laying a richer semantic feature foundation for subsequent fine segmentation, thereby significantly improving the segmentation network's accuracy in characterizing highly heterogeneous tumors. (3) The SRA-Net segmentation network of the present invention adopts a dual-path structure in the bottleneck layer, which includes a spatial pyramid feature extraction path and a deep semantic feature fusion path. A coordinate attention mechanism is introduced in the decoder. The spatial pyramid path enhances the model’s adaptability to tumors of different sizes through multi-scale context modeling. The deep semantic fusion path enhances the attention to the tumor region by focusing on and strengthening deep features. The coordinate attention mechanism provides precise spatial location guidance for feature fusion, enabling the network to more effectively model the heterogeneous internal structure and fuzzy boundaries of the tumor. Finally, it obtains tumor segmentation results with more fitting boundaries and more complete structure, thus improving the robustness of the segmentation method. Attached Figure Description

[0017] Figure 1 A flowchart of a segmentation method for highly heterogeneous tumor images in lung cancer CT images; Figure 2 This is an architecture diagram of the FR-CNN region of interest extraction network in this embodiment; Figure 3 This is an architecture diagram of the SRA-Net segmentation network in this embodiment; Figure 4 This is a comparison chart of the segmentation results of the method in this embodiment and existing image segmentation methods on the MSD dataset; Figure 5 This is a comparison chart of the segmentation results of the method in this embodiment and existing image segmentation methods on a private lung cancer dataset; Figure 6 This is a comparison chart of ablation experiment results of the method in this embodiment on a private lung cancer dataset. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below 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 should fall within the scope of protection of the present invention.

[0019] In recent years, deep learning technology has driven the rapid development of the field of medical image segmentation. Convolutional Neural Networks (CNNs) have been widely used in this field due to their local perception and hierarchical feature extraction capabilities. By stacking convolutional and pooling layers, CNNs can extract multi-level features from images, ranging from low-level texture to high-level semantics. However, their initial design focused more on image classification tasks, and when applied to pixel-level segmentation, they often face problems such as limited receptive fields and loss of spatial detail information. Encoder-decoder architectures and skip connections have been introduced into segmentation networks to improve model performance. The encoder extracts deep semantic features through downsampling, the decoder gradually recovers spatial resolution through upsampling, and skip connections are responsible for passing early detailed features from the encoder to the decoder to achieve accurate localization. Such architectures and their variants have achieved good results in many medical image segmentation studies. Subsequent research has made various improvements around this core architecture, such as introducing residual connections to alleviate gradient degradation in deep network training, or using dense connections to enhance feature reuse. In addition, the integration of attention mechanisms has become an important direction. By introducing gating mechanisms in the feature transmission path, irrelevant background regions are suppressed, improving the model's ability to focus on the target region. Existing technologies have further designed attention modules for specific lesion structures to address challenges such as blurred boundaries. Although these methods improve segmentation accuracy to varying degrees, their ability to model complex structures and restore fine boundaries remains limited when dealing with lung cancer tumors that are highly heterogeneous internally, morphologically variable, and have blurred boundaries. On the other hand, visual Transformer models based on self-attention mechanisms have demonstrated powerful global context modeling capabilities in the field of computer vision. However, their high computational complexity poses a challenge to the real-time requirements of clinical applications, and the limited scale of medical image data also restricts the advantages of large-scale pre-training.

[0020] This embodiment aims to achieve high-precision segmentation of small and complex target regions in lung CT images. For example... Figure 1 The image shown illustrates a method for segmenting highly heterogeneous tumor images in lung cancer CT images provided in this embodiment. The specific steps include: S1. For the input lung CT image, use the improved FR-CNN region of interest extraction network to detect the target organ region and obtain a uniform bounding box including the target region. S2. Cropping the original CT image based on the bounding rectangle to obtain the region of interest image; S3. Input the region of interest image into the SRA-Net segmentation network for accurate segmentation of the tumor region. The SRA-Net segmentation network includes a multi-scale encoder, a dual-path bottleneck layer and a decoder. The multi-scale encoder includes a selective convolution module and a channel attention mechanism. The dual-path bottleneck layer includes a spatial pyramid feature extraction path and a deep semantic feature fusion path. The decoder introduces a skip connection with a coordinate attention mechanism. S4. Restore the size of the segmentation result obtained in S3 to make the size of the segmentation result consistent with the size of the original input CT image, and output the final segmentation mask.

[0021] like Figure 2 As shown, the improved FR-CNN region of interest extraction network in S1 includes a feature extraction backbone network, a region proposal network, and a target classification and regression module. The FR-CNN region of interest extraction network is introduced as a detector for identifying potential GTV regions. During training, the FR-CNN region of interest extraction network receives CT images with bounding boxes, generates candidate boxes through the region proposal network (RPN), and further optimizes the target boundary localization through the classification and regression module. During the testing phase, FR-CNN can output one or more high-confidence candidate regions for each image. To ensure that the segmentation stage covers all possible target regions, these predicted boxes are analyzed, and a minimum bounding rectangle encompassing all candidate boxes is constructed. In this embodiment, the final size of the cropped region is 224×224. This step focuses on the most diagnostically significant region in the image without introducing redundant background. This preprocessing strategy effectively compresses the input information, reduces the introduction of interfering features, and maintains attention to the integrity of the target region, providing a simpler and higher-quality input foundation for the segmentation model. This two-stage architecture is particularly effective for extracting small-scale targets in complex medical images, especially when dealing with target regions with blurred contours and uncertain locations, where it exhibits stronger robustness and generalization ability.

[0022] This embodiment uses ResNet-50 or ResNet-101 as the feature extraction backbone network to extract multi-level convolutional features from the input image, which are then fed into the region proposal network to generate several potential target regions. The region proposal network uses a set of anchors of varying sizes to generate a large number of candidate boxes under a sliding window mechanism, and uses a classifier to make an initial determination as to whether they contain the target; at the same time, a regressor is used to adjust the position and size of each anchor to more accurately fit the target region.

[0023] During implementation, the FR-CNN region of interest extraction network for target organ region detection specifically includes: The input lung CT image is fed into a feature extraction backbone network to extract multi-level convolutional features. These features are then fed into a region proposal network, which generates multiple candidate regions using pre-defined anchor boxes of different scales and aspect ratios. Preliminary foreground / background classification and bounding box regression are performed on these candidate regions. A target classification and regression module is used to spatially align the features corresponding to the candidate regions, resulting in a fixed-size feature map. The fixed-size feature map is then fine-tuned for classification and bounding box regression, outputting organ region bounding boxes with confidence scores. Based on all output organ region bounding boxes, a minimum bounding rectangle covering all bounding boxes is constructed as the unified bounding rectangle.

[0024] The improved FR-CNN region of interest extraction network uses a joint loss function during training. Including classification loss Bounding box regression loss and structure-aware loss term The classification loss optimizes the classification of candidate regions, the bounding box regression loss optimizes the location regression accuracy of candidate regions, and the structure-aware loss term adapts to the differences in density distribution, boundary clarity, and morphological structure of organ regions and adjacent lesions in lung cancer CT images. By introducing the structure-aware loss term, physical feature constraints from the lung cancer CT image domain can be explicitly introduced during the region of interest extraction stage. The density gradient term prompts the network to focus on learning the density transition features from lung parenchyma to adjacent tissues such as the mediastinum and chest wall, making the candidate regions more complete. The boundary ambiguity and second-order curvature terms work together to guide the network to impose greater penalties on regions with blurred edges and irregular contours during training, thereby improving the fitting ability to complex lung structures and reducing organ region truncation or omission.

[0025] Joint loss function The expression is: , , , , in, This indicates the predicted probability that the candidate region is the target. These are the corresponding real labels, where 1 represents the foreground and 0 represents the background; These are the parameters for the predicted bounding box; For the corresponding actual border parameters, The offset corresponding to the center coordinates, These are scaling factors for width and height, respectively; The HU density value is a voxel. For density gradient; Boundary ambiguity is expressed as local entropy or local variance; , , This is the adjustment coefficient.

[0026] The function expression is: .

[0027] After training, this embodiment inputs a lung CT image during the testing phase. The FR-CNN region of interest extraction network trained based on the improved loss function described above can automatically output bounding boxes containing the target organ region, with each bounding box carrying a confidence score. To ensure that all detection results are included, a minimum bounding rectangle is constructed based on all predicted boxes to unify the input region for subsequent segmentation networks. To ensure the compatibility of subsequent models with input image sizes, the height and width of the bounding rectangle are uniformly adjusted to integer multiples of 25 to meet the size alignment requirements of subsequent modules and improve the stability of the feature mapping process.

[0028] The image is cropped using the obtained minimum bounding rectangle to extract the key region to be segmented. The improved segmentation network SRA-Net then performs high-precision segmentation of the target region. The SRA-Net segmentation network is based on a typical encoder-decoder architecture, including a multi-scale encoder, a dual-path bottleneck layer, and a decoder. It incorporates an attention mechanism to enhance the response to important features and improve the restoration of boundary details. After segmentation, the obtained predicted mask is restored to the original image size (512×512) to maintain data format consistency and facilitate subsequent processing. In the SRA-Net segmentation network, the encoder module extracts deep semantic features of the image layer by layer; the decoder module is responsible for progressively restoring spatial information to achieve accurate reconstruction; and the attention mechanism further guides the network to focus on the feature regions most relevant to the GTV region, enhancing overall segmentation performance. Figure 3 The complete network structure of the SRA-Net segmentation network.

[0029] The multi-scale encoder in S3 processes the region of interest image to obtain the output feature map. The multi-scale encoder consists of multiple coding units, each integrating two dilated convolutional kernels with different dilation rates: a first dilation rate and a second dilation rate, used to simultaneously extract texture details and boundary information. Low-dilation-rate convolutions focus more on capturing local textures in the tumor region, while high-dilation-rate convolutions help maintain the global structural contour. To enhance the network's ability to express features at different scales, each convolutional unit fuses these multi-scale features through a dynamic gating mechanism and combines residual connections to improve information flow efficiency. Furthermore, a channel attention mechanism is introduced in the residual branch to suppress redundant channels and enhance boundary feature expression, thereby optimizing the network's adaptability to targets with varying sizes. The encoder also integrates a selective convolution module, which extracts features in parallel through convolutional kernels with different receptive fields, such as 5×5 and 7×7, and weights and fuses them through a soft attention mechanism to achieve adaptive receptive field adjustment. Compared with the traditional U-Net, the multi-scale encoder in this embodiment improves both the depth and breadth of feature extraction, effectively enhancing the network's ability to identify small-volume, morphologically variable tumor regions.

[0030] The specific steps for each coding unit include: Input feature image The feature map is processed through dilated convolutional paths with first and second dilation rates, respectively, where C is the number of extracted features, H is the spatial resolution of the feature map in the vertical direction, and W is the spatial resolution of the feature map in the horizontal direction, thus obtaining the first feature map. Second feature map The first and second feature maps are weighted and fused using a dynamic gating mechanism to obtain a fused feature map. ,in and The fusion weights are calculated by adding the residuals of the fused feature map and the input feature image, resulting in the output feature map of the coding unit. The weights generated by the dynamic gating mechanism are obtained by processing the first and second feature maps through convolution and activation functions, and adaptive weighting is applied to the first and second feature maps. The residual branch where the residual addition operation is located integrates a channel attention mechanism, which is used to reweight the feature channels before fusion, suppress redundant channels, enhance the expression of boundary features, and thus optimize the network's adaptability when facing targets with different sizes.

[0031] The feature images input to each coding unit of the multi-scale encoder are obtained through a selective convolution module. Features are extracted in parallel using convolutional kernels with different receptive fields (e.g., 5×5 and 7×7), and weighted and fused using a soft attention mechanism to achieve adaptive receptive field adjustment. The selective convolution module inputs the region of interest image into the base convolutional layer to obtain the initial feature image; the initial feature image is then input into the first and second convolutional kernels and convolved to obtain the first and second branch feature maps; the first and second branch feature maps are concatenated and global average pooling is performed, followed by a fully connected layer and a Softmax function to generate the first and second weights; the first and second branch feature maps are then weighted and summed using the first and second weights to obtain the output feature map of the selective convolution module, which serves as the input feature map for the coding unit.

[0032] In this embodiment, the initial feature image is Where C is the number of extracted features, H is the spatial resolution of the feature map in the vertical direction, and W is the spatial resolution of the feature map in the horizontal direction. First branch feature map and second branch feature map. The global average pooling expression is: The first and second weights obtained are The output feature map is then obtained as follows. .

[0033] In the dual-path bottleneck layer, to enhance the model's adaptability to tumor regions of different sizes and shapes, a spatial pyramid structure is introduced to capture multi-scale semantic information. The steps performed by the spatial pyramid feature extraction path in the dual-path bottleneck layer include: performing parallel convolution processing on the feature map output by the multi-scale encoder using a set of dilated convolution kernels with different dilation rates; concatenating the feature maps output by each parallel path along the channel dimension; performing 1×1 convolution dimensionality reduction on the concatenated feature map and performing residual concatenation with the feature map output by the multi-scale encoder to obtain the output features of the spatial pyramid feature extraction path. : , in, This is the input feature map for the spatial pyramid structure. It is a set of dilated convolution kernels.

[0034] Furthermore, in the dual-path bottleneck layer, to further enhance the model's ability to identify tumor regions and suppress interference from shallow redundant information, a fusion path based on deep feature priority is constructed. Considering that shallow features, although containing rich edge information, have insufficient receptive fields and are often accompanied by high noise, a cross-layer fusion strategy is used to enhance contextual relevance representation in order to focus on the output of the deeper encoder. Specifically, element-wise multiplication is first performed on both to strengthen semantic collaboration, and then the product result is concatenated with the output of the deeper encoder along the channel dimension to obtain the fused feature representation. To further focus on the target region and guide the model to exclude irrelevant background information, a spatial attention mechanism is introduced in the dual-path bottleneck layer to modulate the aforementioned fused features.

[0035] The steps of the deep semantic feature fusion path in the dual-path bottleneck layer include: performing element-wise multiplication on two deep feature maps from the multi-scale encoder to enhance semantic collaboration; concatenating the multiplication result with one of the deep feature maps along the channel dimension to obtain the fused feature; inputting the fused feature into the spatial attention module for modulation to obtain the output feature of this path; the deep feature map is the output feature map of the last two downsampling stages in the multi-scale encoder. Fusion Feature for: , in, The result of the multiplication is a single-channel attention map. and This is a deep feature map.

[0036] The decoder incorporates a coordinate attention mechanism in the skip connections, embedding spatial location information into the channel attention modeling process. This effectively enhances the spatial localization capability of features while maintaining lightweight computational overhead. Specifically, the coordinate attention module operates on the shallow feature maps in the skip connections. Its processing does not rely on guidance from deep feature maps but is based on the spatial response within its own feature maps for modeling.

[0037] The data processing steps for skip connections include: The shallow feature map from the encoder is subjected to global average pooling along the horizontal and vertical directions to obtain horizontal and vertical feature representations, respectively. The horizontal and vertical feature representations are concatenated and subjected to one-dimensional convolution to generate position-sensitive attention weights. The attention weights are decomposed into horizontal and vertical attention maps, and the shallow feature maps are reweighted separately to obtain enhanced feature maps for fusion with the decoder features. The shallow feature map is the output feature map of the first or second stage of the encoder.

[0038] The skip connection mechanism effectively alleviates the localization ambiguity and spatial detail loss problems encountered by shallow skip features during upsampling. By introducing coordinate information, the model can explicitly perceive the location of key regions in the features, and then apply enhancement to target regions, such as tumor boundaries or small lesions. In addition, the coordinate attention module has a simple structure and does not introduce significant computational burden, making it suitable for integration into the skip connection pathway. When fused with deep decoded feature maps, it provides more accurate spatial guidance, thereby improving the structural reconstruction ability and semantic consistency of the final segmentation map.

[0039] The SRA-Net segmentation network uses a weighted sum of binary cross-entropy loss and Dice loss during training to simultaneously optimize the model's pixel classification ability and overall structural consistency. Binary cross-entropy loss is stable in pixel-level binary classification tasks, effectively measuring the difference between predicted probabilities and ground truth labels, and driving the model to learn fine boundary features of tumor regions. Dice loss is advantageous in handling class imbalance problems (such as small tumors) by maximizing the overlap between predicted segments and ground truth labels, improving the model's sensitivity to small lesions and edge details. The combination of these two methods enhances the model's constraint on morphological consistency while maintaining stable gradient propagation.

[0040] The expression for the loss function of the SRA-Net segmentation network is: , in, For the weighting coefficient, in this embodiment, we take... .

[0041] The binary cross-entropy (BCE) loss function is: , in, For pixels In category (Background / Tumor) True Labels To predict probabilities, Total number of pixels Mark invalid areas (such as pixels filling the edges of CT scans). This is an indicator function. In this study, the class weights are set to... (background), (Tumor), to balance the sparse distribution of lesions.

[0042] The Dice loss function is: , in, The total number of categories, After Softmax normalization, The tag after One-Hot encoding. Tag values ​​are masked during calculation. The pixels are selected to exclude interference from non-interesting regions; and a smoothing coefficient is introduced. Ensure the values ​​are stable.

[0043] In this embodiment, six metrics are used to measure the accuracy of segmentation results, including Dice Similarity Coefficient (DSC), Intersection over Union (IoU), Recall, 95% Hausdorff Distance (HD95), Relative Volume Difference (RVD), and Average Surface Distance (ASD). DSC and IoU reflect the algorithm's overall ability to identify the main tumor region, with IoU being more sensitive to small targets and boundary changes. Clinically, Recall is a key guarantee to avoid missed tumor diagnoses (preventing false negatives), and a high value means a significantly reduced risk of missing real lesions. HD95 and ASD together quantify the quality of segmentation boundaries. HD95 characterizes the maximum local deviation (excluding 5% outliers), while ASD reflects the global average error. Clinically, a low HD95 value ensures the reliability of segmentation in high-risk areas (such as the tumor invasion front), while a low ASD value maintains the overall accuracy of the contour morphology. RVD reveals systematic biases in volume measurement (oversegmentation / undersegmentation), and the absolute value of RVD is directly related to the clinical reliability of volume-based efficacy assessments (such as RECIST criteria) and radiotherapy dose calculations.

[0044] The expressions for the metrics are as follows: , , , , , , in, It is the prediction region. It is a real area. Indicates the number of pixels. TP (True Positive) is the number of true positive pixels. FN (False Negative) is the number of false negative pixels. A higher recall indicates fewer missed detections. , These are the predicted and actual boundaries, respectively. It is the Euclidean distance. RVD>0 indicates over-segmentation, RVD<0 indicates under-segmentation, and the smaller the absolute value, the better.

[0045] As shown in Table 1, the method in this embodiment outperforms other comparative methods in key metrics such as DSC (73.26%), IoU (63.45%), Recall (81.75%), and RVD (39.75), demonstrating good generalization performance. Regarding the Dice coefficient, Ours outperforms the second-ranked Attention U-Net (71.55%) and is significantly higher than traditional CNN architectures such as VGG16-U-Net (57.92%), showing a higher fitting ability for tumor regions. The improvement in IoU is also significant (Ours is 63.45%, while TransU-Net is 63.84%, but its RVD and ASD are both higher), indicating that the method in this embodiment has a greater advantage in terms of segmentation region consistency. In terms of boundary accuracy, the proposed method achieves a minimum value of 15.43 on ASD, which is better than Attention U-Net (20.98) and DeepLabv3+Res50 (19.66), indicating that it has better modeling ability for complex tumor edge structures; HD95 also reaches a relatively low value of 41.88, which shows good clinical adaptability considering the diversity of tumor morphology in the MSD dataset.

[0046] Table 1 Comparison of tumor segmentation results on the MSD Task 6 dataset. like Figure 4 As shown, in the first set of samples, it can be observed that many methods, such as MobileV3Net (b) and VGG16-U-Net (c), exhibit numerous artifacts, fragmented regions, or severe offsets. While SAM2-U-Net and TransU-Net provide good coverage of the main tumor, their boundary details are not refined enough. In contrast, the method in this embodiment (Figure g) accurately restores the location and structure of the lesion, with coherent regions and clear outlines, most closely resembling the Ground Truth (true label). In the second set of samples, the tumor area is smaller, placing higher demands on the ability to identify small targets. Methods such as MobileV3Net and VGG16-U-Net perform worse in this scenario, exhibiting numerous false small regions or holes. While Attention U-Net and DeepLabv3+Res50Net retain the main region, they still suffer from excessive boundary shrinkage or offset. In comparison, the method in this embodiment not only accurately locates small tumor targets but also significantly reduces background false detections and redundant boundary predictions, demonstrating the model's strong sensitivity to small targets and refined modeling capabilities.

[0047] To further verify the robustness and generalization ability of the model under different data distributions, this embodiment also conducted experimental evaluations on a private lung cancer dataset. Table 2 lists the comparison of six metrics for each method on this dataset. Figure 5 The segmentation visualization effect for representative samples.

[0048] Table 2 Comparison of tumor segmentation results on private datasets Quantitative results show that the method presented in this embodiment outperforms other methods in key metrics such as DSC (74.77%), IoU (62.33%), and ASD (8.43), demonstrating strong tumor region identification ability and boundary accuracy. Particularly in volume assessment, the lowest RVD (32.76) indicates that the model is more stable in tumor volume estimation and can provide a reliable basis for clinical radiotherapy planning.

[0049] Combination Figure 5 The visualization results further validate the effectiveness of the above metrics. In the first set of test samples, Attention U-Net and MobileV3Net exhibited significant missed detections and spurious segmentation, with the latter even showing multiple false detections in small regions. While VGG16-U-Net, TransU-Net, and SAM2-U-Net could cover the main region well, they still exhibited jagged edges or offsets in edge contour fitting. The method presented in this paper (column g in the figure) not only closely matches the overall shape of the Ground Truth but also has a more precise boundary fit, avoiding contour breaks and irregular edges that occur in other methods, consistent with its superior performance on HD95 and ASD metrics. In the second set of samples, the lesion area was large and the morphology was complex, testing the model's generalization ability and contextual understanding. At this point, MobileV3Net and Attention U-Net again showed boundary contraction in their predictions, failing to completely cover the real region. TransU-Net and SAM2-U-Net showed some improvement in contour processing but still could not fully recover the boundary details of the lesions. In contrast, the method in this embodiment not only preserves the complex structure of the tumor, but also exhibits a smoother and more realistic segmentation profile, which helps to provide a reliable basis for preoperative planning or auxiliary diagnosis.

[0050] To demonstrate the practical effectiveness of the proposed modules, this embodiment employs an incremental approach to add modules for experimental purposes. First, the tumor segmentation performance of the baseline model on original lung cancer CT images is evaluated. Based on this, SRFE and DFA modules are added sequentially to the baseline model to verify the effectiveness of the two modules and further explore the impact of the number of module parameters on performance.

[0051] Table 3 Comparison of ablation studies on private datasets Table 3 presents the results of the ablation experiments. As shown in Table 3, Attention U-Net, as the baseline network, achieved a DSC score of 69.03%, an HD95 score of 44.4664, and an ASD score of 12.4849 on the private dataset. To demonstrate the effectiveness of the SRA-Net model, a CA coordinate attention mechanism was first introduced into the skip connections of the baseline network. This operation significantly improved the model's segmentation ability, raising the DSC score to 69.75%. Building upon the experiments described above, the proposed SRFE and DFA modules were further added, further increasing the DSC scores to 72.28% and 72.97%, respectively. HD95 and ASD scores also converged to more reliable levels. Figure 6 As shown, compared with the baseline model, introducing the channel attention module (Baseline+CA) alone can improve the response to tumor regions to a certain extent, making the segmentation results closer to the real annotation in terms of overall contour. Further combining the selective residual feature extraction module (Baseline+CA+SFRE) significantly improves the continuity and integrity of tumor boundaries, reducing the loss of corners and elongated structures. Introducing the deep feature aggregation module (Baseline+CA+DFA) further enhances the model's ability to capture fine-grained features of tumor regions, making the characterization of internal tumor structures more accurate. Ultimately, the complete model proposed in this embodiment exhibits the best segmentation performance under the synergistic effect of multiple modules, especially in cases of irregular tumor morphology, blurred boundaries, or large size differences, effectively maintaining regional integrity and reducing missed segments. These experimental results fully demonstrate that the multi-scale learning mechanism and the collaborative design between modules significantly improve the model's sensitivity to irregular tumor regions and the reliability of the segmentation results.

[0052] To meet the diverse clinical needs for accuracy and robustness in lung tumor segmentation, this embodiment proposes a lung cancer CT segmentation model—SRA-Net—based on residual feature mining and deep feature fusion. A Selective Residual Feature Extraction (SRFE) module is designed in the encoder stage. This module extracts multi-scale contextual information through dilated convolution and gated fusion mechanisms, and utilizes the attention mechanism in residual connections to suppress redundant channels, thereby improving the network's ability to model complex boundaries and details of lung tumors. Furthermore, this embodiment proposes a Multi-Scale Feature Aggregation (DFA) module to deeply integrate high-level tumor feature information in the decoding stage. This module discards shallow feature interference and, combined with convolution operations of different receptive fields and pixel-by-pixel enhancement, significantly improves the model's ability to perceive the edges and morphology of lung tumors. By combining the SRFE and DFA modules, SRA-Net can effectively alleviate the missegmentation problem of small-volume or structurally similar regions and improve its ability to model tumors with blurred boundaries and diverse morphologies, thus significantly improving the segmentation accuracy of lung tumor CT images. Experimental results on the MSD public dataset and the private lung cancer CT dataset show that SRA-Net exhibits excellent performance, with Dice coefficients reaching 73.26% and 74.77%, respectively. Therefore, the method provided in this embodiment offers an effective solution for lung tumor segmentation and has good potential for clinical application.

[0053] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0054] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0055] Multiple components in the device are connected to an I / O interface, including: input units such as a keyboard, mouse, etc.; output units such as various types of displays, speakers, etc.; storage units such as disks, optical disks, etc.; and communication units such as network interface cards, modems, wireless transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks. The processing unit performs the various methods and processes described above, such as the method of the present invention. For example, in some embodiments, the method of the present invention may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or the communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method of the present invention described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute the method of the present invention by any other suitable means (e.g., by means of firmware).

[0056] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0057] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0058] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0059] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for segmenting highly heterogeneous tumor images in lung cancer CT images, characterized in that, The specific steps include: S1. For the input lung CT image, use the improved FR-CNN region of interest extraction network to detect the target organ region and obtain a uniform bounding box including the target region. S2. Based on the circumscribed rectangle, crop the original CT image to obtain the region of interest image; S3. Input the region of interest image into the SRA-Net segmentation network for accurate segmentation of the tumor region. The SRA-Net segmentation network includes a multi-scale encoder, a dual-path bottleneck layer, and a decoder. The multi-scale encoder includes a selective convolution module and a channel attention mechanism. The dual-path bottleneck layer includes a spatial pyramid feature extraction path and a deep semantic feature fusion path. The decoder introduces a skip connection with a coordinate attention mechanism. S4. Restore the size of the segmentation result obtained in S3 to make the size of the segmentation result consistent with the size of the original input CT image, and output the final segmentation mask.

2. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The improved FR-CNN region of interest extraction network in S1 includes a feature extraction backbone network, a region proposal network, and a target classification and regression module. Specifically, the target organ region detection includes: The input lung CT image is fed into a feature extraction backbone network to extract multi-level convolutional features. These multi-level convolutional features are then fed into a region proposal network, generating multiple candidate regions using preset anchor boxes of different scales and aspect ratios. Preliminary foreground / background classification and bounding box regression are performed on these candidate regions. A target classification and regression module is used to spatially align the features corresponding to the candidate regions, resulting in a fixed-size feature map. The fixed-size feature map is then fine-tuned for classification and bounding box regression, outputting organ region bounding boxes with confidence scores. Based on all output organ region bounding boxes, a minimum bounding rectangle covering all bounding boxes is constructed as the unified bounding rectangle.

3. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The improved FR-CNN region of interest extraction network uses a joint loss function during training. Including classification loss Bounding box regression loss and structure-aware loss term The expression is: , , , , in, This indicates the predicted probability that the candidate region is the target. These are the corresponding real labels, where 1 represents the foreground and 0 represents the background; These are the parameters for the predicted bounding box; For the corresponding actual border parameters, The offset corresponding to the center coordinates, These are scaling factors for width and height, respectively; The HU density value is a voxel. For density gradient; Boundary ambiguity is expressed as local entropy or local variance; , , This is the adjustment coefficient.

4. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The multi-scale encoder in S3 processes the region of interest image to obtain an output feature map. The specific steps of each encoding unit include: processing the input feature image through dilated convolution paths with a first dilation rate and a second dilation rate to obtain a first feature map and a second feature map; performing weighted fusion of the first feature map and the second feature map through a dynamic gating mechanism to obtain a fused feature map; adding the residual of the fused feature map to the input feature image to obtain the output feature map of the encoding unit; the weights generated by the dynamic gating mechanism are obtained by processing the first feature map and the second feature map through convolution and activation functions, and adaptively weighting the first feature map and the second feature map; the residual branch where the residual addition operation is located integrates a channel attention mechanism to reweight the feature channels before fusion.

5. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 4, characterized in that, The feature images input to each coding unit of the multi-scale encoder are obtained through a selective convolution module. The selective convolution module inputs the region of interest image into the base convolution layer to obtain the initial feature image. The initial feature image is input into the first and second convolution kernels and convolutional processing is performed to obtain the first branch feature map and the second branch feature map. The first branch feature map and the second branch feature map are concatenated and global average pooling is performed. Then, they are passed through a fully connected layer and the Softmax function to generate the first weight and the second weight. The first branch feature map and the second branch feature map are weighted and summed using the first weight and the second weight to obtain the output feature map of the selective convolution module, which is used as the input feature map of the encoding unit.

6. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The steps of the spatial pyramid feature extraction path in the dual-path bottleneck layer include: performing parallel convolution processing on the feature map output by the multi-scale encoder using a set of dilated convolution kernels with different dilation rates; concatenating the feature maps output by each parallel path in the channel dimension; performing 1×1 convolution dimensionality reduction on the concatenated feature map and performing residual connection with the feature map output by the multi-scale encoder to obtain the output features of the spatial pyramid feature extraction path. The steps of the deep semantic feature fusion path in the dual-path bottleneck layer include: performing element-wise multiplication on two deep feature maps from the multi-scale encoder to enhance semantic collaboration; concatenating the multiplication result with one of the deep feature maps in the channel dimension to obtain fused features; inputting the fused features into the spatial attention module for modulation to obtain the output features of the path; the deep feature map is the output feature map of the last two downsampling stages in the multi-scale encoder.

7. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The decoder introduces a skip connection with a coordinate attention mechanism. Global average pooling is performed along both the horizontal and vertical directions on the shallow feature map from the encoder to obtain horizontal and vertical feature representations. These horizontal and vertical feature representations are then concatenated and subjected to one-dimensional convolution to generate position-sensitive attention weights. These attention weights are decomposed into horizontal and vertical attention maps, and the shallow feature maps are reweighted accordingly to obtain enhanced feature maps used for feature fusion with the decoder. The shallow feature maps are the output feature maps of the encoder's first or second stage.

8. The method for segmenting highly heterogeneous tumor images in lung cancer CT images according to claim 1, characterized in that, The SRA-Net segmentation network uses a loss function that is a weighted sum of binary cross-entropy loss and Dice loss during training.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.