A method for MRI brain tumor segmentation

Through the design of the SwinGhostU-Net model, combined with the GDG downsampling convolution and Swin Transformer encoding modules, efficient fusion of global and local features is achieved, which solves the problem of insufficient accuracy in complex tumor morphology segmentation in MRI brain tumor segmentation and improves segmentation accuracy.

CN120451568BActive Publication Date: 2025-10-17GUIZHOU UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510953748.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-10-17
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

Existing MRI brain tumor segmentation methods have shortcomings in segmenting complex tumor morphology, effectively capturing long- and short-distance dependent features, and deeply fusing global and local information, resulting in low segmentation accuracy.

Method used

The SwinGhostU-Net model is adopted, combined with the GDG downsampling convolutional encoding module and the Swin Transformer encoding module, and an enhanced spatial attention mechanism and an adaptive channel attention mechanism are designed. The FUSA feature fusion module is used to achieve efficient fusion of global multi-scale semantic information and local detail features.

Benefits of technology

The accuracy of brain tumor region segmentation is improved, the location of heterogeneous tumors can be accurately segmented, the receptive field is expanded, and local features can be effectively extracted without increasing computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451568B_ABST
    Figure CN120451568B_ABST
Patent Text Reader

Abstract

This application discloses an MRI brain tumor segmentation method, which relates to the field of computer vision technology. The method includes: acquiring brain MRI image data; preprocessing the brain MRI image data to obtain preprocessed brain MRI image data; inputting the preprocessed brain MRI image data into a brain tumor region segmentation model to obtain a prediction result of the brain tumor segmentation region; wherein 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 the FUSA feature fusion module includes an enhanced spatial attention mechanism module and an adaptive channel attention mechanism module. This application improves the accuracy of brain tumor region segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, and particularly relates to an MRI brain tumor segmentation method. BACKGROUND

[0002] Magnetic Resonance Imaging (MRI) plays a crucial role in brain tumor diagnosis, and its images including T2-weighted imaging, T2 Fluid-Attenuated Inversion Recovery (T2 FLAIR) and T1-weighted imaging sequences can help doctors identify and monitor the shape and size of tumors. However, MRI has limitations in identifying smaller or special location tumors, and image interpretation is highly dependent on the experience of radiologists, which may lead to misdiagnosis or missed diagnosis.

[0003] Traditional computer vision methods rely on hand-designed features, which are difficult to adapt to the high diversity of tumor shapes, textures and sizes in medical images. With the development of deep learning technology, Convolutional Neural Network (CNN) has been widely used in medical image segmentation tasks due to its automatic feature learning mechanism. The classic U-Net preserves the spatial information of the image through a symmetrical encoding-decoding structure and is widely used in medical image semantic segmentation. However, CNN is limited by the locality of convolution operation, and the sensitivity to small target edges is insufficient, and the computational efficiency is not high when processing large volume MRI data.

[0004] With the development of technology, Transformer breaks through the spatial distance constraint through self-attention mechanism and shows strong global context capturing ability in MRI tumor segmentation, but the problems of large Transformer architecture parameters and insufficient detail preservation need to be solved. Although existing methods have made significant progress in brain tumor segmentation, there are still challenges in segmentation of complex tumor morphology, effective capture of long and short distance dependent features, and deep fusion of global and local information.

[0005] Existing segmentation methods combining CNN and Transformer architecture 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

[0007] The purpose of the present application is to provide an MRI brain tumor segmentation method to improve the accuracy of MRI brain tumor segmentation.

[0008] To achieve the above object, the application provides the following scheme:

[0009] The application provides an MRI brain tumor segmentation method, which comprises the following steps:

[0010] Obtain brain MRI image data;

[0011] Preprocess the brain MRI image data to obtain preprocessed brain MRI image data;

[0012] Input the preprocessed brain MRI image data into a brain tumor region segmentation model to obtain a prediction result of a brain tumor segmentation region; the prediction result of the brain tumor segmentation region is an MRI image in which a brain tumor region is labeled; the brain tumor region segmentation model is obtained by training a SwinGhostU-Net model using a training set;

