A lightweight medical image segmentation method and system based on Ghostnet

By using the improved Unet network model Ghostnet and the CBAM attention mechanism, a lightweight medical image segmentation method is constructed, which solves the problems of large number of parameters and computational complexity of existing models, and achieves faster inference speed and higher segmentation accuracy. It is suitable for medical image segmentation tasks on various devices.

CN115994892BActive Publication Date: 2026-03-17HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing medical image segmentation models have a large number of parameters, are computationally complex, and have slow inference, making them difficult to apply effectively in tasks with limited data samples. They are also costly and difficult to run on ordinary devices.

Method used

We employ an improved Unet network model, Ghostnet, as the backbone feature extraction network. By combining the CBAM attention mechanism and the Ghostbottleneck structure, we construct a lightweight medical image segmentation method. Through the combination of encoder and decoder, we achieve efficient feature map extraction and stitching, reduce the number of parameters, and improve segmentation efficiency.

Benefits of technology

It achieves faster inference speed and fewer parameters, improving the accuracy and efficiency of medical image segmentation. It is applicable to a variety of devices, and particularly improves diagnostic efficiency and accuracy in computer-aided diagnosis and smart healthcare.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115994892B_ABST
    Figure CN115994892B_ABST
Patent Text Reader

Abstract

The application discloses a kind of light medical image segmentation method and system based on ghostnet, comprising: constructing image segmentation model, using improved Unet network model ghsotnet as main feature extraction network, comprising: encoder, decoder and CBAM attention mechanism;The picture to be segmented is input into the image segmentation model constructed in step 1, the picture to be segmented is encoded by the encoder, and the channel numbers of the sub-feature maps E1~E5 obtained are 16, 24, 40, 80 and 160 respectively, the size of the image is reduced to 1 / 2 of the original after each encoding layer.The decoder is used to restore the sub-feature map to the size of the input image, and output the segmentation result p0;Finally, the segmented result graph is displayed.The application proposes a kind of light segmentation network GAUnet according to the above situation, has faster inference speed, less parameter amount, obtains quite or better segmentation level, and the lightness, accuracy and high efficiency of GAUnet can be well applied to most machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image segmentation technology, specifically to a lightweight medical image segmentation method and system based on Ghostnet. Background Technology

[0002] The purpose of medical image segmentation is to make changes in anatomical or pathological structures in images clearer; it plays a crucial role in computer-aided diagnosis and intelligent healthcare, greatly improving diagnostic efficiency and accuracy. Currently popular medical image segmentation tasks include liver and liver tumor segmentation, brain and brain tumor segmentation, optic disc segmentation, cell segmentation, lung segmentation, and lung nodules, among others.

[0003] In 2015, Olaf Ronneberger et al. proposed the Unet network model, which is based on an encoder-decoder structure and uses long-distance skip connections to combine details from the lower layers. This effectively compensates for the loss of spatial information during the downsampling process and helps the network recover more accurate localization. This is crucial for dense segmentation tasks that are very detail-oriented, such as medical image segmentation, remote sensing image segmentation, and image matting.

[0004] In pursuit of improved accuracy, some models based on modified UET networks have deeper convolutional layers. However, these often result in a large number of parameters, complex computations, and slow inference. They tend to perform poorly in segmentation tasks with limited data samples. Furthermore, the excessive number of parameters consumes significant amounts of GPU memory, leading to high costs and low efficiency. Consequently, training these neural networks requires specific external conditions. Summary of the Invention

[0005] Purpose of the invention: In order to overcome the shortcomings of the prior art, the present invention provides a lightweight medical image segmentation method based on Ghostnet, which solves the above-mentioned technical problems and provides a lightweight medical image segmentation system based on Ghostnet.

[0006] Technical solution: One aspect of the present invention provides a lightweight medical image segmentation method based on Ghostnet, comprising the following steps:

[0007] An image segmentation model is constructed, which uses the improved Unet network model ghsotnet as the backbone feature extraction network, including: encoder, decoder and CBAM attention mechanism;

