Transform-assisted CNN-based medical image segmentation method
By constructing an encoder-decoder network of CNN and Transformer composite structure modules, combined with the feature combination unit and channel cross-attention module, the problem of lack of global understanding and semantic divergence in the existing technology is solved, and the accuracy of medical image segmentation is significantly improved. Especially the performance on small-scale data sets.
Patent Information
- Application Number
- CN202410162125.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2024-09-03
AI Technical Summary
Existing CNN-based medical image segmentation methods lack global understanding and cannot fully utilize the global context information of the image, resulting in poor segmentation results on small-scale data sets. In addition, inconsistent feature dimensions of CNN and Transformer lead to semantic differences and affect segmentation accuracy.
A medical image segmentation method based on Transformer-assisted CNN is adopted, by constructing an encoder-decoder network of CNN and Transformer composite structure modules, combined with binary cross entropy and Dice loss function for training, using feature combination unit modules to eliminate semantic differences, and using channel crossover The attention module bridges the gap between the encoder and the decoder and achieves the combination of local features and global information.
The segmentation accuracy is significantly improved on multi-organ core data sets, colon tissue images and colonoscopy images, and it can achieve high segmentation results on a small amount of medical image data, avoiding the problem of Transformer being difficult to train on small-scale data sets.
Smart Images