[0013] The SwinGhostU-Net model comprises an input layer, an encoder, a FUSA feature fusion module, a decoder and an output layer connected in sequence, and the decoder is further connected to the encoder in a skip connection manner; the encoder comprises a plurality of GDG down-sampling convolution encoding modules and a Swin Transformer encoding module connected in sequence; the FUSA feature fusion module comprises an enhanced spatial attention mechanism module, an adaptive channel attention mechanism module and a weight distribution module;

[0014] Input the preprocessed brain MRI image data into the brain tumor region segmentation model to obtain the prediction result of the brain tumor segmentation region, which comprises the following steps:

[0015] Input the preprocessed brain MRI image data into a plurality of GDG down-sampling convolution encoding modules connected in sequence through the input layer to obtain a plurality of local detail feature maps of different spatial scales; each GDG down-sampling convolution encoding module comprises a GDG down-sampling convolution module and a max-pooling layer connected in sequence; each GDG down-sampling convolution module comprises a first ghost convolution layer, a first hollow convolution layer, a second hollow convolution layer and a second ghost convolution layer;

[0016] Input the preprocessed brain MRI image data into the Swin Transformer encoding module to obtain a global context feature map;

[0017] The local detail feature map output by the last GDG downsampling convolutional encoding module is input into an enhanced spatial attention mechanism module to obtain an enhanced spatial attention feature map; the global context feature map is input into an adaptive channel attention mechanism module to obtain an adaptive channel attention feature map; and the weight distribution module obtains a multi-scale fusion feature map based on the enhanced spatial attention feature map and the adaptive channel attention feature map.

[0018] The multi-scale fusion feature map is subjected to upsampling processing by the decoder and is fused with the skip connection feature map of the encoder to obtain a brain tumor segmentation result.

[0019] Optionally, the number of GDG downsampling convolutional encoding modules is 3.

[0020] The input end of the GDG downsampling convolutional module in the first GDG downsampling convolutional encoding module is connected with the output end of the input layer, and the output end of the max pooling layer in the third GDG downsampling convolutional encoding module is connected with the decoder.

[0021] Optionally, each GDG downsampling convolutional module comprises a first convolutional layer and a first global attention mechanism layer.

[0022] The first ghost convolutional layer, the first dilated convolutional layer, the second dilated convolutional layer, the second ghost convolutional layer and the first global attention mechanism layer form a first branch, and the first ghost convolutional layer, the first dilated convolutional layer, the second dilated convolutional layer, the second ghost convolutional layer and the first global attention mechanism layer are sequentially connected; the input end of the first ghost convolutional layer in the first GDG downsampling convolutional module is connected with the output end of the input layer, and the output end of the first global attention mechanism layer is connected with the corresponding max pooling layer.

[0023] The first convolutional layer forms a second branch; and the input end of the first ghost convolutional layer is connected with the input end of the first global attention mechanism layer through the first convolutional layer.

[0024] Optionally, the input end of the Swin Transformer encoding module is connected with the output end of the input layer, and the output end of the Swin Transformer encoding module is connected with the input end of the FUSA feature fusion module.

[0025] Optionally, the FUSA feature fusion module further comprises 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.

[0026] The enhanced spatial attention mechanism module forms a 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 a fourth branch; and the adaptive channel attention mechanism module forms a fifth branch.

[0027] The input end of the enhanced spatial attention mechanism module is connected with the output end of the max-pooling layer in the third GDG down-sampling convolutional encoding module, and the output end of the enhanced spatial attention mechanism module is connected with the input end of the weight distribution module.

[0028] The input end of the second convolutional layer is connected with the output end of the max-pooling layer in the third GDG down-sampling convolutional encoding module, the input end of the third convolutional layer is connected with the output end of the Swin Transformer encoding module, and the second convolutional layer and the third convolutional layer are connected with 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 after being connected in parallel.

[0029] The input end of the adaptive channel attention mechanism module is connected with the output end of the Swin Transformer encoding module, and the output end of the adaptive channel attention mechanism module is connected with the input end of the weight distribution module.

[0030] Optionally, the weight distribution module comprises a second fusion layer, a third fusion layer, and a dynamic attention weight distribution sub-module.

