Nonlinear medical image segmentation method based on SMTK-UNet model
By introducing SwinMamba block and TKAN module in the U-Net model, the performance of SMTK-UNet model in medical image segmentation is improved, and the shortcomings of the existing U-Net model in global context information capture and deep nonlinear feature extraction are solved, thereby achieving higher segmentation accuracy and model robustness.
Patent Information
- Application Number
- CN202411820560.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
AI Technical Summary
When processing medical images with high resolution and complex structures, existing U-Net models are difficult to fully capture global context information and long-distance dependencies, resulting in low segmentation accuracy and limited ability to extract deep nonlinear features, which affects the generalization ability and robustness of the model.
A new U-Net variant, SMTK-UNet, is proposed to enhance the global perception and local feature capture capabilities of the model by introducing SwinMamba blocks into the encoder and decoder. At the same time, the design bottleneck layer uses the TKAN module to extract deep nonlinear features through learnable activation functions and spline interpolation.
It significantly improves the accuracy and robustness of medical image segmentation, improves the generalization ability and robustness of the model, enhances the interpretability and transparency of the model, and can more intuitively observe and understand the feature representation of the model at different levels.
Smart Images

Figure CN119762775A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data processing, and more specifically, relates to a nonlinear medical image segmentation method based on an SMTK-UNet model. Background Art
[0002] In the field of medical image analysis, the application of deep learning technology has achieved remarkable results, especially in image segmentation tasks. Image segmentation is the core task of medical image processing. Its main purpose is to automatically distinguish different tissues, organs or lesion areas in the image for accurate quantitative analysis and clinical diagnosis. In medicine, first, image segmentation can assist doctors in making more accurate diagnoses. By accurately segmenting specific tissues or lesion areas, doctors can assess the severity and progression of the disease. Secondly, image segmentation plays a key role in surgical planning, generating detailed anatomical structure maps to help surgeons better plan surgical paths and steps and reduce surgical risks. In addition, image segmentation is also used for treatment monitoring, by regularly segmenting lesion areas and evaluating treatment effects, such as adjusting radiotherapy doses and locations. In scientific research, image segmentation provides high-quality data to support disease mechanism research and the development of new treatments.
[0003] As a classic convolutional neural network architecture, U-Net performs well in medical image segmentation tasks with its unique encoder-decoder structure and skip connection mechanism. U-Net gradually reduces the spatial size of the feature map and increases the number of channels of the feature map through the encoder part to capture more high-level features; the decoder part gradually restores the spatial size of the feature map through upsampling operations and combines low-level features with high-level features through skip connections to retain more spatial detail information. This design makes U-Net perform well in processing medical images with complex structures, especially for high-resolution image data.
[0004] However, despite the remarkable achievements of U-Net in medical image segmentation, the existing U-Net and its variants still have several key problems and deficiencies when dealing with medical images with high resolution and complex structures. First, the traditional U-Net mainly relies on convolution operations in the feature extraction process. Although it can capture local features, it performs poorly in processing global context information and is difficult to fully capture the long-distance dependencies between different organs and tissues in medical images, resulting in low segmentation accuracy on some details. Second, the bottleneck layer of U-Net usually adopts simple convolution or pooling operations, which have limited ability to extract deep nonlinear features, affecting the generalization ability and robustness of the model. Finally, the existing U-Net model has deficiencies in interpretability, and it is difficult to intuitively display the internal working principle of the model, which affects the interpretability and credibility of the model.
[0005] Chinese patent document CN113538363A discloses a lung medical image segmentation method and device based on improved U-Net, which normalizes and binarizes the original CT image acquired in advance by threshold method; uses bottleneck residual module to optimize the U-Net downsampling part to construct U-Net optimization network; uses Dice loss function for U-Net optimization network; uses NADAM optimization algorithm to train the original U-Net network and U-Net optimization network, and uses average intersection over union (MIoU) index to measure segmentation accuracy. The present invention uses residual block structure to improve the traditional U-Net network structure, effectively improves the convergence speed and accuracy; at the same time, optimizes the use of Dice loss function to judge the difference between the estimate and the reality; however, this method still ignores the importance of nonlinear features when extracting deep features, and secondly, the global perception ability and long-distance dependency need to be improved.
[0006] In order to solve the above problems, the present invention proposes a new U-Net variant SMTK-UNet, and designs a nonlinear medical image segmentation method based on the SMTK-UNet model. Summary of the invention
[0007] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a nonlinear medical image segmentation method based on the SMTK-UNet model, aiming to improve the accuracy and robustness of medical image segmentation by extracting deeper nonlinear features. SUMMARY OF THE INVENTION
[0009] This paper proposes a new U-Net variant SMTK-UNet. Specifically, the SMTK-UNet model not only enhances the ability to capture local features, but also greatly improves the global perception and processing of long-distance dependencies through an improved encoder-decoder structure. In addition, the design of the bottleneck layer further improves the performance of the model when processing high-resolution and low-contrast targets. This design not only improves the overall performance of the model, but also ensures its efficiency and adaptability in medical images.
[0010] The detailed technical scheme of the present invention is as follows:
[0011] A nonlinear medical image segmentation method based on an SMTK-UNet model, the method comprising the following steps:
[0012] S1. Obtain a medical image and divide it into a series of non-overlapping image patches. Each image patch is converted into a vector of fixed dimension through a linear embedding layer, and the input medical image is converted into a sequence embedding.
[0013] S2. Input the converted medical image into the SMTK-UNet model, passing through the encoder, bottleneck layer and decoder in sequence;
[0014] S3, input the output of the decoder to an upsampling layer to restore the resolution of the feature map to the input resolution;
[0015] S4. Apply a linear projection layer to the upsampled features and output pixel-level segmentation predictions.
[0016] Preferably, according to the present invention, the SMTK-UNet model uses skip connections on the layers corresponding to the encoder and the decoder to fuse the extracted context features with the multi-scale features of the encoder to compensate for the spatial information loss caused by downsampling.
[0017] Preferably, according to the present invention, the encoder includes six SwinMamba blocks and three downsampling layers. After each image data passes through two SwinMamba blocks, it enters the downsampling layer, which reduces the resolution of the image data to half of the input size and doubles the number of channels.
[0018] Preferably according to the present invention, the decoder includes six SwinMamba blocks and three upsampling layers. After each image data passes through two SwinMamba blocks, it enters the upsampling layer, which increases the resolution of the image data to twice the input size and halves the number of channels.
[0019] Preferably, according to the present invention, the bottleneck layer uses a TKAN module to extract deep nonlinear features. The specific processing flow of the TKAN module is as follows:
[0020] First, the features output by the encoder are reshaped into a 2D patch sequence in PatchEmbed to meet the requirements of KANBlock, and then each image block patch is mapped to the N-dimensional embedding space using linear projection; after the features are output by PatchEmbed, they enter n KANBlocks, which include KANLiner, depthwise separable convolution DwConv, batch normalization BN and ReLU activation functions, and residual connections are used in the KANBlock layer to add the features input to the KANBlock layer as residuals; the processing process of each KANBlock is expressed by the following formula:
[0021] V=BN(x+DwConv(KANLiner(x))) (1)
[0022] In formula (1), V represents the output feature of the KANBlock layer, BN refers to the normalization layer, x represents the input feature tensor, and DWConv refers to the depthwise separable convolution;
[0023] The output of the nth tokenized KANBlock is expressed as follows:
[0024] P n= BN(P n-1 +DwConv(KANBlock(P n-1 ))) (2)
[0025] In formula (2), P n refers to the output feature map of the nth layer, P n ∈R Hn×Wn×Dn , P n-1 refers to the output feature map of the n-1th layer, and KANBlock refers to the KANBlock layer;
[0026] After the features are output from all KANBlock layers, they pass through a depthwise separable convolution Dw Conv, a normalization layer BN, and a ReLU activation function; then a layer normalization LN is applied and the output features are passed to the next TKAN block.
[0027] Preferably, the KANLiner is the core layer of the entire TKAN module. The KANLiner module receives the input feature tensor x. First, the spline parameter S is activated using the basis activation function σ to generate the spline value V. Then, the weight W of each input feature is generated according to the position and spline value of the input feature through the interpolation method. Then, the weight matrix W is used to generate the weight W of each input feature. liner Perform a linear transformation on the input feature X and add the bias vector b to obtain the preliminary feature representation Tliner; finally, multiply the preliminary feature representation by the weight generated by interpolation to obtain the final feature representation and return the processed feature tensor T. The specific formula is as follows:
[0028] T=(xW liner +b)⊙Interpolate(σ(S),x) (3)
[0029] In formula (3), T represents the feature tensor output by KANLiner, x represents the input feature tensor, and W liner Represents the weight matrix, b represents the bias vector, Interpolate represents the interpolation method, σ represents the basis activation function, S represents the spline parameter, and ⊙ represents element-by-element multiplication.
[0030] Preferably, according to the present invention, the SwinMamba block first uses two consecutive Swin Transformer blocks, each Swin Transformer is composed of a layer normalization LN, a multi-head self-attention module, a residual connection and a multi-layer perceptron MLP, wherein the multi-head self-attention module of the first Swin Transformer block applies a window-based multi-head self-attention W-MSA module, and the multi-head self-attention module of the second Swin Transformer block applies a moving window-based multi-head self-attention SW-MSA module; based on this window division mechanism, the two consecutive Swin Transformer blocks are expressed by the following formula:
[0031]
[0032]
[0033]
[0034]
[0035] In formula (4) to formula (7), Represents the output of W-MSA; r l-1 Represents the input of the SwinMamba block; r l represents the output of MLP after W-MSA, that is, the output of the first Swin Transformer block; represents the output of SW-MSA; r l+1 represents the output of MLP after SW-MSA, i.e., the output of the second Swin Transformer block; W-MSA represents a window-based multi-head self-attention module; SW-MSA represents a moving window-based multi-head self-attention module; MLP represents a multi-layer perceptron; LN represents layer normalization;
[0036] Then, the VSS block receives the features from the output of the second Swin Transformer block as input. After the input passes through layer normalization LN, it is divided into two branches: in the first branch, the input passes through a linear layer and then passes through an activation function; in the second branch, the input first passes through a linear layer, then passes through a depth-wise separable convolution Dw Conv and an activation function, and then is sent to the 2D selective scanning SS2D module for further feature extraction; subsequently, the features are normalized using layer normalization LN, and then element-wise multiplication is performed with the output of the first branch to merge the two paths; finally, the features are mixed through a linear layer and combined with a residual connection to form the output of the VSS block.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) This paper proposes a novel nonlinear deep learning model based on U-Net, called the SMTK-UNet model. By introducing SwinMamba blocks in the encoder and decoder, the model can effectively capture global context information and local features, thereby flexibly adjusting the complexity and representation ability of the model.
[0039] (2) The present invention proposes a “bottleneck layer enhancement mechanism”, which enhances the model’s ability to extract deep nonlinear features by introducing a TKAN module in the bottleneck layer, using a learnable activation function and spline interpolation, and combining a multi-layer structure and regularization technology. This design not only improves the performance of the model when processing high-resolution and low-contrast targets, but also enhances the generalization ability and robustness of the model.
[0040] (3) The present invention solves the shortcomings of traditional U-Net in capturing global context information and extracting deep nonlinear features, and also significantly improves the interpretability of the model. This design enables users to more intuitively observe and understand the feature representation of the model at different levels, thereby improving the transparency and credibility of the model. The method of the present invention exhibits excellent performance when processing high-resolution and complex-structure medical images. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of a medical image segmentation method based on the SMTK-UNet model described in the present invention.
[0042] Figure 2 2 is a structural diagram of a TKAN module in an embodiment of the present invention.
[0043] Figure 3 It is a structural diagram of the SwinMamba module in an embodiment of the present invention.
[0044] Figure 4 This is the comparison result of different models in the embodiments of the present invention on the Synapse dataset.
[0045] Figure 5 It is the comparison result of different models on the ACDC dataset in the embodiment of the present invention. DETAILED DESCRIPTION
[0046] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0047] Embodiment 1,
[0048] This embodiment provides a nonlinear medical image segmentation method based on the SMTK-UNet model. Figure 1 , the method comprising:
[0049] S1. Obtain a medical image and divide it into a series of non-overlapping image patches through Image Tiling. Each image patch is converted into a vector of fixed dimension through a Linear Embedding layer, and the input medical image is converted into a sequence embedding.
[0050] S2. Input the converted medical image into the SMTK-UNet model, passing through the encoder, bottleneck layer and decoder in sequence;
[0051] S3, input the output of the decoder to an upsampling layer to restore the resolution of the feature map to the input resolution;
[0052] S4. Apply a linear projection layer to the upsampled features and output pixel-level segmentation predictions.
[0053] The overall architecture of the SMTK-UNet model consists of an encoder, a decoder, a skip connection SkipConnection and a bottleneck layer. The main modules in the encoder and decoder are SwinMamba, and the main module in the bottleneck layer is TKAN. Specifically, in order to adapt to the input requirements of SwinMamba, the input medical image with a dimension of H×W×3 is divided into a series of non-overlapping patches. Each patch can be converted into a vector of fixed dimension through a linear projection layer. Through the above process, the input image will be converted into a sequence embedding. In the encoder, it consists of six SwinMamba blocks. After every two SwinMamba blocks, the data will pass through the downsampling layer Downsampling to reduce the resolution to half of its input size and double the number of channels. The structure of the decoder is similar to that of the encoder but in the opposite direction. It is mainly composed of six SwinMamba blocks and an upsampling layer Upsampling. After every two SwinMamba blocks, the data will pass through the upsampling layer Upsampling. The upsampling layer Upsampling will increase the resolution to twice its input size and halve the number of channels.
[0054] At the same time, Skip Connection is used on the corresponding layers of the encoder and decoder to fuse the extracted contextual features with the multi-scale features of the encoder to compensate for the loss of spatial information caused by downsampling; in order to extract deeper features, a bottleneck layer enhancement mechanism is used after the encoder, and TKAN is used to extract deep nonlinear features; finally, the last upsampling is used to restore the resolution of the feature map to the input resolution H×W, and then a linear projection layer is applied to these upsampled features to output pixel-level segmentation predictions.
[0055] Bottleneck layer enhancement mechanism TKAN: The bottleneck layer receives the output from the last layer of the encoder. At this time, the feature map has been downsampled many times, and the spatial size is greatly reduced, but the number of feature channels is usually large. This means that the bottleneck layer needs to process a highly abstract and condensed feature representation. For existing unet and unet variants, fixed activation functions are usually used, such as ReLU, Leaky ReLU, etc. These activation functions are predefined and cannot be adjusted according to the data, and linear weight matrices are used, which cannot model complex nonlinear relationships more flexibly. Therefore, the present invention uses the learnable activation function of KAN to replace each weight parameter with a univariate function parameterized by splines, and automatically adjusts these functions according to the data, so that complex nonlinear relationships can be modeled more flexibly. The general KAN model consists of S nested layers, and the output mapping can be defined as:
[0056]
[0057] Among them, Φi represents the i-th layer of the entire KAN model, and x represents the input.
[0058] In order to further improve the performance of the model at the bottleneck layer, the TKAN module is designed. The flowchart of the TKAN module is as follows: Figure 2 As shown in the figure, first, the features output by the encoder are reshaped into a 2D patch sequence to meet the requirements of KANBlock, and then each patch is mapped to the N-dimensional embedding space using linear projection. KANBlock consists of multiple submodules, including KANLiner, depthwise separable convolution Dw Conv, batch normalization BN, and ReLU activation function. Among them, KANLiner is the core layer of the entire TKAN module, and the KANLiner module receives the input feature tensor x. First, the spline parameter S is activated using the basis activation function σ to generate the spline value V. Then, the weight W of each input feature is generated according to the position and spline value of the input feature through the interpolation method. Next, the input feature X is linearly transformed using the weight matrix Wliner, and the bias vector b is added to obtain the preliminary feature representation Tliner. Finally, the preliminary feature representation is multiplied by the weight generated by interpolation to obtain the final feature representation, and the processed feature tensor T is returned. Specifically, the forward propagation process of the KANLiner layer and KANBlock can be expressed by the following formulas:
[0059] T=(xW liner +b)⊙Interpolate(σ(S),x)(2)
[0060] Among them, Interpolate is the interpolation method, and ⊙ represents element-by-element multiplication.
[0061] V=BN(x+DwConv(KANLiner(x)))(3)
[0062] Where V is the output feature of each KANBlock layer. After passing through all KANBlock layers, these features pass through a deep convolution layer DwConv and a normalization layer BN and a ReLU activation function. Residual connection is used here, and the original token is added as a residual. Then a layer normalization (LN) is applied, and the output feature is passed to the next block. The output of the nth tokenized KANBlock can be elaborated as:
[0063] P n= BN(P n-1 +DwConv(KANBlock(P n-1 )))(4)
[0064] Among them, P n refers to the output feature map of the nth layer, P n ∈R Hn×Wn×Dn , P n-1 Refers to the output of layer n-1
[0065] Feature map, KANBlock refers to the KANBlock layer.
[0066] Efficient multi-scale hierarchical global context-aware technology based on SwinMamba: Traditional Transformer establishes global semantic connections by processing all pixels, but the computational cost is high in high-resolution medical images. SwinTransformer adopts a windowed attention mechanism to divide the image into small non-overlapping windows, thereby achieving local self-attention and reducing the computational cost. Although Swin Transformer performs well in handling long-range dependencies and local details, in the task of medical image segmentation, Swin Transformer still has room for improvement when dealing with structures of different scales, especially for the detection of small targets or subtle structures. This is because excessive attention to local details may cause the model to ignore important global context information, thereby affecting the final segmentation effect. When facing large-scale datasets, more computing resources are required. In addition, although Swin Transformer can capture local features in the image well, its performance still needs to be improved when dealing with target detection tasks of different scales. Especially when facing small target detection, SwinTransformer may ignore global context information due to excessive attention to local details, resulting in decreased detection accuracy.
[0067] In order to overcome the above problems and further improve the accuracy of medical image segmentation, the present invention proposes the SwinMamba architecture, such as Figure 3 As shown in the figure, VSS blocks are used on the basis of Swin Transformer to obtain context information from different directions; for the entire SwinMamba block, two consecutive Swin Transformer blocks are first used, each Swin Transformer consists of layer normalization LN, multi-head self-attention module, residual connection and MLP, and the multi-head self-attention modules of the two Swin Transformer blocks respectively apply the window-based multi-head self-attention W-MSA module and the moving window-based multi-head self-attention SW-MSA module. Based on this window division mechanism, the continuous Swin Transformer block can be expressed by the following formula:
[0068]
[0069]
[0070]
[0071]
[0072] in, Represents the output of W-MSA; r l-1 Represents the input of the SwinMamba block; r l represents the output of MLP after W-MSA, that is, the output of the first Swin Transformer block; represents the output of SW-MSA; r l+1 represents the output of MLP after SW-MSA, that is, the output of the second Swin Transformer block; W-MSA represents a window-based multi-head self-attention module; SW-MSA represents a moving window-based multi-head self-attention module; MLP represents a multi-layer perceptron; LN represents layer normalization.
[0073] Next, the VSS block receives features from the output of the second Swin Transformer block, and the input is divided into two branches after passing through layer normalization LN. In the first branch, the input passes through a linear layer and then an activation function. In the second branch, the input first passes through a linear layer, then a depth-separable convolution and an activation function, and then is sent to the 2D selective scanning SS2D module for further feature extraction. Subsequently, these features are normalized using layer normalization LN, and then element-wise multiplication is performed with the output of the first branch to merge the two paths. Finally, the features are mixed through a linear layer, and this result is combined with a residual connection to form the output of the VSS block.
[0074] Experimental example
[0075] The experiment uses the Synapse dataset and the ACDC dataset. The Synapse dataset is a dataset for abdominal multi-organ image segmentation, which contains 3779 abdominal clinical CT axial images of 30 cases. Among them, images of 18 cases are used for training and images of 12 cases are used for testing. The dataset covers 8 major abdominal organs: aorta, gallbladder, spleen, left kidney, right kidney, liver, pancreas and stomach. In order to evaluate the performance of the model, the Dice coefficient (DSC) and Hausdorff distance (HD) of these 8 organs were averaged for quantitative comparison.
[0076] The ACDC dataset is a medical image dataset for heart disease diagnosis, focusing on the segmentation of the left ventricle (LV), right ventricle (RV), and myocardium (Myo) in cardiac dynamic magnetic resonance imaging (MRI). The MRI images of each patient are annotated with the regions of the left ventricle, right ventricle, and myocardium. The dataset is randomly divided into 70 training samples, 10 validation samples, and 20 test samples. When evaluating the performance of the model, only the average Dice similarity coefficient (DSC) is used as the evaluation metric.
[0077] In order to improve the generalization and robustness of the model, data augmentation was performed on all training datasets, including operations such as rotation and flipping, to increase the diversity of the data. The input medical image resolution was 224x224, and the patch size was set to 4. The model parameters were initialized using weights pre-trained on ImageNet. During the training process, the SGD optimizer with a learning rate of 0.05, a batch size of 24, a momentum of 0.9, and a weight decay of 1e-4 was used for back-propagation optimization. In order to obtain higher training accuracy, multiple different epochs were trained, and it was finally found that the training accuracy of the model was the highest at the 300th epoch.
[0078] The proposed SMTK-Unet model is compared with the previous state-of-the-art methods on the Synapse multi-organ CT dataset. Figure 4 This is the comparison result of different models on the Synapse dataset. The experimental results show that the performance of the nonlinear medical image segmentation method based on the SMTK-UNet model of the present invention is the best, with segmentation accuracies of 80.17% (DSC↑) and 22.03% (HD↓). Compared with the best-performing SwinUnet, the model of the present invention has improvements in both DSC and HD evaluation indicators. However, for the two organs, the left kidney Kidney (L) and the right kidney Kidney (R), although the accuracy has decreased, it is still higher than the accuracy of other methods, and the overall performance is still in the forefront. Through the comparison of the above different results on the Synapse dataset, it is proved that better segmentation results can be obtained by extracting deep nonlinear features through TKAN to enhance the bottleneck layer and adding VSS in the encoder and decoder to connect the context information.
[0079] Similarly, the SMTK-UNet model proposed in this invention is used for training on the ACDC dataset. Figure 5 The results of different models on the ACDC dataset are compared. In this experiment, MR image data was used for the experiment, and the results showed that SMTK-Unet can still achieve an accuracy of 90.67%. This shows that the method proposed in this invention has a high generalization ability and robustness.
[0080] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A nonlinear medical image segmentation method based on the SMTK-UNet model, characterized in that: The method comprises the following steps: S1. Obtain a medical image and divide it into a series of non-overlapping image patches. Each image patch is converted into a vector of fixed dimension through a linear embedding layer, and the input medical image is converted into a sequence embedding. S2. Input the converted medical image into the SMTK-UNet model, passing through the encoder, bottleneck layer and decoder in sequence; S3, input the output of the decoder to an upsampling layer to restore the resolution of the feature map to the input resolution; S4. Apply a linear projection layer to the upsampled features and output pixel-level segmentation predictions.
2. According to claim 1, a nonlinear medical image segmentation method based on the SMTK-UNet model is characterized in that: The SMTK-UNet model uses skip connections on the layers corresponding to the encoder and decoder to fuse the extracted context features with the multi-scale features of the encoder.
3. The nonlinear medical image segmentation method based on the SMTK-UNet model according to claim 2, characterized in that: The encoder includes six SwinMamba blocks and three downsampling layers. After each image data passes through two SwinMamba blocks, it enters the downsampling layer, which reduces the resolution of the image data to half of the input size and doubles the number of channels.
4. The nonlinear medical image segmentation method based on the SMTK-UNet model according to claim 2, characterized in that: The decoder includes six SwinMamba blocks and three upsampling layers. After each image data passes through two SwinMamba blocks, it enters the upsampling layer, which increases the resolution of the image data to twice the input size and reduces the number of channels by half.
5. The nonlinear medical image segmentation method based on the SMTK-UNet model according to claim 1, characterized in that: The bottleneck layer uses the TKAN module to extract deep nonlinear features. The specific processing flow of the TKAN module is as follows: First, the features output by the encoder are reshaped into a 2D patch sequence in PatchEmbed, and then each image block patch is mapped to an N-dimensional embedding space using linear projection; after being output by PatchEmbed, the features enter n KANBlocks, which include KANLiner, depthwise separable convolution Dw Conv, batch normalization BN and ReLU activation function, and residual connection is used in the KANBlock layer to add the features input to the KANBlock layer as residuals; the processing process of each KANBlock is expressed by the following formula: V=BN(x+DwConv(KANLiner(x))) (1) In formula (1), V represents the output feature of the KANBlock layer, BN refers to the normalization layer, x represents the input feature tensor, and DWConv refers to the depthwise separable convolution; The output of the nth tokenized KANBlock is expressed as follows: P n= BN(P n-1 +DwConv(KANBlock(P n-1 ))) (2) In formula (2), P n refers to the output feature map of the nth layer, P n ∈R Hn×Wn×Dn , P n-1 refers to the output feature map of the n-1th layer, and KANBlock refers to the KANBlock layer; After the features are output from all KANBlock layers, they pass through a depthwise separable convolution Dw Conv, a normalization layer BN, and a ReLU activation function; then a layer normalization LN is applied and the output features are passed to the next TKAN block.
6. The nonlinear medical image segmentation method based on the SMTK-UNet model according to claim 5, characterized in that: The KANLiner is the core layer of the entire TKAN module. The KANLiner module receives the input feature tensor x. First, the spline parameter S is activated using the basis activation function σ to generate the spline value V. Then, the weight W of each input feature is generated according to the position and spline value of the input feature through the interpolation method. Then, the weight matrix W is used to calculate the weight W of each input feature. liner Perform a linear transformation on the input feature X and add the bias vector b to obtain the preliminary feature representation Tliner; finally, multiply the preliminary feature representation by the weight generated by interpolation to obtain the final feature representation and return the processed feature tensor T. The specific formula is as follows: T=(xW liner +b)⊙Interpolate(σ(S),x) (3) In formula (3), T represents the feature tensor output by KANLiner, x represents the input feature tensor, and W liner Represents the weight matrix, b represents the bias vector, Interpolate represents the interpolation method, σ represents the basis activation function, S represents the spline parameter, and ⊙ represents element-by-element multiplication.
7. The nonlinear medical image segmentation method based on the SMTK-UNet model according to claim 3 and claim 4, characterized in that: The SwinMamba block first uses two consecutive Swin Transformer blocks, each Swin Transformer is composed of a layer normalization LN, a multi-head self-attention module, a residual connection and a multi-layer perceptron MLP, wherein the multi-head self-attention module of the first Swin Transformer block applies a window-based multi-head self-attention W-MSA module, and the multi-head self-attention module of the second Swin Transformer block applies a moving window-based multi-head self-attention SW-MSA module; based on this window division mechanism, the two consecutive Swin Transformer blocks are expressed by the following formula: In formula (4) to formula (7), Represents the output of W-MSA; r l-1 Represents the input of the SwinMamba block; r l represents the output of MLP after W-MSA, that is, the output of the first Swin Transformer block; represents the output of SW-MSA; r l+1 represents the output of MLP after SW-MSA, i.e., the output of the second Swin Transformer block; W-MSA represents a window-based multi-head self-attention module; SW-MSA represents a moving window-based multi-head self-attention module; MLP represents a multi-layer perceptron; LN represents layer normalization; Then, the VSS block receives the features output from the second Swin Transformer block as input. After the input passes through layer normalization LN, it is divided into two branches: in the first branch, the input passes through a linear layer and then passes through the activation function; In the second branch, the input first passes through a linear layer, then through a depthwise separable convolution Dw Conv and an activation function, and then is sent to the 2D selective scanning SS2D module for further feature extraction; Subsequently, the features are normalized using layer normalization (LN) and then element-wise multiplied with the output of the first branch to merge the two paths; finally, the features are mixed through a linear layer and combined with a residual connection to form the output of the VSS block.
Citation Information
Patent Citations
Lung medical image segmentation method and device based on improved U-Net
CN113538363A
Cited By
VMAT dose verification method and system based on Swin Transform network
CN119963952A
A VMAT Dose Verification Method and System Based on the Swin Transformer Network
CN119963952B