System and method for accurately segmenting EdgeAttenNet glomerular image based on camouflage target detection
Through the synergy between the EdgeAttenNet model and the innovative module, the problems of blurred boundaries and loss of details in glomerular image segmentation are solved, and a higher accuracy and robust glomerular segmentation effect is achieved.
Patent Information
- Application Number
- CN202411255905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The prior art has problems of blurred boundaries, loss of details and difficulty in identifying small targets in glomerular image segmentation, especially in the case of complex backgrounds and morphological diversity, and traditional methods are difficult to achieve ideal results.
Using the EdgeAttenNet model, combined with PVTv2 backbone network and innovative modules such as AGBM, EFEM and AFCM, the boundary detection and feature expression capabilities are improved through multi-scale feature extraction, attention guidance and edge enhancement, and the traditional model is solved in complex backgrounds and small goals. Limitations in identification.
Significantly improves the accuracy and robustness of glomerulus image segmentation, can handle complex morphology and blur boundaries more accurately, and enhances the segmentation performance and adaptability of the model, especially when dealing with glomerulus of different sizes and morphology. .
Smart Images

Figure CN119206218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image analysis, and in particular to an EdgeAttenNet glomerulus image precise segmentation system and method based on camouflaged target detection. Background Art
[0002] In recent years, with the rapid development of deep learning and computer vision technology, the field of medical image analysis has made significant progress. Accurate segmentation of glomeruli is crucial for the diagnosis, disease assessment and treatment of chronic kidney disease. However, due to the complex morphology, irregular boundaries and high similarity of glomeruli to surrounding tissues in pathological images, traditional image segmentation methods are difficult to achieve ideal results, and more advanced technical means are urgently needed.
[0003] Deep learning models, especially those based on convolutional neural networks (CNNs), have demonstrated excellent performance in image segmentation tasks. Classic network architectures such as U-Net, FCN, and DeepLab3+ have also made significant progress in medical image segmentation, but these models still face many challenges when faced with glomerular pathology images, such as blurred boundaries, loss of details, and difficulty in identifying small targets (such as small glomeruli). In addition, how to effectively utilize multi-scale features and simultaneously process target objects of different sizes remains the focus and difficulty of current research.
[0004] Existing glomerulus segmentation methods mainly include traditional image processing techniques, machine learning methods and deep learning methods. Traditional image processing techniques, such as threshold segmentation, edge detection and region growing, have limited effects in complex backgrounds and are difficult to handle the morphological diversity and structural variability of glomeruli. Although machine learning methods such as support vector machines (SVMs) and random forests have been improved, they still have limitations in feature extraction and generalization capabilities.
[0005] In contrast, deep learning-based segmentation methods, especially models based on architectures such as U-Net, perform well in medical image segmentation. However, these models still have some shortcomings in the segmentation of complex glomerular structures, such as inaccurate boundary recognition and limited detection capabilities for small target glomeruli. These challenges mainly stem from the high similarity between glomeruli and surrounding tissues, as well as the morphological diversity and variability of glomeruli in pathological images. Although existing deep learning methods perform well in global feature extraction, they still have limitations in processing boundary details and small-sized targets, especially when the glomerular boundaries are blurred or merged with the background, the models are prone to misclassification or missed detection.
[0006] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide an EdgeAttenNet glomerulus image accurate segmentation system and method based on camouflaged target detection, and to propose an optimization solution for the complex challenges in glomerular segmentation. The system adopts the EdgeAttenNet model, combined with PVTv2 as the backbone network, which can efficiently capture multi-scale features, and improve the global perception ability through its hierarchical design, maintaining efficient feature extraction performance. The model also introduces the ASPP (spatial pyramid pooling) module, which uses different void rates to expand the receptive field, accurately capture spatial information from details to the global, and is particularly suitable for glomerular segmentation tasks with complex morphology and blurred boundaries.
[0008] The innovative modules in EdgeAttenNet include AGBM (Attention Guided Boundary Module) and EFEM (Boundary Guided and Feature Enhanced Module), which significantly improve boundary detection capabilities and feature expression. AFCM (Adaptive Fusion Context Module) further improves the accuracy of the model in glomerular segmentation of different sizes and complex shapes by fusing multi-scale features. The synergy of these modules effectively solves the limitations of traditional models in dealing with small targets and complex boundaries, and significantly improves the segmentation performance and robustness of the model.
[0009] In order to achieve the above object, the present invention adopts the following technical solutions: In the first aspect, an EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection includes the following modules: A feature extraction module based on multi-level convolution, which contains five consecutive feature extraction layers (f1, f2, f3, f4, f5) to extract image features from low-level to high-level layer by layer; The attention-guided boundary (AGBM) module is responsible for accurate boundary detection and improves the recognition accuracy of glomerular boundaries in complex scenes by combining low-level and high-level features (such as f2 and f5); The edge-guided feature enhancement (EFEM) module is connected to each feature extraction layer (f2, f3, f4, f5) to enhance the edge information in each layer of features and ensure that multi-scale edge features can be accurately captured and processed; The Adaptive Fusion Context (AFCM) module concatenates multiple features from EFEM and gradually fuses context information at different levels to improve the model's global understanding of complex structures.
[0010] These modules work together to form an end-to-end segmentation network structure designed for high-precision glomerulus recognition and segmentation. The system successfully solves the limitations of traditional methods in dealing with complex backgrounds, fuzzy boundaries and small target recognition by integrating multiple innovative modules such as multi-level convolution feature extraction, boundary detection, edge enhancement and context information fusion, and greatly improves the accuracy and robustness of segmentation.
[0011] Furthermore, the feature extraction module adopts the PVTv2 (Pyramid Vision Transformer v2) network architecture, which can extract multi-scale feature information (such as f1 to fn) from the input glomerular pathology image. These features have different spatial resolutions and semantic levels, corresponding to the features of {C1, C2, ... Cn} dimensions. PVTv2 reduces the computational complexity while maintaining efficient feature extraction capabilities through multi-level spatial downsampling and local attention mechanisms, ensuring that the system can process high-resolution medical images. The multi-scale feature extraction strategy of this module enables the system to capture local details and understand global structures, thereby better processing glomeruli of different sizes and shapes.
[0012] Furthermore, the attention-guided boundary module adopts spatial attention mechanism and channel attention mechanism, and captures multi-scale context information through atrous spatial pyramid pooling (ASPP). The core process of the attention-guided boundary module includes: feat_1 = self.conv1(feat_1) feat_1 = self.spatial_attention(feat_1) *feat_1 feat_4 = self.aspp(feat_4) feat_4 =self.channel_attention(feat_4) *feat_4 xa = torch.cat((feat_4, feat_1), 1) xa = self.block(xa) Among them, feat_1 represents low-level features. After dimensionality reduction by 1x1 convolution, it is weighted by the spatial attention mechanism to highlight important spatial location information and capture local details. feat_4 represents high-level features. After the ASPP module extracts multi-scale context information and expands the receptive field, it is then weighted by the channel attention mechanism to highlight the key channels. feat_1 and feat_4 are concatenated in the channel dimension (torch.cat((feat_4, feat_1), 1)) and passed to the block for processing. The block module fuses multi-scale information through multiple convolution operations to further refine the boundary features and ensure the accuracy of segmentation; The overall design of this module enables the model to perform well in processing complex glomerular boundaries. The spatial attention mechanism effectively focuses on important spatial position information in the feature map to ensure accurate capture of local details; the channel attention mechanism highlights important feature channels related to the segmentation task, improving the accuracy of overall feature expression; and the ASPP module enables the model to process glomerular structures of different shapes and sizes by capturing multi-scale contextual information and expanding the receptive field. The overall design ensures the model's accurate detection and segmentation of boundary features in complex backgrounds, significantly improving the robustness and performance of segmentation tasks.
[0013] Furthermore, the edge-guided feature enhancement module implements feature enhancement through the following steps: Combined with the boundary prediction information, the input feature c is weighted, and the boundary weight att is used to highlight the edge area. The core operation is: x = c * att + c Where c is the input feature and att is the boundary prediction weight. This operation highlights the features related to the glomerular edge by multiplying the channel attention weight att with the original feature map c. The residual connection retains the original feature information, ensuring that the enhanced features can emphasize important edge information. Adaptive pooling combines average pooling and maximum pooling to aggregate global features at different scales. Then, one-dimensional convolution is used to capture the dependencies between channels and generate fused attention weights: wei = self.avg_pool(x) wei = self.conv1d(wei.squeeze(-1).transpose(-1, -2)).transpose(-1, -2).unsqueeze(-1) wei2 = self.max_pool(x) wei2 = self.conv1d2(wei2.squeeze(-1).transpose(-1, -2)).transpose(-1,-2).unsqueeze(-1) Among them, self.avg_pool(x) uses adaptive average pooling to aggregate the input feature map x into global features, and the generated results are used for subsequent attention weight calculations; self.max_pool(x) uses adaptive maximum pooling to reduce the input feature map x to a one-dimensional vector, providing the maximum value representation of the global feature; wei.squeeze(-1) removes redundant dimensions, and the transpose operation is used to adjust the tensor dimension order to adapt to the input format of one-dimensional convolution. self.conv1d means processing the global features through one-dimensional convolution to generate attention weights between channels.
[0014] Subsequently, the channel weights generated by average pooling and maximum pooling are fused to ensure that the model is smoother and more robust when integrating different global features: wei = 0.5 * wei + 0.5 * wei2 Among them, wei and wei2 are the attention weights obtained by average pooling and maximum pooling respectively. In order to make full use of the advantages of two different pooling strategies, the two are weighted fused with a weight of 0.5 to ensure the comprehensiveness and robustness of global features.
[0015] Next, the fused weights are normalized using the Sigmoid activation function: wei = self.sigmoid(wei) Among them, the Sigmoid function scales the attention weight to the range of [0,1] to ensure the stability and flexibility of the attention weight, thereby effectively adjusting the weight distribution between channels, highlighting key edge features and suppressing irrelevant background information.
[0016] Finally, the attention-weighted feature map x is further convolved and enhanced by the following operations: x = x * wei + x This step performs a weighted operation on the feature map x, which not only enhances the edge features but also maintains the integrity of the input features through residual connections, ensuring that the model has stronger robustness and adaptability to the detection of complex boundaries.
[0017] This module effectively captures the dependencies between channels through adaptive pooling, dynamically calculated convolution kernel size, and channel attention mechanism, significantly improving the model's detection accuracy for complex glomerular boundaries. This module introduces edge prediction information and further strengthens the expression of edge features through edge-related attention weights to achieve precise enhancement of edge semantics. This edge-guided mechanism can highlight areas that are highly correlated with glomerular boundaries in feature maps and suppress irrelevant background information. At the same time, the original feature information is retained through the residual connection mechanism, ensuring that the enhanced features can better capture key edge details without losing global information.
[0018] Furthermore, the adaptive fusion context module realizes the aggregation, feature reorganization and enhancement of context information through the following steps, and introduces new context information to improve the model's feature expression ability and ability to understand complex structures: First, the low-level features (lf) and high-level features (hf) are concatenated along the channel dimension (i.e., dim=1) through the torch.cat operation, and then the concatenated features are fused using a 1x1 convolution (conv1_1): x = self.conv1_1(torch.cat((lf, hf), dim=1)) Among them, lf is a low-level feature, hf is a high-level feature, torch.cat concatenates them along the channel dimension, and conv1_1 is a 1x1 convolution operation, which is used for the initial fusion and dimension unification of features; Use torch.chunk to divide the fused feature map into four equal-channel sub-feature maps in the channel dimension: xc = torch.chunk(x, 4, dim=1) The torch.chunk function divides x into four sub-feature blocks along the channel dimension for use in subsequent multi-scale feature fusion operations.
[0019] Perform convolution operations on the first and second sub-feature blocks, and use the AttentionFuoin2 module to weightedly fuse the two feature maps through the attention mechanism: x0 = self.conv3_1(xc[0], xc[1]) Among them, conv3_1 is the AttentionFuoin2 module, which is used to weight xc[0] and xc[1] through Softmax to ensure that important local details are retained during the fusion process.
[0020] Perform multi-scale convolution operations on the feature blocks x0 after the second, third and first step fusion, and use the AttentionFuoin3 module to process the fusion of the three feature blocks: x1 = self.dconv5_1(xc[1], x0,xc[2]) Among them, dconv5_1 is the AttentionFuoin3 module, which fuses xc[1], x0 and xc[2] in a weighted manner to ensure the interaction between features and enhance the capture of multi-scale context information.
[0021] Similarly, convolution operations are performed on the third, fourth, and fused feature blocks in the previous steps, and AttentionFusion3 is used to continue processing the fusion of the three feature blocks: x2 = self.dconv7_1(xc[2], x1,xc[3]) Among them, dconv7_1 is also the AttentionFuoin3 module, which is used to further fuse xc[2], x1 and xc[3] to strengthen the contextual dependencies between different scales.
[0022] Finally, the fourth feature block is convolved with the feature block x2 after fusion in the third step to complete the weighted fusion of the last two features: x3 = self.dconv9_1(xc[3], x2) Among them, dconv9_1 is the AttentionFuoin2 module, which is used to fuse xc[3] and x2 and retain key features through residual connections.
[0023] The four feature blocks fused after multiple convolution operations are reassembled into a complete feature map, and the channels are further compressed through convolution operations to complete the final feature fusion: xx = self.conv1_2(torch.cat((x0, x1, x2, x3), dim=1)) Among them, torch.cat reconnects the four feature blocks in the channel dimension, and conv1_2 uses 1x1 convolution to compress the channel to further fuse multi-scale feature information to ensure the compactness of feature expression.
[0024] Finally, after further convolution processing, the fused feature map is refined to improve the expressiveness of the features: x = self.conv3_3(xx, x) Among them, conv3_3 is a convolution operation, which is used to refine the fused features to ensure that the model can make full use of high- and low-level features and improve the segmentation accuracy in complex scenes.
[0025] The core logic of AttentionFuoin2 and AttentionFuoin3 is as follows: AttentionFuoin2 generates dynamic weights through Softmax, performs weighted fusion of two input features, and retains the original features through residual connections: w = self.act(x1 + x2) x1 = w[:, 0, ...].unsqueeze(1) * x1+ x1 x2 = w[:, 1, ...].unsqueeze(1) * x2+ x2 The weights generated by the act function are normalized by Softmax to weight x1 and x2. The residual connection ensures that the original feature information is not lost during the fusion process.
[0026] AttentionFuoin3 processes the three input feature maps in a similar way, generates three-dimensional weights, weights each feature map, and retains key features through residual connections: w = self.act(x1 + x2 + x3) x1 = w[:, 0, ...].unsqueeze(1) * x1+ x1 x2 = w[:, 1, ...].unsqueeze(1) * x2+ x2 x3 = w[:, 2, ...].unsqueeze(1) * x3+ x3 Among them, Softmax generates a three-dimensional weight matrix for weighted fusion of three features to ensure the integration of multi-scale information. The residual connection also retains the original features and enhances the robustness of the model.
[0027] The adaptive fusion context module can effectively capture the multi-scale information in the complex glomerular structure through the adaptive fusion of multi-scale features and the dynamic weight generation mechanism of AttentionFuoin2 and AttentionFuoin3. The design of residual connection ensures that key information is not lost in the process of feature fusion, and improves the segmentation ability of the model under complex backgrounds.
[0028] In the second aspect, a segmentation method of an EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection, the method comprising the following steps: Step 1: Use PVTv2 (Pyramid Vision Transformer v2) as a feature extraction module to perform multi-scale feature extraction on the input glomerular pathology image. PVTv2 extracts multi-scale features layer by layer through its hierarchical Transformer structure, which can not only effectively capture local details (such as the texture and edge information of the glomerulus), but also provide global context information to adapt to the feature requirements of glomeruli of different sizes and shapes. The multi-scale feature extraction capability of PVTv2 helps improve the adaptability of the model to complex scenes while maintaining low computational complexity; Step 2: Use the attention-guided boundary module (AGBM module) to enhance the boundaries of multi-scale features. This module combines the spatial attention mechanism, channel attention mechanism, and ASPP (atrous spatial pyramid pooling) mechanism to capture multi-scale contextual information through different atrous rates and expand the receptive field of the model. The spatial attention mechanism is used to enhance the local details related to the glomerular edge in the low-level features, and the channel attention mechanism is used to enhance the global information expression in the high-level features, thereby improving the detection accuracy of edge features and ensuring more accurate segmentation of the glomerular boundary; Step 3: Further enhance the features related to the glomerular edge through the edge-guided feature enhancement module (EFEM module). The EFEM module combines the boundary prediction information to generate channel-level attention weights and dynamically adjusts the feature expression through the edge-guided mechanism. EFEM uses a dual pooling strategy (average pooling and maximum pooling) to comprehensively capture global and local information, effectively highlight key features, ensure that the edge details of the glomerulus are enhanced, and further improve the segmentation accuracy; Step 4: Use the adaptive fusion context module (AFCM module) to adaptively fuse features at different levels. AFCM captures multi-scale context information by combining convolution operations with different dilation rates, and dynamically weights and fuses features through the attention mechanism. During the feature fusion process, AFCM can focus on important context information and suppress irrelevant background noise, thereby improving the segmentation performance of the model in complex glomerular structures; Step 5: The final decoding generates the glomerulus segmentation result, and morphological operations are applied to optimize the segmentation result.
[0029] This method achieves accurate segmentation of glomerular structure by gradually refining and enhancing features. Each step specifically addresses specific challenges in glomerular segmentation. This progressive feature processing and fusion strategy not only improves the accuracy of segmentation, but also enhances the model's adaptability to diseased glomeruli of different types and degrees.
[0030] The third aspect is a training method for an EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection, comprising: Step 1: Standardize the input glomerular pathology image III to ensure that the eigenvalue distribution of the input image is consistent and improve the training effect and stability of the model. The standardization formula is as follows: Among them, μ is the mean of the image, and σ is the standard deviation. Through this step, the brightness and contrast differences between different images are eliminated, so that the model can process different images at the same scale and ensure the consistency of feature extraction; Step 2: Load the EdgeAttenNet model and use the pre-trained PVTv2 (Pyramid Vision Transformer v2) weights to initialize the feature extraction module. PVTv2 is pre-trained on a large-scale image dataset. Through its multi-scale feature extraction capabilities, it provides rich contextual information for glomerular images, especially in capturing complex structures and details. Model initialization helps speed up training convergence and improve initial segmentation performance; Step 3: Use a weighted combination of cross-entropy loss and Dice loss to optimize the objective function of the segmentation task. Cross-entropy loss focuses on pixel-level classification accuracy, while Dice loss focuses more on the overlap and matching accuracy of the target area. The loss function is defined as: Among them, LCE is the cross entropy loss, LDice is the Dice loss, and α is the balance factor. By adjusting α, a good balance can be achieved between global classification accuracy and local area matching. Especially in the case of class imbalance, Dice loss can effectively prevent the missed detection of small targets (such as glomeruli); Step 4: Use the Adam optimizer to update parameters. The Adam optimizer combines the advantages of momentum and adaptive learning rate adjustment, and has good robustness when dealing with complex non-convex optimization problems. Set the initial learning rate: Adam's adaptive learning rate mechanism helps to improve the training convergence speed while reducing the need to manually adjust the learning rate; Step 5: Use the polynomial decay strategy to dynamically adjust the learning rate to ensure that the model can reasonably control the learning rate at different stages of training. The learning rate update formula is: Among them, lr0 is the initial learning rate, t is the current number of iterations, T is the total number of iterations, and β is a hyperparameter that controls the decay rate. This strategy can maintain a low learning rate in the later stages of training to prevent the model from falling into oscillation or overfitting, while ensuring refined feature adjustment; Step 6: In each training iteration, first perform forward propagation to calculate the loss function value of the current batch. Then, use backpropagation to update the model parameters according to the gradient information of the loss function. After each update, the Adam optimizer will adaptively adjust the learning rate of the parameters to ensure that the model can gradually converge; Step 7: Regularly evaluate the model performance on the validation set, and quantify the segmentation performance of the model by calculating indicators such as mean intersection over union (mIoU) and mean Dice coefficient (mDice). mIoU measures the segmentation consistency of the model in each category, while mDice focuses on the overlap of the target area. These evaluation indicators can accurately reflect the performance of the model in complex scenes. After verification and evaluation, save the model weights with the best performance to ensure that the optimal parameter configuration can be selected during training. Through this process, avoid overfitting of the model and ensure the robustness of the model in practical applications.
[0031] This method ensures that the EdgeAttenNet model can achieve excellent performance in the glomerular image segmentation task through multi-step optimization strategies and adaptive mechanisms. Each step is closely combined, through data preprocessing, model initialization, loss function optimization, dynamic learning rate adjustment, etc., so that the model can still maintain high accuracy and stability in complex backgrounds.
[0032] The technical solution adopted by the present invention has the following beneficial effects: This paper proposes an EdgeAttenNet network for the glomerulus segmentation problem. It effectively improves the accuracy of segmentation through innovative module design, especially when dealing with complex backgrounds and fuzzy boundaries. EdgeAttenNet is optimized in both width and depth of the network, which can achieve better detection results.
[0033] The attention-guided boundary module (AGBM) proposed in this paper combines spatial attention, channel attention and ASPP to significantly enhance the perception of glomerular boundaries. The design of this multi-attention mechanism enables the model to locate glomerular boundaries more accurately, overcoming the shortcomings of traditional methods in dealing with fuzzy boundaries.
[0034] The edge-guided feature enhancement module (EFEM) proposed in this paper combines boundary prediction information and input features to achieve fine enhancement of edge regions, effectively improving the accuracy of segmentation. The design of EFEM not only enhances edge features, but also retains the original feature information through residual connections, avoiding the problem of over-emphasizing edges and ignoring internal structures.
[0035] The adaptive fusion context module (AFCM) proposed in this paper realizes the effective capture and dynamic fusion of multi-scale context information, and improves the model's adaptability to glomeruli of different sizes. The design of AFCM allows the model to adaptively adjust the importance of different features according to the input, so that the system can better handle the changing glomerular morphology and complex background information.
[0036] The overall network architecture of the present invention effectively solves problems such as detail loss and blurred boundaries while maintaining high-precision segmentation through the synergy of multiple innovative modules, providing reliable technical support for glomerular pathology analysis. EdgeAttenNet not only improves the accuracy of segmentation, but also enhances the interpretability and scalability of the model, laying the foundation for future applications in other medical image segmentation tasks.
[0037] The multi-objective loss function design adopted by the present invention combines cross entropy loss and Dice loss, which can better balance the classification accuracy and regional overlap at the pixel level, thereby achieving more accurate glomerular boundary positioning. This loss function design is particularly suitable for the needs of medical image segmentation tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the structure of the EdgeAttenNet glomerulus segmentation system based on the camouflaged target detection technology of the present invention; Figure 2 Schematic diagram of the structure of the attention guided boundary module (AGBM) of the present invention; Figure 3 Schematic diagram of the structure of the edge-guided feature enhancement module (EFEM) of the present invention; Figure 4 Schematic diagram of the structure of the adaptive fusion context module (AFCM) of the present invention; Figure 5 This is a comparison chart of the segmentation effects of the present invention and other methods. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] This paper uses the glomerulus as a camouflaged target in pathological images, and for the first time innovatively applies the camouflaged target detection algorithm based on deep learning to glomerular segmentation, and proposes an EdgeAttenNet algorithm that uses a new attention mechanism and network structure to achieve high-precision glomerular segmentation. This innovative application not only improves the accuracy of glomerular segmentation, but also opens up a new research direction in the field of medical image analysis.
[0041] Figure 1 It is a structural diagram of the EdgeAttenNet glomerulus segmentation system based on camouflage target detection technology of the present invention. As shown in the figure, the EdgeAttenNet glomerulus segmentation system includes a feature extraction module, an attention-guided boundary module (AGBM), an edge-guided feature enhancement module (EFEM) and an adaptive fusion context module (AFCM). These modules work together to form an end-to-end segmentation network structure for achieving high-precision glomerulus recognition and segmentation.
[0042] The feature extraction module is used to extract multi-scale feature information from the input glomerular pathology image. In the specific implementation, the improved Pyramid Vision Transformer v2 (PVTv2) is used in the feature extraction module to complete the feature extraction work. As an advanced visual Transformer architecture, PVTv2 significantly reduces the computational complexity by introducing spatial downsampling and local attention mechanisms while maintaining the powerful feature extraction capabilities of the original Transformer. This enables the model to efficiently process high-resolution medical images.
[0043] The feature extraction module is represented by PVTv2(i), where i=1,2,3,4,5 is the index of the extraction block. The input glomerular pathology image size is 224×224×3. PVTv2 generates a series of feature maps {f1,f2,...,f5} by gradually reducing the spatial resolution and increasing the number of channels, where f1 represents the lowest level feature and f5 represents the highest level feature. This multi-scale feature extraction strategy enables the model to focus on local details and global structures at the same time, thereby better processing glomeruli of different sizes and shapes. The feature dimensions output by the feature extraction module are: f1: 128×128×64 f2: 64×64×128f3: 32×32×320f4: 16×16×512f5: 16×16×512 refer to Figure 1 and Figure 2The innovation of the attention-guided boundary module (AGBM) lies in the combination of spatial attention mechanism (SA) and channel attention mechanism (CA), and the introduction of atrous spatial pyramid pooling (ASPP), which enhances the perception of glomerular boundaries. The SA mechanism highlights the important spatial positions in the feature map, and the CA mechanism weights the channels to further optimize the feature expression related to the boundary. In addition, the ASPP module expands the receptive field through multi-scale convolution, which effectively copes with glomeruli of different sizes and shapes. This module achieves accurate segmentation of boundaries in complex backgrounds through the fusion and refinement of multi-scale features.
[0044] refer to Figure 1 and 3 The innovation of the edge-guided feature enhancement module (EFEM) is that it combines boundary prediction information and input features to achieve fine enhancement of edge areas. EFEM adopts a dual pooling strategy, capturing significant features through maximum pooling and obtaining the overall feature distribution through average pooling, thereby retaining global context information while enhancing the edges. This design effectively improves the model's ability to recognize glomerular edges and avoids over-emphasizing edges while ignoring internal structures. In addition, the module retains the original feature information through residual connections, ensuring that the integrity of the input features is maintained while enhancing the edges, enhancing the robustness and adaptability of the model in complex boundary detection.
[0045] refer to Figure 1 and Figure 4 The innovation of the Adaptive Fusion Context Module (AFCM) is to capture multi-scale context information through convolution operations with different dilation rates and realize dynamic weighted fusion of features. This design allows the system to adaptively adjust the fusion weights according to the different scales and context information of the input features, thereby enhancing the model's ability to understand complex glomerular structures. In particular, the AFCM module shows superior adaptability when dealing with glomeruli with large changes in size and morphology. In addition, the introduction of Attentional Feature Fusion (AFF) technology further enhances the accuracy of feature fusion, ensuring that important features can be dynamically highlighted when multi-scale information is fused, thereby improving the segmentation performance of the model.
[0046] In order to verify the glomerular segmentation performance of the system and method of the present invention, we conducted a comprehensive experimental evaluation on the KPIS2024 dataset. The KPIS2024 dataset contains 60 high-resolution whole slide images of rat kidneys from 20 rodents, covering three chronic kidney disease (CKD) models and normal kidney tissue. These images were stained with PAS and captured at 40x magnification using a Leica SCN400 slide scanner. This dataset represents different CKD conditions and stages, providing a diverse sample for renal pathology image segmentation research.
[0047] We compared the proposed EdgeAttenNet method with a variety of cutting-edge methods, including UNet, Segformer, DeepLabV3+, SINetV2, PFNet, and BGNet. To ensure the rigor and fairness of the experiments, the prediction results of all baseline methods were either obtained directly from the original authors or re-implemented using publicly available source code. This approach ensures the reproducibility of our comparative analysis and reduces potential bias in model performance evaluation.
[0048] We used several widely used indicators in medical image segmentation to evaluate the segmentation results, including mean pixel accuracy (mPA), mean intersection over union (mIoU), and mean Dice coefficient (mDice). These indicators comprehensively evaluate the performance of the model from the perspectives of pixel-level classification accuracy, region overlap, and region similarity.
[0049] The experimental results are shown in Table 1 below. EdgeAttenNet achieved the best results in all indicators, showing significant performance advantages. Specifically, without using pre-trained weights, EdgeAttenNet achieved a mean intersection over union (mIoU) of 83.10% on the KPIS2024 dataset, which is about 5% higher than the 78.03% of the traditional UNet model. This result not only highlights the superiority of the EdgeAttenNet architecture, but also proves its excellent generalization ability and efficiency in processing complex visual datasets.
[0050] Table 1 Quantitative comparison of method performance - without using pre-trained weights More notably, when using pre-trained weights, as shown in Table 2, EdgeAttenNet's performance is further improved. In this case, EdgeAttenNet achieves 91.23% mIoU, 3.5% higher than UNet's 87.58%. This significant performance improvement not only demonstrates the robustness of the EdgeAttenNet model structure, but also demonstrates its ability to effectively utilize pre-trained knowledge.
[0051] Table 2 Quantitative comparison of method performance - using pre-trained weights In terms of qualitative analysis, we performed a visual comparison of representative samples from the KPIS2024 dataset. The results show that traditional segmentation methods often have difficulty in accurately depicting glomerular boundaries, often resulting in over-segmentation or under-segmentation problems. This is particularly evident in areas where the glomerulus has similar visual features to the surrounding tissue. In contrast, models designed specifically for camouflaged target detection demonstrate a stronger ability to distinguish these subtle differences, thereby improving segmentation accuracy.
[0052] Our EdgeAttenNet approach effectively addresses these limitations by leveraging advanced attention mechanisms and boundary-aware features. Figure 5 As shown in Figure 2, EdgeAttenNet consistently produces segmentation results that are highly consistent with the ground-truth annotations. It is able to accurately capture the complex morphological variations of glomeruli, precisely delineate boundaries even in challenging situations where tissues overlap or are similar, and preserve fine structural details that are critical for accurate pathological analysis. This performance highlights the effectiveness and robustness of our model architecture.
[0053] This qualitative comparison not only confirms the quantitative results presented previously, but also highlights the practical significance of our method's improvements. The enhanced segmentation quality provided by EdgeAttenNet may significantly aid pathologists in their analysis, potentially leading to more accurate diagnoses and a better understanding of kidney disease at the glomerular level. Furthermore, this demonstration of superior performance suggests that EdgeAttenNet has significant advantages in handling complex medical image segmentation tasks, especially when dealing with objects with camouflaged features.
[0054] To further verify the effectiveness of the proposed model, we also conducted comprehensive ablation experiments. These experiments are designed to evaluate the effects of the individual modules we proposed and how they work together to improve the overall performance. All ablation experiments are performed without using pre-trained weights to ensure an unbiased evaluation of the intrinsic learning ability and architectural advantages of each model.
[0055] The ablation experiment results are shown in Table 3. Removing the AFCM module will cause the mIoU to drop by 0.22%, removing the AGBM module will cause the mIoU to drop by 0.31%, and removing the EFEM module will cause the mIoU to drop by 0.37%. These results show that each module plays a key role in improving the segmentation performance. In particular, the combination of AGBM+EFEM+AFCM, as the core innovation of this study, achieved the highest mIoU (83.1%) among all tested model combinations. This result further emphasizes the complementarity of the AGBM, EFEM, and AFCM modules, which together enhance the model's ability to handle camouflaged target segmentation in complex backgrounds.
[0056] Table 3 Ablation experiment results In addition, we also tested the performance of the model on input images of different resolutions. The results show that EdgeAttenNet can still maintain high segmentation accuracy when processing high-resolution images (such as 2048×2048), while the computation time only increases slightly, demonstrating the efficiency and scalability of the model. This feature is particularly important for processing large-scale pathology image datasets.
[0057] In summary, the EdgeAttenNet glomerulus segmentation system based on disguised target detection technology proposed in this paper effectively solves the challenges faced by existing methods in processing complex medical images by innovatively applying disguised target detection technology to medical image analysis. This system not only improves the accuracy and efficiency of glomerular segmentation, but also provides new ideas and methods for other medical image analysis tasks, opening up a new research direction for applying disguised target detection technology to medical image analysis.
[0058] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the schemes disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.
Claims
1. An EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection, characterized in that: Includes the following modules: The feature extraction module contains five consecutive convolutional feature extraction layers f1, f2, f3, f4, f5. By extracting feature information of different depths layer by layer, the extracted features gradually capture the details, local features and high-level semantic information in the image from shallow to deep. Features at different levels are used for processing and fusion in subsequent different modules. The attention-guided boundary module obtains information from the low-level features f2 and the high-level features f5 in the feature extraction module; the low-level features f2 usually contain more edge and local texture information, while the high-level features f5 contain rich context and semantic information; by fusing the features of the low-level features f2 and the high-level features f5, the glomerular boundaries in complex backgrounds are identified; The edge-guided feature enhancement module is connected to the four feature extraction layers f2, f3, f4, and f5 in the feature extraction module. These edge-guided feature enhancement modules process feature maps from each layer, especially use edge information for feature enhancement, to ensure that the model can extract key edge-related information at multiple scales. Through this multi-scale fusion, the edge-guided feature enhancement module can effectively capture the edge details and structural features of the target area, ensuring that the model has the ability to process multi-scale edge features in complex scenes, thereby improving the edge recognition accuracy in segmentation tasks. The adaptive fusion context module receives enhanced features f2, f3, f4, and f5 of different levels processed by the edge-guided feature enhancement module, and performs multi-scale context information fusion on these features. The core function of this module is to capture context information from different levels through standard convolution and dilated convolution operations of different scales, ensuring that the model can effectively obtain global semantic information with a larger receptive field. The adaptive fusion context module fuses features from different scales through an adaptive mechanism. This fusion mechanism can dynamically adjust the weights according to the importance of the features, thereby improving the expressiveness of the features and the utilization efficiency of contextual information. By combining contextual information at different levels and scales, the adaptive fusion context module significantly improves the model's feature expression ability and segmentation accuracy in complex backgrounds.
2. The EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 1, characterized in that: The feature extraction module adopts the PVTv2 network architecture, which can extract multi-scale feature information f1, f2, ..., fn from the input glomerular pathology image. These features have different spatial resolutions and semantic levels, where f1 represents the lowest-level feature, fn represents the highest-level feature, and the feature dimensions are C1, C2, ..., Cn respectively; the PVTv2 network architecture significantly reduces the computational complexity while ensuring powerful feature extraction capabilities through layer-by-layer spatial downsampling and local attention mechanism, so that it can efficiently process high-resolution medical images.
3. The EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 1, characterized in that: The attention-guided boundary module includes: Spatial attention mechanism, which is used to identify and emphasize important spatial locations in the feature map to improve the precise positioning of the target area; The channel attention mechanism highlights the key information related to boundary detection by weighted selection of feature channels, ensuring accurate capture of target boundaries. Multi-scale convolution operations are used to capture contextual information of different scales and enhance the multi-scale representation capability of feature maps, thereby improving the boundary segmentation effect in complex scenes. The attention-guided boundary module part is expressed as: xa = torch.cat((feat_4, feat_1), 1) xa = self.block(xa) Among them, xa is the feature map after fusion processing; the torch.cat() function concatenates and fuses the deep feature map feat_4 and the shallow feature map feat_1 in the channel dimension; feat_4 represents the high-level feature map, which provides rich contextual information, while feat_1 is the low-level feature map, which retains the detailed information of the target; self.block is a predefined feature processing module, which is used to further enhance the expression ability of the fused features and realize the accurate segmentation of the target boundary.
4. The EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 1, characterized in that: The edge-guided feature enhancement module implements feature enhancement by the following steps: Perform element-wise multiplication of the input feature c and the boundary prediction weight att, combine the boundary information, and enhance the feature expression related to the edge: x = c * att + c Among them, c represents the input feature map, att is the weight obtained by boundary prediction, which is used to highlight the important features at the boundary; The input feature map is processed using adaptive average pooling and adaptive maximum pooling operations to extract global and local information, and channel-level attention weights are generated through one-dimensional convolution; this step enhances feature expression by adaptively adjusting the weights of different channels.
5. The EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 1, characterized in that: The adaptive fusion context module implements feature fusion through the following steps: The low-level feature lf and the high-level feature hf are initially fused through a 1x1 convolution operation; first, lf and hf are concatenated in the channel dimension, and the number of channels is compressed through a 1x1 convolution operation to obtain the fused initial features: x = self.conv1_1(torch.cat((lf, hf), dim=1)) Among them, lf and hf are low-level and high-level features respectively, and conv1_1 is a 1x1 convolution operation, which is used to reduce the number of feature map channels and achieve preliminary fusion; The fused feature map x is divided according to the channel dimension to obtain four feature blocks. Each block will perform convolution operations with different expansion rates to capture contextual information of different scales: xc = torch.chunk(x, 4, dim=1) Among them, torch.chunk is an operation in PyTorch used to split a tensor into multiple chunks according to a specified dimension; Convolution operations with different dilation rates are applied to the block features to capture contextual information of different scales. The features generated by different dilated convolutions are weighted through the attention mechanism, and the weight of each feature block is dynamically adjusted to achieve adaptive fusion of multi-scale information.
6. A segmentation method of the EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection as claimed in claim 1, characterized in that: include: Step 1: Use the feature extraction module to extract multi-scale features of the input image based on PVTv2; PVTv2 extracts multi-scale features layer by layer through its hierarchical structure and has good global context capture capabilities. PVTv2 can provide efficient global feature expression while maintaining low computational complexity, adapting to the multi-scale feature requirements in complex scenes. Step 2: Use the attention-guided boundary module to perform boundary enhancement processing on multi-scale features; the attention-guided boundary module combines spatial attention, channel attention and ASPP mechanisms to capture multi-scale contextual information and highlight features related to glomerular edges through the attention mechanism; this module strengthens low-level features through spatial attention and uses the ASPP module to process high-level features to enhance the perception of edge features, thereby improving the accurate segmentation of glomerular boundaries; Step 3: The input features are enhanced by edge-guided feature enhancement module. This module uses boundary prediction information and adaptive pooling mechanism to generate channel-level attention weights, further strengthen edge-related feature expression, and improve segmentation accuracy. Step 4: Use the adaptive fusion context module to adaptively fuse features at different levels; capture multi-scale context information by combining convolution operations with different expansion rates, and achieve dynamic weighted fusion through the attention mechanism to further enhance the feature expression ability and improve the model's accurate segmentation of glomerular structures; Step 5: Finally, the fused features are decoded to generate accurate glomerulus segmentation results.
7. The segmentation method of the EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 6, characterized in that: The edge-guided feature enhancement module adopts a channel attention mechanism that combines adaptive pooling and one-dimensional convolution, where the kernel size k of the one-dimensional convolution is determined by the number of feature channels C, and the calculation formula is: C represents the number of feature channels of the image, and the log function calculates the logarithm of these channel numbers; the formula calculates t by adding 1 to the logarithmic result and dividing it by 2 and taking the integer. Finally, the t value is doubled and added to 1 to determine the convolution kernel size k, ensuring that k is always an odd number, which helps maintain the spatial symmetry of the convolution operation.
8. The segmentation method of the EdgeAttenNet glomerular image accurate segmentation system based on camouflaged target detection according to claim 6, characterized in that: The adaptive fusion context module uses AttentionFusion2 and AttentionFusion3 components to implement dynamic weighted fusion of features. Its core operations are: AttentionFusion2(x1, x2) = Conv(w1·x1 + w2·x2 + x1 + x2) AttentionFusion3(x1, x2, x3) = Conv(w1·x1 + w2·x2 + w3·x3 + x1 + x2 +x3) Where w = Softmax(Conv1x1(x1 + x2 + x3)) is the attention weight. This adaptive fusion strategy can dynamically adjust the fusion weight according to the importance of the input features.
9. A training method for the EdgeAttenNet glomerulus image accurate segmentation system based on camouflaged target detection as claimed in claim 1, characterized in that: include: Step 1: Data preprocessing: Standardize the input glomerular pathology image I: Among them, μ is the mean of the image and σ is the standard deviation. This step ensures that the input feature values of different images are on the same scale, improving the training effect of the model. Step 2: Model initialization: Load the EdgeAttenNet model and use the pre-trained PVTv2 weights to initialize the feature extraction module; after being pre-trained on a large-scale image dataset, PVTv2 can provide richer contextual information for multi-scale feature extraction of glomerular images, which helps the model converge quickly and improve performance; Step 3: Loss function definition: A weighted combination of cross entropy loss and Dice loss is used to optimize the objective function of the segmentation task to ensure that the model can still achieve good segmentation results in the case of class imbalance; the loss function is defined as: Where LCE is the cross entropy loss, LDice is the Dice loss, and α is the balance factor. This combination can take into account both the accuracy of global classification and the accuracy of local area matching. Step 4: Optimizer selection: Use the Adam optimizer, which has good robustness and fast convergence when dealing with complex optimization problems. The initial learning rate lr = 1e-4; Step 5: Learning rate scheduling: Use a polynomial decay strategy to dynamically adjust the learning rate, and gradually reduce the learning rate as the training progresses to prevent overfitting or oscillation in the later training; the learning rate update formula is: Where t is the current iteration number, T is the total iteration number, lr_0 is the initial learning rate, and β is the hyperparameter that controls the decay rate. This scheduling strategy can ensure that the model can be fine-tuned more stably in the later stages of training. Step 6: Iterative training: In each training iteration, forward propagation is performed to calculate the loss, and then the model parameters are updated through backpropagation; Step 7: Validation and evaluation: Regularly evaluate the model performance on the validation set, and calculate indicators such as the average intersection-over-union ratio and the average Dice coefficient to measure the segmentation performance of the model; after each round of evaluation, the model parameters with the best performance will be saved based on the validation results; this process ensures that the model can be continuously optimized during training and avoids overfitting.
Citation Information
Patent Citations
Medical image segmentation method and system and electronic device
CN116228792A
Codec medical image segmentation system and method for guiding attention based on boundary
CN116503431A
Medical image small target segmentation method based on double-branch feature fusion attention
CN116681679A
Camouflage target image segmentation method and system based on multilevel feature fusion
CN116703950A
MRI (Magnetic Resonance Imaging) brain tumor segmentation method based on multi-scale feature fusion of improved U-Net
CN117876399A
Cited By
Medical image fuzzy boundary segmentation system and method based on COD frequency domain guidance
CN120125599A
Pedestrian re-identification method and device, algorithm server and pedestrian re-identification system
CN121191190A