[0031] The input end of the second fusion layer and the input end of the third fusion layer are both connected with 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 with the dynamic attention weight distribution sub-module after being connected in parallel, and the dynamic attention weight distribution sub-module is connected with the input end of the MLP layer.

[0032] Optionally, the enhanced spatial attention mechanism module comprises a fourth convolutional layer, a fifth convolutional layer, a sixth convolutional layer, a first splicing layer, a seventh convolutional 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.

[0033] The fourth convolutional layer, the fifth convolutional layer and the sixth convolutional layer are connected in parallel, and then sequentially connected with 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; the input end of the fourth convolutional layer, the input end of the fifth convolutional layer, the input end of the sixth convolutional layer, the input end of the fifth fusion layer, the input end of the non-local attention mechanism calculation layer and the input end of the seventh fusion layer are connected with the output end of the maximum pooling layer in the third GDG downsampling convolutional coding module; and the output end of the non-local attention mechanism calculation layer is connected with the input end of the fifth fusion layer.

[0034] Optionally, the adaptive channel attention mechanism module comprises a scaling parameter calculation module, an offset parameter calculation module, a channel grouping and group attention weight calculation module and a seventh fusion layer.

[0035] The scaling parameter calculation module, the offset parameter calculation module and the channel grouping and 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 group attention weight calculation module are connected with the seventh fusion layer.

[0036] The scaling parameter calculation module comprises 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 with the output end of the Swin Transformer coding module, and then sequentially connected with the eighth fusion layer, the first shared MLP layer and the second sigmoid activation function layer in parallel.

[0037] The offset parameter calculation module comprises 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 with the output end of the Swin Transformer coding module, and then sequentially connected with the ninth fusion layer, the second shared MLP layer and the Tanh activation function layer in parallel.

[0038] The channel grouping and group attention weight calculation module comprises 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.

[0039] The channel mixing module comprises 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 with the output end of the Swin Transformer coding module, and the output end of the ninth convolutional layer is connected with the input end of the grouping module.

[0040] The group attention weight calculation module includes a plurality of 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 with the output end of the global average pooling module, and the output end of the second linear layer is connected with the input end of the second splicing layer;

[0041] The input end of the tenth fusion layer is also connected with the output end of the grouping module.

[0042] 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 connected in sequence;

[0043] The embedding block includes a block division layer and a linear embedding layer connected in sequence, and the block division layer is connected with the output end of the input layer;

[0044] 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;

[0045] The processing module includes a tenth convolutional layer, a batch normalization layer and a Mish activation function layer connected in sequence.

[0046] Optionally, the training process of the brain tumor region segmentation model specifically includes:

[0047] Constructing a SwinGhostU-Net model;

[0048] Constructing a training set; the training set includes a plurality of preprocessed sample brain MRI image data and sample MRI images with brain tumor regions labeled;

[0049] Taking the preprocessed sample brain MRI image data as input and the sample MRI image with the brain tumor region labeled as output, the SwinGhostU-Net model is iteratively trained until the total loss function reaches a minimum value or the iteration number reaches a maximum value, the iteration is stopped, and a brain tumor region segmentation model is obtained;

[0050] The expression of the total loss function is:

[0051] ;

[0052] ;

[0053] ;

[0054] 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.

[0055] According to the specific embodiments provided in this application, this application has the following technical effects:

[0056] 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

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0058] Figure 1 The MRI brain tumor segmentation method flowchart provided by an embodiment of the present application;

[0059] Figure 2 The SwinGhostU-Net model structure diagram provided by an embodiment of the present application;

[0060] Figure 3 The GDG down-sampling convolution module structure diagram provided by an embodiment of the present application;

[0061] Figure 4 The FUSA feature fusion module structure diagram provided by an embodiment of the present application;

[0062] Figure 5 The enhanced spatial attention mechanism module structure diagram provided by an embodiment of the present application;

[0063] Figure 6 The adaptive channel attention mechanism module structure diagram provided by an embodiment of the present application;

[0064] Figure 7 The prediction result diagram of the brain tumor segmentation region 1 provided by an embodiment of the present application;

[0065] Figure 8 The prediction result diagram of the brain tumor segmentation region 2 provided by an embodiment of the present application;

