A liver image segmentation method based on multi-head attention feature fusion

By using multi-head attention feature fusion and edge detection operators based on the Unet network, the problem of insufficient utilization of multi-scale features in traditional liver segmentation methods is solved, achieving higher accuracy and faster liver segmentation.

CN119229116BActive Publication Date: 2025-12-26CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411267421.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-12-26
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

Traditional liver segmentation methods are easily affected by changes in liver morphology and grayscale information, and it is difficult to make full use of multi-scale features in the image, resulting in inaccurate segmentation results, especially in complex scenes.

Method used

A liver image segmentation model based on the Unet network structure is adopted, which combines multi-head attention feature fusion and edge detection operators. Through feature extraction, fusion and upsampling modules, multi-scale features are utilized and the network structure is optimized to reduce the amount of computation and improve segmentation accuracy and speed.

Benefits of technology

It improves the accuracy of liver region recognition, enhances the utilization of liver contour information, improves segmentation results, and speeds up processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229116B_ABST
    Figure CN119229116B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of liver segmentation, in particular to a liver image segmentation method based on multi-head attention feature fusion, which comprises the following steps: establishing a liver image segmentation model based on an Unet network structure, collecting liver CT images and corresponding labeled region images; performing edge detection operator processing on the liver CT images to obtain a liver region contour image; performing binaryzation processing on the liver CT images to obtain a liver region binaryzation image; obtaining a liver region rough segmentation image through a segmentation network; after adjusting the liver CT images, the labeled region images, the liver region contour image, the liver region binaryzation image and the liver region rough segmentation image to the same size, the images are combined to obtain a combined image; training the liver image segmentation model by using the combined image set, calculating a loss by using a loss function, optimizing model parameters according to the loss until convergence; inputting a to-be-processed liver CT image into the trained liver image segmentation model to obtain a liver segmentation image; and the application can provide a more accurate segmentation image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of liver segmentation, and particularly relates to a liver image segmentation method based on multi-head attention feature fusion. BACKGROUND

[0002] Liver segmentation is the process of identifying and extracting the liver region in medical images. Liver segmentation is of great significance in clinical practice, as it can help doctors accurately assess the size, location, and shape of liver lesions, and promote disease diagnosis, treatment, and monitoring.

[0003] Due to the large variation in the shape and grayscale information of the liver in images, and the similar features that may exist with the surrounding tissues, segmentation errors are easily caused. At the same time, medical image data is usually complex, with noise, uneven brightness, etc., which also affects the accuracy of the segmentation results. Traditional segmentation methods have major problems. With the continuous development of deep learning technology, liver segmentation methods based on deep learning have made significant progress. Traditional deep learning-based segmentation methods usually use convolutional neural network (CNN) architectures such as U-Net, SegNet, DeepLab to build models, learn a large amount of medical image data through the model, automatically learn feature representation and matching rules, and train them with different loss functions and optimization methods to achieve accurate segmentation of liver images.

[0004] Some scholars have proposed applying region-based convolutional neural network (R-CNN) in image segmentation detection. Through experiments on the PASCAL VOC-2007 dataset, R-CNN improved the detection accuracy from 29.2% of traditional methods to 66.0%. This method integrates feature extraction, feature selection, and feature classification into the same model, greatly optimizing performance and efficiency. Based on R-CNN, some scholars have proposed a pyramid pooling network model (SPPNet), and some have proposed a Fast R-CNN algorithm. These two algorithms effectively improve the speed of image detection and increase the accuracy on the PASCAL VOC 2007 dataset to 70%. Some scholars have further developed the Faster R-CNN algorithm based on Fast R-CNN, introducing the candidate window grid technology (RPN), greatly accelerating the calculation speed, and improving the detection accuracy on the PASCAL VOC 2007 dataset to 73.2%. However, the segmentation effect is overly dependent on the fine degree of the label region, while ignoring the information of the original image contour region, and traditional segmentation methods may not be able to fully utilize the multi-scale features in the image, which limits the model's understanding and adaptability to complex scenes. SUMMARY

[0005] To solve the above problems, the application provides a liver image segmentation method based on multi-head attention feature fusion, comprising the following steps:

[0006] S1. A liver image segmentation model is established based on a Unet network structure, the liver image segmentation model comprising a feature extraction module, a feature fusion module, an attention screening module and an up-sampling module; the feature extraction module comprises four down-sampling layers, and the up-sampling module comprises four up-sampling layers;