Figure CN118587429A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a medical image segmentation method based on Transformer-assisted CNN. Background Art
[0002] Medical image segmentation is an important field in medical image analysis. It can provide very important guidance and help for accurate identification, reasonable diagnosis, prediction and prevention of diseases. In recent years, deep learning has developed rapidly, especially convolutional neural networks (CNNs), which have been widely used in the field of medical imaging. Since CNNs have the local perception ability of convolutional layers, they can effectively capture the details and local features in images. The U-Net structure based on CNN has begun to dominate this field. U-Net is a CNN-based encoder-decoder network architecture. It consists of symmetrical expansion paths and contraction paths to form a U-shaped shape segment. A simple skip connection is used in the middle to transfer the spatial information lost by encoder downsampling to enhance the retention of details. Inspired by the U-Net architecture, a series of U-Net variants have been proposed by scholars, such as UNet++, UNet3+, AttUNet, Res-UNet, MultiResUNet, etc. These algorithms usually adopt a complex encoder-decoder framework or further improve the simple skip connection scheme to improve the performance of medical image segmentation. Although U-Net and its variants have achieved good performance on various medical image segmentation tasks, due to the inherent inductive bias of CNN, they lack a global understanding of the image itself and cannot model long-distance information dependencies, thus failing to fully utilize global contextual information, which limits further improvement of medical image segmentation performance.
[0003] Inspired by the success of the Transformer model in language tasks, many studies have applied the Transformer to computer vision tasks. ViT (Vision Transformer) is the first image recognition model that fully adopts the Transformer in structure. It divides the input image into several patch sequences with position embeddings, and then models the relationship between the patch sequences to obtain the global context information of the image. ViT has achieved advanced levels in multiple image recognition benchmark tasks. Due to its excellent performance, many researchers have begun to propose ViT-based models to improve visual tasks. A series of models based on the ViT architecture have emerged. SETR is the first model that attempts to introduce ViT into the field of image segmentation and has achieved good results. Swin-Unet replaces the convolutional blocks in U-Net with Swin Transformer. Swin Transformer uses a window attention mechanism and only performs attention calculations on the pixel area within the window, reducing the computational complexity of the Transformer to a linear relationship. TransUNet can more effectively capture local details and global representations by combining CNN and Transformer in one architecture. MedT extends the existing architecture by introducing additional control mechanisms in the self-attention mechanism, enabling it to be effectively trained on small-scale datasets. Although the above-mentioned method based on the ViT architecture has achieved certain results, it still cannot produce satisfactory results in various medical segmentation tasks. The reasons for this are as follows: first, due to the inconsistency of the feature dimensions of CNN and Transformer, simply combining the two cannot eliminate the semantic differences between the two; second, due to the lack of the inherent inductive bias of CNN in Transformer itself, its ability to acquire low-level features is insufficient. Compared with other computer vision tasks, the number of data samples in medical images is usually small, which makes it difficult to effectively train Transformer on small-scale data sets, affecting the segmentation effect. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes an image segmentation method based on Transformer-assisted CNN to improve the segmentation accuracy on multi-organ nuclear datasets, glandular datasets of colon tissue images, and colonoscopy image datasets. Even on a small amount of medical image data, a high segmentation accuracy can be achieved. The specific technical solution is as follows:
[0005] A medical image segmentation method based on Transformer-assisted CNN, comprising the steps of:
[0006] Step 1: Obtain a medical image dataset, including medical images and corresponding label images, and divide the dataset into a training set and a test set;
[0007] Step 2: Preprocess the data set, including data augmentation methods such as horizontal flipping, vertical flipping, and random rotation;
[0008] Step 3: Build a segmentation network model based on transformer-assisted CNN, which is an encoder-decoder network composed of a composite structure module of CNN and transformer;
[0009] Step 4: Network training, using the combined loss function of binary cross entropy and Dice, and the Adam optimizer to optimize the model. The training set and test set in step 2 are input into the encoder-decoder network framework for end-to-end training.
[0010] Step 5: Obtain the segmentation result, load the network weights trained in step 3, input a medical image to be segmented into the network model for encoding and decoding, and finally obtain the segmented image.
[0011] As a preferred embodiment: the step three is specifically as follows;
[0012] The composite structure module of CNN and transformer consists of a CNN branch, a Transformer branch and a fusion module of the two branches. The CNN branch sequentially uses a convolutional layer conv2d to extract fine local features of the image and an element-wise addition unit elementwise_add to accept the global features of the image fed back by the transformer.
[0013] The transformer branch uses a global average pooling layer GAP, a channel-by-channel connection unit Concat, an element-by-element addition unit elementwise_add, and a Transformer module in sequence. This process can enhance the global context information of the image while retaining the local features of the image;
[0014] The fusion module of the two branches adopts the feature combination unit FCU module in the Conformer work, which is responsible for reasonably connecting the CNN branch and the Transformer branch to continuously eliminate the semantic differences between the CNN branch and the Transformer branch. It includes two processes: CNN input to the Transformer branch, and transformer feedback to the CNN branch; the composite structure module of CNN and transformer gives full play to the respective advantages of CNN and Transformer, and can retain the local features and global representation of the image. It acts as both an encoder and a decoder in the segmentation network model, which can be described in formula language as:
[0015] Yi =Conv 3x3 (X i-1 );
[0016]
[0017]
[0018] X i =FCU down (T i )+Y i ;
[0019] Where X i-1 Represents the feature vector of the CNN branch in the previous same module, Conv 3x3 Represents the convolution layer conv2d with a convolution kernel of 3 in the CNN branch, Y i Represents this module, currently in the i-th layer of the network, X in the CNN branch i-1 Feature vector after convolution layer; FCU up Represents the process of CNN input to transformer branch in feature combination unit module, while FCU down It is the process of transformer feeding back to CNN branch; T i-1 Represents the token sequence of the transformer branch in the previous same module, Represents the result of concatenating the feature vector of the CNN branch and the token sequence input to the transformer branch, T i represents the output result of this module in the transformer branch of the i-th layer of the network, X i is the output result of the CNN branch.
[0020] Preferably: in the step three, the encoder-decoder network composed of the composite structure module of CNN and transformer is specifically composed of symmetrical expansion paths and contraction paths to form a U-shaped segment, in which a simple skip connection is used to transfer the spatial information lost by the encoder downsampling to enhance the retention of details. A preprocessing module is used in the first layer of the encoder, and the convolution blocks in the U-Net network are replaced with the composite structure modules of CNN and transformer in the remaining layers, giving full play to the respective advantages of CNN and transformer while retaining the local features and global representation of the image. The skip connection process of this network adopts the channel cross attention module CCA proposed in the UCTransNet work to bridge the semantic differences between the encoder and the decoder.
[0021] Preferably, in the encoder-decoder network, the first layer of the encoder adopts a preprocessing module, and the module structure is sequentially connected as follows: a convolutional layer conv2d for extracting initial local features of the image, an image block embedding layer patch embeding for inputting into the feature processing process of the transformer branch, a global average pooling layer GAP for aggregating local features of the image in the channel, a channel-by-channel connection layer concat, and a transformer layer. The output result is two paths, which are the result after passing through the convolutional layer and the result after passing through a transformer layer, which can be described in formula language as follows:
[0022] X=Conv 3x3 (I)
[0023] E=Trans(Concat[E c ,E g ])
[0024] Where I represents the input image feature vector, X represents the result after the convolution layer, and E g represents the feature vector after global average pooling, E c represents the result after linear embedding of feature vector X, E g and E c They are all two-dimensional token sequences, Trans represents the transformer module, and E represents the result after passing through the transformer layer.
[0025] As a preference: in the step 4, the network training uses a combined loss function of binary cross entropy and Dice, and the final loss function can be described in formula language as follows:
[0026]
[0027] Where L is the final loss function combination, represents the image segmentation prediction value and y represents the image segmentation target value, BCE represents the binary cross entropy loss function, Dice represents the Dice loss function, α and β represent the coefficients of the loss function, α is set to 0.5, and β is set to 0.5.
[0028] The beneficial effects of the present invention are as follows: the present invention proposes a new medical image segmentation algorithm based on transformer-assisted CNN, which is mainly composed of a composite structure module of CNN and transformer. This module can inherit the respective advantages of CNN and transformer while avoiding their respective limitations to achieve effective medical image segmentation. In addition, this module adopts a dual-branch structure, consisting of a CNN branch and a Transformer branch. The CNN branch is the main branch of the network model, which is mainly used for the final segmentation of medical images, while the transformer branch is auxiliary and is mainly used to extract image features, with a feature combination unit (FCU) used as a bridge in the middle. This dual-branch structure can be used to combine detailed local features with global context information to the greatest extent. Using the CNN branch as the main trunk and the transformer branch as an auxiliary can eliminate the problem that the existing Vit-based architecture requires large-scale data for effective training. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is the model structure of the medical image segmentation network (TAC-UNet) based on transformer-assisted CNN;
[0030] Figure 2 It is the structure of the composite structure (TAC) module of CNN and transformer;
[0031] Figure 3 It is the structure of the first layer preprocessing module (TAC Stem) in the segmentation network encoder;
[0032] Figure 4 It is the structure of the channel cross attention module (CCA);
[0033] Figure 5 This is the segmentation visualization result diagram of the TAC-UNet network model. DETAILED DESCRIPTION
[0034] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0035] In this embodiment, MoNuSeg, GlaS and CVC-ClincDB datasets are used to evaluate the segmentation network architecture. MoNuSeg is a multi-organ nuclear segmentation dataset, which contains 30 images with approximately 22,000 nuclear boundary annotations for training, and 14 images with more than 7,000 nuclear boundary annotations for testing. GlaS is a gland segmentation dataset from colon tissue images, which contains 85 images for training and 80 images for testing. CVC-ClincDB is a colonoscopy image dataset with a total of 612 images. The training set and test set are divided into 80% and 20% ratios, and the test set is randomly selected from the 612 images by the program.
[0036] A medical image segmentation method based on transformer-assisted CNN, the specific steps are:
[0037] S1. Obtain a medical image dataset, including medical images and corresponding label images, and divide the dataset into a training set and a test set.
[0038] S2. Preprocess the dataset, including data augmentation techniques such as horizontal flipping, vertical flipping, and random rotation.
[0039] S3. Construct a segmentation network model based on transformer-assisted CNN, an encoder-decoder network mainly composed of a composite structure module of CNN and transformer.
[0040] S4, network training, using the combined loss function of binary cross entropy and Dice, and the Adam optimizer to optimize the model, the training set and test set in S2 are input into the encoder-decoder network framework for end-to-end training.
[0041] S5. Obtain the segmentation result, load the network weights trained in S3, input a medical image to be segmented into the network model for encoding and decoding processing, and finally obtain the segmented image.
[0042] In step S3: the composite structure module of CNN and transformer is named TAC module, such as Figure 2As shown in the figure, it consists of a CNN branch, a Transformer branch and a fusion module of the two branches. The CNN branch uses a convolution layer "conv2d" to extract fine local features of the image and an element-wise addition unit "elementwise_add" to accept the global features of the image fed back by the transformer. The transformer branch uses a global average pooling layer "GAP", a channel-by-channel connection unit "Concat", an element-wise addition unit "elementwise_add", and a Transformer module. This process can enhance the global contextual information of the image while retaining the local features of the image. The fusion module of the two branches uses the feature combination unit (FCU) module in the Conformer work, as shown in Figure 2 As shown in the figure, it is responsible for reasonably connecting the CNN branch and the Transformer branch, and is used to continuously eliminate the semantic differences between the CNN branch and the Transformer branch. It includes two key processes: CNN input to the Transformer branch, and transformer feedback to the CNN branch. The composite structure module of CNN and transformer can give full play to the respective advantages of CNN and Transformer, and can retain the local features and global representation of the image to the greatest extent. It acts as both an encoder and a decoder in the segmentation network model, which can be described in formula language as:
[0043] Y i =Conv 3x3 (X i-1 );
[0044] X i =FCU down (T i )+ Y i;
[0045] Where X i-1 Represents the feature vector of the CNN branch in the previous same module, Conv 3x3 Represents the convolution layer "conv2d" with a convolution kernel of 3 in the CNN branch, Y i Represents X in the CNN branch of this module (currently in the i-th layer of the network) i-1 Feature vector after convolution layer. FCU up Represents the process of CNN input to transformer branch in feature combination unit module, while FCU down This is the process of transformer feeding back to the CNN branch. i-1Represents the token sequence of the transformer branch in the previous same module, Represents the result of concatenating the feature vector of the CNN branch and the token sequence input to the transformer branch, T i represents the output result of this module in the transformer branch of the i-th layer of the network, X i is the output result of the CNN branch.
[0046] In the step S3, an encoder-decoder network mainly composed of a composite structure module of CNN and transformer is named TAC-UNet network in this embodiment, such as Figure 1 As shown, this network adopts an encoder-decoder network architecture similar to the U-Net structure, which is composed of symmetrical expansion paths and contraction paths to form a U-shaped segment. A simple skip connection is used in the middle to transmit the spatial information lost by the encoder downsampling to enhance the retention of details. The difference from U-Net is that: U-Net has a total of 5 layers, each layer is composed of a simple stack of convolution blocks, and the network of this embodiment uses a preprocessing module in the first layer of the encoder, and the remaining layers replace the convolution blocks in the U-Net network with a composite structure module of CNN and transformer, which can give full play to the respective advantages of CNN and transformer, while retaining the local features and global representation of the image to the greatest extent. In addition, the skip connection process of the network of this embodiment adopts the channel cross attention module (CCA) proposed in the UCTransNet work, as shown in Figure 4 As shown, it can be used to bridge the semantic gap between the encoder and the decoder.
[0047] The first layer of the encoder in the network uses a preprocessing module, which is named TAC stem module in this embodiment. Figure 3 As shown in the figure, this module structure is connected in sequence: a convolutional layer "conv2d" for extracting the initial local features of the image, an image block embedding layer "patch embeding" for inputting the feature processing process of the transformer branch, a global average pooling layer "GAP" for aggregating local features of the image in the channel, a channel-by-channel connection layer "concat", and a transformer layer. The output results are two paths, one after the convolutional layer and the other after a transformer layer. It can be described in formula language as:
[0048] X=Conv 3x3 (I)
[0049] E=Trans(Concat[E c ,E g ])
[0050] Where I represents the input image feature vector, X represents the result after the convolution layer, and E g represents the feature vector after global average pooling, E c represents the result after linear embedding of feature vector X, E g and E c They are all two-dimensional token sequences. Trans represents the transformer module, and E represents the result after passing through the transformer layer.
[0051] In step S4, the network training uses a combination loss function of binary cross entropy and Dice, and the final loss function can be described in formula language as follows:
[0052]
[0053] Where L is the final loss function combination, represents the image segmentation prediction value and y represents the image segmentation target value, BCE represents the binary cross entropy loss function, Dice represents the Dice loss function, α and β represent the coefficients of the loss function, α is set to 0.5, and β is set to 0.5.
[0054] This embodiment is completed under the Pytorch framework, and an RTX 3090 GPU with 24G memory is used for training. At the same time, data enhancement techniques such as vertical flipping, random rotation, and horizontal flipping are performed on the data set. The medical image segmentation network based on transformer-assisted CNN proposed in this embodiment is not trained using any pre-trained weights. For the MoNuSeg and Glas data sets, batch_size is set to 4, and for the CVC-ClincDB data set, batch_size is set to 16. For each data set, the image size input to the network is set to 224x224, and the Adam optimizer is used to optimize the model, where the initial learning rate is set to 0.001. The loss function of the training network uses a combination of cross entropy loss and Dice loss, and all baselines are trained using the same settings and loss functions. In order to evaluate the method of this embodiment, the Dice coefficient, IoU, Precison, Recall, and Accuracy are used as evaluation indicators in the medical image segmentation task.
[0055] The Dice coefficient is the most commonly used evaluation indicator in medical image segmentation tasks. It can effectively avoid the common class imbalance problem in medical images. IoU is also known as the Jaccard index. It can measure the ratio of the intersection and union between the predicted segmentation results and the true segmentation results. Precision indicates the ratio of correctly segmented pixels to all pixels predicted as positive examples. It focuses on the accuracy of predictions as positive examples. Recall, also known as sensitivity, indicates the ratio of correctly segmented pixels to all true positive pixels. Accuracy indicates the ratio of all correctly segmented pixels to the total number of pixels. It is suitable for balanced data sets and is easily affected by the number of negative examples in unbalanced data sets. The formulas are expressed as:
[0056]
[0057] Among them, TP represents true positive, FP represents false positive, FN represents false negative, and TN represents true negative. These evaluation indicators are widely used in image segmentation tasks and help to comprehensively evaluate the performance of the model. In practical applications, you can choose appropriate evaluation indicators according to different segmentation tasks, or consider their results comprehensively.
[0058] The proposed transformer-assisted CNN-based medical image segmentation network (TAC-UNet) was compared with the following eight deep neural networks on the test set: 1. U-Net (Ronneberger, Fischer, and Brox, 2015), the winner of the 2015 ISBI Cell Tracking Challenge and the most popular deep learning model for biomedical image segmentation. 2. UNet++ (Zhou Z, Rahman Siddiquee MM, Tajbakhsh N, et al 2018), a segmentation model that introduces more upsampling nodes and skip connections to improve the model's ability to model long-range dependencies. 3. Attention-UNet (Oktay O, Schlemper J, Folgoc LL, et al, 2018), which introduces an attention mechanism to better focus on important areas in the image, thereby improving segmentation performance. 4. R2UNet (Alom MZ, Hasan M, Yakopcic C, et al. 2019), a network model composed of U-Net and residual structure. The main advantage is the feature accumulation through the recurrent network, and the experimental performance is better. 5. TransUNet (Chen J, Lu Y, Yu Q, et al. 2021), the design is inspired by the Transformer model in the field of natural language processing, which can automatically learn features in images and convert them into semantic information. 6. SwinUnet (Cao H, Wang Y, Chen J, et al. 2022), it uses the Swin-Tranformer module to replace the convolutional layer in U-Net. 7. UCTransnet (Wang H, Cao P, Wang J, et al. 2022), it proposes a CTrans module to improve the jump connection in U-Net. 8. DoubleUnet-DCA (Ates GC, Mohan P, Celik E, 2023), proposes a DCA module to improve the segmentation performance of the U-type network model.
[0059] Table 1 shows the comparison results of different methods on the CVC-ClincDB dataset, where the better experimental results are marked in bold. As can be seen from Table 1, TAC-UNet outperforms most CNN and Transformer-based baselines, achieving an excellent Dice score of 91.81%. In addition, it was found that when trying to adjust the TAC modules in the 4th and 5th layer encoders and decoders of TAC-UNet (a total of 5 layers), that is, adjusting the number of Transformers in the TransBlock module from 1 to 2, the Dice score of TAC-UNet on the CVC-ClincDB dataset can be further improved by 0.5% (Dice score of 92.31%). In Table 1, we call this model TAC-UNet-L.
[0060] Table 2 shows the comparison results of different methods on the MoNuSeg and GlaS datasets. As can be seen from Table 2, transformer-based models such as Swin-Unet have a Dice score of 77.74% on MoNuSeg and 85.84% on GlaS, while UNet++ and Attention U-Net models are 0.33% and 0.49% higher than Swin-Unet on MoNuSeg, and 2.23% and 4.13% higher on GlaS, respectively. Compared with TAC-UNet, it can achieve excellent results of 80.36% and 90.7% Dice scores on MoNuSeg and GlaS, which is better than all other two types of baselines. In addition, the Dice score of the TAC-UNet-L model on MoNuSeg can be further improved by 0.77% (Dice score is 81.13%).
[0061] Our model segmentation visualization results are as follows Figure 5 shown.
[0062] Table 1
[0063]
[0064]
[0065] Table 2
[0066]
[0067]
Claims
1. A medical image segmentation method based on Transformer-assisted CNN, characterized in that: Includes steps: Step 1: Obtain a medical image dataset, including medical images and corresponding label images, and divide the dataset into a training set and a test set; Step 2: Preprocess the data set, including data augmentation methods such as horizontal flipping, vertical flipping, and random rotation; Step 3: Build a segmentation network model based on transformer-assisted CNN, which is an encoder-decoder network composed of a composite structure module of CNN and transformer; Step 4: Network training, using the combined loss function of binary cross entropy and Dice, and the Adam optimizer to optimize the model. The training set and test set in step 2 are input into the encoder-decoder network framework for end-to-end training. Step 5: Obtain the segmentation result, load the network weights trained in step 3, input a medical image to be segmented into the network model for encoding and decoding, and finally obtain the segmented image.
2. The medical image segmentation method based on Transformer-assisted CNN according to claim 1, characterized in that: The step three is specifically as follows: The composite structure module of CNN and transformer consists of a CNN branch, a Transformer branch and a fusion module of the two branches. The CNN branch sequentially uses a convolutional layer conv2d to extract fine local features of the image and an element-wise addition unit elementwise_add to accept the global features of the image fed back by the transformer. The transformer branch uses a global average pooling layer GAP, a channel-by-channel connection unit Concat, an element-by-element addition unit elementwise_add, and a Transformer module in sequence. This process can enhance the global context information of the image while retaining the local features of the image; The fusion module of the two branches adopts the feature combination unit FCU module in the Conformer work, which is responsible for reasonably connecting the CNN branch and the Transformer branch to continuously eliminate the semantic differences between the CNN branch and the Transformer branch. It includes two processes: CNN input to the Transformer branch, and transformer feedback to the CNN branch; the composite structure module of CNN and transformer gives full play to the respective advantages of CNN and Transformer, and can retain the local features and global representation of the image. It acts as both an encoder and a decoder in the segmentation network model, which can be described in formula language as: Y i =Conv 3x3 (X i-1 ); X i =FCU down (T i )+Y i ; Where X i-1 Represents the feature vector of the CNN branch in the previous same module, Conv 3x3 Represents the convolution layer conv2d with a convolution kernel of 3 in the CNN branch, Y i Represents this module, currently in the i-th layer of the network, X in the CNN branch i-1 Feature vector after convolution layer; FCU up Represents the process of CNN input to transformer branch in feature combination unit module, while FCU down It is the process of transformer feeding back to CNN branch; T i-1 Represents the token sequence of the transformer branch in the previous same module, Represents the result of concatenating the feature vector of the CNN branch and the token sequence input to the transformer branch, T i represents the output result of this module in the transformer branch of the i-th layer of the network, X i is the output result of the CNN branch.
3. The medical image segmentation method based on Transformer-assisted CNN according to claim 1, characterized in that: In the step three, the encoder-decoder network composed of the composite structure module of CNN and transformer is specifically composed of symmetrical expansion paths and contraction paths to form a U-shaped segment, in which a simple skip connection is used to transfer the spatial information lost by the encoder downsampling to enhance the retention of details. A preprocessing module is used in the first layer of the encoder, and the convolution blocks in the U-Net network are replaced with the composite structure modules of CNN and transformer in the remaining layers, giving full play to the respective advantages of CNN and transformer while retaining the local features and global representation of the image. The skip connection process of this network adopts the channel cross attention module CCA proposed in the UCTransNet work to bridge the semantic differences between the encoder and the decoder.
4. The medical image segmentation method based on Transformer-assisted CNN according to claim 3, characterized in that: In the encoder-decoder network, the first layer of the encoder adopts a preprocessing module, and the module structure is sequentially connected as follows: a convolutional layer conv2d for extracting the initial local features of the image, an image block embedding layer patch embedding for inputting the feature processing process of the transformer branch, a global average pooling layer GAP for aggregating local features of the image in the channel, a channel-by-channel connection layer concat, and a transformer layer. The output results are two paths, namely the result after the convolutional layer and the result after a transformer layer, which can be described in formula language as follows: X=Conv 3x3 (I) E=Trans(Concat[E c ,It g ]) Where I represents the input image feature vector, X represents the result after the convolution layer, and E g represents the feature vector after global average pooling, E c represents the result after linear embedding of feature vector X, E g and E c They are all two-dimensional token sequences, Trans represents the transformer module, and E represents the result after passing through the transformer layer.
5. The medical image segmentation method based on Transformer-assisted CNN according to claim 1, characterized in that: In step 4, the network training uses a combination loss function of binary cross entropy and Dice, and the final loss function can be described in formula language as follows: Where L is the final loss function combination, represents the image segmentation prediction value and y represents the image segmentation target value, BCE represents the binary cross entropy loss function, Dice represents the Dice loss function, α and β represent the coefficients of the loss function, α is set to 0.5, and β is set to 0.5.
Citation Information
Cited By
Medical image segmentation method based on double-branch hybrid model
CN118864867A
Medical image segmentation method and system based on CNN and ViT hybrid architecture
CN120107607A
A medical image segmentation method and system based on CNN and ViT hybrid architecture
CN120107607B
Rock mass internal pore intelligent characterization and three-dimensional reconstruction method and system
CN121476269A