[0066] Figure 9 The prediction result diagram of the brain tumor segmentation region 3 provided by an embodiment of the present application;

[0067] Figure 10 The prediction result diagram of the brain tumor segmentation region 4 provided by an embodiment of the present application;

[0068] Figure 11 The prediction result diagram of the brain tumor segmentation region 5 provided by an embodiment of the present application;

[0069] Figure 12 The prediction result diagram of the brain tumor segmentation region 6 provided by an embodiment of the present application. DETAILED DESCRIPTION

[0070] With reference to the drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0071] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0072] In one exemplary embodiment, as shown in Figure 1 An MRI brain tumor segmentation method is provided, comprising the following steps. Among them:

[0073] Step S1, acquiring brain MRI image data.

[0074] Specifically, the brain MRI image data includes T1 weighted imaging, T1 weighted enhanced imaging, T2 weighted imaging and liquid attenuated inversion recovery imaging. The brain MRI image data of four modalities is obtained from the Brats2021 dataset.

[0075] Step S2, pre-processing the brain MRI image data to obtain pre-processed brain MRI image data.

[0076] Specifically, the brain MRI image data of four modalities is integrated into a four-dimensional tensor (C1xH1xW1xD1, 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) in the channel dimension, and then cropped to 4x60x160x128 to remove the edge area and retain the core brain structure; then, the values of the non-background area are z-score standardized to ensure that the values of the background area are zero; the pre-processed brain MRI image data of four modalities is stored in compressed.h5 format after being combined in the channel, which optimizes the data loading efficiency in the subsequent training and inference process.

[0077] Step S3, inputting the pre-processed brain MRI image data into a brain tumor region segmentation model to obtain a prediction result of a brain tumor segmentation region; the prediction result of the brain tumor segmentation region is an MRI image with a brain tumor region labeled; the brain tumor region segmentation model is obtained by training the SwinGhostU-Net model using a training set.

[0078] Among them, as shown in Figure 2As shown, the SwinGhostU-Net model comprises an input layer, an encoder, a FUSA feature fusion module, a decoder and an output layer connected in sequence, and the decoder is further connected with the encoder in a skip connection manner; the encoder comprises a plurality of GDG down-sampling convolutional encoding modules and a Swin Transformer encoding module connected in sequence, and the FUSA feature fusion module comprises an enhanced spatial attention mechanism module, an adaptive channel attention mechanism module and a weight distribution module. The skip connection adopts a residual connection manner.

[0079] The preprocessed brain MRI image data is input into the brain tumor region segmentation model to obtain a prediction result of a brain tumor segmentation region, including:

[0080] The preprocessed brain MRI image data is input into a plurality of GDG down-sampling convolutional encoding modules connected in sequence through an input layer to obtain a plurality of local detail feature maps of different spatial scales; each GDG down-sampling convolutional encoding module comprises a GDG down-sampling convolutional module and a max-pooling layer connected in sequence; each GDG down-sampling convolutional module comprises a first ghost convolutional layer, a first hollow convolutional layer, a second hollow convolutional layer and a second ghost convolutional layer.

[0081] The preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain a global context feature map.

[0082] The local detail feature map output by the last GDG down-sampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain an enhanced spatial attention feature map; the global context feature map is input into the adaptive channel attention mechanism module to obtain an adaptive channel attention feature map, and the weight distribution module obtains a multi-scale fusion feature map based on the enhanced spatial attention feature map and the adaptive channel attention feature map.

[0083] The multi-scale fusion feature map is up-sampled through the decoder and is fused with the skip connection feature map of the encoder to obtain a brain tumor segmentation result.

[0084] As an optional implementation, as shown in Figure 2 As shown, the number of GDG down-sampling convolutional encoding modules is 3.

[0085] The input end of the GDG down-sampling convolutional module in the first GDG down-sampling convolutional encoding module is connected with the output end of the input layer, and the output end of the max-pooling layer in the third GDG down-sampling convolutional encoding module is connected with the decoder.

[0086] As an optional implementation, as shown in Figure 3As shown, each GDG down-sampling convolution module includes a first convolution layer and a first global attention mechanism layer.