[0007] S2. A liver CT image and a corresponding labeled region image thereof are collected;

[0008] S3. An edge detection operator is used to process the liver CT image of step S2 to obtain a liver region contour image;

[0009] S4. A binaryzation process is performed on the liver CT image of step S2 to obtain a liver region binaryzation image;

[0010] S5. The liver CT image of step S2 is subjected to a segmentation network to obtain a liver region rough segmentation image;

[0011] S6. The liver CT image, the labeled region image, the liver region contour image, the liver region binaryzation image and the liver region rough segmentation image are adjusted to the same size and then combined to obtain a combined image;

[0012] S7. The liver image segmentation model is trained using the combined image set, and a loss function is used to calculate a loss, and the model parameters are optimized according to the loss until convergence; specifically comprising:

[0013] S11. The combined image is input into the down-sampling module to obtain a down-sampled image set, the down-sampled image set comprising a 256x256 image X 1,0 , a 128x128 image X 2,0 , a 64x64 image X 3,0 and a 32x32 image X 4,0 ;

[0014] S12. The down-sampled image set and the combined image are input into the feature fusion module to obtain a feature fusion image set, the feature fusion image set comprising a 64x64 image , a 128x128 image , a 256x256 image and a 512x512 image

[0015] S13. The feature fusion image set is input into the attention screening module to obtain an attention image set, the attention image set comprising a 64x64 image O 1 , a 128x128 image O 2 , a 256x256 image O 3and 512*512 image O 4 ;

[0016] S14. Input the 32*32 images in the attention image group and the down-sampling image group into an up-sampling module to obtain an output image group, wherein the output image group comprises image out1, image out2, image out3 and image out4;

[0017] S15. Perform convolution conversion processing on each image in the output image group to obtain a corresponding prediction map, and calculate a loss according to the prediction map;

[0018] S8. Obtain a liver segmentation image by inputting a to-be-processed liver CT image into the trained liver image segmentation model.

[0019] The beneficial effects of the present application are:

[0020] The present application uses a multi-head attention mechanism to capture features at different scales, thereby improving the recognition accuracy of the liver region; the liver region contour image is obtained by processing with an edge detection operator, and is combined with other image information, thereby strengthening the use of liver contour information; a specific feature fusion module is designed, so that features at different resolution levels can be better combined to make up for the limitations of single-scale feature expression ability; under the premise of ensuring the fusion between features, the network operation amount is reduced through structure pruning to improve the network processing speed. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 The method flowchart of the present application is shown in the figure;

[0022] Figure 2 The model structure schematic diagram of the present application is shown in the figure;

[0023] Figure 3 The feature fusion module schematic diagram of the present application is shown in the figure;

[0024] Figure 4 The fusion block flowchart of the present application is shown in the figure;

[0025] Figure 5 The image acquisition and processing example of the present application is shown in the figure. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0027] The application provides a liver image segmentation method based on multi-head attention feature fusion, as shown in the following steps. Figure 1

[0028] S1. A liver image segmentation model is established based on a Unet network structure, the liver image segmentation model comprising a feature extraction module, a feature fusion module, an attention screening module and an up-sampling module; the feature extraction module comprising four down-sampling layers, and the up-sampling module comprising four up-sampling layers.

[0029] S2. A liver CT image and a corresponding labeled region image thereof are collected.

[0030] S3. The liver CT image of step S2 is subjected to edge detection operator processing to obtain a liver region contour image; wherein the edge detection operator is preferably a Sobel operator.

[0031] S4. The liver CT image of step S2 is subjected to binaryzation processing to obtain a liver region binaryzation image.

[0032] S5. The liver CT image of step S2 is subjected to liver region coarse segmentation image through a segmentation network; wherein the segmentation network adopts a Unet_2D network, which takes an ImageNet pre-training model and unet as a backbone network.

[0033] S6. The liver CT image, the labeled region image, the liver region contour image, the liver region binaryzation image and the liver region coarse segmentation image are adjusted to the same size and then combined to obtain a combined image; the liver CT image, the liver region binaryzation image, the liver region contour image, the labeled region image and the liver region coarse segmentation image are as shown in (a)-(e) of Figure 5 .

[0034] S7. The liver image segmentation model is trained using the combined image set, and a loss is calculated using a loss function, and the model parameters are optimized according to the loss until convergence.