[0008] First, the image to be segmented is input into the encoder for encoding to obtain sub-feature maps with multiple channels. The encoder consists of six encoding layers, namely convolutional layers, ghostbottleneck1, ghostbottleneck2, ghostbottleneck3, ghostbottleneck4, and ghostbottleneck5. The encoder encodes the image to be segmented to obtain sub-feature maps E1 to E5 with 16, 24, 40, 112, and 160 channels respectively.

[0009] Next, the sub-feature maps E1 to E4 are input into the corresponding CBAM attention mechanism channels to obtain sub-feature maps E1' to E4' respectively. E5 is upsampled to obtain M5. M5 and E4' are concatenated in the channel dimension. After passing through the fourth decoding layer, a feature map of size M4 is output. It is then concatenated with E3'. After passing through the third decoding layer, a feature map of size M3 is output. It is then concatenated with E2'. After passing through the second decoding layer, a feature map of size M3 is output. It is then concatenated with E1'. After passing through the first decoding layer, a feature map of size M2 is output. Finally, the number of image channels is adjusted by a 1*1 convolution kernel to be equal to the number of segmentation targets num_classes, and the final feature map p0 is output.

[0010] The resulting image after segmentation is displayed.

[0011] Furthermore, including:

[0012] The ghsotnet also includes: ghostbottleneck1 to ghostbottleneck5, which are composed of 2, 2, 2, 6, and 5 ghostbottlenecks respectively.

[0013] Furthermore, including:

[0014] The ghostbottleneck performs L nonlinear transformation operations on the input data, where L is the number of ghostbottlenecks. These nonlinear transformation operations include:

[0015] If stride = 2, the input feature map T1 is sequentially subjected to ghostmodule, BN, ReLU activation, channel-wise convolution, BN, ghostmodule, BN, and finally the feature map T2 is obtained. Then the input feature map T1 and the feature map T2 are added together to obtain the output feature map T3.

[0016] If stride=1, the input feature map T1 is activated by ghostmodule, BN, and ReLU. The ghostmodule and BN are used to obtain feature map T2. Then, the input feature map T1 and feature map T2 are added together to obtain the output feature map T3. The ghostmodule includes basic convolution and channel-wise convolution, and the channels are added together.

[0017] Furthermore, including:

[0018] The attention mechanism of CBAM includes:

[0019] Channel attention: The input feature map is of size H×W×C. After global max pooling and global average pooling, the output is two C×1×1 feature maps. These two maps are then fed into a shared multilayer perceptron. The feature maps are first reduced in dimensionality and then increased in dimensionality. The two output feature maps are then added together. The weights of each channel of the feature map are normalized by the sigmoid activation function. The normalized weights are then multiplied by the input feature map.

[0020] Spatial attention: The feature maps output by channel attention are processed by performing global max pooling and global average pooling respectively. The two output feature maps are concatenated along the number of channels, and then the number of channels is adjusted by a 1×1 convolution. Finally, the weights are normalized by the sigmoid function, and the normalized weights are multiplied by the input feature map.

[0021] Furthermore, including:

[0022] The decoding layer sequentially includes: Dsc-ghost convolutional block, BN, ReLU activation, Dsc-ghost convolutional block, BN, ReLU activation, and upsampling. The Dsc-ghost convolutional block process includes: input feature map T1 is convolved with a 1*1 convolutional kernel, BN, and ReLU activation to obtain feature map T2; input feature map T1 is convolved with basic convolution, BN, and ReLU activation to obtain feature map T3; input feature map T1 is convolved channel-wise, BN, and ReLU activation, and convolved pointwise, BN, and ReLU activation to obtain feature map T4; T3 and T4 are added in the channel dimension to obtain feature map T5; T5 is squeezed and activated by a network mechanism to obtain feature map T6; and feature maps T2 and T6 are added to obtain output feature map T7.

[0023] Furthermore, including:

[0024] The squeezing and excitation network includes:

[0025] The squeezing network part: compresses a feature map into one dimension. When the initial feature map dimension is C*H*W, where C is the number of channels, and H and W are the height and width of the image, the squeezing network compresses the feature map into a size of C*1*1 through global average pooling.