[0087] The first ghost convolution layer, the first dilated convolution layer, the second dilated convolution layer, the second ghost convolution layer, and the first global attention mechanism layer form a first branch, and are sequentially connected; the input end of the first ghost convolution layer in the first GDG down-sampling convolution module is connected with the output end of the input layer, and the output end of the first global attention mechanism layer is connected with the corresponding maximum pooling layer. The input feature map passes through the first branch to obtain a first branch feature map. The first ghost convolution layer and the second ghost convolution layer are used to efficiently generate a feature map and provide rich feature representation; the first dilated convolution layer and the second dilated convolution layer expand the receptive field by introducing a dilation rate without increasing the parameter amount and the calculation amount, so as to capture a wider range of context information and improve the understanding of the global semantics of the model.

[0088] The first convolution layer forms a second branch; the input end of the first ghost convolution layer is connected with the input end of the first global attention mechanism layer through the first convolution layer. The input feature map passes through the second branch to obtain a second branch feature map.

[0089] Specifically, each ghost convolution layer is used to efficiently extract a feature map and reduce the calculation 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 context information.

[0090] The first convolution layer is a convolution layer of , which is used to extract small-scale features and is connected with the output of the first branch in a residual manner; the output feature of the GDG down-sampling convolution module (i.e., the local detail feature map) may be represented as:

[0091] .

[0092] wherein, is a preprocessed brain MRI image; , represents the batch size of the preprocessed brain MRI image, represents the channel number 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 a global attention mechanism operation; denotes a convolution; denotes a ghost convolution operation; denotes a ghost convolution operation; denotes a ghost convolution operation; is a residual connection operation.

[0093] As an optional implementation, as shown in Figure 2 , the input end of the Swin Transformer encoding module is connected with the output end of the input layer, and the output end of the Swin Transformer encoding module is connected with the input end of the FUSA feature fusion module. Wherein, the preprocessed brain MRI image data is input into the Swin Transformer encoding module to obtain a global context feature map.

[0094] As an optional implementation, as shown in Figure 4 , the FUSA feature fusion module further comprises 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.

[0095] Wherein, the enhanced spatial attention mechanism module forms a 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 a fourth branch; the adaptive channel attention mechanism module forms a fifth branch.

[0096] The input end of the enhanced spatial attention mechanism module is connected with the output end of the maximum pooling layer in the third GDG down-sampling convolutional encoding module, and the output end of the enhanced spatial attention mechanism module is connected with the input end of the weight distribution module.

[0097] The input end of the second convolutional layer is connected with the output end of the maximum pooling layer in the third GDG down-sampling convolutional encoding module, the input end of the third convolutional layer is connected with the output end of the Swin Transformer encoding module, and the second convolutional layer and the third convolutional layer are connected with 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 turn after being connected in parallel.

[0098] The input end of the adaptive channel attention mechanism module is connected with the output end of the Swin Transformer encoding module, and the output end of the adaptive channel attention mechanism module is connected with the input end of the weight distribution module.

[0099] Specifically, an Enhanced Spatial Attention (ESA) layer is used to capture global spatial information of the features, and an Adaptive Channel Attention Mechanism (ACA) layer is used to adaptively and dynamically adjust the weights between feature channels.

[0100] The local detail feature map output by the third GDG down-sampling convolutional encoding module is input into the enhanced spatial attention mechanism module to obtain an 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 an adaptive channel attention feature map; then, the local detail feature map output by the third GDG down-sampling convolutional encoding module is subjected to a second convolutional layer, and the global context feature map is subjected to a third convolutional layer, and the output feature maps of the second convolutional layer and the third convolutional layer are subjected to a first fusion layer, a first processing layer, and a second global attention mechanism layer to obtain an 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 further subjected to an MLP layer and a second processing layer to obtain a multi-scale fusion feature map.

[0101] As an optional implementation manner, as shown in Figure 4 , the weight distribution module includes a second fusion layer, a third fusion layer, and a dynamic attention weight distribution sub-module.

[0102] The input ends of the second fusion layer and the third fusion layer are connected with 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 with the dynamic attention weight distribution sub-module in parallel, and the dynamic attention weight distribution sub-module is connected with the input end of the MLP layer.