[0035] S8. A liver CT image to be processed is input into the trained liver image segmentation model to obtain a liver segmentation image.

[0036] Preferably, step S7 inputs the 512x512 combined image into the liver image segmentation model for training, as shown in the following steps. Figure 2

[0037] S11. The combined image X 0,0 is input into the down-sampling module to obtain a down-sampled image set, the down-sampled image set comprising a 256x256 image X 1,0 , a 128x128 image X 2,0 , a 64x64 image X 3,0 and a 32x32 image X 4,0 .​​

[0038] S12. input the down-sampling image group and the merged image into a feature fusion module to obtain a feature fusion image group, the feature fusion image group including 64x64 images 128x128 images 256x256 images and 512x512 images

[0039] S13. input the feature fusion image group into an attention screening module to obtain an attention image group, the attention image group including 64x64 images O 1 128x128 images O 2 256x256 images O 3 and 512x512 images O 4 ;

[0040] S14. input the attention image group and the 32x32 images in the down-sampling image group into an up-sampling module to obtain an output image group, the output image group including images out1, out2, out3 and out4;

[0041] S15. perform convolution conversion processing on each image in the output image group to obtain a corresponding prediction map, and calculate a loss according to the prediction map.

[0042] Specifically, as shown in Figure 3 , the processing flow of the feature fusion module specifically includes:

[0043] fusing the 512x512 merged image X 0,0 with the 256x256 image X 1,0 to obtain a 512x512 image X 0,1 ;

[0044] fusing the 256x256 image X 1,0 with the 128x128 image X 2,0 to obtain a 256x256 image X 1 ,1 ;

[0045] fusing the 512x512 merged image X 0,0 with the 512x512 image X 0,1 , and then fusing the fusion result with the 256x256 image X 1,1 to obtain a 512x512 image X 0,2 ;

[0046] fusing the 128x128 image X 2,0 with the 64x64 image X3,0 The 128 x 128 image X is obtained by fusing the block 2,1

[0047] The 256 x 256 image X is fused with the 256 x 256 image X 1,0 The 256 x 256 image X is fused with the 256 x 256 image X 1,1 The 256 x 256 image X is fused with the 256 x 256 image X 2,1 The 256 x 256 image X is obtained by fusing the block 1,2

[0048] The 512 x 512 image X is fused with the 512 x 512 image X 0,0 The 512 x 512 image X is fused with the 512 x 512 image X 0,1 The 512 x 512 image X is fused with the 512 x 512 image X 0,2 The 512 x 512 image X is fused with the 512 x 512 image X 1,2 The 512 x 512 image X is obtained by fusing the block 0,3

[0049] The 64 x 64 image X is fused with the 32 x 32 image X 3,0 The 64 x 64 image X is fused with the 32 x 32 image X 4,0 The 64 x 64 image X is obtained by fusing the block 3,1 The 64 x 64 image X is fused with the 64 x 64 image X 3,1 The 64 x 64 image X is fused with the 64 x 64 image X

[0050] The 128 x 128 image X is fused with the 128 x 128 image X 2,0 The 128 x 128 image X is fused with the 128 x 128 image X 2,1 The 128 x 128 image X is fused with the 128 x 128 image X 3 The 128 x 128 image X is fused with the 128 x 128 image X ,1 The 128 x 128 image X is obtained by fusing the block 2,2 The 128 x 128 image X is fused with the 128 x 128 image X 2,2 The 128 x 128 image X is fused with the 128 x 128 image X

[0051] The 256 x 256 image X is fused with the 256 x 256 image X 1,0 The 256 x 256 image X is fused with the 256 x 256 image X 1,1 The 256 x 256 image X is fused with the 256 x 256 image X 1,2 The 256 x 256 image X is fused with the 256 x 256 image X 2,2 The 256 x 256 image X is obtained by fusing the block 1,3 The 256 x 256 image X is fused with the 256 x 256 image X 1,3 The 256 x 256 image X is fused with the 256 x 256 image X

[0052] The 512 x 512 image X is fused with the 512 x 512 image X 0,0 The 512 x 512 image X is fused with the 512 x 512 image X 0,1 The 512 x 512 image X is fused with the 512 x 512 image X 0,2 The 512 x 512 image X is fused with the 512 x 512 image X 0,3 ​​The images are then merged, and the resulting 256×256 image is X... 1,3 The resulting image X, after merging, is 512×512. 0,4 Image X 0,4 It's an image.

