Method and system for segmenting kidney region in renal dynamic imaging image based on hybrid attention branch

CN118918126BActive Publication Date: 2026-09-18SHANGHAI CHILDRENS HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410962521.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2026-09-18
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

[0009]针对现有技术的以上缺陷或改进需求,本发明提供了一种基于混合注意力分支分割肾动态显像图像中肾脏区域的方法和系统,其目的在于,解决现有基于经典UNet及其变体的肾动态显像图像分割方法通过跳跃连接增强了特征传递,但在处理细节丰富的肾动态显像图像时,其分割能力有限;尤其在面对复杂的解剖结构和低对比度区域时,由于这种模型难以准确捕捉重要的特征,因此会导致肾动态显像图像分割结果并不准确的技术问题,以及现有基于Transformer模型的肾动态显像图像分割方法在处理大规模肾动态显像图像时,往往需要大量计算资源,且对细节特征的捕捉能力有限的技术问题,以及现有基于混合架构的肾动态显像图像分割方法在应对高细节和高分辨率图像时,其模型结构复杂,训练过程繁琐,对计算资源要求高的技术问题,以及现有SAM模型在面对肾动态显像图像时,其提示驱动的输入机制和掩码解码器无法充分发挥作用的技术问题

Benefits of technology

[0060]1. Improved segmentation accuracy and generalization ability: By employing steps (2-3) and (2-4), this invention effectively fuses global semantic features and fine-grained local details through a cross-branch attention mechanism, enabling the model to maintain high accuracy and reliability in complex medical images. Therefore, it can solve the problem that existing kidney dynamic imaging image segmentation methods based on the classic UNet and its variants struggle to accurately capture important features when facing complex anatomical structures and low-contrast regions, thus avoiding the technical problem of inaccurate kidney dynamic imaging image segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918126B_ABST
    Figure CN118918126B_ABST
Patent Text Reader

Abstract

This invention discloses a method for segmenting the kidney region in dynamic kidney imaging images based on hybrid attention branches. The method includes: acquiring dynamic kidney imaging images obtained by a single-photon emission computed tomography (SPECT) scanner; preprocessing the dynamic kidney imaging images to obtain multiple preprocessed images; and inputting each preprocessed image into a pre-trained dynamic kidney imaging image segmentation model to obtain the corresponding kidney region. This invention addresses the technical problems of existing dynamic kidney imaging image segmentation methods based on the classic UNet and its variants, which enhance feature transfer through skip connections but have limited segmentation capabilities when processing detailed dynamic kidney imaging images. Especially when facing complex anatomical structures and low-contrast regions, this model struggles to accurately capture important features, leading to inaccurate segmentation results. It also addresses the technical problem that existing dynamic kidney imaging image segmentation methods based on the Transformer model often require significant computational resources and have limited ability to capture detailed features when processing large-scale dynamic kidney imaging images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer science and medical imaging, and more specifically, relates to a method and system for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching. Background Technology

[0002] Kidney dynamic imaging image segmentation plays a crucial role in computer-aided diagnostic systems, particularly in identifying and analyzing specific anatomical structures. In recent years, with the rapid development of deep learning technology, kidney dynamic imaging image segmentation techniques have been significantly improved. However, existing segmentation methods still face many challenges when processing kidney dynamic imaging images with complex details and low contrast.

[0003] Existing kidney dynamic imaging image segmentation techniques mainly fall into three categories: kidney dynamic imaging image segmentation methods based on classic UNet and its variants (such as UNet++ and Attention UNet), kidney dynamic imaging image segmentation methods based on Transformer models (such as SwinUNet), and kidney dynamic imaging image segmentation methods based on hybrid architectures (such as MambaUNet). In addition, the Segment Anything model (SAM) has also gained attention in recent years. Although it is mainly applied to natural image segmentation tasks, it is gradually being explored for application in the field of medical image segmentation.

[0004] However, all four existing kidney dynamic imaging image segmentation methods mentioned above have some significant drawbacks:

[0005] First, kidney dynamic imaging image segmentation methods based on the classic UNet and its variants enhance feature propagation through skip connections, but their segmentation ability is limited when dealing with detailed kidney dynamic imaging images. Especially when facing complex anatomical structures and low-contrast regions, this model struggles to accurately capture important features (for example, UNet++ improves feature propagation by introducing nested skip connections, but still suffers from blurred boundaries in complex kidney dynamic imaging images; Attention UNet enhances feature selection through attention mechanisms, but these mechanisms may not effectively distinguish important features from background noise when processing low-contrast images), thus leading to inaccurate kidney dynamic imaging image segmentation results.

[0006] Second, the kidney dynamic imaging image segmentation method based on the Transformer model captures global dependencies through a self-attention mechanism, but when processing large-scale kidney dynamic imaging images, it often requires a lot of computational resources and has limited ability to capture detailed features.

[0007] Third, although the hybrid architecture-based kidney dynamic imaging image segmentation method combines the advantages of state-space models and convolutional neural networks and performs well in handling long-distance dependencies, its model structure is complex, the training process is cumbersome, and it has high requirements for computing resources when dealing with high-detail and high-resolution images.

[0008] Fourth, while the Segment Anything Model (SAM) performs exceptionally well in zero-shot and few-shot segmentation tasks in natural images, directly applying it to kidney dynamic imaging image segmentation presents some challenges. Kidney dynamic imaging images often exhibit subtle variations, such as low contrast, blurred boundaries, and complex anatomical structures, which differ from the challenges in natural image segmentation. Although SAM is highly adaptable, its cue-driven input mechanism and mask decoder may not be fully effective when dealing with kidney dynamic imaging images. Summary of the Invention

[0009] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and system for segmenting the kidney region in dynamic kidney imaging images based on hybrid attention branches. The aim is to solve the following problems: Existing kidney dynamic imaging image segmentation methods based on classic UNet and its variants enhance feature transfer through skip connections, but their segmentation ability is limited when processing detailed kidney dynamic imaging images; especially when facing complex anatomical structures and low-contrast regions, this model struggles to accurately capture important features, leading to inaccurate segmentation results; existing kidney dynamic imaging image segmentation methods based on Transformer models often require significant computational resources and have limited ability to capture detailed features when processing large-scale kidney dynamic imaging images; existing kidney dynamic imaging image segmentation methods based on hybrid architectures have complex model structures, cumbersome training processes, and high computational resource requirements when dealing with high-detail and high-resolution images; and existing SAM models cannot fully utilize their cue-driven input mechanism and mask decoder when dealing with kidney dynamic imaging images.

[0010] To achieve the above objectives, according to one aspect of the present invention, a method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching is provided, comprising the following steps:

[0011] (1) Acquire dynamic kidney imaging images acquired by single-photon emission computed tomography (SPECT) and preprocess the dynamic kidney imaging images to obtain multiple preprocessed images.

[0012] (2) Input each preprocessed image obtained in step (1) into the pre-trained kidney dynamic imaging image segmentation model to obtain the corresponding kidney region.

[0013] Preferably, the renal dynamic imaging image obtained in step (1) is in the medical digital imaging and communication (DICOM) format.

[0014] The preprocessing process in step (1) is as follows: First, the DICOM format kidney dynamic imaging image is converted into a NIfTI format image; then, all kidney imaging slices are extracted from the NIfTI format image; subsequently, all kidney imaging slices without kidney labels are deleted from all extracted kidney imaging slices, and slices with kidney labels are retained; finally, each retained kidney imaging slice is converted into a PNG format image as the preprocessed image.

[0015] Preferably, the kidney dynamic imaging image segmentation model includes a SAM encoder branch, a VMamba encoder branch, and a cross-branch attention (CBA) part for connecting the SAM encoder branch and the image decoder part.

[0016] The SAM encoder branch includes an overlapping patch embedding module, a position embedding module, a window Transformer module, and a detailed feature extraction module.

[0017] The overlapping patch embedding module takes an image of dimension 1024*1024*3 as input. It divides the input image into multiple patches of the same size that overlap each other, and transforms each patch into a high-dimensional vector through a linear projection. The final output is a set of vectors corresponding to all patches, namely the first feature vector of dimension 256*256*768.

[0018] The input to the position embedding module is the first feature vector with a dimension of 256*256*768 output by the overlapping patch embedding module. It performs position embedding processing on the vector corresponding to each patch in the first feature vector, and finally outputs a second feature vector with a dimension of 256*256*768.

[0019] The Window Transformer module includes a layer normalization submodule, a multi-head attention submodule, and a feedforward neural network.

[0020] The input to the layer normalization submodule is the second feature vector with dimensions of 256*256*768 output from the position embedding module. It performs layer normalization on the second feature vector and outputs a normalized feature vector with the same dimension as the input second feature vector.

[0021] The input to the multi-head attention submodule is the normalized feature vector output by the layer normalization submodule. It performs multi-head attention processing on this vector and outputs an attention feature vector with dimensions of 256*256*768.

[0022] The input to the feedforward neural network is the attention feature vector output by the multi-head attention submodule. It processes the attention feature vector using a non-linear activation function and performs feature transformation through a fully connected layer, finally outputting a third feature vector with a dimension of 64*64*128.

[0023] The detailed feature extraction module takes as input the third feature vector with dimensions of 64*64*128 output from the window Transformer module. It then performs feature extraction on this third feature vector using a convolutional neural network, pooling using a spatial pyramid, preserving the original information using residual connections, and applying an attention mechanism. Finally, it outputs a final feature vector with dimensions of 64*64*128.

[0024] Preferably, the VMamba encoder branch runs in parallel with the SAM encoder branch and includes an input processing module, four visual state space (VSS) blocks, and three block merging layers.

[0025] The input processing module takes the same input as the SAM encoder branch: an image with dimensions of 1024*1024*3. This module first segments the input image into multiple non-overlapping patches of the same size. Then, each patch is flattened into a one-dimensional vector, and all patch vectors are concatenated sequentially to form a long sequence. Finally, a linear embedding layer is used to adjust the feature dimensions of this sequence, and the final output is the adjusted feature sequence.

[0026] The first VSS block takes as input the adjusted feature sequence output from the input processing module. This block first applies a selective scanning mechanism to capture local dependencies by performing local scans within the sequence. Then, a cross-gated multilayer perceptron (MLP) is used for feature interaction to enhance the expressive power of the features. Next, residual connections are implemented to preserve the original information, and layer normalization is applied to stabilize the training process. After these processing steps, the final output is a first feature vector with dimensions 512*512*32.

[0027] The input to the second VSS block and the first merged layer is the first feature vector with a dimension of 512*512*32, which is the output of the first VSS block. In the second VSS block, a selective scan with a larger receptive field is first applied to capture a wider range of dependencies. Then, a more complex feature interaction is performed using a higher-dimensional cross-gated MLP. Residual connections and layer normalization are also implemented. Afterward, the first merged layer reduces the spatial dimension and increases the number of channels through operations such as pooling or straddle convolution, ultimately outputting a second feature vector with a dimension of 256*256*64.

[0028] The input to the third VSS block and the second merged layer is the second feature vector with a dimension of 256*256*64, which is the output of the second VSS block and the first merged layer. The third VSS block further increases the receptive field of selective scanning, uses a higher-dimensional cross-gated MLP, and continues to apply residual connections and layer normalization. The second merged layer again reduces the spatial dimension and increases the number of channels, outputting a third feature vector with a dimension of 128*128*128.

[0029] The inputs to the fourth VSS block and the third merging layer are the third feature vector with dimensions of 128*128*128, which are the outputs of the third VSS block and the second merging layer. The fourth VSS block uses selective scanning with the largest receptive field and the highest-dimensional cross-gated MLP, while maintaining residual connections and layer normalization. The third merging layer performs final dimensionality reduction and increases the number of channels, ultimately outputting a fourth feature vector with dimensions of 64*64*128.

[0030] Preferably, the cross-branch attention module is used to fuse the final feature vector with a dimension of 64*64*128 from the output of the SAM encoder branch and the fourth feature vector with a dimension of 64*64*128 from the output of the VMamba encoder branch. The cross-branch attention module includes a query mapping module, a key mapping module, a value mapping module, a scaled dot product attention module, a weight calculation module, and a feature fusion module.

[0031] The input to the query mapping module is the fourth feature vector with a dimension of 64*64*128 output from the VMamba encoder branch. It transforms this feature vector into a set of high-dimensional vectors through a linear projection, and finally outputs a query vector with a dimension of 64*64*q, where q represents the dimension of the query vector.

[0032] The input to the key mapping module is a 64*64*128 feature vector output from the SAM encoder branch. It performs a linear transformation on the feature vector to map the feature at each spatial location to the key space, and finally outputs a key vector with a dimension of 64*64*q.

[0033] The input to the value mapping module is also the feature vector output from the SAM encoder branch with a dimension of 64*64*128. It maps the feature vector to the value space through another linear transformation, and finally outputs a value vector with a dimension of 64*64*r, where r represents the dimension of the value vector.

[0034] The input to the scaled dot product attention module is the query vector output by the query mapping module, the key vector output by the key mapping module, and the value vector output by the value mapping module. It calculates the dot product between the query vector and the key vector, divides the result by √q to scale it, and then uses the softmax function to process the scaled result, outputting an attention weight matrix with a dimension of 64*64, where √q represents the square root of q.