[0103] Specifically, the data processing process of the FUSA feature fusion module includes the following steps:

[0104] 1) Assuming that the first feature (i.e., the local detail feature map) from the third GDG down-sampling convolutional encoding module is , and the second feature (i.e., the global context feature map) from the Swin Transformer encoding module is , the first feature and the second feature are input into the ESA module and the ACA module respectively to obtain enhanced feature representations, i.e., the enhanced spatial attention feature and the adaptive channel attention feature .

[0105] 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:

[0106] .

[0107] in, Represents the convolution operation; represents the Hadamard product fusion operation, represents the batch normalization operation, Represents the Mish activation function operation.

[0108] 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:

[0109] .

[0110] The multiplication fusion feature is obtained by performing Hadamard product fusion through the third fusion layer , using the following formula:

[0111] .

[0112] in, Represents element-wise multiplication.

[0113] 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:

[0114] .

[0115] 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.

[0116] 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:

[0117] .

[0118] 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).

[0119] 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). .

[0120] .

[0121] 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.

[0122] As an optional implementation, Figure 5 As 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.

[0123] 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.

[0124] Specifically, the data processing process of the enhanced spatial attention mechanism module includes the following steps:

[0125] 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:

[0126] .

[0127] in, Indicates merging in the channel dimension; 、 、 They represent three types of convolutions: 1×1×1, 3×3×3, and 5×5×5.

[0128] 2) Obtain the non-local attention feature map through the non-local attention mechanism calculation layer to capture long-range dependencies, and then combine with the first feature Residual connection.

[0129] 3) Finally, the enhanced spatial attention feature map is obtained by adding the non-local attention feature map multiplied by the learnable parameter and the first feature with a residual connection. The expression is:

[0130] .

[0131] wherein the non-local attention feature is calculated by the formula:

[0132]

[0133] wherein, represents a 1x1x1 convolutional layer for mapping the feature to the "Query" space, and the output is denoted as ; represents a 1x1x1 convolutional layer for mapping the feature to the "Key" space, and the output is denoted as ; represents a 1x1x1 convolutional layer for mapping the feature to the "Value" space, and the output is denoted as ; represents the attention feature obtained after the non-local attention operation; represents the transpose of a matrix.

[0134] As an optional implementation, as shown in Figure 6 , 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.

[0135] wherein the scaling parameter calculation module, the offset parameter calculation module, and the channel grouping and 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 group attention weight calculation module are all connected with the seventh fusion layer.

[0136] The scaling parameter calculation module comprises 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 with 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 with the eighth fusion layer, the first shared MLP layer and the second sigmoid activation function layer in sequence after being connected in parallel.

[0137] The offset parameter calculation module comprises 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 with the output end of the Swin Transformer encoding module, and the second global average pooling layer and the second global maximum pooling layer are connected with the ninth fusion layer, the second shared MLP layer and the Tanh activation function layer in sequence after being connected in parallel.

[0138] The channel grouping and group attention weight calculation module comprises 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.

[0139] The channel mixing module comprises 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 with the output end of the Swin Transformer encoding module, and the output end of the ninth convolutional layer is connected with the input end of the grouping module.

[0140] The group attention weight calculation module comprises a plurality of parallel group attention weight calculation sub-modules, each group attention weight calculation sub-module comprises 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 with the output end of the global average pooling module, and the output end of the second linear layer is connected with the input end of the second splicing layer.

[0141] The input end of the tenth fusion layer is also connected with the output end of the grouping module.

[0142] Specifically, 1) the second feature is combined with two groups of global average pooling GAP and global maximum pooling GMP to capture feature responses; adaptive scaling parameters γ and offset parameters β are generated after the two shared MLP layers, respectively through the Sigmoid activation function layer and the Tanh activation function layer:

[0143]

[0144] .

[0145] wherein, is the scaling parameter; sigmoid activation function; β bias parameter; tanh activation function; shared multi-layer perceptron layer; GAP is a global average pooling layer, and GMP is a global maximum pooling layer.