[0026] Activation network part: After obtaining the C*1*1 representation of the squeeze network part, an FC fully connected layer is added to predict the importance of each channel, obtain the importance of different channels, and then activate the corresponding channels of the previous feature map for operation.

[0027] On the other hand, the present invention provides a lightweight medical image segmentation system based on Ghostnet, which includes the following modules:

[0028] The image acquisition module is used to acquire medical images that need to be segmented.

[0029] The image segmentation model building module is used to employ the improved Unet network model ghsotnet as the backbone feature extraction network, including: encoder, decoder and CBAM attention mechanism;

[0030] First, the medical image to be segmented is input into the encoder for encoding to obtain sub-feature maps with multiple channels. The encoder consists of six encoding layers, namely convolutional layers, ghostbottleneck1, ghostbottleneck2, ghostbottleneck3, ghostbottleneck4, and ghostbottleneck5. The encoder encodes the image to be segmented to obtain sub-feature maps E1 to E5 with 16, 24, 40, 112, and 160 channels respectively.

[0031] Next, the sub-feature maps E1 to E4 are input into the corresponding CBAM attention mechanism channels to obtain sub-feature maps E1' to E4' respectively. E5 is upsampled to obtain M5. M5 and E4' are concatenated in the channel dimension. After passing through the fourth decoding layer, a feature map of size M4 is output. It is then concatenated with E3'. After passing through the third decoding layer, a feature map of size M3 is output. It is then concatenated with E2'. After passing through the second decoding layer, a feature map of size M3 is output. It is then concatenated with E1'. After passing through the first decoding layer, a feature map of size M2 is output. Finally, the number of image channels is adjusted by a 1*1 convolution kernel to be equal to the number of segmentation targets num_classes, and the final feature map p0 is output.

[0032] The display module is used to display the segmented result image.

[0033] Beneficial effects: Compared with the prior art, the significant advantages of the present invention are as follows:

[0034] This invention proposes a lightweight segmentation network, GAUnet, which boasts faster inference speed, fewer parameters, and superior segmentation performance. GAUnet's lightweight nature, accuracy, and high efficiency make it well-suited for most machines, indicating a promising market prospect. Furthermore, this segmentation method can be applied in hospitals and medical institutions, making changes in anatomical or pathological structures in images clearer; it plays a crucial role in computer-aided diagnosis and intelligent healthcare, significantly improving diagnostic efficiency and accuracy. Attached Figure Description

[0035] Figure 1 This is a diagram of the GAUnet structure as described in an embodiment of the present invention;

[0036] Figure 2 This is a flowchart of the ghostbottleneck process described in an embodiment of the present invention;

[0037] Figure 3 This is a flowchart of the Ghost convolutional block as described in an embodiment of the present invention;

[0038] Figure 4 This is a flowchart of the Dsc-ghost convolutional block as described in an embodiment of the present invention;

[0039] Figure 5 This is a flowchart of the squeezeandexcitation module according to an embodiment of the present invention;

[0040] Figure 6 This is a flowchart of the CBAM attention mechanism described in an embodiment of the present invention;

[0041] Figure 7 This is a segmentation result diagram according to an embodiment of the present invention. Detailed Implementation

[0042] The technical solution of the present invention will be described in detail below.

[0043] First, this invention provides a lightweight medical image segmentation method based on Ghostnet, comprising the following steps:

[0044] S1 acquires the medical image to be segmented. In this embodiment, a publicly available multi-organ segmentation dataset is used.

[0045] S2 constructs an image segmentation model that uses an improved Unet network model, ghsotnet, as the backbone feature extraction network, including an encoder, a decoder, and a CBAM attention mechanism.

[0046] First, such as Figure 1As shown, a 1-channel image to be segmented with a size of 256*256 pixels is input into the encoder for encoding, resulting in sub-feature maps E1 to E5 with 16, 24, 40, 112, and 160 channels respectively. After each encoding layer, the image size is reduced to half of its original size. The encoder consists of six encoding layers: convolutional layers, ghostbottleneck1, ghostbottleneck2, ghostbottleneck3, ghostbottleneck4, and ghostbottleneck5. The number of convolutional layers in the six encoding layers is 1, and ghostbottleneck1 to ghostbottleneck5 are composed of 2, 2, 2, 6, and 5 ghostbottlenecks (bottleneck layers) respectively.