[0053] To improve network speed and reduce computational load, structural pruning can be performed on the feature fusion module during training. For example, in a downsampled image group, the 32×32 image X... 4,0 Not participating in feature fusion, Figure 3 The red portion in the image is cropped out, so that the image X... 0,3 As an image Image X 1,2 As an image Image X 2,1 As an image Image X 3,0 As an image Output the results; pruning simplifies the structure while still ensuring the fusion of features.

[0054] Specifically, using image F i and image G i As input to the fusion block, image G i The scale ratio of the image F i Half the size; such as Figure 3 As shown, Figure 4 As shown, the specific processing steps for the fusion block include:

[0055] S111. Transfer image F i Reconstructed into first local information Representing image F i In the middle j = 1, 2, ..., H Fi ×W Fi The characteristics of each element, H Fi W Fi Representing the image F respectively i Height and width; image G i Compressed into the first global feature g i , is represented as:

[0056] g i =Flatten(AvgPool(G i ))

[0057] Where AvgPool(·) represents average pooling, and Flatten(·) represents compression operation; the first local information and the first global feature are concatenated and then input into a multilayer perceptron to obtain the fused feature. Represented as:

[0058]

[0059] fused feature after head disassembly

[0060] S112. Reshape the image G i into second local information representing the j-th = 1, 2,.., H i element of the image G Gi , H Gi , W Gi , W Gi respectively represent the height and width of the image G i ; compress the image F i into second global feature f i , represented as:

[0061]

[0062] fuse the second local information and the second global feature to obtain a fused feature , represented as:

[0063]

[0064] after head disassembly

[0065] S113. After upsampling the mixed feature , fuse the upsampling result and the mixed feature and output.

[0066] Specifically, the attention screening module processes four images in the feature fusion image group respectively, and the process of processing the images obtains the image O i , which includes:

[0067] S131. Divide the image into N image blocks of the same size to obtain a region set wherein represents the n-th = 1, 2,.., N image block; calculate the query matrix key matrix value matrix W Q is represented as a query weight matrix, W K is represented as a key weight matrix, and W V is represented as a value weight matrix;

[0068] ​S132. Calculate the attention weight matrix one-to-one corresponding to the key matrix and the value matrix, denoted as:

[0069]

[0070] denote the n = 1, 2, …, N attention weight matrix, denote the scaling factor; arrange all the attention weight matrix in descending order according to the size, and extract the first k attention weight matrix to obtain an attention weight matrix A i ; in the embodiment of the application, k = 12;

[0071] S133. All value matrices are integrated to obtain a value matrix V i , according to the attention weight matrix A i and the value matrix V i , the attention matrix X i = A i ×V i , the attention matrix X i and the value matrix V i are added to obtain the image O i = X i +V i .

[0072] Specifically, as shown in Figure 2 , the specific process of step S14 includes:

[0073] S141. The 32x32 image in the down-sampled image group is subjected to the first up-sampling layer to obtain the first up-sampled image, and the first up-sampled image is fused with the image O 1 to obtain the image out1;

[0074] S142. The image out1 is subjected to the second up-sampling layer to obtain the second up-sampled image, and the second up-sampled image is fused with the image O 2 to obtain the image out2;

[0075] S143. The image out2 is subjected to the third up-sampling layer to obtain the third up-sampled image, and the third up-sampled image is fused with the image O 3 to obtain the image out3;

[0076] S144. The image out3 is subjected to the fourth up-sampling layer to obtain the fourth up-sampled image, and the fourth up-sampled image is fused with the image O 4 to obtain the image out4.

[0077] Specifically, as shown in Figure 2 , the convolution conversion processing is performed on each image in the output image group to obtain the corresponding prediction image, including:

[0078] The image is passed through the LN layer and the 3*3 convolution layer to obtain a convolution image, and the convolution image is passed through the sigmoid activation function layer and then up-sampled to obtain a prediction map.

[0079] Specifically, the loss function L used in the present application is seg is expressed as:

[0080] L seg = L BCE + L dice

[0081] wherein L BCE represents the cross-entropy loss, L dice represents the Dice coefficient loss, and the specific formula is:

[0082]

[0083]