[0146] 2) After channel mixing and grouping the second features, the group features of each group are first subjected to global average pooling GAP, and then subjected to a group attention weight calculation mechanism to enhance important features within the group; the output feature map of the adaptive channel attention mechanism module, i.e., the adaptive channel attention feature map, is obtained by fusing the second features, the scaling parameter, the bias parameter, the mixed features, and the group attention weight through the seventh fusion layer .

[0147]

[0148] .

[0149] .

[0150] wherein, indicates the mixed features after channel mixing; indicates the mixed features of the i-th group; indicates the channel mixing operation (wherein G is the total number of groups, G = 8, i.e., 8 groups); indicates the weight obtained after the group attention mechanism for the i-th mixed feature; indicates the calculation operation of the group attention for the i-th mixed feature. As an optional implementation, the Swin Transformer encoding module comprises, in sequence, 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; wherein the embedding block comprises, in sequence, a block division layer and a linear embedding layer, and the block division layer is connected to the output end of the input layer.

[0151]

[0152]

[0153] ​​​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.

[0154] The processing module includes a tenth convolutional layer, a batch normalization layer, and a Mish activation function layer connected in sequence.

[0155] As an optional implementation, the decoder includes 3 decoding modules and a spatial attention mechanism layer, for paying attention to important spatial regions and segmentation edges in the feature upsampling process. Each decoding module includes an upsampling layer, a batch normalization layer, and a Mish activation function layer, and the output end of the maximum pooling layer in the encoder is also connected to the input end of the upsampling layer through a corresponding spatial attention mechanism layer in a skip connection manner.

[0156] As an optional implementation, in step S3, the training process of the brain tumor region segmentation model specifically includes:

[0157] In step S31, a SwinGhostU-Net model is constructed.

[0158] In step S32, a training set is constructed; the training set includes a plurality of preprocessed sample brain MRI image data and sample MRI images with brain tumor regions labeled.

[0159] Specifically, the data set is divided into a training set, a validation set, and a test set according to a preset ratio. The training set and the validation set are used to train the SwinGhostU-Net model. The model with the optimal parameters obtained through the training is the brain tumor region segmentation model.

[0160] In the training process, a data augmentation strategy is used for the training set, including random scaling, random flipping in three directions, Gaussian noise, and random contrast adjustment. The corresponding settings are as follows: with a probability of P=0.5, randomly rotate in the axial, coronal, and sagittal planes (rotation angle [-10°, +10°]); with a probability of 0.5, randomly add Gaussian noise to each channel of the image, and the noise variance ranges from 0 to 0.1; randomly change the contrast of each channel in the image, and the adjustment range is between 0.75 and 1.25.

[0161] In the sliding inference phase, the test time augmentation (TTA) technique is used to improve the performance and robustness of the model.

[0162] The preprocessed sample brain MRI image data in the test set is input into the trained SwinGhostU-Net model, and the output is the segmented brain tumor region. 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.

[0163] 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.

[0164] Among them, the expression of the total loss function is:

[0165] .

[0166] .

[0167] .

[0168] 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; The network parameters of the SwinGhostU-Net model are learned through training data.

[0169] The application constructs a brain tumor region segmentation model based on a U-shaped CNN architecture. By combining GDG downsampling convolution modules with ghost convolution and dilated convolution, the receptive field is expanded without increasing the computational complexity, effectively extracting the local features of brain MRI images. The Swin Transformer is combined to capture long-distance dependencies. A FUSA feature fusion module based on multiple attention mechanisms is designed. Through the fusion strategy of ESA, ACA attention mechanisms and dynamic attention weighting, efficient fusion of global multi-scale semantic information and local detailed features is achieved. The decoder uses spatial attention residual connection to refine segmentation details. The total loss function combines Dice loss, cross-entropy loss and boundary loss, effectively handling the class imbalance problem, enhancing the model's attention to boundary details and improving the model's sensitivity to imbalanced data. The brain tumor region segmentation model of the application can accurately segment the location of heterogeneous tumors, improve the accuracy of brain tumor region segmentation, and has wide clinical application value.

[0170] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to a memory, a database or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc.

[0172] The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0173] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0174] The principles and implementation manners of the present application are described by using specific examples in the present application, and the above-mentioned embodiments are only used to help understand the method and its core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In conclusion, the content of the present application should not be understood as a limitation.

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