[0047] like Figure 2 As shown, GhostBottomLeave performs L nonlinear transformation operations on the input data, where L is the number of GhostBottomLeave operations. These nonlinear transformation operations include, when stride = 2, applying GhostModule (Ghost convolutional block), BN (normalization), ReLU activation, channel-wise convolution, BN, GhostModule, BN to the input feature map T1 to obtain feature map T2. Then, the input feature map T1 and feature map T2 are added together to obtain the output feature map T3. When stride = 1, applying GhostModule, BN, ReLU activation, GhostModule, BN to the input feature map T1 to obtain feature map T2. Then, the input feature map T1 and feature map T2 are added together to obtain the output feature map T3. Figure 3 As shown, ghostmodule includes basic convolution (Primary_conv), channel-wise convolution (DepthWise convolution), and concat (summing the channels).

[0048] Secondly, the decoder restores the sub-feature maps to the size of the input image and outputs the segmentation result p0. Specifically, sub-feature maps E1 to E4 are input into the corresponding CBAM attention mechanism channels to obtain sub-feature maps E1' to E4' respectively. E5 is upsampled to obtain M5. M5 and E4' are concatenated in the channel dimension. After passing through the fourth decoding layer, a feature map of size M4 is output, which is then concatenated with E3'. After passing through the third decoding layer, a feature map of size M3 is output, which is then concatenated with E2'. After passing through the second decoding layer, a feature map of size M3 is output, which is then concatenated with E1'. After passing through the first decoding layer, a feature map of size M2 is output. Finally, the number of image channels is adjusted using a 1*1 convolution kernel to adjust the number of segmentation targets num_classes, and the final feature map P1 is output.

[0049] The decoder described above consists of four decoding layers. Each decoding layer includes Dsc-ghostmodule, BN, ReLU activation (an activation function), Dsc-ghostmodule (Dsc-ghost convolutional block), BN, ReLU activation, upsampling, and outputs p4, p3, p2, p1 from bottom to top.

[0050] like Figure 4 As shown, the Dsc-ghostmodule process includes: input feature map T1 is convolved with a 1*1 kernel, BN, and ReLU activation to obtain feature map T2; input feature map T1 is convolved with basic convolution, BN, and ReLU to obtain feature map T3; input feature map T1 is convolved channel-wise, BN, and ReLU activation, and then convolved pointwise, BN, and ReLU activation to obtain feature map T4; T3 and T4 are added together along the channel dimension to obtain feature map T5; T5 is processed by a squeeze & excitation mechanism to obtain feature map T6; and feature maps T2 and T6 are added together to obtain output feature map T7.

[0051] The feature map E5 with 160 channels is deconvolved to reduce its size to 112*16*16. It is then concatenated with E4' (which has undergone CBAM attention) along the channel dimension. After passing through the fourth decoding layer, the output size is 40*32*32, which is concatenated with E3'. After passing through the third decoding layer, the output size is 24*64*64, which is concatenated with E2'. After passing through the second decoding layer, the output size is 16*128*128, which is concatenated with E1'. After passing through the first decoding layer, the output size is 16*256*256. Finally, the number of image channels is adjusted using a 1*1 convolution kernel to match the number of segmentation targets num_classes, resulting in the final feature map p0.

[0052] like Figure 5 The diagram illustrates the squeeze and excitation mechanism. The squeeze part compresses a feature map into one dimension. If the initial feature map dimension is C*H*W, where C is the number of channels, and H and W are the height and width of the image, the squeeze mechanism uses global average pooling to compress the feature map to a size of C*1*1.

[0053] The excitation part involves obtaining the C*1*1 representation of the Squeeze, then adding a fully connected (FC) layer to predict the importance of each channel. After obtaining the importance of different channels, this prediction is applied (excited) to the corresponding channels of the previous feature map for further processing.