[0035] The input to the weight calculation module is the attention weight matrix output by the scaled dot product attention module. It normalizes the attention weight matrix to ensure that the sum of the weights is 1, and outputs a normalized attention weight matrix with a dimension of 64*64.

[0036] The input to the feature fusion module is the value vector output by the value mapping module and the normalized attention weight matrix output by the weight calculation module. It applies the attention weights to the value vector, generates fused features through weighted summation, and finally outputs a fused feature map with a dimension of 64*r.

[0037] Preferably, the image decoder section includes a continuous feature decoder and an implicit feature alignment (IFA) module;

[0038] The continuous feature decoder includes an input block, a feature expansion block, and a final convolutional layer. The implicit feature alignment module includes a feature collection submodule, a feature mapping submodule, a feature alignment submodule, and a feature fusion submodule.

[0039] The input to the input block is a feature map with a dimension of 64*64*256 (i.e., the sum of the outputs of the SAM encoder branch and the VMamba encoder branch). This feature map is processed by convolutional layers, batch normalization, and ReLU activation function, and finally outputs a feature map with a dimension of 128*128*256.

[0040] The input to the feature expansion block is a feature map with a dimension of 128*128*256 output from the input block. It uses a combination of convolutional layers and transposed convolutional layers to expand and refine the feature map, and finally outputs a feature map with a dimension of 512*512*256.

[0041] The input to the final convolutional layer is a feature map with a dimension of 512*512*256 output from the feature expansion block. It performs a convolution operation on this feature map and outputs a feature map with a dimension of 512*512*128 that can be aligned.

[0042] The feature collection submodule takes a 64*64*256 feature map as input, a 128*128*256 feature map as output from the input block, a 512*512*256 feature map as output from the feature expansion block, and a 512*512*128 feature map as output from the final convolutional layer. It merges all these feature maps according to their respective channel dimensions and outputs a multi-scale feature map set.

[0043] The input to the feature mapping submodule is the set of multi-scale feature maps output by the feature collection submodule. It uses a multilayer perceptron (MLP) to map the set of multi-scale feature maps to an implicit feature space. The output is an implicit feature representation with a dimension of 512*512*D, where D is the dimension of the implicit feature, which is usually smaller than the number of channels of each multi-scale feature in the set of multi-scale feature maps.

[0044] The input to the feature alignment submodule is the implicit feature representation with a dimension of 512*512*D output from the feature mapping submodule. It achieves feature alignment through an iterative optimization process and outputs aligned implicit features with a dimension of 512*512*D.

[0045] The input to the feature fusion submodule is the aligned implicit features output by the feature alignment submodule. First, the implicit features are projected back into the original feature space through a learnable mapping to obtain features at different scales. Then, a weighted summation or adaptive fusion strategy is used to fuse all features at different scales together to obtain a feature map. Finally, the feature map is gradually enlarged to the target resolution through upsampling or transposed convolution operations, and the final output is a segmentation mask with a dimension of 1024*1024*1.

[0046] Preferably, the kidney dynamic imaging image segmentation model is trained through the following steps:

[0047] (2-1) Obtain the pediatric renal dynamic imaging dataset composed of pediatric renal dynamic imaging images. Preprocess the pediatric renal dynamic imaging dataset to obtain the preprocessed pediatric renal dynamic imaging dataset, and divide the preprocessed pediatric renal dynamic imaging dataset into training set and test set in a 4:1 ratio.

[0048] (2-2) Initialize the kidney dynamic imaging image segmentation model to obtain the initialized kidney dynamic imaging image segmentation model;

[0049] (2-3) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the pediatric renal dynamic imaging image is input into the SAM encoder branch and the VMamba encoder branch respectively to obtain the two feature vectors corresponding to the pediatric renal dynamic imaging image respectively.

[0050] (2-4) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the two feature vectors corresponding to the pediatric renal dynamic imaging image obtained in step (2-3) are input into the cross-branch attention part for fusion to obtain the fused feature map corresponding to the pediatric renal dynamic imaging image.

[0051] (2-5) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the fusion feature map corresponding to the pediatric renal dynamic imaging image obtained in step (2-4) is input into the image decoder part to obtain the segmentation result corresponding to the pediatric renal dynamic imaging image.

[0052] (2-6) Based on the segmentation results corresponding to each pediatric dynamic kidney imaging image obtained in step (2-5), the loss function is used to iteratively train the dynamic kidney imaging image segmentation model until the dynamic kidney imaging image segmentation model converges, thereby obtaining the preliminarily trained dynamic kidney imaging image segmentation model.

[0053] (2-7) Use the test set obtained in step (2-1) to verify the kidney dynamic imaging image segmentation model initially trained in step (2-6) until the classification accuracy reaches the optimal level or the set total number of iterations (epochs) is reached, thereby obtaining the trained kidney dynamic imaging image segmentation model.

[0054] Preferably, step (2-2) initializes the total number of iterations and the learning rate of the kidney dynamic imaging image segmentation model, wherein the total number of iterations ranges from 100 to 300, preferably 200, and the learning rate ranges from 0 to 1, preferably 0.001.

[0055] Step (2-6) uses the Dice Loss function as the loss function.

[0056] According to another aspect of the present invention, a system for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching is provided, comprising:

[0057] The first module is used to acquire dynamic kidney imaging images obtained by single-photon emission computed tomography (SPECT) and to preprocess these dynamic kidney imaging images to obtain multiple preprocessed images.

[0058] The second module is used to input each preprocessed image obtained from the first module into a pre-trained kidney dynamic imaging image segmentation model to obtain the corresponding kidney region.

[0059] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0060] 1. Improved segmentation accuracy and generalization ability: By employing steps (2-3) and (2-4), this invention effectively fuses global semantic features and fine-grained local details through a cross-branch attention mechanism, enabling the model to maintain high accuracy and reliability in complex medical images. Therefore, it can solve the problem that existing kidney dynamic imaging image segmentation methods based on the classic UNet and its variants struggle to accurately capture important features when facing complex anatomical structures and low-contrast regions, thus avoiding the technical problem of inaccurate kidney dynamic imaging image segmentation results.

[0061] 2. Simplified workflow and reduced manual input: By employing steps (2-2) and (2-5), this invention eliminates the prompt-driven input mechanism through its autonomous prediction model and image decoder, improving operational efficiency and reducing reliance on manual input. Therefore, it solves the problem of existing Transformer-based kidney dynamic imaging image segmentation methods requiring significant manual adjustments and computational resources when processing large-scale kidney dynamic imaging images, thereby improving the simplicity and efficiency of the workflow.