[0084] y m represents the true label of the mth sample, represents the prediction value of the mth sample, M represents the sample quantity, R represents the total number of pixels of each image, y m,r represents the true label of the rth pixel of the mth sample, represents the prediction value of the rth pixel of the mth sample.

[0085] In the present application, unless otherwise explicitly specified and limited, the terms “mounting”, “setting”, “connecting”, “fixing”, “rotating” and the like should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or can be integrated; can be mechanically connected, or can be electrically connected; can be directly connected, or can be indirectly connected through an intermediate medium; can be the internal communication of two elements or the interaction relationship between two elements, unless otherwise explicitly limited, the above-mentioned terms in the present application can be understood according to the specific meaning in the specific circumstances by the ordinary skilled in the art.

[0086] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A liver image segmentation method based on multi-head attention feature fusion, characterized in that, The method comprises the following steps: S1. A liver image segmentation model is established based on a Unet network structure, the liver image segmentation model comprising a feature extraction module, a feature fusion module, an attention screening module and an up-sampling module; the feature extraction module comprising four down-sampling layers, and the up-sampling module comprising four up-sampling layers; S2. A liver CT image and a corresponding labeled region image thereof are collected; S3. An edge detection operator is used to process the liver CT image of step S2 to obtain a liver region contour image; S4. A binaryzation process is performed on the liver CT image of step S2 to obtain a liver region binaryzation image; S5. The liver CT image of step S2 is processed through a segmentation network to obtain a liver region rough segmentation image; S6. The liver CT image, the labeled region image, the liver region contour image, the liver region binaryzation image and the liver region rough segmentation image are adjusted to the same size and then combined to obtain a combined image; S7. The liver image segmentation model is trained using the combined image set, a loss function is used to calculate a loss, and the model parameters are optimized according to the loss until convergence; specifically comprising: S11. input the merged image into a down-sampling module to obtain a down-sampled image set, the down-sampled image set comprising 256x256 image X 1,0 , 128x128 image X 2,0 , 64x64 image X 3,0 and 32x32 image X 4,0 ; S12. input the down-sampled image group and the merged image into a feature fusion module to obtain a feature fusion image group, the feature fusion image group including 64x64 images 128x128 images 256x256 images and 512x512 images S13. input the feature fusion image group into an attention screening module to obtain an attention image group, the attention image group including 64x64 images O 1 , 128x128 images O 2 , 256x256 images O 3 , and 512x512 images O 4 ; S14. The 32x32 images in the attention image group and the down-sampled image group are input into the up-sampling module to obtain an output image group, the output image group comprising an image out1, an image out2, an image out3 and an image out4; S15. Each image in the output image group is processed through convolution conversion to obtain a corresponding prediction map, and the loss is calculated according to the prediction map; S8. A liver CT image to be processed is input into the trained liver image segmentation model to obtain a liver segmentation image.