[0054] like Figure 6 The diagram illustrates the CBAM attention mechanism. First, channel attention: the input feature map E is of size H×W×C. After global max pooling and global average pooling, the width and height both become 1, resulting in two C×1×1 feature maps. These are then input into a shared MLP, where the feature maps are first reduced in dimensionality and then increased in dimensionality. The two output feature maps are then summed, and the weights of each channel of the feature map are normalized using a sigmoid activation function. Finally, the normalized weights are multiplied by the input feature map.

[0055] Spatial attention: The feature maps output by channel attention are processed by performing global max pooling and global average pooling respectively. The two output feature maps are concatenated in terms of the number of channels, and then the number of channels is adjusted by a 1×1 convolution. Finally, the weights are normalized by the sigmoid function. The normalized weights are then multiplied by the input feature degrees.

[0056] S3 displays the segmented result image.

[0057] This invention uses Ghostnet as the backbone feature extraction network and adds the CBAM attention mechanism. CBAM is not only a lightweight attention mechanism but also effectively combines spatial and channel information, ignoring irrelevant noise and focusing on key information. Simultaneously, the Ghost convolutional block is improved by adding pointwise convolutions to obtain more image feature information. A squeeze and excitation module is added to increase the receptive field of the convolution, enhancing the network's ability to extract multi-scale spatial information. Furthermore, the residual concept is introduced to alleviate the vanishing gradient descent and information loss problems. Compared with newer and current mainstream medical image segmentation networks, it has fewer parameters, faster speed, and fewer FLOPs, achieving comparable or better segmentation results. GAUnet's lightweight, accurate, and efficient nature makes it well-suited for most machines.

[0058] The regions to be segmented in the image are labeled. This example selects 623 images to be segmented and their labels, with 500 images used as the training set and 123 as the test set. The GAUnet dataset is input for model training. Then, only the test images to be segmented are input into the trained model. The segmentation result is shown in the image below. Figure 7 As shown. _r is ResNet34, and _m is MobileNet_V2.

[0059] Depend on Figure 7As shown, GAUnet demonstrates excellent results in segmenting small, multiple, and large objects, showcasing its superiority. To illustrate the effectiveness of this method, the same images were input into Unet, Unet++, and DeepLabV3+, which use ResNet34 and MobileV2 as the backbone feature extraction networks. The intersection-union ratio (mIoU), Dice coefficient, recall, and precision of the model's output segmentation results and the ground truth labels were calculated. The comparison results are shown in the table below:

[0060]

[0061] As shown in Table 1, GAUnet outperforms all other control networks in mIoU and Precision, while its Dice and Recall metrics are slightly lower than Uet++_resnet34. The number of network parameters and model size are shown in Table 2.

[0062]

[0063] As shown in Table 2, GAUnet has the fewest parameters. Uet++_resnet34, which performs slightly better in Dice and Recall metrics, has more than 7 times the number of parameters of GAUnet, far exceeding GAUnet's. Furthermore, the three models using the lightweight network Mobilenet_v2 as their backbone feature extraction network not only have a higher number of parameters than GAUnet, but also generally perform worse than GAUnet in all metrics.

[0064] The segmentation result image is as follows Figure 7 As shown. _r is ResNet34, and _m is MobileNet_V2. (By...) Figure 7 As shown, GAUnet demonstrates excellent results in segmenting small targets, multiple targets, and large targets, showcasing its superiority.

[0065] On the other hand, the present invention provides a lightweight medical image segmentation system based on Ghostnet, which includes the following modules:

[0066] The image acquisition module is used to acquire medical images that need to be segmented.

[0067] The image segmentation model building module is used to employ the improved Unet network model ghsotnet as the backbone feature extraction network, including: encoder, decoder and CBAM attention mechanism;

[0068] First, the medical image to be segmented is input into the encoder for encoding to obtain sub-feature maps with multiple channels. The encoder consists of six encoding layers, namely convolutional layers, ghostbottleneck1, ghostbottleneck2, ghostbottleneck3, ghostbottleneck4, and ghostbottleneck5. The encoder encodes the image to be segmented to obtain sub-feature maps E1 to E5 with 16, 24, 40, 112, and 160 channels respectively.