[0062] 3. Enhanced robustness and stability of the model: By employing steps (2-5) and (2-6), this invention ensures multi-level integration of feature maps and high-quality segmentation output through the collaborative work of the continuous feature decoder and the implicit feature alignment module, thereby enhancing the robustness of the model when processing complex medical images. Therefore, it can solve the problems of complex model structure, cumbersome training process, and high computational resource requirements of existing hybrid architecture-based kidney dynamic imaging image segmentation methods when dealing with high-detail and high-resolution images, thus improving the robustness and stability of the model.

[0063] 4. Improved Model Training Efficiency and Effectiveness: By employing steps (2-6) and (2-7), this invention optimizes training strategies and model parameters to ensure superior segmentation performance in diverse medical image environments, accelerating model convergence and improving training efficiency and effectiveness. Therefore, it addresses the issues of insufficient computational resources and inadequate cue-driven input mechanisms and mask decoders when the SAM model is directly applied to kidney dynamic imaging image segmentation, thereby enhancing model training efficiency and effectiveness. Attached Figure Description

[0064] Figure 1 This is an overall flowchart of the method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to the present invention;

[0065] Figure 2 This is a schematic diagram of the structure of the kidney dynamic imaging image segmentation model used in this invention. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0067] The basic idea of ​​this invention is to design a segmentation method based on hybrid attention branches. This method integrates the Segment Anything Model (SAM) with the Visual Mamba (VMamba) model and incorporates a cross-branch attention (CBA) mechanism to segment the kidney region in dynamic kidney imaging images. By eliminating cue-driven input mechanisms and employing an autonomous prediction model, the segmentation workflow is simplified, reducing reliance on manual input and improving operational efficiency. Compared to traditional segmentation methods, this invention significantly improves segmentation accuracy and model generalization ability when handling complex details and low-contrast medical images.

[0068] like Figure 1 As shown, this invention provides a method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching, comprising the following steps:

[0069] (1) Acquire dynamic kidney images acquired by a single photon emission computed tomography (SPECT) scanner and preprocess the dynamic kidney images to obtain multiple preprocessed images.

[0070] Specifically, the renal dynamic imaging images acquired in this step are in the format of Digital Imaging and Communications in Medicine (DICOM).

[0071] The preprocessing steps in this process are as follows: First, the DICOM format kidney dynamic imaging images are converted to Neuroimaging Informatics Technology Initiative (NIfTI) format images; then, all kidney imaging slices are extracted from the NIfTI format images; next, all kidney imaging slices without kidney labels are deleted from all extracted kidney imaging slices, retaining the slices with kidney labels; finally, each retained kidney imaging slice is converted to a PNG format image as the preprocessed image.

[0072] (2) Input each preprocessed image obtained in step (1) into the pre-trained kidney dynamic imaging image segmentation model to obtain the corresponding kidney region;

[0073] Specifically, the kidney dynamic imaging image segmentation model of the present invention includes a SAM encoder branch, a VMamba encoder branch, and a part for connecting the SAM encoder branch, a cross-branch attention (CBA) part, and an image decoder part.

[0074] The SAM encoder branch includes an overlapping patch embedding module, a position embedding module, a window Transformer module, and a detailed feature extraction module.

[0075] The overlapping patch embedding module takes an image of dimension 1024*1024*3 as input. It divides the input image into multiple patches of the same size that overlap each other, and transforms each patch into a high-dimensional vector through a linear projection (i.e., embedding layer). The final output is a set of vectors corresponding to all patches, i.e., the first feature vector of dimension 256*256*768.

[0076] The input to the location embedding module is the first feature vector with a dimension of 256*256*768 output by the overlapping patch embedding module. It performs location embedding processing on the vector corresponding to each patch in the first feature vector (specifically, it embeds information indicating its position in the image into the vector corresponding to the first patch of the first feature vector, embeds information indicating its position into the vector corresponding to the second patch, and so on). The final output is a second feature vector with a dimension of 256*256*768.

[0077] The Window Transformer module (a core component of the ViT branch) includes a layer normalization submodule, a multi-head attention submodule, and a feedforward neural network.

[0078] The input to the layer normalization submodule is the second feature vector with dimensions of 256*256*768 output from the position embedding module. It performs layer normalization on the second feature vector (to accelerate training and improve model stability) and outputs a normalized feature vector with the same dimension as the input second feature vector.

[0079] The input to the multi-head attention submodule is the normalized feature vector output by the layer normalization submodule. It performs multi-head attention processing on this vector (the purpose is to enable the model to capture different contextual information in the input, each attention head independently calculates the attention score, and their outputs are concatenated and linearly transformed), and the output is an attention feature vector with a dimension of 256*256*768.

[0080] The input to the feedforward neural network is the attention feature vector output by the multi-head attention submodule. It processes the attention feature vector using a non-linear activation function (such as ReLU) and performs feature transformation through a fully connected layer, finally outputting a third feature vector with a dimension of 64*64*128.

[0081] The detailed feature extraction module takes as input the third feature vector with dimensions of 64*64*128 output from the window Transformer module. It then performs feature extraction on this third feature vector using a convolutional neural network, pooling using a spatial pyramid (to capture multi-scale information), retaining the original information using residual connections, and applying an attention mechanism (to highlight important features). Finally, it outputs a final feature vector with dimensions of 64*64*128.

[0082] The SAM encoder branch of this invention can effectively extract multi-scale features from images, providing rich feature representations for subsequent segmentation tasks. By combining overlapping patch embedding, positional encoding, Transformer structure, and detailed feature extraction, this encoder can capture local details and global semantic information of images, thereby improving the accuracy and robustness of segmentation tasks.

[0083] In parallel with the SAM encoder branch, the VMamba encoder branch focuses on extracting fine-grained features of the image and includes an input processing module, four visual state space (VSS) blocks, and three block merging layers.

[0084] The input processing module takes the same input as the SAM encoder branch: an image with dimensions of 1024*1024*3. This module first segments the input image into multiple non-overlapping patches of the same size (e.g., 16x16 pixels). Then, each patch is flattened into a one-dimensional vector, and all patch vectors are concatenated sequentially to form a long sequence. Finally, a linear embedding layer is used to adjust the feature dimensions of this sequence, and the final output is the adjusted feature sequence.

[0085] The first VSS block takes as input the adjusted feature sequence output from the input processing module. This block first applies a selective scanning mechanism to capture local dependencies by performing local scans within the sequence. Then, a cross-gated multilayer perceptron (MLP) is used for feature interaction to enhance the expressive power of the features. Next, residual connections are implemented to preserve the original information, and layer normalization is applied to stabilize the training process. After these processing steps, the final output is a first feature vector with dimensions 512*512*32.

