Lightweight medical image segmentation method based on 1*1 convolution
By adopting a U-shaped encoder-decoder structure and a cascaded multi-scale feature fusion module in the medical image segmentation model, combined with ultra-light shift convolution and dynamic spatial shift operations, the problems of increased model parameters and computational cost are solved, and efficient multi-category segmentation performance is improved.
Patent Information
- Application Number
- CN202510827581.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-17
AI Technical Summary
Existing medical image segmentation models have increased parameter count and computational cost due to the introduction of large kernel convolution or self-attention mechanism, and lightweight networks have low segmentation performance in multi-category segmentation tasks.
A U-shaped encoder-decoder structure is adopted, combined with a cascaded multi-scale feature fusion module and an ultra-light shift convolution module. 1×1 convolution is used for feature map processing, and a cascaded information compensation mechanism is used to compensate for the information loss caused by the dynamic spatial shift operation. A dynamic spatial shift operation is designed to expand the receptive field of the convolution kernel.
It significantly reduces the number of model parameters and computational costs, while improving the performance of medical image segmentation, especially maintaining high segmentation accuracy in complex task scenarios.
Smart Images

Figure CN120807546A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer vision and medical image processing, and particularly relates to a lightweight medical image segmentation method based on 1x1 convolution. BACKGROUND
[0002] With the development of artificial intelligence technology, deep learning driven image segmentation methods have been widely studied and concerned in the field of medical image segmentation. Convolutional neural network (CNN) has shown strong performance in local feature extraction due to its parameter sharing and sparse connection. UNet is one of the classic networks in the field of medical image segmentation, which is implemented in a fully convolutional manner and innovatively constructs a symmetric encoder-decoder architecture. Due to the simple structure and easy expansion of UNet, subsequent improved versions such as Attention-UNet, UNet++, ResUNet++ have become classic methods widely used in medical image segmentation.
[0003] In order to improve the performance of the model, existing works tend to introduce modules with larger parameters or computational complexity, such as large kernel convolution (D-LKA) or self-attention mechanism (Swin-UNet, TransUNet, MissFormer, HiFormer). However, these strategies, although they can help the model improve the segmentation accuracy to a certain extent, inevitably lead to a significant increase in model parameter quantity and computational cost. The computational load of large kernel convolution grows quadratically with the kernel size, while the computational complexity of self-attention mechanism is related to the resolution of the feature map in a quadratic manner, which limits the application of the model in actual medical environment. Therefore, designing lightweight medical image segmentation network model with low parameter quantity and computational quantity has become a research hotspot in the field of intelligent medical treatment.
[0004] In recent years, significant progress has been made in the research of lightweight image segmentation network. MobileNets uses depthwise separable convolution to replace standard convolution, effectively reducing the parameter quantity and computational quantity of the model; GhostNet proposes a new Ghost module, aiming to help the model capture more rich features through cheap operations; EGE-Net improves the segmentation accuracy while significantly reducing the model parameter quantity by grouping feature enhancement and efficient multi-scale feature fusion. UNext effectively learns the feature representation of the latent space through the tokenized MLP module with axial shift. UltraLight VM-UNet proposes a PVM layer for processing features in parallel visual Mamba, effectively reducing the computational load. Although the above methods can significantly reduce the parameter quantity and computational quantity of the model, their segmentation accuracy is limited.
[0005] In summary, the mainstream deep learning method faces two main challenges: (1) the mainstream deep learning method improves the segmentation performance of the model by introducing large kernel convolution or self-attention mechanism in the network architecture, which leads to a significant increase in model parameter quantity and computational cost; (2) the existing lightweight method can significantly reduce the model parameter quantity and computational quantity, but the segmentation performance is lower than the mainstream model in some complex task scenarios. SUMMARY
[0006] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a lightweight medical image segmentation method based on 1x1 convolution, which solves the problem that the existing medical image segmentation model has a large parameter quantity and high computational complexity due to the introduction of a module, resulting in an increase in model parameter quantity and computational cost. The lightweight network has low segmentation performance in multi-class segmentation tasks.
[0007] The present application is realized by the following technical solutions:
[0008] A lightweight medical image segmentation method based on 1x1 convolution, comprising the following steps:
[0009] S1, preprocessing the medical image dataset, and dividing the preprocessed dataset into a training set, a validation set and a test set according to a predetermined proportion;
[0010] S2, constructing a lightweight medical image segmentation model, the lightweight medical image segmentation model adopts a U-shaped encoder-decoder structure, adopts a cascaded multi-scale feature fusion module for feature map extraction in each layer of the encoder-decoder, adopts 1x1 convolution for channel adjustment of the feature map, and adopts maximum pooling and bilinear interpolation respectively for down-sampling and up-sampling of the feature map; the cascaded multi-scale feature fusion module includes a super-light shift convolution module, the super-light shift convolution module combines a standard convolution into a combination of a 1x1 convolution and a dynamic spatial shift operation, while reducing the parameter quantity, the receptive field of the 1x1 convolution kernel is expanded, and a super-light shift convolution feature map is output; the cascaded multi-scale feature fusion module combines super-light shift convolution feature maps with different spatial shift steps, and adopts a cascaded information compensation mechanism to improve the information loss caused by the dynamic spatial shift operation;
[0011] S3, given the network training parameters, training the lightweight medical image segmentation model using the training set and the validation set until the network converges;
[0012] S4, inputting the test set into the lightweight medical image segmentation model trained in step S3, and outputting the medical image target segmentation result.
[0013] Further, the preprocessing of the medical image dataset specifically comprises: randomly rotating and flipping the medical images, and uniformly adjusting the size of the input images to the same size.
[0014] Further, the ultra-light shift convolution module comprises a main branch, the main branch being composed of two 1x1 convolution-batch normalization and dynamic spatial shift operation alternating combination, and a weak branch composed of 1x1 convolution-batch normalization is added outside the main branch.
[0015] Further, the processing procedure of the cascaded multi-scale feature fusion module is as follows:
[0016] S2.1, channel compression is performed on the feature map, 1x1 convolution is used to adjust the channel of the input feature map to C / 3, to obtain the output feature map of the cascaded multi-scale feature fusion module in the first stage
[0017] X1=PWConv(X)
[0018] wherein, HxW represents the spatial resolution of the feature map, C represents the number of channels, and PWConv() represents 1x1 convolution;
[0019] S2.2, the channel-compressed feature map X1 is input into three ultra-light shift convolution modules with different spatial shift steps, respectively, to obtain three groups of output feature maps
[0020] S2.3, a cascaded information compensation mechanism is designed, the output feature map of the current ultra-light shift convolution module is added to the output feature map of the previous ultra-light shift convolution module with a smaller shift step after the current ultra-light shift convolution module processes the output feature map X1, the information loss is compensated by step-by-step accumulation, specifically:
[0021]
[0022] wherein, represents the output feature map of the current ultra-light shift convolution module, represents the output feature map of the previous ultra-light shift convolution module, represents that the output feature map of the first ultra-light shift convolution module is not additionally fused;
[0023] S2.4, the three groups of output feature maps obtained in step S2.3 are channel spliced, and then channel shuffling is performed, to obtain the final output feature map Specifically:
[0024]
[0025] Further, the processing flow of the ultra-light shift convolution module is as follows:
[0026] S2.21, the processing steps of the main branch are:
[0027] X strong =ConvBN(Shift(ConvBN(X1),s)
[0028] wherein X1 is the output feature map of the cascaded multi-scale feature fusion module in the first stage, ConvBN() represents the combination of 1x1 convolution and batch normalization, Shift(X ConvBN ,s) represents performing a dynamic spatial shift operation on the feature map X ConvBN with a shift step s, and X strong represents the output feature map of the strong branch;
[0029] S2.22, the processing steps of the weak branch are:
[0030] X weak =ConvBN(X1)
[0031] wherein X weak represents the output feature map of the weak branch;
[0032] S2.23, the features of the double branches are fused, and nonlinear activation is performed, and a residual connection is introduced, and the output of the ultra-light shift convolution module can be represented as:
[0033] X ULSC =GELU(X weak +X strong )+shortcut
[0034] wherein X ULSC represents the output feature map of the ultra-light shift convolution module.
[0035] Further, the dynamic spatial shift operation is specifically:
[0036] The feature map X ConvBN is divided into 8 groups of feature maps by channel averaging, and each group contains C / 8 channels, and the feature maps obtained by grouping can be represented as:
[0037] X ConvBN =[X1,X2,X3,…,X8], k=1,2,3,…8
[0038] wherein X k represents the feature map of the kth group, k represents the group number, and g represents the number of channels of each group of feature maps.
[0039] The spatial shifts in eight different directions of up, down, left, right and four diagonals are performed on eight groups of feature maps respectively, the shift base vector of the kth group of feature maps is Δk, and the shift feature map of the kth group is is represented as:
[0040]
[0041] wherein Δ·s represents the spatial shift of the feature map in the specified direction with a step size of s;
[0042] The shift feature map of the kth group obtained The trainable parameters are introduced for grouping weighting, specifically:
[0043]
[0044] wherein θ represents a group of learnable weights, represents the weighted shift feature map of the kth group.
[0045] The obtained weighted shift feature maps of each group are spliced:
[0046]
[0047] wherein Concat() represents splicing the feature maps of each group in the channel dimension, X Shift represents the output feature map of the dynamic spatial shift operation.
[0048] Further, the loss function of the lightweight medical image segmentation model is:
[0049] For a binary classification medical image dataset, the combination of the Dice loss function and the BCE loss function is used as the total loss function:
[0050]
[0051] wherein L total represents the total loss function, L Dice represents the Dice loss function, and L BCE represents the binary cross-entropy loss function.
[0052] For a four-class medical image dataset, the combination of the Dice loss function and the CE loss function is used as the total loss function:
[0053]
[0054] wherein L total represents the total loss function, L Dice represents the Dice loss function, and L CE represents the cross-entropy loss function.
[0055] Further, in the step S3 training process, the batch size is set to 8, and the Adam optimizer is used to update the parameters, and the initial learning rate is set to 0.001.
[0056] Compared with the prior art, the present application has the following beneficial effects:
[0057] (1) The present application designs a new cascaded multi-scale feature fusion module CMSF as the feature extraction layer of the network model ShiftU-Net to efficiently integrate the multi-scale information in medical images. The module first uses 1x1 convolution to compress the channel of the input feature map, and then combines the ultra-light shift convolution block ULSC with different spatial shift scales to capture multi-scale features. To make up for the information loss caused by a larger shift step, the present application designs a cascaded information compensation mechanism to effectively improve this problem through deep interaction between multi-scale features. Finally, the feature map is reorganized through channel shuffling to realize efficient fusion of cross-scale features. Unlike the mainstream multi-scale method, the CMSF proposed in the present application has lower computational cost and is more efficient.
[0058] (2) The ultra-light shift convolution block module ULSC constructed in the present application splits the standard convolution into the combination of 1x1 pointwise convolution and dynamic spatial shift operation DynaShift. In order to further improve the flexibility of the module, the dynamic spatial shift operation DynaShift performs grouped spatial shift on the feature map, so that the 1x1 convolution kernel can effectively simulate the receptive field of the standard convolution kernel. By introducing a small number of learnable parameters in DynaShift to weight the grouped feature maps in different shift directions, the model can adaptively adjust the importance of different shift directions during the training process. The ultra-light shift convolution block module constructed in the present application can significantly reduce the model parameter quantity while improving the feature extraction capability of the model.
[0059] The present application can be applied to the field of medical image analysis, such as lesion detection, organ segmentation, etc., and lays a solid foundation for precision medicine and intelligent diagnosis, and provides a new research idea and technical means for computer-aided diagnosis system. BRIEF DESCRIPTION OF DRAWINGS
[0060] Figure 1 The flow principle block diagram of the present application;
[0061] Figure 2 The principle diagram of the dynamic spatial shift operation proposed in the present application;
[0062] Figure 3 The comparison diagram of the influence of different shift steps on the receptive field range;
[0063] Figure 4This is a visual comparison of the segmentation results of the present invention and existing mainstream methods on public datasets. DETAILED DESCRIPTION
[0064] The present invention will be further described in detail below with reference to specific embodiments, which are intended to explain the present invention rather than to limit it.
[0065] like Figure 1 As shown in FIG, a lightweight medical image segmentation method based on 1×1 convolution includes the following steps:
[0066] (1) Dataset preprocessing: First, the medical images are randomly rotated and flipped to enhance the generalization ability of the model; second, the size of the input images is uniformly adjusted to 224×224 pixels to ensure the normalization of the model input; finally, the dataset is divided into training set, validation set, and test set according to the preset ratio.
[0067] (2) Propose a lightweight medical image segmentation model ShiftU-Net model: Figure 1 In the middle (a) figure, the ShiftU-Net model proposed in the present invention adopts a U-type encoding and decoding structure. The encoder part extracts image features layer by layer, and the decoder restores the image information layer by layer, and finally obtains a segmentation result with a size consistent with the input image. Specifically, the present invention includes two core parts: ultra-light shift convolution (ULSC) and cascaded multiscale feature fusion (Cascaded Multiscale Feature Fusion, CMSF) module. ULSC can effectively expand the receptive field of the convolution kernel while reducing the number of parameters by splitting the standard convolution into a combination of 1×1 point-by-point convolution and dynamic spatial shift operation (DynaShift). The CMSF module effectively integrates richer multi-scale information by combining ULSCs with different shift steps, and adopts a cascaded information compensation mechanism to effectively improve the information loss problem caused by the spatial shift operation.
[0068] (3) Model training: In the training phase, given the network training parameters, ShiftU-Net is trained until the network converges;
[0069] (4) Model prediction: In the testing phase, the test image is input into ShiftU-Net to obtain the target segmentation result in the medical image.
[0070] Example
[0071] (1) Dataset source and preprocessing operation: The skin lesion dataset (ISIC2018) is a large-scale dermoscopy image dataset released by the International Skin Imaging Collaboration, which contains 2594 skin lesion images. 80% of the image data is used for the training process of the present application, and the remaining 20% of the data is used for the test process of the present application. The colorectal gland segmentation dataset (GLAS) is derived from the 2015 gland segmentation challenge, which contains 165 images from 16 H&E histology sections. Among them, 85 images are used for training, and 80 images are used for testing. The cell nucleus dataset (MNS) is derived from the 2018 multi-organ cell nucleus segmentation challenge, which contains multiple organ nucleus segmentation images, including breast, liver, kidney, etc. MoNuSeg has 30 images for training and 14 images for testing. The heart dataset is derived from the 2017 automated cardiac diagnosis challenge, which contains short-axis MRI data from 100 patients. The dataset includes healthy patients, patients with previous myocardial infarction, dilated cardiomyopathy, hypertrophic cardiomyopathy and right ventricular abnormalities, with 20 scans per group. The ACDC dataset contains three segmentation categories: left ventricle (LV), right ventricle (RV) and myocardium (MYO). In order to improve the computational efficiency and generalization of the network proposed in the present application, the following processing operations are performed on the dataset during training: ① The original size of the dataset is uniformly adjusted to 224x224, ② The original image is rotated by 90°, 180° and 270°, and randomly flipped horizontally and vertically at a ratio of 0.5.
[0072] (2) The implementation process of the dynamic spatial shift designed by the present application: 1x1 convolution is a commonly used component of network architecture, which has significant advantages in reducing model parameter quantity and channel dimension information interaction. This approach is widely used in Inception architecture. However, a single 1x1 convolution kernel cannot effectively model the spatial features of the feature map, because the 1x1 convolution kernel is limited by its receptive field range and does not consider the relationship between the pixel and its surrounding pixels when extracting features. In order to solve this limitation, the present application designs a new dynamic spatial shift operation DynaShift to enhance the spatial representation ability of 1x1 convolution, breaking through the limitation that 1x1 convolution cannot model spatial features. Figure 3 Different shift steps have different effects on 1x1 convolution kernels, as shown in the following figure: Figure 3 (a) represents that when the shift step is 0, the 1x1 convolution kernel can only focus on a single pixel, and at this time it cannot model the spatial correlation between different pixels; Figure 3 (b) represents that when the shift step is 1, the 1x1 convolution kernel obtains a 3x3 range of receptive field, which can realize the modeling of spatial information of the image; when the shift step gradually increases, the range of the area that the 1x1 convolution kernel can focus on also increases, Figure 3(c) and Figure 3 (d) indicates that when the shift step is 2 and 3, the 1x1 convolution kernel respectively obtains the receptive field range of 5x5 and 7x7.
[0073] (a) First, given a set of feature maps where HxW represents the spatial resolution of the feature map, and C represents the number of channels. The present application first divides it into 8 groups by channel average, and each group contains C / 8 channels (in order to ensure that it can be divided evenly, the present application sets C to be a multiple of 8). The feature map X obtained by grouping can be represented as:
[0074] X ConvBN = [X1, X2, X3, …, X8], k = 1, 2, 3, … 8
[0075] where X k represents the feature map of the kth group, k represents the group number, and g represents the number of channels of each group of feature maps;
[0076] (b) Next, referring to the standard convolution 3x3 size receptive field range, spatial shifts in eight different directions are performed on the eight groups of feature maps. As shown in Figure 2 , taking the first group of feature maps as an example, the dashed part represents the initial state of the feature map, and then it is moved down by one pixel size in the spatial dimension to obtain the shifted feature map, and the shaded area below it represents 0 padding, which ensures that the spatial resolution of the feature map before and after shifting is consistent. Next, the remaining groups of feature maps are respectively shifted in different directions in the same way, and the pre-defined 8 groups of shift base vectors Δ and the kth group of shifted feature maps can be represented as:
[0077]
[0078] where Δ·s represents the spatial shift of the feature map in the specified direction with a step size of s.
[0079] (c) In order to enable the network to dynamically adjust the importance of different shift directions during training, to strengthen the influence of important shift directions on spatial feature extraction, and to weaken unimportant shift directions, the present application introduces some trainable parameters to further group weight them:
[0080]
[0081] where θ represents a set of learnable weights, represents the weighted shifted feature map of the kth group.
[0082] (d) Finally, the obtained groups of weighted shifted feature maps are spliced:
[0083]
[0084] where Concat() represents concatenating each group of feature maps in the channel dimension, X Shift represents the output feature map of the dynamic spatial shift operation.
[0085] (3) The implementation process of the ultra-light shift convolution ULSC designed by the application: the ULSC adopts a double-branch architecture containing a residual design. As shown in FIG. Figure 1 (b) of the drawings, the main branch is composed of two 1x1 convolution-batch normalization and dynamic spatial shift alternately combined, which can effectively extract spatial information and has strong feature expression ability, and can be used as a strong branch of the module to realize cross-channel information interaction and spatial feature capture of the feature map. In order to further enrich the feature space, the application adds a weak branch composed of 1x1 convolution-BatchNorm outside the main branch.
[0086] (a) the feature passing through the strong branch can be represented as:
[0087] X strong = ConvBN(Shift(ConvBN(X1), s))
[0088] where s represents the shift step, X1 is the output feature map of the first stage of the cascaded multi-scale feature fusion module, ConvBN() represents the combination of 1x1 convolution-batch normalization, and Shift() represents the proposed dynamic spatial shift operation.
[0089] (b) the feature map passing through the weak branch can be represented as:
[0090] X weak = ConvBN(X1)
[0091] (c) finally, the features of the double branches are fused and nonlinearly activated. In addition, in order to help the model to better propagate information in the training process and solve the risk of gradient disappearance in the deep network, residual connection is introduced. The output of the module can be represented as:
[0092] X ULSC = GELU(X weak + X strong )+ shortcut
[0093] where X ULSC represents the output feature map of the ultra-light shift convolution module.
[0094] (4) The implementation process of the cascaded multi-scale feature fusion method designed by the application: as shown in FIG. Figure 1As shown in FIG. c, the cascade multi-scale feature fusion module CMSF proposed in the application is mainly composed of an efficient 1x1 convolution, which can greatly reduce the parameter quantity of the model and improve the running efficiency of the model. By efficiently combining the ultra-light shift convolution block with different shift steps, CMSF can capture more comprehensive multi-scale features and improve the segmentation performance of the model.
[0095] (a) First, the channel compression is performed on the feature map, and the input feature map is adjusted in the channel by using the 1x1 convolution to make the number of channels C / 3, and the output feature map of the cascade multi-scale feature fusion module in the first stage
[0096] X1=PWConv(X)
[0097] wherein, PWConv() represents the 1x1 convolution.
[0098] (b) Then, the channel compressed feature map is input into three different ULSC structures respectively, and three groups of output feature maps are obtained As Figure 3 shown, in the CMSF module, in order to realize multi-scale feature extraction, each ULSC is assigned with different spatial shift steps (shift step = [1, 2, 3]) when initialized; through this multi-direction and multi-scale spatial shift, the ULSC can be equivalent to a convolution kernel with a larger receptive field, which is equivalent to 3x3, 5x5, 7x7 respectively, while maintaining the advantages of 1x1 convolution in terms of parameter quantity and computational efficiency.
[0099] Since a larger shift step can expand the receptive field, it may also cause the model to lose key feature information in the process of spatial shift transformation. In order to alleviate this information loss, the application designs a cascade information compensation mechanism in the CSMF: after the current ULSC processes the original input feature map, its output is added to the output of the previous ULSC with a smaller shift step. Through this step-by-step accumulation, the model can effectively compensate for the loss of information and retain more rich multi-scale features. This process can be represented as:
[0100]
[0101] wherein, represents the output feature map of the current ultra-light shift convolution module, represents the output feature map of the previous ultra-light shift convolution module, represents that the output feature map of the first ultra-light shift convolution module is not additionally fused with features;
[0102] (c) Finally, the obtained three groups of multi-scale feature maps are spliced in the channel. In order to enhance the feature interaction of different scales, the application carries out channel mixing after feature splicing to obtain the final output
[0103]
[0104] As an efficient composite convolution structure, the CMSF fully plays the advantages of the ULSC module in multi-scale transformation, and improves the problem of key information loss that may occur in the process of the ULSC performing spatial shift on the feature map through the cascading compensation mechanism. The module realizes the unification of reducing the calculation burden and improving the model feature extraction capability, overcomes the defect that the traditional method is difficult to effectively balance efficiency and high performance, and provides a new feasible scheme for the research of medical image segmentation method.
[0105] (5) The setting of the loss function in the application: in the training process of the model, mainly adopts the Dice loss, the BCE loss and the CE loss as the loss function. For the ISIC2018, GLAS and MNS three binary classification data sets, the combination of the Dice loss and the BCE loss is adopted as the total loss:
[0106]
[0107] For the four-classification data set of ACDC, the combination of the Dice loss and the CE loss is adopted as the total loss:
[0108]
[0109] The effect of the application can be further illustrated by the following experiments.
[0110] All experiments are implemented using Python3.9 and Pytorch1.10 in a server equipped with NVIDIA GeForce RTX 3090 24GB graphics card. In the training process, the batch size is set to 8, and the Adam optimizer is used to update the model parameters, and the initial learning rate is set to 0.001. The application evaluates the algorithm performance by calculating the following several index parameters, which are:
[0111]
[0112] Wherein, IoU represents the intersection over union of the predicted region and the real region, and Dice represents the similarity coefficient of the predicted region and the real region. Wherein, TP (True Positive) represents the number of pixels predicted as the category and actually as the category, that is, the correct prediction result; FP (False Positive) represents the number of pixels predicted as the category but not actually as the category, that is, the false detection result; and FN (False Negative) represents the number of pixels actually as the category but not predicted, that is, the missed detection result.
[0113] In order to verify the accuracy and segmentation efficiency of the present application in different data sets, the present application is compared with 12 kinds of current mainstream methods. These comparison methods include UNet, Attention UNet, ResUNet++, UCTransNet, Swin-UNet, TransResUNet, TransCeption, TransUNet, ACCU-Net, UltraLightVM-UNet, VM-UNet, and VM-UNetv2. As shown in Table 1, in order to fully demonstrate the effectiveness of the proposed method, three different size models are trained, which are named ShiftU-Net-T, ShiftU-Net-S and ShiftU-Net-B according to the different parameter quantities. The same experimental environment and experimental settings are used in the experiment process. A large number of experimental results prove that the proposed method has superior performance on four public data sets. Especially in the GLAS data set, compared with other methods, ShiftU-Net-B increases the Dice and IoU by at least 1.56% and 2.6%, respectively. In addition, the proposed method maintains a leading position in model compactness and computational efficiency. The experimental results fully verify the advantages of the present application in achieving an efficient balance between segmentation accuracy and computational efficiency. In addition, the visualization comparison chart of the segmentation result is shown in Figure 4 As shown in the figure, on the ISIC2018 and ACDC data sets, the present application obtains better segmentation results; on the GLAS data set, compared with other methods, the segmentation result of the present application is closer to the label, and it is not easy to appear false detection or missed detection phenomenon.
[0114] To further analyze the efficiency of the model, the present application further compares some common segmentation methods and lightweight methods on the ACDC dataset. Including UNet, Attention UNet, ResUNet++, Dense-UNet, CE-Net, VM-UNet, MobileNet, GhostNet, EGE-UNet, UNext, UltraLight VM-UNet. As shown in Table 2, the classic segmentation model usually faces the challenge of large network parameters and high computing cost, such as the parameter amount of UNet is 34.52M, the Flops is 65.64G, and the model size is 121.33MB, which is not conducive to application in resource-constrained scenarios. Although some existing lightweight methods have achieved great advantages in model parameter amount and computing amount, they have made different degrees of compromise in segmentation performance. On the contrary, the ShiftU-Net-T proposed in the present application can still maintain high segmentation accuracy while greatly improving the efficiency of the model. Compared with EGE-UNet, UNext and UltraLight-VMUNet, the average Dice is improved by 3.95%, 0.82% and 5.75% respectively. ShiftU-Net-B compared with other methods, achieved the highest Dice score, reaching 92.15%, while maintaining a leading level in parameter amount and computing amount.
[0115] Table 1 Comparison of the present application with the most advanced segmentation method in four different datasets
[0116]
[0117] Table 2 Efficiency comparison of the present application with different models
[0118]
Claims
1. A lightweight medical image segmentation method based on 1×1 convolution, characterized in that: The following steps are involved: S1, preprocessing the medical image dataset and dividing the preprocessed dataset into a training set, a validation set, and a test set according to a preset ratio; S2, constructing a lightweight medical image segmentation model, which adopts a U-shaped encoder-decoder structure, adopts a cascaded multi-scale feature fusion module to extract feature maps in each layer of the encoder and decoder, adopts 1×1 convolution to adjust the channels of the feature maps, and adopts maximum pooling and bilinear interpolation to perform downsampling and upsampling of the feature maps respectively; the cascaded multi-scale feature fusion module includes an ultra-light shift convolution module, which expands the receptive field of the 1×1 convolution kernel while reducing the number of parameters by splitting the standard convolution into a combination of 1×1 convolution and dynamic spatial shift operations, and outputs an ultra-light shift convolution feature map; the cascaded multi-scale feature fusion module combines ultra-light shift convolution feature maps with different spatial shift steps, and adopts a cascaded information compensation mechanism to improve the information loss caused by the dynamic spatial shift operation; S3, given network training parameters, training the lightweight medical image segmentation model using the training set and the validation set until the network converges; S4: Input the test set into the lightweight medical image segmentation model trained in step S3, and output the medical image target segmentation result.
2. A lightweight medical image segmentation method based on 1×1 convolution according to claim 1, characterized in that: The preprocessing of the medical image dataset specifically includes: randomly rotating and randomly flipping the medical images, and uniformly adjusting the sizes of the input images to the same size.
3. The lightweight medical image segmentation method based on 1×1 convolution according to claim 1, characterized in that: The ultra-light shift convolution module includes a trunk branch, which is an alternating combination of two 1×1 convolution-batch normalization and dynamic spatial shift operations. A weak branch consisting of 1×1 convolution-batch normalization is added to the trunk branch.
4. The lightweight medical image segmentation method based on 1×1 convolution according to claim 1, characterized in that: The processing flow of the cascaded multi-scale feature fusion module is as follows: S2.1, perform channel compression on the feature map, use 1×1 convolution on the input feature map After channel adjustment, the number of channels becomes C / 3, and the output feature map of the cascaded multi-scale feature fusion module in the first stage is obtained. X1=PWConv(X) Among them, H×W represents the spatial resolution of the feature map, C represents the number of channels, and PWConv() represents 1×1 convolution; S2.2, the channel-compressed feature map X1 is input into three ultra-light shift convolution modules with different spatial shift steps to obtain three sets of output feature maps. S2.3, design a cascade information compensation mechanism. After processing the output feature map X1, the current ultra-lightly shifted convolution module adds the output feature map of the current ultra-lightly shifted convolution module to the output feature map of the previous ultra-lightly shifted convolution module with a smaller shift step size. The information loss is compensated by step-by-step accumulation. Specifically: in, Represents the output feature map of the current ultra-light shift convolution module, Represents the output feature map of the previous ultra-light shift convolution module, Indicates that no additional feature fusion is performed on the output feature map of the first ultra-light shift convolution module; S2.4, the three sets of output feature maps obtained in step S2.3 are channel-joined, and then channel-shuffled to obtain the final output feature map Specifically:
5. The lightweight medical image segmentation method based on 1×1 convolution according to claim 4, characterized in that: The ultra-light shift convolution module processing flow is as follows: S2.21, the processing steps for the trunk branch are: X strong =ConvBN(Shift(ConvBN(X1),s)) Among them, X1 is the output feature map of the cascaded multi-scale feature fusion module in the first stage, ConvBN() represents the combination of 1×1 convolution-batch normalization, Shift(X ConvBN , s) represents the feature map X after ConvBN() ConvBN Perform dynamic spatial shift operation, s represents the shift step, X strong Represents the output feature map of the strong branch; S2.22, the processing steps for weak branches are: X weak =ConvBN(X1) Among them, X weak Represents the output feature map of the weak branch; S2.23, the features of the two branches are fused and nonlinear activation is performed, and residual connections are introduced. The output of the ultra-light shift convolution module can be expressed as: X ULSC =GELU(X weak +X strong )+shortcut Among them, X ULSC Represents the output feature map of the ultra-lightly shifted convolution module.
6. The lightweight medical image segmentation method based on 1×1 convolution according to claim 5, characterized in that: The dynamic spatial shift operation is specifically as follows: The feature map X ConvBN The feature maps are divided into 8 groups by channel. The number of channels in each group is C / 8. The feature maps obtained by grouping can be expressed as: Among them, X k represents the feature map of the kth group, k represents the group number, and g represents the number of channels of each group of feature maps; The 8 groups of feature maps are shifted in eight different directions, namely, up, down, left, right and four diagonals. The shift basis vector Δ of the k-th group feature map and the shift feature map of the k-th group are Expressed as: Δ={(0,-1),(0,+1),(-1,0),(+1,0),(+1,+1),(-1,-1),(-1,+1),(+1,-1)} Among them, Δ·s represents the spatial shift of the feature map in the specified direction with a step size of s; The shift feature map of the kth group obtained Introduce trainable parameters for group weighting, specifically: Among them, θ represents a set of learnable weights, Represents the weighted shift feature map of the kth group; Concatenate the obtained groups of weighted shift feature maps: Among them, Concat() means concatenating each set of feature maps in the channel dimension, X Shift Represents the output feature map of the dynamic spatial shift operation.
7. The lightweight medical image segmentation method based on 1×1 convolution according to claim 1, characterized in that: The loss function of the lightweight medical image segmentation model is: For the binary classification medical image dataset, a combination of the Dice loss function and the BCE loss function is used as the total loss function: Among them, L total Represents the total loss function, L Dice represents the Dice loss function, L BCE represents the binary cross entropy loss function; For the four-category medical image dataset, a combination of the Dice loss function and the CE loss function is used as the total loss function: Among them, L total Represents the total loss function, L Dice represents the Dice loss function, L CE represents the cross entropy loss function.
8. The lightweight medical image segmentation method based on 1×1 convolution according to claim 1, characterized in that: During the training process of step S3, the batch size is set to 8, and the Adam optimizer is used to update the parameters, and the initial learning rate is set to 0.001.