[0069] Next, the sub-feature maps E1 to E4 are input into the corresponding CBAM attention mechanism channels to obtain sub-feature maps E1' to E4' respectively. E5 is upsampled to obtain M5. M5 and E4' are concatenated in the channel dimension. After passing through the fourth decoding layer, a feature map of size M4 is output. It is then concatenated with E3'. After passing through the third decoding layer, a feature map of size M3 is output. It is then concatenated with E2'. After passing through the second decoding layer, a feature map of size M3 is output. It is then concatenated with E1'. After passing through the first decoding layer, a feature map of size M2 is output. Finally, the number of image channels is adjusted by a 1*1 convolution kernel to be equal to the number of segmentation targets num_classes, and the final feature map p0 is output.

[0070] The display module is used to display the segmented result image.

[0071] Other features of the system described in this invention are similar to those of the lightweight medical image segmentation method based on Ghostnet, and will not be repeated here.

[0072] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0077] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations to the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A lightweight medical image segmentation method based on ghostnet, characterized in that, The method comprises the following steps: An image segmentation model is constructed, which adopts a modified Unet network model ghostnet as a backbone feature extraction network, and comprises an encoder, a decoder and a CBAM attention mechanism; Firstly, the image to be segmented is input into the encoder for encoding to obtain a plurality of channel number sub-feature maps, and the encoder is composed of six encoding layers in total, which are a convolutional layer, ghostbottleneck1, ghostbottleneck2, ghostbottleneck3, ghostbottleneck4 and ghostbottleneck5, respectively; the image to be segmented is encoded by the encoder to obtain sub-feature maps E1-E5 with channel numbers of 16, 24, 40, 112 and 160, respectively; Secondly, the sub-feature maps E1-E4 are input into corresponding CBAM attention mechanism channels to obtain sub-feature maps E1'-E4', respectively, M5 is obtained by upsampling E5, M5 is spliced with E4' in the channel dimension, a feature map with a size of M4 is output through a fourth decoding layer, which is spliced with E3', a feature map with a size of M3 is output through a third decoding layer, which is spliced with E2', a feature map with a size of M3 is output through a second decoding layer, which is spliced with E1', a feature map with a size of M2 is output through a first decoding layer, and finally the channel number of the picture is adjusted to the segmentation target number num_classes through a 1*1 convolution kernel to output the final feature map p0; The segmented result image is displayed; The decoding layer comprises, in sequence, a Dsc-ghost convolutional block, BN, ReLU activation, a Dsc-ghost convolutional block, BN, ReLU activation and upsampling, the Dsc-ghost convolutional block process comprises that an input feature map T1 is convolved through a 1*1 convolution kernel, BN and ReLU activation to obtain a feature map T2, the input feature map T1 is convolved through a basic convolution, BN and ReLU activation to obtain a feature map T3, the input feature map T1 is convolved through a channel-by-channel convolution, BN, ReLU activation, point-by-point convolution, BN and ReLU activation to obtain a feature map T4, T3 and T4 are added in the channel dimension to obtain a feature map T5, T5 is processed through a squeeze-and-excitation network mechanism to obtain a feature map T6, and T2 and T6 are added to obtain an output feature map T7; The squeeze-and-excitation network comprises: The squeeze network part: a feature map is compressed into one dimension, when the initial feature map has a dimension of C*H*W, C is the channel number, H and W are the height and width of the picture, and the squeeze network compresses the feature map into a size of C*1*1 through global average pooling; The excitation network part: after obtaining the C*1*1 representation of the squeeze network part, a FC full connection layer is added to predict the importance of each channel, and the importance of different channels is obtained, which is then excited to the corresponding channel of the previous feature map for operation.

2. The ghostnet-based lightweight medical image segmentation method according to claim 1, characterized in that, The ghostnet further comprises: the ghostbottleneck1 to the ghostbottleneck5 are respectively composed of 2, 2, 2, 6, and 5 ghostbottlenecks.