[0086] The input to the second VSS block and the first merged layer is the first feature vector with a dimension of 512*512*32, which is the output of the first VSS block. In the second VSS block, a selective scan with a larger receptive field is first applied to capture a wider range of dependencies. Then, a more complex feature interaction is performed using a higher-dimensional cross-gated MLP. Residual connections and layer normalization are also implemented. Afterward, the first merged layer reduces the spatial dimension and increases the number of channels through operations such as pooling or straddle convolution, ultimately outputting a second feature vector with a dimension of 256*256*64.

[0087] The input to the third VSS block and the second merged layer is the second feature vector with a dimension of 256*256*64, which is the output of the second VSS block and the first merged layer. The third VSS block further increases the receptive field of selective scanning, uses a higher-dimensional cross-gated MLP, and continues to apply residual connections and layer normalization. The second merged layer again reduces the spatial dimension and increases the number of channels, outputting a third feature vector with a dimension of 128*128*128.

[0088] The inputs to the fourth VSS block and the third merging layer are the third feature vector with dimensions of 128*128*128, which are the outputs of the third VSS block and the second merging layer. The fourth VSS block uses selective scanning with the largest receptive field and the highest-dimensional cross-gated MLP, while maintaining residual connections and layer normalization. The third merging layer performs final dimensionality reduction and increases the number of channels, ultimately outputting a fourth feature vector with dimensions of 64*64*128.

[0089] Through this hierarchical processing, the VMamba encoder branch can effectively extract fine-grained features from images, progressively increasing the complexity and abstraction of features while maintaining sensitivity to local details. This design enables the model to capture image features at different scales, providing rich local detail information for subsequent segmentation tasks.

[0090] The cross-branch attention module of this invention is used to fuse the final feature vector with a dimension of 64*64*128 from the output of the SAM encoder branch and the fourth feature vector with a dimension of 64*64*128 from the output of the VMamba encoder branch. The cross-branch attention module includes a query mapping module, a key mapping module, a value mapping module, a scaled dot product attention module, a weight calculation module, and a feature fusion module.

[0091] The input to the query mapping module is the fourth feature vector with a dimension of 64*64*128, which is output by the VMamba encoder branch. It transforms this feature vector into a set of high-dimensional vectors through a linear projection, and finally outputs a query vector with a dimension of 64*64*q, where q represents the dimension of the query vector. It usually takes a value between 32 and 256, and the specific value is selected according to the model complexity and computing resources.

[0092] The input to the key mapping module is a 64*64*128 feature vector output from the SAM encoder branch. It performs a linear transformation on the feature vector to map the feature at each spatial location to the key space, and finally outputs a key vector with a dimension of 64*64*q.

[0093] The input to the value mapping module is also the feature vector output from the SAM encoder branch with a dimension of 64*64*128. It maps the feature vector to the value space through another linear transformation, and finally outputs a value vector with a dimension of 64*64*r, where r represents the dimension of the value vector, which is usually equal to or slightly different from q, and the value range is between 32 and 256.

[0094] The input to the scaled dot product attention module is the query vector output by the query mapping module, the key vector output by the key mapping module, and the value vector output by the value mapping module. It calculates the dot product between the query vector and the key vector, and divides the result by √q to scale it (where √q represents the square root of q). Then, it uses the softmax function to process the scaled result and outputs an attention weight matrix with a dimension of 64*64.

[0095] The input to the weight calculation module is the attention weight matrix output by the scaled dot product attention module. It normalizes the attention weight matrix to ensure that the sum of the weights is 1, and outputs a normalized attention weight matrix with a dimension of 64*64.

[0096] The input to the feature fusion module is the value vector output by the value mapping module and the normalized attention weight matrix output by the weight calculation module. It applies the attention weights to the value vector, generates fused features through weighted summation, and finally outputs a fused feature map with a dimension of 64*r.

[0097] The cross-branch attention mechanism of this invention can effectively fuse features from the SAM encoder and the VMamba encoder. By dynamically calculating attention weights and feature fusion, this mechanism can capture global semantic information and local details, thereby improving the accuracy and robustness of segmentation tasks.

[0098] The image decoder part includes a continuous feature decoder and an implicit feature alignment (IFA) module, which is used to convert the 64*r fused feature map output by the cross-branch attention part into a high-resolution segmentation result.

[0099] The continuous feature decoder includes an input block, a feature expansion block, and a final convolutional layer. The implicit feature alignment module includes a feature collection submodule, a feature mapping submodule, a feature alignment submodule, and a feature fusion submodule.

[0100] The input to the input block is a feature map with dimensions of 64*64*256 (which is the sum of the outputs of the SAM encoder branch and the VMamba encoder branch). This feature map is processed by convolutional layers, batch normalization, and ReLU activation function, and finally outputs a feature map with dimensions of 128*128*256.

[0101] The input to the feature expansion block is a feature map with a dimension of 128*128*256 output from the input block. It uses a combination of convolutional layers and transposed convolutional layers to expand and refine the feature map, and finally outputs a feature map with a dimension of 512*512*256.

[0102] The input to the final convolutional layer is a feature map with a dimension of 512*512*256 output from the feature expansion block. It performs a convolution operation on this feature map and outputs a feature map with a dimension of 512*512*128 that can be aligned.

[0103] The feature collection submodule takes a 64*64*256 feature map as input, a 128*128*256 feature map as output from the input block, a 512*512*256 feature map as output from the feature expansion block, and a 512*512*128 feature map as output from the final convolutional layer. It merges all these feature maps according to their respective channel dimensions and outputs a multi-scale feature map set.

[0104] The input to the feature mapping submodule is the set of multi-scale feature maps output by the feature collection submodule. It uses a multilayer perceptron (MLP) to map the set of multi-scale feature maps to an implicit feature space. The output is an implicit feature representation with a dimension of 512*512*D, where D is the dimension of the implicit feature, which is usually smaller than the number of channels of each multi-scale feature in the set of multi-scale feature maps (e.g., D=64).

[0105] The input to the feature alignment submodule is the implicit feature representation with a dimension of 512*512*D output from the feature mapping submodule. It achieves feature alignment through an iterative optimization process and outputs aligned implicit features with a dimension of 512*512*D.

[0106] Specifically, the feature alignment submodule uses learnable positional encoding and attention mechanisms to adaptively align features at different scales in the implicit feature space. This process allows the model to capture long-range dependencies between features at different scales.

[0107] The input to the feature fusion submodule is the aligned implicit features output by the feature alignment submodule. First, the implicit features are projected back into the original feature space through a learnable mapping to obtain features at different scales. Then, a weighted summation or adaptive fusion strategy is used to fuse all features at different scales together to obtain a feature map. Finally, the feature map is gradually enlarged to the target resolution (1024*1024) through upsampling or transposed convolution operations, and the final output is a segmentation mask with a dimension of 1024*1024*1.