2. The liver image segmentation method based on multi-head attention feature fusion according to claim 1, characterized in that, The processing process of the feature fusion module specifically comprises: The 512x512 merged image is compared with the 256x256 image X 1,0 The 512x512 merged image is compared with the 256x256 image X 0,1 ; The 256x256 image X 1,0 with the 128x128 image X 2,0 The 256x256 image X 1,1 ; merge the 512x512 image with the 512x512 image X 0,1 fuse, and fuse the result with the 256x256 image X 1,1 obtain the 512x512 image X through the fusion block 0,2 ; An image X of 128x128 is obtained by fusing the images X1, X2, X3, X4 2,0 An image X of 64x64 is obtained by fusing the images X1, X2, X3, X4 3,0 An image X of 128x128 is obtained by fusing the images X1, X2, X3, X4 2,1 ​ The 256x256 image X 1,0 is fused with the 256x256 image X 1,1 , and the fusion result is fused with the 128x128 image X 2 ,1 to obtain the 256x256 image X 1,2 ; The 512 x 512 merged image X 0,0 , the 512 x 512 image X 0,1 , and the 512 x 512 image X 0,2 are fused, and the fusion result is fused with the 256 x 256 image X 1,2 to obtain the 512 x 512 image X 0,3 ; The 64x64 image X 3,0 with the 32x32 image X 4,0 The 64x64 image X The 128x128 image X is fused with the 128x128 image Y to obtain a 64x64 image X 2,0 The 128x128 image X is fused with the 128x128 image Y to obtain a 64x64 image X 2,1 The 64x64 image X is fused with the 64x64 image Y to obtain a 32x32 image X 3,1 The 128x128 image X is fused with the 128x128 image Y to obtain a 64x64 image X The 256 x 256 image X 1,0 is fused with the 256 x 256 image X 1,1 and the 256 x 256 image X 1,2 is fused, and the fused result 128 x 128 image X 2,2 is obtained through the fusion block The 512 x 512 merged image, the 512 x 512 image X 0,1 , the 512 x 512 image X 0,2 , and the 512 x 512 image X 0,3 are fused, and the fusion result, the 256 x 256 image X 1,3 is obtained through the fusion block 3. The liver image segmentation method based on multi-head attention feature fusion according to claim 2, characterized in that, The image F i and the image G i As the input of the fusion block, the image G i is one-half the size of the image F i ; the specific processing procedure of the fusion block includes: S111. Transfer image F i Reconstructed into first local information Representing image F i In the middle j = 1, 2, ..., H Fi ×W Fi The characteristics of each element, H Fi W Fi Representing the image F respectively i Height and width; image G i Compressed into the first global feature g i The first local information and the first global feature are concatenated and then input into a multilayer perceptron to obtain the fused feature. Fusion features Hybrid features were obtained after head disassembly. S112. The image G i is reshaped into second local information The second input G i is represented Gi , where H Gi is the number of elements, H Gi , W Gi represent the height and width of the image G i , respectively; the image F i is compressed into second global feature f i ; the second local information is concatenated with the second global feature, and the result is input into a multi-layer perception to obtain a fusion feature The fusion feature is disassembled into a head to obtain a mixed feature S113. upsample the mixed feature S114. fuse the upsampled result with the mixed feature and output.

4. The liver image segmentation method based on multi-head attention feature fusion according to claim 1, characterized in that, The attention screening module processes the image The process to obtain the image O i includes: S131. Split the image into N image patches of the same size to get a region set S132. Calculate the query matrix for each image patch S133. Calculate the key matrix for each image patch S134. Calculate the value matrix for each image patch S135. Calculate the query weight matrix W S136. Calculate the key weight matrix W S137. Calculate the value weight matrix W Q W K W V W S132. Calculate the attention weight matrix one-to-one corresponding to the key matrix and the value matrix, arrange all the attention weight matrices in descending order according to the size, and extract the first k attention weight matrices to obtain an attention weight matrix A i ; S133. Integrate all value matrices to obtain a value matrix V i , calculate an attention matrix X i from the attention weight matrix A i and the value matrix V i , and add the attention matrix X i to the value matrix V i to obtain an image O i .

5. The liver image segmentation method based on multi-head attention feature fusion according to claim 1, characterized in that, The specific process of step S14 comprises: S141. The 32x32 image in the down-sampled image group is passed through a first up-sampling layer to obtain a first up-sampled image, and the first up-sampled image is fused with the image O 1 to obtain an image out1. S142. pass the image out1 through a second up-sampling layer to obtain a second up-sampled image, pass the second up-sampled image and the image O 2 to obtain a fused image out2. S143. pass the image out2 through a third up-sampling layer to obtain a third up-sampled image, and pass the third up-sampled image and the image O 3 to obtain a fused image out3. S144. The image out3 is passed through a fourth up-sampling layer to obtain a fourth up-sampled image. The fourth up-sampled image is combined with the image O 4 to obtain the image out4.

6. The liver image segmentation method based on multi-head attention feature fusion according to claim 1, characterized in that, Each image in the output image group is processed through convolution conversion to obtain a corresponding prediction map, comprising: The image is processed through an LN layer and a 3x3 convolution layer to obtain a convolution image, and the convolution image is processed through a sigmoid activation function layer and then up-sampled to obtain a prediction map.

7. The liver image segmentation method based on multi-head attention feature fusion according to claim 1, characterized in that, The loss function L employed in step S8 seg is: L seg = L BCE + L dice where L BCE represents the cross-entropy loss, L dice represents the Dice coefficient loss, y m represents the true label of the mth sample, represents the predicted value of the mth sample, M represents the number of samples, R represents the total number of pixels of each image, y m,r represents the true label of the rth pixel of the mth sample, represents the predicted value of the rth pixel of the mth sample.

Citation Information

Patent Citations

  • Automatic image segmentation method based on multi-level multi-attention MLMA-UNet network

    CN116309640A

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

    CN117764948A