3. The ghostnet-based lightweight medical image segmentation method according to claim 2, characterized in that, The ghostbottleneck performs L times of nonlinear operations on the input data, L is the number of ghostbottlenecks, and the nonlinear operation comprises: If the stride is 2, the input feature map T1 is sequentially subjected to the ghostmodule, BN, ReLU activation, channel-wise convolution, BN, ghostmodule, BN, and finally the feature map T2 is obtained, and then the input feature map T1 and the feature map T2 are added to obtain the output feature map T3; If the stride is 1, the input feature map T1 is subjected to the ghostmodule, BN, ReLU activation, ghostmodule, and BN to obtain the feature map T2, and then the input feature map T1 and the feature map T2 are added to obtain the output feature map T3, wherein the ghostmodule comprises a basic convolution and a channel-wise convolution, and the channel numbers are added.

4. The ghostnet-based lightweight medical image segmentation method according to claim 1, characterized in that, The CBAM attention mechanism comprises: Channel attention: the size of the input feature map is HxWxC, after being subjected to global maximum pooling and global average pooling respectively, the output results are two Cx1x1 feature maps; then the two feature maps are input into a shared multilayer perceptron, the feature map is first reduced in dimension and then restored in dimension, then the two output feature maps are added, and the weight of each channel of the normalized feature map is normalized through a sigmoid activation function; and the normalized weight is multiplied by the input feature map; Spatial attention: the feature map output by the channel attention is processed, global maximum pooling and global average pooling are performed, the two output feature maps are connected in the channel number, and then a 1x1 convolution is used to adjust the channel number, and finally the weight is normalized through a sigmoid function, and the normalized weight is multiplied by the input feature map. 5.A lightweight medical image segmentation system based on ghostnet, characterized in that, The system comprises the following modules: An image acquisition module for acquiring a medical image to be segmented An image segmentation model construction module for adopting an improved Unet network model ghostnet as a backbone feature extraction network, comprising: an encoder, a decoder, and a CBAM attention mechanism; Firstly, the medical image to be segmented is input into the encoder for encoding to obtain a plurality of channel number sub-feature maps, the encoder comprises six encoding layers, which are a convolution layer, a ghostbottleneck1, a ghostbottleneck2, a ghostbottleneck3, a ghostbottleneck4, and a ghostbottleneck5, and the image to be segmented is encoded by the encoder to obtain sub-feature maps E1 to E5 with channel numbers of 16, 24, 40, 112, and 160 respectively. Secondly, the sub-feature maps E1-E4 are input into corresponding CBAM attention mechanism channels respectively to obtain sub-feature maps E1'-E4' respectively, M5 is obtained by upsampling E5, M5 is spliced with E4' in the channel dimension, and a feature map with a size of M4 is output through the fourth decoding layer, which is spliced with E3', a feature map with a size of M3 is output through the third decoding layer, which is spliced with E2', a feature map with a size of M3 is output through the second decoding layer, which is spliced with E1', a feature map with a size of M2 is output through the first decoding layer, and finally the channel number of the picture is adjusted to the segmentation target number num_classes through a 1*1 convolution kernel to output the final feature map p0; The display module is used to display the segmented result picture. The decoding layer comprises, in sequence, a Dsc-ghost convolution block, BN, ReLU activation, a Dsc-ghost convolution block, BN, ReLU activation and upsampling, the Dsc-ghost convolution block process comprises that an input feature map T1 is convolved through a 1*1 convolution kernel, BN and ReLU activation to obtain a feature map T2, the input feature map T1 is convolved through a basic convolution, BN and ReLU activation to obtain a feature map T3, the input feature map T1 is convolved through a channel-by-channel convolution, BN, ReLU activation, point-by-point convolution, BN and ReLU activation to obtain a feature map T4, T3 and T4 are added in the channel dimension to obtain a feature map T5, T5 is subjected to squeezing and excitation network mechanism to obtain a feature map T6, and T2 and T6 are added to obtain an output feature map T7; The squeezing and excitation network comprises: The squeezing network part: a feature map is compressed into one dimension, when the initial feature map dimension is C*H*W, C is the channel number, H and W are the height and width of the picture, and the squeezing network compresses the feature map into C*1*1 size through global average pooling; The excitation network part: after obtaining the C*1*1 representation of the squeezing network part, an FC full connection layer is added to predict the importance of each channel, the importance size of different channels is obtained, and then the corresponding channels of the previous feature map are excited for operation.