MRI brain tumor segmentation method
Through the design of the SwinGhostU-Net model, combined with GDG downsampling convolution and Swin Transformer encoding module, the efficient fusion of global and local features is achieved, solving the problem of insufficient accuracy in MRI brain tumor segmentation and improving the segmentation effect.
Patent Information
- Application Number
- CN202510953748.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-11
AI Technical Summary
The existing MRI brain tumor segmentation methods have insufficient segmentation accuracy when identifying complex tumor morphology, especially the problem of insufficient sensitivity of small target edges and low computing efficiency, making it difficult to effectively capture the deep fusion of long-term and short-distance dependence characteristics and the deep fusion of global and local information.
The SwinGhostU-Net model is adopted, combined with the GDG downsampling convolutional coding module and the Swin Transformer coding module, an enhanced spatial attention mechanism and an adaptive channel attention mechanism are designed, and the efficient integration of global multi-scale semantic information and local detail features is achieved through multiple attention mechanisms.
It improves the accuracy of brain tumor area segmentation, can accurately segment heterogeneous tumor locations, expands the receptive field, and extracts local features without increasing the computational complexity, improving the segmentation effect.
Smart Images

Figure CN120451568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to an MRI brain tumor segmentation method. Background Art
[0002] Brain and central nervous system tumors are among the diseases with the highest cancer-related mortality and disability rates worldwide. According to statistics, more than 83,000 new cases of brain tumors are diagnosed worldwide each year, of which approximately 24,000 are malignant tumors. Magnetic Resonance Imaging (MRI) plays a vital role in the diagnosis of brain tumors. Its images, including T2-weighted imaging, T2 Fluid-Attenuated Inversion Recovery (T2FLAIR) and T1-weighted imaging sequences, can help doctors identify and monitor the morphology and size of tumors. However, MRI has limitations in identifying smaller or uniquely located tumors, and image interpretation relies heavily on the experience of radiologists, which may lead to misdiagnosis or missed diagnosis.
[0003] Traditional computer vision methods rely on handcrafted features and struggle to adapt to the high diversity of tumor morphology, texture, and size found in medical images. With the development of deep learning technology, convolutional neural networks (CNNs), thanks to their automatic feature learning mechanism, have been widely used in medical image segmentation tasks. The classic U-Net, with its symmetrical encoder-decoder architecture, preserves the spatial information of images and is widely used for semantic segmentation of medical images. However, CNNs are limited by the locality of convolution operations, lacking sensitivity to the edges of small objects, and are computationally inefficient when processing large volumes of MRI data.
[0004] With the development of technology, the Transformer breaks through spatial distance constraints through its self-attention mechanism, demonstrating powerful global context capture capabilities in MRI tumor segmentation. However, the Transformer architecture suffers from a large number of parameters and insufficient detail preservation, which needs to be addressed urgently. Although existing methods have made significant progress in the field of brain tumor segmentation, challenges remain in segmenting complex tumor morphologies, effectively capturing long- and short-range dependent features, and deeply integrating global and local information.
[0005] Existing segmentation methods that combine CNN and Transformer architectures still have deficiencies in feature fusion. Therefore, these problems limit the application effect of the model, especially in the segmentation task of complex brain tumor morphology.
[0006] Therefore, it is necessary to provide an MRI brain tumor segmentation method to solve the above problems. Summary of the Invention
[0007] The purpose of this application is to provide an MRI brain tumor segmentation method to improve the accuracy of MRI brain tumor segmentation.
[0008] To achieve the above objectives, this application provides the following solutions: The present application provides an MRI brain tumor segmentation method, which includes: Acquiring brain MRI image data; Preprocessing the brain MRI image data to obtain preprocessed brain MRI image data; The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain the predicted result of the brain tumor segmentation region; the predicted result of the brain tumor segmentation region is the MRI image with the brain tumor region marked; the brain tumor region segmentation model is obtained by training the SwinGhostU-Net model using the training set; The SwinGhostU-Net model includes an input layer, an encoder, a FUSA feature fusion module, a decoder, and an output layer connected in sequence, and the decoder is also jump-connected to the encoder; the encoder includes multiple GDG downsampling convolutional encoding modules connected in sequence and a Swin Transformer encoding module; the FUSA feature fusion module includes: an enhanced spatial attention mechanism module, an adaptive channel attention mechanism module, and a weight distribution module; The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain the prediction results of the brain tumor segmentation region, including: The preprocessed brain MRI image data is input into a plurality of sequentially connected GDG downsampling convolutional encoding modules through the input layer to obtain a plurality of local detail feature maps of different spatial scales; each GDG downsampling convolutional encoding module includes a sequentially connected GDG downsampling convolutional module and a maximum pooling layer; each GDG downsampling convolutional module includes: a first ghost convolutional layer, a first dilated convolutional layer, a second dilated convolutional layer and a second ghost convolution; The preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain the global context feature map; The local detail feature map output by the last GDG downsampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain the enhanced spatial attention feature map; the global context feature map is input into the adaptive channel attention mechanism module to obtain the adaptive channel attention feature map. The weight distribution module obtains the multi-scale fusion feature map based on the enhanced spatial attention feature map and the adaptive channel attention feature map; The multi-scale fusion feature map is upsampled by the decoder and fused with the jump connection feature map of the encoder to obtain the brain tumor segmentation result.
[0009] Optionally, the number of GDG downsampling convolutional coding modules is 3; Among them, the input end of the GDG downsampling convolution module in the first GDG downsampling convolution encoding module is connected to the output end of the input layer, and the output end of the maximum pooling layer in the third GDG downsampling convolution encoding module is connected to the decoder.
[0010] Optionally, each GDG downsampling convolution module includes: a first convolution layer and a first global attention mechanism layer; Among them, the first ghost convolution layer, the first void convolution layer, the second void convolution layer, the second ghost convolution layer and the first global attention mechanism layer form the first branch, and the first ghost convolution layer, the first void convolution layer, the second void convolution layer, the second ghost convolution layer and the first global attention mechanism layer are connected in sequence; the input end of the first ghost convolution layer in the first GDG downsampling convolution module is connected to the output end of the input layer, and the output end of the first global attention mechanism layer is connected to the corresponding maximum pooling layer; The first convolutional layer forms the second branch; the input of the first ghost convolutional layer is jump-connected to the input of the first global attention mechanism layer through the first convolutional layer.
[0011] Optionally, the input end of the Swin Transformer encoding module is connected to the output end of the input layer, and the output end of the Swin Transformer encoding module is connected to the input end of the FUSA feature fusion module.
[0012] Optionally, the FUSA feature fusion module further includes: a second convolution layer, a third convolution layer, a first fusion layer, a first processing layer, a second global attention mechanism layer, an MLP layer, and a second processing layer; Among them, the enhanced spatial attention mechanism module forms the third branch; the second convolutional layer, the third convolutional layer, the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer and the second processing layer form the fourth branch; the adaptive channel attention mechanism module forms the fifth branch; The input of the enhanced spatial attention mechanism module is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the output of the enhanced spatial attention mechanism module is connected to the input of the weight distribution module; The input of the second convolutional layer is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the input of the third convolutional layer is connected to the output of the Swin Transformer encoding module. The second and third convolutional layers are connected in parallel and then connected to the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer, and the second processing layer in sequence; The input of the adaptive channel attention mechanism module is connected to the output of the Swin Transformer encoding module, and the output of the adaptive channel attention mechanism module is connected to the input of the weight distribution module.
[0013] Optionally, the weight allocation module includes: a second fusion layer, a third fusion layer and a dynamic attention weight allocation submodule; Among them, the input ends of the second fusion layer and the third fusion layer are connected to the output end of the enhanced spatial attention mechanism module, the output end of the second global attention mechanism layer and the output end of the adaptive channel attention mechanism module. The second fusion layer and the third fusion layer are connected in parallel and then connected to the dynamic attention weight allocation submodule, and the dynamic attention weight allocation submodule is connected to the input end of the MLP layer.
[0014] Optionally, the enhanced spatial attention mechanism module includes: a fourth convolution layer, a fifth convolution layer, a sixth convolution layer, a first splicing layer, a seventh convolution layer, a first sigmoid activation function layer, a fourth fusion layer, a fifth fusion layer, a sixth fusion layer, a third processing layer, and a non-local attention mechanism calculation layer; Among them, the fourth convolutional layer, the fifth convolutional layer and the sixth convolutional layer are connected in parallel and then connected to the first splicing layer, the seventh convolutional layer, the first sigmoid activation function layer, the fourth fusion layer, the fifth fusion layer, the sixth fusion layer and the third processing layer in sequence. The input of the fourth convolutional layer, the input of the fifth convolutional layer, the input of the sixth convolutional layer, the input of the fifth fusion layer, the input of the non-local attention mechanism calculation layer and the input of the seventh fusion layer are all connected to the output of the maximum pooling layer in the third GDG downsampling convolutional coding module, and the output of the non-local attention mechanism calculation layer is connected to the input of the fifth fusion layer.
[0015] Optionally, the adaptive channel attention mechanism module includes: a scaling parameter calculation module, an offset parameter calculation module, a channel grouping and group attention weight calculation module, and a seventh fusion layer; Among them, the scaling parameter calculation module, the offset parameter calculation module, the channel grouping and the group attention weight calculation module are connected in parallel, and the output end of the scaling parameter calculation module, the output end of the offset parameter calculation module, and the output end of the channel grouping and the group attention weight calculation module are all connected to the seventh fusion layer; The scaling parameter calculation module includes: a first global average pooling layer, a first global maximum pooling layer, an eighth fusion layer, a first shared MLP layer, and a second sigmoid activation function layer; the first global average pooling layer and the first global maximum pooling layer are connected to the output end of the Swin Transformer encoding module, and the first global average pooling layer and the first global maximum pooling layer are connected in parallel and then connected to the eighth fusion layer, the first shared MLP layer, and the second sigmoid activation function layer in sequence; The offset parameter calculation module includes: a second global average pooling layer, a second global maximum pooling layer, a ninth fusion layer, a second shared MLP layer, and a Tanh activation function layer; the second global average pooling layer and the second global maximum pooling layer are connected to the output end of the SwinTransformer encoding module, and the second global average pooling layer and the second global maximum pooling layer are connected in parallel and then connected to the ninth fusion layer, the second shared MLP layer, and the Tanh activation function layer in sequence; The channel grouping and group attention weight calculation module includes a channel mixing module, a grouping module, a global average pooling module, a group attention weight calculation module, a second splicing layer and a tenth fusion layer connected in sequence; The channel mixing module includes the eighth convolutional layer, the batch normalization layer, the first RELU layer, and the ninth convolutional layer connected in sequence; the eighth convolutional layer is connected to the output of the Swin Transformer encoding module, and the output of the ninth convolutional layer is connected to the input of the grouping module; The group attention weight calculation module includes multiple parallel group attention weight calculation submodules, each of which includes a first linear layer, a second RELU layer, and a second linear layer connected in sequence; the input end of the first linear layer is connected to the output end of the global average pooling module, and the output end of the second linear layer is connected to the input end of the second splicing layer; The input end of the tenth fusion layer is also connected to the output end of the grouping module.
[0016] Optionally, the Swin Transformer encoding module includes an embedding block, a first Swin Transformer unit, a first merging block, a second Swin Transformer unit, a second merging block, a third Swin Transformer unit, a third merging block, a fourth Swin Transformer unit and a processing module, which are connected in sequence; The embedding block includes a block partitioning layer and a linear embedding layer connected in sequence, and the block partitioning layer is connected to the output end of the input layer; The first Swin Transformer unit, the second Swin Transformer unit, and the fourth Swin Transformer unit each include 2 Swin Transformer modules, and the third Swin Transformer unit includes 18 Swin Transformer modules; The processing module includes the tenth convolutional layer, batch normalization layer and Mish activation function layer connected in sequence.
[0017] Optionally, the training process of the brain tumor region segmentation model specifically includes: Build the SwinGhostU-Net model; Constructing a training set; the training set includes multiple preprocessed sample brain MRI image data and sample MRI images with brain tumor areas marked; The SwinGhostU-Net model is iteratively trained using preprocessed sample brain MRI image data as input and sample MRI images with brain tumor areas marked as output until the total loss function reaches a minimum or the number of iterations reaches a maximum. The iteration is then stopped to obtain a brain tumor region segmentation model. Among them, the expression of the total loss function is: ; ; ; in, is the total loss function; is the dice loss function; is the cross entropy loss function; is a dynamic regulatory factor; is the boundary loss function; is a collection of categories; is the category index; A set of position indices for all pixels or voxels; Indicates the first The pixel position is predicted to be The probability of each tumor type; For the label The corresponding position One-hot encoding value of each category; Represents a positive number is the set of all locations where boundary loss needs to be calculated; is the spatial position of a point in the MRI image space or voxel space; is the distance from a point in the MRI image space or voxel space to the target boundary; Indicates the probability that a point in the MRI image space or voxel space belongs to the target; are the network parameters of the SwinGhostU-Net model.
[0018] According to the specific embodiments provided in this application, this application has the following technical effects: This application discloses an MRI brain tumor segmentation method. Through the design of a GDG downsampling convolution module, the receptive field is expanded without increasing the computational complexity, and the local features of brain MRI images are effectively extracted. A FUSA feature fusion module based on a multiple attention mechanism is designed to achieve efficient fusion of global multi-scale semantic information and local detail features, thereby enabling the trained brain tumor region segmentation model to accurately segment the location of heterogeneous tumors, thereby improving the accuracy of brain tumor region segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A flowchart of an MRI brain tumor segmentation method according to an embodiment of the present application is provided; Figure 2 A schematic diagram of the SwinGhostU-Net model structure provided in one embodiment of the present application; Figure 3 A schematic diagram of the GDG downsampling convolution module structure provided in one embodiment of the present application; Figure 4 A schematic diagram of the FUSA feature fusion module structure provided in one embodiment of the present application; Figure 5 A schematic diagram of the structure of an enhanced spatial attention mechanism module provided in one embodiment of the present application; Figure 6 A schematic diagram of the structure of the adaptive channel attention mechanism module provided in one embodiment of the present application; Figure 7 A schematic diagram of the prediction results of brain tumor segmentation region 1 provided in one embodiment of the present application; Figure 8 A schematic diagram of the prediction results of brain tumor segmentation region 2 provided in one embodiment of the present application; Figure 9 A schematic diagram of the prediction result of the brain tumor segmentation region 3 provided in one embodiment of the present application; Figure 10A schematic diagram of the prediction results of brain tumor segmentation region 4 provided in one embodiment of the present application; Figure 11 A schematic diagram of the prediction results of the brain tumor segmentation region 5 provided in one embodiment of the present application; Figure 12 This is a schematic diagram of the prediction results of the brain tumor segmentation region 6 provided in one embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0023] In an exemplary embodiment, Figure 1 As shown, a method for MRI brain tumor segmentation is provided, comprising the following steps: Step S1: Acquire brain MRI image data.
[0024] Specifically, brain MRI image data includes: T1-weighted imaging, T1-weighted enhanced imaging, T2-weighted imaging, and fluid-attenuated inversion recovery imaging. Brain MRI image data of four modalities are obtained from the Brats2021 dataset.
[0025] Step S2: preprocessing the brain MRI image data to obtain preprocessed brain MRI image data.
[0026] Specifically, the brain MRI image data of the four modalities are integrated into a four-dimensional tensor in the channel dimension (C1×H1×W1×D1, C1=4, C1 represents the number of channels of the four-dimensional tensor, H1 represents the height of the four-dimensional tensor, W1 represents the width of the four-dimensional tensor, and D1 represents the depth of the four-dimensional tensor), and then cropped to 4×60×160×128 to remove the edge areas and retain the core brain structure; then, the values of the non-background areas are z-score normalized to ensure that the values of the background areas are zero; the preprocessed brain MRI image data of the four modalities are merged in the channel and stored in the compressed .h5 format to optimize the data loading efficiency in subsequent training and inference processes.
[0027] In step S3, the preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain a prediction result of the brain tumor segmentation region; the prediction result of the brain tumor segmentation region is an MRI image with the brain tumor region marked; the brain tumor region segmentation model is obtained by training the SwinGhostU-Net model using the training set.
[0028] Among them, such as Figure 2 As shown in the figure, the SwinGhostU-Net model includes a sequentially connected input layer, encoder, FUSA feature fusion module, decoder, and output layer. The decoder also has a skip connection with the encoder. The encoder includes multiple sequentially connected GDG downsampling convolutional encoding modules and a Swin Transformer encoding module. The FUSA feature fusion module includes an enhanced spatial attention mechanism module, an adaptive channel attention mechanism module, and a weight distribution module. The skip connection adopts a residual connection method.
[0029] The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain the prediction results of the brain tumor segmentation region, including: The preprocessed brain MRI image data is input into multiple sequentially connected GDG downsampling convolutional encoding modules through the input layer to obtain multiple local detail feature maps of different spatial scales; each GDG downsampling convolutional encoding module includes a sequentially connected GDG downsampling convolution module and a maximum pooling layer; each GDG downsampling convolution module includes: a first ghost convolution layer, a first dilated convolution layer, a second dilated convolution layer and a second ghost convolution.
[0030] The preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain the global context feature map.
[0031] The local detail feature map output by the last GDG downsampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain the enhanced spatial attention feature map; the global context feature map is input into the adaptive channel attention mechanism module to obtain the adaptive channel attention feature map. The weight distribution module obtains the multi-scale fusion feature map based on the enhanced spatial attention feature map and the adaptive channel attention feature map.
[0032] The multi-scale fusion feature map is upsampled by the decoder and fused with the jump connection feature map of the encoder to obtain the brain tumor segmentation result.
[0033] As an optional implementation, Figure 2 As shown, the number of GDG downsampling convolutional coding modules is 3.
[0034] Among them, the input end of the GDG downsampling convolution module in the first GDG downsampling convolution encoding module is connected to the output end of the input layer, and the output end of the maximum pooling layer in the third GDG downsampling convolution encoding module is connected to the decoder.
[0035] As an optional implementation, Figure 3 As shown in the figure, each GDG downsampling convolution module includes: a first convolution layer and a first global attention mechanism layer.
[0036] The first ghost convolutional layer, the first atrous convolutional layer, the second atrous convolutional layer, the second ghost convolutional layer, and the first global attention mechanism layer form the first branch. These layers are connected sequentially. The input of the first ghost convolutional layer in the first GDG downsampling convolution module is connected to the output of the input layer, and the output of the first global attention mechanism layer is connected to the corresponding max pooling layer. The input feature map passes through the first branch to obtain the first branch feature map. The first and second ghost convolutional layers are used to efficiently generate feature maps and provide rich feature representations. The first and second atrous convolutional layers introduce a dilation rate to expand the receptive field without increasing the number of parameters or computational complexity, capturing a wider range of contextual information and thus improving the model's understanding of global semantics.
[0037] The first convolutional layer forms the second branch; the input of the first ghost convolutional layer is jump-connected to the input of the first global attention mechanism layer through the first convolutional layer. The input feature map passes through the second branch to obtain the second branch feature map.
[0038] Specifically, each ghost convolution layer is used to efficiently extract feature maps and reduce computational complexity; the dilation rate of each dilated convolution layer is 2, which is used to expand the receptive field and capture a wider range of contextual information; The first convolutional layer is The convolution layer is used to extract small-scale features and perform a residual connection with the output of the first branch. After the residual connection between the first branch and the second branch, it passes through the first global attention mechanism layer to model global dependencies in spatial and channel dimensions. The output features of the GDG downsampled convolution module (i.e., local detail feature map) It can be expressed as: .
[0039] in, is the preprocessed brain MRI image; , represents the batch size of preprocessed brain MRI images, represents the number of channels of the preprocessed brain MRI image, represents the height of the preprocessed brain MRI image, represents the width of the preprocessed brain MRI image, represents the depth of the preprocessed brain MRI image; Represents the global attention mechanism operation; express Convolution; represents the ghost convolution operation; Represents the dilated convolution operation; is the residual connection operation.
[0040] As an optional implementation, Figure 2 As shown in Figure 1, the input of the Swin Transformer encoding module is connected to the output of the input layer, and the output of the Swin Transformer encoding module is connected to the input of the FUSA feature fusion module. The preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain a global context feature map.
[0041] As an optional implementation, Figure 4 As shown, the FUSA feature fusion module also includes: a second convolutional layer, a third convolutional layer, a first fusion layer, a first processing layer, a second global attention mechanism layer, a weight distribution module, an MLP layer and a second processing layer.
[0042] Among them, the enhanced spatial attention mechanism module forms the third branch; the second convolutional layer, the third convolutional layer, the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer and the second processing layer form the fourth branch; the adaptive channel attention mechanism module forms the fifth branch.
[0043] The input of the enhanced spatial attention mechanism module is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the output of the enhanced spatial attention mechanism module is connected to the input of the weight distribution module.
[0044] The input of the second convolutional layer is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the input of the third convolutional layer is connected to the output of the Swin Transformer encoding module. The second and third convolutional layers are connected in parallel and then connected to the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer, and the second processing layer in sequence.
[0045] The input of the adaptive channel attention mechanism module is connected to the output of the Swin Transformer encoding module, and the output of the adaptive channel attention mechanism module is connected to the input of the weight distribution module.
[0046] Specifically, the Enhanced Spatial Attention (ESA) layer is used to capture the global spatial information of features; the Adaptive Channel Attention (ACA) layer is used to adaptively and dynamically adjust the weights between feature channels.
[0047] Among them, the local detail feature map output by the third GDG downsampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain the enhanced spatial attention feature map; the global context feature map output by the Swin Transformer encoding module is input into the adaptive channel attention mechanism module to obtain the adaptive channel attention feature map; then, the local detail feature map output by the third GDG downsampling convolutional encoding module passes through the second convolutional layer, the global context feature map passes through the third convolutional layer, and the output feature maps of the second and third convolutional layers are processed by the first fusion layer, the first processing layer, and the second global attention mechanism layer to obtain the original fine-grained interaction feature map; the weight distribution module is based on the enhanced spatial attention feature map, the adaptive channel attention feature map and the original fine-grained interaction feature map, and then passes through the MLP layer and the second processing layer to obtain a multi-scale fusion feature map.
[0048] As an optional implementation, Figure 4 As shown, the weight allocation module includes: a second fusion layer, a third fusion layer and a dynamic attention weight allocation submodule.
[0049] Among them, the input ends of the second fusion layer and the third fusion layer are connected to the output end of the enhanced spatial attention mechanism module, the output end of the second global attention mechanism layer and the output end of the adaptive channel attention mechanism module. The second fusion layer and the third fusion layer are connected in parallel and then connected to the dynamic attention weight allocation submodule, and the dynamic attention weight allocation submodule is connected to the input end of the MLP layer.
[0050] Specifically, the data processing process of the FUSA feature fusion module includes the following steps: 1) Assume that the first feature (i.e., local detail feature map) from the third GDG downsampling convolutional coding module is , the second feature from the Swin Transformer encoding module (i.e., the global context feature map) is , respectively, the first feature and the second feature Input the ESA module and ACA module to obtain enhanced feature representation, namely enhanced spatial attention feature and adaptive channel attention features .
[0051] 2) Then, for the first feature and the second feature To carry out fine-grained original information interaction. Specifically, the first feature After 3×3×3 convolution (i.e. the second convolution layer), the second feature After 3×3×3 convolution (i.e. the third convolution layer), and through the first fusion layer, using The fused features are processed by the first processing layer (including batch normalization BatchNorm3d and Mish activation function layer), and then passed to the second global attention mechanism layer to obtain the original fine-grained interaction feature map. , the formula can be expressed as: .
[0052] in, Represents the convolution operation; represents the Hadamard product fusion operation, represents the batch normalization operation, Represents the Mish activation function operation.
[0053] 3) Enhanced spatial attention features Features, adaptive channel attention features and the original fine-grained interaction feature map The additive fusion features are obtained by performing additive fusion through the second fusion layer. , using the following formula: .
[0054] The multiplication fusion feature is obtained by performing Hadamard product fusion through the third fusion layer , using the following formula: .
[0055] in, Represents element-wise multiplication.
[0056] 4) Then the dynamic attention weight allocation strategy is used to allocate the addition operation and The product operation generates the attention weight vector of the additive fusion feature And the attention weight vector of the multiplicative fusion feature Among them, the dynamic attention weight allocation strategy is based on the following formula: .
[0057] in, represents the activation function used for multi-class classification problems; Represents a 1×1×1 convolutional layer, which is used to map the concatenated features to the "Query" space; Represents a 1×1×1 convolutional layer, which is used to map another set of spliced features to the "Key" space; Indicates that the three features are concatenated in the "channel" dimension; Indicates that the additive fusion features are added on the channel and multiplication fusion features Perform splicing; Indicates that the matrix multiplication of the transpose of Query and Key is performed to obtain the similarity score matrix; It represents the channel dimension (feature length) of the query / key. Scaling is done to avoid excessive values and stabilize training.
[0058] 5) Use the corresponding weight vector to perform weighted summation on the additive fusion feature and the multiplication fusion feature to obtain the weighted fusion feature . Weighted fusion features The expression is as follows: .
[0059] in, Represents the weight of the additive fusion feature obtained by the addition operation (that is, the attention weight vector of the additive fusion feature ); Indicates that Multiplication fusion features obtained after product fusion operation The weight of (i.e., the attention weight vector of the multiplicative fusion feature).
[0060] 6) In order to further enhance the nonlinear representation ability of features, the weighted fusion features The input is sent to a lightweight MLP layer (the MLP layer consists of two 1×1×1 convolutional layers and a ReLU activation function layer), and then the features processed by the MLP layer are batch normalized and Mish activation function is applied to output the final fused features (i.e., multi-scale fused feature map). .
[0061] .
[0062] Among them, the dynamic attention weight allocation submodule uses the dynamic attention weight allocation strategy to dynamically allocate attention weights. The weights of the multiplication fusion features and the addition fusion features obtained after the operation and addition operation are used to measure the influence of the two operations on the features. The specific dynamic attention weight allocation strategy process is referred to Figure 4 .
[0063] As an optional implementation, Figure 5As shown in the figure, the enhanced spatial attention mechanism module includes: the fourth convolution layer, the fifth convolution layer, the sixth convolution layer, the first splicing layer, the seventh convolution layer, the first sigmoid activation function layer, the fourth fusion layer, the fifth fusion layer, the sixth fusion layer, the third processing layer and the non-local attention mechanism calculation layer.
[0064] Among them, the fourth convolutional layer, the fifth convolutional layer and the sixth convolutional layer are connected in parallel and then connected to the first splicing layer, the seventh convolutional layer, the first sigmoid activation function layer, the fourth fusion layer, the fifth fusion layer, the sixth fusion layer and the third processing layer in sequence. The input of the fourth convolutional layer, the input of the fifth convolutional layer, the input of the sixth convolutional layer, the input of the fifth fusion layer, the input of the non-local attention mechanism calculation layer and the input of the seventh fusion layer are all connected to the output of the maximum pooling layer in the third GDG downsampling convolutional coding module, and the output of the non-local attention mechanism calculation layer is connected to the input of the fifth fusion layer.
[0065] Specifically, the data processing process of the enhanced spatial attention mechanism module includes the following steps: 1) Through the fourth convolutional layer, the fifth convolutional layer, and the sixth convolutional layer, respectively, using 、 and The three convolution kernels simultaneously extract spatial feature maps of different scales, and the spliced feature map is obtained by splicing on the channel based on the first splicing layer. , the spatial attention weight map is generated through the seventh convolutional layer and the first sigmoid activation function layer , and then the spatial attention weight map is transformed through the fourth fusion layer With the first feature conduct Multiply the products to highlight important spatial locations and suppress irrelevant areas. The expression is: .
[0066] in, Indicates merging in the channel dimension; 、 、 They represent three types of convolutions: 1×1×1, 3×3×3, and 5×5×5.
[0067] 2) Obtain the non-local attention feature map through the non-local attention mechanism calculation layer , in order to capture long-range dependencies, and then combine them with the first feature Residual connection.
[0068] 3) Finally, With non-local attention feature map Add and then multiply by the learnable parameter and with the first feature Residual connection to obtain enhanced spatial attention feature map , whose expression is: .
[0069] Among them, non-local attention features The calculation formula is:
[0070] in, Represents a 1×1×1 convolutional layer, which is used to map features to the “Query” space, and the output is recorded as ; Represents a 1×1×1 convolutional layer, which is used to map features to the "Key" space, and the output is recorded as ; Represents a 1×1×1 convolutional layer, which is used to map features to the "Value" space, and the output is recorded as ; Represents the attention features obtained after the non-local attention operation; Represents the transpose of a matrix.
[0071] As an optional implementation, Figure 6 As shown, the adaptive channel attention mechanism module includes: a scaling parameter calculation module, an offset parameter calculation module, a channel grouping and group attention weight calculation module, and a seventh fusion layer.
[0072] Among them, the scaling parameter calculation module, the offset parameter calculation module, the channel grouping and the group attention weight calculation module are connected in parallel, and the output end of the scaling parameter calculation module, the output end of the offset parameter calculation module, the channel grouping and the group attention weight calculation module are all connected to the seventh fusion layer.
[0073] The scaling parameter calculation module includes: a first global average pooling layer, a first global maximum pooling layer, an eighth fusion layer, a first shared MLP layer and a second sigmoid activation function layer; the first global average pooling layer and the first global maximum pooling layer are connected to the output end of the Swin Transformer encoding module, and the first global average pooling layer and the first global maximum pooling layer are connected in parallel and then connected to the eighth fusion layer, the first shared MLP layer and the second sigmoid activation function layer in sequence.
[0074] The offset parameter calculation module includes: a second global average pooling layer, a second global maximum pooling layer, a ninth fusion layer, a second shared MLP layer, and a Tanh activation function layer; the second global average pooling layer and the second global maximum pooling layer are connected to the output end of the SwinTransformer encoding module, and the second global average pooling layer and the second global maximum pooling layer are connected in parallel and then connected to the ninth fusion layer, the second shared MLP layer, and the Tanh activation function layer in sequence.
[0075] The channel grouping and group attention weight calculation module includes a channel mixing module, a grouping module, a global average pooling module, a group attention weight calculation module, a second splicing layer and a tenth fusion layer that are connected in sequence.
[0076] The channel mixing module includes an eighth convolutional layer, a BN layer, a first RELU layer, and a ninth convolutional layer connected in sequence; the eighth convolutional layer is connected to the output end of the Swin Transformer encoding module, and the output end of the ninth convolutional layer is connected to the input end of the grouping module.
[0077] The group attention weight calculation module includes multiple parallel group attention weight calculation sub-modules, each of which includes a first linear layer, a second RELU layer, and a second linear layer connected in sequence; the input end of the first linear layer is connected to the output end of the global average pooling module, and the output end of the second linear layer is connected to the input end of the second splicing layer.
[0078] The input end of the tenth fusion layer is also connected to the output end of the grouping module.
[0079] Specifically, 1) the second feature is combined with two sets of global average pooling GAP and global maximum pooling GMP to capture the feature response; after passing through two shared MLP layers, each passes through the Sigmoid activation function layer and the Tanh activation function layer to generate the adaptive scaling parameter γ and offset parameter β:
[0080] .
[0081] in, is the scaling parameter; is the Sigmoid activation function; β is the offset parameter; Tanh activation function; is a shared multi-layer perceptron layer; GAP is a global average pooling layer, and GMP is a global maximum pooling layer.
[0082] 2) After channel mixing of the second feature and grouping, the group features of each group are first subjected to global average pooling GAP, and then the important features within the group are enhanced through the group attention weight calculation mechanism; the output feature map of the adaptive channel attention mechanism module is obtained by fusing the second feature, scaling parameter, offset parameter, mixed feature and group attention weight through the seventh fusion layer, i.e., the adaptive channel attention feature map :
[0083] .
[0084] .
[0085] in, Represents the mixed characteristics after channel mixing; Indicates the Mixed characteristics of the groups; Indicates channel mixing operation (where G is the total number of groups, G=8, that is, divided into 8 groups); Indicates the The weights of the mixed features after the group attention mechanism; Indicates the The mixed features are used to perform group attention calculations.
[0086] As an optional implementation, the Swin Transformer encoding module includes an embedding block, a first Swin Transformer unit, a first merging block, a second Swin Transformer unit, a second merging block, a third Swin Transformer unit, a third merging block, a fourth Swin Transformer unit, and a processing module, which are connected in sequence; The embedding block includes a block partitioning layer and a linear embedding layer connected in sequence, and the block partitioning layer is connected to the output end of the input layer; The first Swin Transformer unit, the second Swin Transformer unit, and the fourth Swin Transformer unit each include 2 Swin Transformer modules, and the third Swin Transformer unit includes 18 Swin Transformer modules; The processing module includes the tenth convolutional layer, batch normalization layer and Mish activation function layer connected in sequence.
[0087] As an optional implementation, the decoder includes three decoding modules and a spatial attention mechanism layer to focus on important spatial regions and segmentation edges during feature upsampling. Each decoding module includes an upsampling layer, a batch normalization layer, and a Mish activation function layer. The output of the max pooling layer in the encoder is also jump-connected to the input of the upsampling layer through the corresponding spatial attention mechanism layer.
[0088] As an optional implementation, in step S3, the training process of the brain tumor region segmentation model specifically includes: Step S31, constructing the SwinGhostU-Net model.
[0089] Step S32: constructing a training set; the training set includes a plurality of pre-processed sample brain MRI image data and sample MRI images with brain tumor areas marked.
[0090] Specifically, the dataset was divided into a training set, a validation set, and a test set according to a preset ratio. The SwinGhostU-Net model was trained using the training and validation sets. The model with the optimal parameters obtained through training was designated as the brain tumor region segmentation model.
[0091] During training, data augmentation strategies were applied to the training set, including random scaling, random flipping in three directions, Gaussian noise, and random contrast adjustment. The following settings were used: random rotations were performed on the axial, coronal, and sagittal planes with a probability of P = 0.5 (rotation angles were [-10°, +10°]); Gaussian noise was randomly added to each channel of the image with a probability of 0.5, with a noise variance in the range of [0, 0.1]; and the contrast of each channel in the image was randomly adjusted within the range of [0.75, 1.25].
[0092] The test time enhancement technology TTA is used in the sliding inference stage to improve the performance and robustness of the model.
[0093] The pre-processed sample brain MRI image data in the test set is input into the trained SwinGhostU-Net model, and the segmented brain tumor area is output. Figure 7-12 Schematic diagram of the prediction results of different brain tumor segmentation regions (region 1-region 6) to test the performance of the trained brain tumor region segmentation model.
[0094] In step S33, the preprocessed sample brain MRI image data is used as input and the sample MRI image with the brain tumor area marked is used as output. The SwinGhostU-Net model is iteratively trained until the total loss function reaches a minimum value or the number of iterations reaches a maximum value. The iteration is stopped to obtain a brain tumor region segmentation model.
[0095] Among them, the expression of the total loss function is: .
[0096] .
[0097] .
[0098] in, is the total loss function; is the dice loss function; is the cross entropy loss function; To dynamically adjust the factor, we start from 0.01 and gradually increase it by 0.01 after each epoch, so that the model can gradually focus on the boundary area and avoid paying attention to the simple area too early in the early stage of training; is the boundary loss function; is the set of categories (excluding background categories); is the category index; A set of position indices for all pixels or voxels; Indicates the first The pixel position is predicted to be The probability of each tumor type; For the label The corresponding position One-hot encoding value of each category; A very small positive number set to prevent division by zero when calculating the loss function ( ); is the spatial region in the MRI image data, representing the set of all locations (pixels) where boundary loss needs to be calculated; is the spatial position of a point in the MRI image space or voxel space; is the distance from a point in the MRI image space or voxel space to the target boundary; Indicates the probability that a point in the MRI image space or voxel space belongs to the target; are the network parameters of the SwinGhostU-Net model, which are learned through training data.
[0099] This application constructs a brain tumor region segmentation model based on the U-shaped CNN architecture. By combining the GDG downsampling convolution module with ghost convolution and dilated convolution, the receptive field is expanded without increasing the computational complexity, and the local features of brain MRI images are effectively extracted; the Swin Transformer is combined to capture long-distance dependencies; a FUSA feature fusion module based on a multiple attention mechanism is designed, and the fusion strategy of ESA, ACA attention mechanism and dynamic attention weighting is used to achieve efficient fusion of global multi-scale semantic information and local detail features; the decoder uses spatial attention residual connections to refine segmentation details; the total loss function combines Dice loss, cross entropy loss and boundary loss, effectively dealing with the problem of category imbalance, enhancing the model's attention to boundary details, and improving the model's sensitivity to imbalanced data; the brain tumor region segmentation model of this application can accurately segment the location of heterogeneous tumors, improve the accuracy of brain tumor region segmentation, and has broad clinical application value.
[0100] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0101] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0102] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.
[0103] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A brain tumor segmentation method for MRI, characterized in that: The MRI brain tumor segmentation method comprises: Acquiring brain MRI image data; Preprocessing the brain MRI image data to obtain preprocessed brain MRI image data; The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain the predicted result of the brain tumor segmentation region; the predicted result of the brain tumor segmentation region is the MRI image with the brain tumor region marked; the brain tumor region segmentation model is obtained by training the SwinGhostU-Net model using the training set; The SwinGhostU-Net model includes an input layer, an encoder, a FUSA feature fusion module, a decoder, and an output layer connected in sequence, and the decoder is also jump-connected to the encoder; the encoder includes multiple GDG downsampling convolutional encoding modules connected in sequence and a Swin Transformer encoding module; the FUSA feature fusion module includes: an enhanced spatial attention mechanism module, an adaptive channel attention mechanism module, and a weight distribution module; The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain the prediction results of the brain tumor segmentation region, including: The preprocessed brain MRI image data is input into a plurality of sequentially connected GDG downsampling convolutional encoding modules through the input layer to obtain a plurality of local detail feature maps of different spatial scales; each GDG downsampling convolutional encoding module includes a sequentially connected GDG downsampling convolutional module and a maximum pooling layer; each GDG downsampling convolutional module includes: a first ghost convolutional layer, a first dilated convolutional layer, a second dilated convolutional layer and a second ghost convolution; The preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain the global context feature map; The local detail feature map output by the last GDG downsampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain the enhanced spatial attention feature map; the global context feature map is input into the adaptive channel attention mechanism module to obtain the adaptive channel attention feature map. The weight distribution module obtains the multi-scale fusion feature map based on the enhanced spatial attention feature map and the adaptive channel attention feature map; The multi-scale fusion feature map is upsampled by the decoder and fused with the jump connection feature map of the encoder to obtain the brain tumor segmentation result.
2. The MRI brain tumor segmentation method according to claim 1, characterized in that: The number of GDG downsampling convolutional coding modules is 3; Among them, the input end of the GDG downsampling convolution module in the first GDG downsampling convolution encoding module is connected to the output end of the input layer, and the output end of the maximum pooling layer in the third GDG downsampling convolution encoding module is connected to the decoder.
3. The MRI brain tumor segmentation method according to claim 2, characterized in that: Each GDG downsampling convolution module includes: the first convolution layer and the first global attention mechanism layer; Among them, the first ghost convolution layer, the first void convolution layer, the second void convolution layer, the second ghost convolution layer and the first global attention mechanism layer form the first branch, and the first ghost convolution layer, the first void convolution layer, the second void convolution layer, the second ghost convolution layer and the first global attention mechanism layer are connected in sequence; the input end of the first ghost convolution layer in the first GDG downsampling convolution module is connected to the output end of the input layer, and the output end of the first global attention mechanism layer is connected to the corresponding maximum pooling layer; The first convolutional layer forms the second branch; the input of the first ghost convolutional layer is jump-connected to the input of the first global attention mechanism layer through the first convolutional layer.
4. The MRI brain tumor segmentation method according to claim 3, characterized in that: The input end of the Swin Transformer encoding module is connected to the output end of the input layer, and the output end of the Swin Transformer encoding module is connected to the input end of the FUSA feature fusion module.
5. The MRI brain tumor segmentation method according to claim 4, characterized in that: The FUSA feature fusion module also includes: a second convolutional layer, a third convolutional layer, a first fusion layer, a first processing layer, a second global attention mechanism layer, an MLP layer, and a second processing layer; Among them, the enhanced spatial attention mechanism module forms the third branch; the second convolutional layer, the third convolutional layer, the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer and the second processing layer form the fourth branch; the adaptive channel attention mechanism module forms the fifth branch; The input of the enhanced spatial attention mechanism module is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the output of the enhanced spatial attention mechanism module is connected to the input of the weight distribution module; The input of the second convolutional layer is connected to the output of the maximum pooling layer in the third GDG downsampling convolutional encoding module, and the input of the third convolutional layer is connected to the output of the Swin Transformer encoding module. The second and third convolutional layers are connected in parallel and then connected to the first fusion layer, the first processing layer, the second global attention mechanism layer, the weight distribution module, the MLP layer, and the second processing layer in sequence; The input of the adaptive channel attention mechanism module is connected to the output of the Swin Transformer encoding module, and the output of the adaptive channel attention mechanism module is connected to the input of the weight distribution module.
6. The MRI brain tumor segmentation method according to claim 5, characterized in that: The weight allocation module includes: the second fusion layer, the third fusion layer and the dynamic attention weight allocation submodule; Among them, the input ends of the second fusion layer and the third fusion layer are connected to the output end of the enhanced spatial attention mechanism module, the output end of the second global attention mechanism layer and the output end of the adaptive channel attention mechanism module. The second fusion layer and the third fusion layer are connected in parallel and then connected to the dynamic attention weight allocation submodule, and the dynamic attention weight allocation submodule is connected to the input end of the MLP layer.
7. The MRI brain tumor segmentation method according to claim 6, characterized in that: The enhanced spatial attention mechanism module includes: the fourth convolution layer, the fifth convolution layer, the sixth convolution layer, the first splicing layer, the seventh convolution layer, the first sigmoid activation function layer, the fourth fusion layer, the fifth fusion layer, the sixth fusion layer, the third processing layer and the non-local attention mechanism calculation layer; Among them, the fourth convolutional layer, the fifth convolutional layer and the sixth convolutional layer are connected in parallel and then connected to the first splicing layer, the seventh convolutional layer, the first sigmoid activation function layer, the fourth fusion layer, the fifth fusion layer, the sixth fusion layer and the third processing layer in sequence. The input of the fourth convolutional layer, the input of the fifth convolutional layer, the input of the sixth convolutional layer, the input of the fifth fusion layer, the input of the non-local attention mechanism calculation layer and the input of the seventh fusion layer are all connected to the output of the maximum pooling layer in the third GDG downsampling convolutional coding module, and the output of the non-local attention mechanism calculation layer is connected to the input of the fifth fusion layer.
8. The MRI brain tumor segmentation method according to claim 7, characterized in that: The adaptive channel attention mechanism module includes: a scaling parameter calculation module, an offset parameter calculation module, a channel grouping and group attention weight calculation module, and a seventh fusion layer; Among them, the scaling parameter calculation module, the offset parameter calculation module, the channel grouping and the group attention weight calculation module are connected in parallel, and the output end of the scaling parameter calculation module, the output end of the offset parameter calculation module, and the output end of the channel grouping and the group attention weight calculation module are all connected to the seventh fusion layer; The scaling parameter calculation module includes: a first global average pooling layer, a first global maximum pooling layer, an eighth fusion layer, a first shared MLP layer, and a second sigmoid activation function layer; the first global average pooling layer and the first global maximum pooling layer are connected to the output end of the Swin Transformer encoding module, and the first global average pooling layer and the first global maximum pooling layer are connected in parallel and then connected to the eighth fusion layer, the first shared MLP layer, and the second sigmoid activation function layer in sequence; The offset parameter calculation module includes: a second global average pooling layer, a second global maximum pooling layer, a ninth fusion layer, a second shared MLP layer, and a Tanh activation function layer; the second global average pooling layer and the second global maximum pooling layer are connected to the output end of the SwinTransformer encoding module, and the second global average pooling layer and the second global maximum pooling layer are connected in parallel and then connected to the ninth fusion layer, the second shared MLP layer, and the Tanh activation function layer in sequence; The channel grouping and group attention weight calculation module includes a channel mixing module, a grouping module, a global average pooling module, a group attention weight calculation module, a second splicing layer and a tenth fusion layer connected in sequence; The channel mixing module includes the eighth convolutional layer, the batch normalization layer, the first RELU layer, and the ninth convolutional layer connected in sequence; the eighth convolutional layer is connected to the output of the Swin Transformer encoding module, and the output of the ninth convolutional layer is connected to the input of the grouping module; The group attention weight calculation module includes multiple parallel group attention weight calculation submodules, each of which includes a first linear layer, a second RELU layer, and a second linear layer connected in sequence; the input end of the first linear layer is connected to the output end of the global average pooling module, and the output end of the second linear layer is connected to the input end of the second splicing layer; The input end of the tenth fusion layer is also connected to the output end of the grouping module.
9. The MRI brain tumor segmentation method according to claim 8, characterized in that: The Swin Transformer encoding module includes an embedding block, a first Swin Transformer unit, a first merging block, a second Swin Transformer unit, a second merging block, a third Swin Transformer unit, a third merging block, a fourth Swin Transformer unit, and a processing module, which are connected in sequence; The embedding block includes a block partitioning layer and a linear embedding layer connected in sequence, and the block partitioning layer is connected to the output end of the input layer; The first Swin Transformer unit, the second Swin Transformer unit, and the fourth Swin Transformer unit each include 2 Swin Transformer modules, and the third Swin Transformer unit includes 18 Swin Transformer modules; The processing module includes the tenth convolutional layer, batch normalization layer and Mish activation function layer connected in sequence.
10. The MRI brain tumor segmentation method according to claim 1, characterized in that: The training process of the brain tumor region segmentation model specifically includes: Build the SwinGhostU-Net model; Constructing a training set; the training set includes multiple preprocessed sample brain MRI image data and sample MRI images with brain tumor areas marked; The SwinGhostU-Net model is iteratively trained using preprocessed sample brain MRI image data as input and sample MRI images with brain tumor areas marked as output until the total loss function reaches a minimum or the number of iterations reaches a maximum. The iteration is then stopped to obtain a brain tumor region segmentation model. Among them, the expression of the total loss function is: ; ; ; in, is the total loss function; is the dice loss function; is the cross entropy loss function; is a dynamic regulatory factor; is the boundary loss function; is a collection of categories; is the category index; A set of position indices for all pixels or voxels; Indicates the first The pixel position is predicted to be The probability of each tumor type; For the label The corresponding position One-hot encoding value of each category; Represents a positive number ; is the set of all locations where boundary loss needs to be calculated; is the spatial position of a point in the MRI image space or voxel space; is a point in the MRI image space or voxel space distance to the target boundary; Represents a point in MRI image space or voxel space Probability of belonging to the target; are the network parameters of the SwinGhostU-Net model.
Citation Information
Patent Citations
Semi-supervised brain tumor MRI image segmentation method, system and device based on TC-Unet and storage medium
CN117670891A
Brain tumor segmentation method based on space attention and edge recognition enhancement
CN119180794A
Brain tumor MRI image segmentation model and method based on improved Swin UNETR network
CN119600043A
Multi-modal MRI (Magnetic Resonance Imaging) brain tumor image segmentation method based on fusion Transform and U-Net
CN120259342A
Three-dimensional medical image segmentation method and system based on short-term and long-term memory self-attention model
US20240257356A1