[0108] The IFA module of this invention overcomes the scale inconsistency problem in traditional feature fusion methods by performing feature alignment and fusion in the implicit feature space. It adaptively learns the relationships between features at different scales, achieving more accurate feature alignment and fusion. This method not only maintains the continuity and consistency of features but also effectively integrates multi-scale information, thereby capturing global semantic information while preserving high-resolution details.

[0109] By combining a continuous feature decoder and an innovative IFA module, this invention effectively transforms multi-level features extracted by the encoder into high-resolution segmentation results. This design significantly improves the accuracy and detail preservation of segmentation tasks, particularly excelling in handling complex scenes and fine structures.

[0110] Specifically, the kidney dynamic imaging image segmentation model of the present invention is obtained through the following steps:

[0111] (2-1) Obtain the pediatric renal dynamic imaging dataset composed of pediatric renal dynamic imaging images. Preprocess the pediatric renal dynamic imaging dataset to obtain the preprocessed pediatric renal dynamic imaging dataset, and divide the preprocessed pediatric renal dynamic imaging dataset into training set and test set in a 4:1 ratio.

[0112] Specifically, this step first converts the pediatric renal dynamic imaging dataset into an NIfTI format dataset (the purpose of which is to facilitate storage and transmission; the NIfTI format contains head information and image data, such as voxel size and orientation, which makes data access and analysis more convenient). Then, the NIfTI format dataset is divided into training and test sets in an 8:2 ratio (the specific method is to randomly shuffle all preprocessed images, divide them evenly into 5 parts, take any 1 part as the test set, and take the remaining 4 parts as the training set. This data partitioning method ensures the representativeness of the training and test sets, thereby improving the model's generalization ability and robustness).

[0113] (2-2) Initialize the kidney dynamic imaging image segmentation model to obtain the initialized kidney dynamic imaging image segmentation model;

[0114] The purpose of this step is to ensure the effective training of the kidney dynamic imaging image segmentation model.

[0115] Specifically, this step initializes the total number of iterations (epochs) and learning rate of the kidney dynamic imaging image segmentation model, wherein the total number of iterations ranges from 50 to 100, preferably 60, and the learning rate ranges from 0 to 1, preferably 0.001.

[0116] (2-3) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the pediatric renal dynamic imaging image is input into the SAM encoder branch and the VMamba encoder branch respectively to obtain the two feature vectors corresponding to the pediatric renal dynamic imaging image respectively.

[0117] The purpose of this step is to extract global semantic information and local detail features of the image through the encoder structure.

[0118] Specifically, this step uses an encoder architecture that combines a SAM encoder and a VMamba encoder.

[0119] The SAM encoder branch uses a visual transformer (ViT) structure to process pediatric renal dynamic imaging images. It employs a multi-head self-attention mechanism and a feedforward neural network to encode the pediatric renal dynamic imaging images, generating high-dimensional feature vectors containing global semantic information.

[0120] VMamba encoder branch: Uses 2D state space model (SS2D) to process pediatric nephrography SPECT images, and uses selective scanning mechanism (S6) and cross-scan module (CSM) to capture fine-grained local features and generate multi-scale high-dimensional feature vectors.

[0121] (2-4) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the two feature vectors corresponding to the pediatric renal dynamic imaging image obtained in step (2-3) are input into the cross-branch attention part for fusion to obtain the fused feature map corresponding to the pediatric renal dynamic imaging image.

[0122] The purpose of this step is to effectively combine global semantic features and local detail features to improve the accuracy of subsequent segmentation. Specifically, this step uses a cross-branch attention mechanism (CBA) for feature fusion:

[0123] The feature maps of the VMamba encoder branch are mapped to the query space, and the feature maps of the SAM encoder branch are mapped to the key and value spaces. The similarity between the query and the key is calculated, and a stable gradient flow is promoted by scaling the dot product. The values ​​are then weighted and summed using the calculated similarity weights to generate a fused feature map. This final fused feature map combines global semantic information with fine-grained details, laying the foundation for subsequent accurate segmentation.

[0124] (2-5) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the fusion feature map corresponding to the pediatric renal dynamic imaging image obtained in step (2-4) is input into the image decoder part to obtain the segmentation result corresponding to the pediatric renal dynamic imaging image.

[0125] The purpose of this step is to restore the spatial resolution of the feature map and generate the final segmentation result. Specifically, this step employs a continuous feature decoder and an implicit feature alignment (IFA) module:

[0126] Continuous Feature Decoder: Based on a CNN architecture, it expands and refines feature maps through multiple stages of convolution and transposed convolution operations. This includes an input block (adjusting feature depth), a feature expansion block (further refining the feature map), and a final convolutional layer (generating a feature map that can be aligned).

[0127] The IFA module achieves feature alignment through the learned decoding function, ensuring that feature maps of different scales are seamlessly combined in the same space, preserving the details and spatial accuracy required for high-quality semantic segmentation.

[0128] (2-6) Based on the segmentation results corresponding to each pediatric dynamic kidney imaging image obtained in step (2-5), the loss function is used to iteratively train the dynamic kidney imaging image segmentation model until the dynamic kidney imaging image segmentation model converges, thereby obtaining the preliminarily trained dynamic kidney imaging image segmentation model.

[0129] The purpose of this step is to improve segmentation accuracy by iteratively training and optimizing model parameters.

[0130] Specifically, this step uses the Dice Loss function as the loss function.

[0131] (2-7) Use the test set obtained in step (2-1) to verify the kidney dynamic imaging image segmentation model initially trained in step (2-6) until the classification accuracy reaches the optimal level or the set total number of iterations is reached, thereby obtaining the trained kidney dynamic imaging image segmentation model.

[0132] The purpose of this step is to evaluate the segmentation accuracy of the model and optimize it.

[0133] Specifically, this step involves validating the pre-trained model using the test set partitioned in step (2-1). The model's performance on the test set is evaluated by calculating metrics such as the Dice coefficient, Hausdorff distance, and mean intersection (MIoU). Based on the test results, the model parameters and training strategy are adjusted, and steps (2-3) to (2-6) are repeated. This continues until the set total number of iterations is reached or the segmentation accuracy on the test set is optimal, thus obtaining the final trained medical image segmentation model.

[0134] In summary, this invention provides a method and system for segmenting the kidney region in dynamic renal imaging images based on hybrid attention branches. Its aim is to address the shortcomings of existing segmentation methods in terms of accuracy and poor generalization ability when handling complex details and low-contrast medical images. Traditional segmentation methods rely on cue-driven input mechanisms, increasing the complexity of manual input and performing poorly when handling complex details. This invention designs a segmentation method based on hybrid attention branches, integrating the Segment Anything model (SAM) with the Visual Mamba (VMamba) model, and combining it with a cross-branch attention (CBA) mechanism to segment the kidney region in dynamic renal imaging images. By eliminating the cue-driven input mechanism and employing an autonomous prediction model, the segmentation workflow is simplified, reducing reliance on manual input and improving operational efficiency. Specific implementation includes data preprocessing, a dual-branch encoder architecture, a cross-branch attention mechanism, a continuous feature decoder and an implicit feature alignment (IFA) module, as well as model training and evaluation. The data preprocessing step converts the dynamic kidney imaging images into standardized PNG format images; the dual-branch encoder architecture processes the images using SAM and VMamba encoders respectively; the cross-branch attention mechanism fuses global semantics and fine-grained features by calculating attention weights; the continuous feature decoder and IFA module ensure multi-level integration of feature maps and high-quality segmentation output; finally, the model parameters are optimized and the model performance is evaluated through the Dice Loss function.

[0135] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching, characterized in that, Includes the following steps: (1) Acquire dynamic images of the kidney from a single-photon emission computed tomography scanner and preprocess the dynamic images of the kidney to obtain multiple preprocessed images; (2) Input each preprocessed image obtained in step (1) into the pre-trained kidney dynamic imaging image segmentation model to obtain the corresponding kidney region; the kidney dynamic imaging image segmentation model includes a SAM encoder branch, a VMamba encoder branch, a cross-branch attention CBA part for connecting the SAM encoder branch, and an image decoder part. The cross-branch attention component is used to fuse the final feature vector with a dimension of 64*64*128 from the output of the SAM encoder branch and the fourth feature vector with a dimension of 64*64*128 from the output of the VMamba encoder branch.

2. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 1, characterized in that, The renal dynamic imaging image obtained in step (1) is in the medical digital imaging and communication DICOM format; The preprocessing process in step (1) is as follows: First, the DICOM format kidney dynamic imaging image is converted into a NIfTI format image; then, all kidney imaging slices are extracted from the NIfTI format image; subsequently, all kidney imaging slices without kidney labels are deleted from all extracted kidney imaging slices, and slices with kidney labels are retained; finally, each retained kidney imaging slice is converted into a PNG format image as the preprocessed image.

3. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 1 or 2, characterized in that, The SAM encoder branch includes an overlapping patch embedding module, a location embedding module, a window Transformer module, and a detailed feature extraction module; The input to the overlapping patch embedding module is an image with dimensions of 1024*1024*3. It divides the input image into multiple patches of the same size that overlap each other, and transforms each patch into a high-dimensional vector through a linear projection. The final output is a set of vectors corresponding to all patches, namely the first feature vector with dimensions of 256*256*768. The input to the position embedding module is the first feature vector with a dimension of 256*256*768 output by the overlapping patch embedding module. It performs position embedding processing on the vector corresponding to each patch in the first feature vector, and finally outputs a second feature vector with a dimension of 256*256*768. The Window Transformer module includes a layer normalization submodule, a multi-head attention submodule, and a feedforward neural network; The input to the layer normalization submodule is the second feature vector with a dimension of 256*256*768 output by the position embedding module. It performs layer normalization processing on the second feature vector and outputs a normalized feature vector with the same dimension as the input second feature vector. The input to the multi-head attention submodule is the normalized feature vector output by the layer normalization submodule. It performs multi-head attention processing on the normalized feature vector and outputs an attention feature vector with dimensions of 256*256*768. The input to the feedforward neural network is the attention feature vector output by the multi-head attention submodule. It processes the attention feature vector using a non-linear activation function and performs feature transformation through a fully connected layer, finally outputting a third feature vector with a dimension of 64*64*128. The detailed feature extraction module takes as input the third feature vector with dimensions of 64*64*128 output from the window Transformer module. It then performs feature extraction on this third feature vector using a convolutional neural network, pooling using a spatial pyramid, preserving the original information using residual connections, and applying an attention mechanism. Finally, it outputs a final feature vector with dimensions of 64*64*128.

4. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 3, characterized in that, The VMamba encoder branch runs in parallel with the SAM encoder branch and includes an input processing module, four visual state space (VSS) blocks, and three block merging layers. The input processing module takes the same input as the SAM encoder branch, which is an image with dimensions of 1024*1024*3. This module first divides the input image into multiple non-overlapping patches of the same size. Then, each patch is flattened into a one-dimensional vector, and all patch vectors are concatenated in sequence to form a long sequence. Finally, the feature dimension of this sequence is adjusted through a linear embedding layer, and the final output is the adjusted feature sequence. The input to the first VSS block is the adjusted feature sequence output by the input processing module. The first VSS block first applies a selective scanning mechanism to capture local dependencies by performing local scanning in the sequence. Then, a cross-gated multilayer perceptron (MLP) is used for feature interaction to enhance the expressive power of the features. Next, residual connections are implemented to preserve the original information, and layer normalization is applied to stabilize the training process. After these processing steps, the final output is a first feature vector with dimensions of 512*512*32; The input to the second VSS block and the first merged layer is the first feature vector with a dimension of 512*512*32 output from the first VSS block. In the second VSS block, a selective scan with a larger receptive field is first applied to capture a wider range of dependencies. Then, a more complex feature interaction is performed using a cross-gated MLP with a higher dimension. Residual connections and layer normalization are also implemented. After that, the first merged layer reduces the spatial dimension and increases the number of channels through pooling or straddle convolution operations, and finally outputs a second feature vector with a dimension of 256*256*64. The input to the third VSS block and the second merged layer is the second feature vector with a dimension of 256*256*64, which is the output of the second VSS block and the first merged layer. The third VSS block further increases the receiving field of selective scanning, uses a higher-dimensional cross-gated MLP, and continues to apply residual connections and layer normalization. The second merged layer reduces the spatial dimension and increases the number of channels again, outputting a third feature vector with a dimension of 128*128*128. The inputs to the fourth VSS block and the third merging layer are the third feature vector with a dimension of 128*128*128, which are the outputs of the third VSS block and the second merging layer. The fourth VSS block uses selective scanning with the largest receptive field and the highest dimension cross-gated MLP, while maintaining residual connections and layer normalization. The third merging layer performs the final dimensionality reduction and increases the number of channels, and finally outputs the fourth feature vector with a dimension of 64*64*128.

5. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 4, characterized in that, The cross-branch attention module includes a query mapping module, a key mapping module, a value mapping module, a scaled dot product attention module, a weight calculation module, and a feature fusion module. The input to the query mapping module is the fourth feature vector with a dimension of 64*64*128 output from the VMamba encoder branch. It transforms the fourth feature vector into a set of high-dimensional vectors through a linear projection, and finally outputs a query vector with a dimension of 64*64*q, where q represents the dimension of the query vector. The input to the key mapping module is a 64*64*128 feature vector output from the SAM encoder branch. It performs a linear transformation on the feature vector to map the feature at each spatial location to the key space, and finally outputs a key vector with a dimension of 64*64*q. The input to the value mapping module is also the feature vector output from the SAM encoder branch with a dimension of 64*64*128. It maps the feature vector to the value space through another linear transformation, and finally outputs a value vector with a dimension of 64*64*r, where r represents the dimension of the value vector. The input to the scaled dot product attention module is the query vector output by the query mapping module, the key vector output by the key mapping module, and the value vector output by the value mapping module. It calculates the dot product between the query vector and the key vector, divides the result by √q to scale it, and then uses the softmax function to process the scaled result, outputting an attention weight matrix with a dimension of 64*64, where √q represents the square root of q. The input to the weight calculation module is the attention weight matrix output by the scaled dot product attention module. It normalizes the attention weight matrix to ensure that the sum of the weights is 1, and outputs a normalized attention weight matrix with a dimension of 64*64. The input to the feature fusion module is the value vector output by the value mapping module and the normalized attention weight matrix output by the weight calculation module. It applies the attention weights to the value vector, generates fused features through weighted summation, and finally outputs a fused feature map with a dimension of 64*r.

6. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 5, characterized in that, The image decoder section includes a continuous feature decoder and an implicit feature alignment (IFA) module; The continuous feature decoder includes an input block, a feature expansion block, and a final convolutional layer. The implicit feature alignment module includes a feature collection submodule, a feature mapping submodule, a feature alignment submodule, and a feature fusion submodule. The input to the input block is a feature map with a dimension of 64*64*256, which is the sum of the outputs of the SAM encoder branch and the VMamba encoder branch. The feature map is processed by convolutional layers, batch normalization and ReLU activation function in sequence, and finally outputs a feature map with a dimension of 128*128*256. The input to the feature expansion block is a feature map with a dimension of 128*128*256 output from the input block. It uses a combination of convolutional layers and transposed convolutional layers to expand and refine the feature map, and finally outputs a feature map with a dimension of 512*512*256. The input to the final convolutional layer is a feature map with a dimension of 512*512*256 output from the feature expansion block. It performs a convolution operation on this feature map and outputs a feature map with a dimension of 512*512*128 for alignment. The feature collection submodule takes a 64*64*256 feature map as input, a 128*128*256 feature map as output from the input block, a 512*512*256 feature map as output from the feature expansion block, and a 512*512*128 feature map as output from the final convolutional layer. It merges all these feature maps according to their respective channel dimensions and outputs a multi-scale feature map set. The input to the feature mapping submodule is the set of multi-scale feature maps output by the feature collection submodule. It uses a multilayer perceptron (MLP) to map the set of multi-scale feature maps to an implicit feature space. The output is an implicit feature representation with a dimension of 512*512*D, where D is the dimension of the implicit feature, which is less than the number of channels of each multi-scale feature in the set of multi-scale feature maps. The input to the feature alignment submodule is the implicit feature representation with a dimension of 512*512*D output from the feature mapping submodule. It achieves feature alignment through an iterative optimization process and outputs aligned implicit features with a dimension of 512*512*D. The input to the feature fusion submodule is the aligned implicit features output by the feature alignment submodule. First, the implicit features are projected back into the original feature space through a learnable mapping to obtain features at different scales. Then, a weighted summation or adaptive fusion strategy is used to fuse all features at different scales together to obtain a feature map. Finally, the feature map is gradually enlarged to the target resolution through upsampling or transposed convolution operations, and the final output is a segmentation mask with a dimension of 1024*1024*1.

7. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 6, characterized in that, The kidney dynamic imaging image segmentation model was trained through the following steps: (2-1) Obtain the pediatric renal dynamic imaging dataset composed of pediatric renal dynamic imaging images; preprocess the pediatric renal dynamic imaging dataset to obtain the preprocessed pediatric renal dynamic imaging dataset, and divide the preprocessed pediatric renal dynamic imaging dataset into training set and test set in a ratio of 4:

1. (2-2) Initialize the kidney dynamic imaging image segmentation model to obtain the initialized kidney dynamic imaging image segmentation model; (2-3) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the pediatric renal dynamic imaging image is input into the SAM encoder branch and the VMamba encoder branch respectively to obtain the two feature vectors corresponding to the pediatric renal dynamic imaging image respectively. (2-4) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the two feature vectors corresponding to the pediatric renal dynamic imaging image obtained in step (2-3) are input into the cross-branch attention part for fusion to obtain the fused feature map corresponding to the pediatric renal dynamic imaging image. (2-5) For each pediatric renal dynamic imaging image in the training set obtained in step (2-1), the fusion feature map corresponding to the pediatric renal dynamic imaging image obtained in step (2-4) is input into the image decoder part to obtain the segmentation result corresponding to the pediatric renal dynamic imaging image. (2-6) Based on the segmentation results corresponding to each pediatric dynamic kidney imaging image obtained in step (2-5), the loss function is used to iteratively train the dynamic kidney imaging image segmentation model until the dynamic kidney imaging image segmentation model converges, thereby obtaining the preliminarily trained dynamic kidney imaging image segmentation model. (2-7) Use the test set obtained in step (2-1) to verify the kidney dynamic imaging image segmentation model initially trained in step (2-6) until the classification accuracy reaches the optimal level or the set total number of iterations is reached, thereby obtaining the trained kidney dynamic imaging image segmentation model.

8. The method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching according to claim 7, characterized in that, Step (2-2) initializes the total number of iterations and the learning rate of the kidney dynamic imaging image segmentation model, where the total number of iterations ranges from 100 to 300, and the learning rate ranges from 0 to 1. Step (2-6) uses the Dice Loss function as the loss function.

9. A system for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching, implemented based on the method for segmenting the kidney region in a dynamic kidney imaging image based on hybrid attention branching as described in claim 1, characterized in that... The system includes: The first module is used to acquire dynamic kidney imaging images obtained by a single-photon emission computed tomography scanner and to preprocess the dynamic kidney imaging images to obtain multiple preprocessed images. The second module is used to input each preprocessed image obtained from the first module into a pre-trained kidney dynamic imaging image segmentation model to obtain the corresponding kidney region.

Citation Information

Patent Citations

  • Liver tumor segmentation method based on mixed attention and multi-scale supervision

    CN117764948A

  • SAM-based cross-modal domain generalization medical image segmentation method

    CN117808834A