A medical image segmentation method combining a double attention mechanism and a U-Net++ and related devices

By embedding a dual attention module in the U-Net++ network for weighted feature fusion, the problem of insufficient feature fusion in existing medical image segmentation methods is solved, improving segmentation accuracy and boundary integrity, and making it suitable for AI medical image analysis.

CN121505276BActive Publication Date: 2026-06-26ZHUHAI HENGQIN ALL-STAR MEDICAL TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI HENGQIN ALL-STAR MEDICAL TECHNOLOGY CO LTD
Filing Date
2026-01-13
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing medical image segmentation methods based on U-Net and its improved models fail to fully consider the differences in channels and spatial dimensions in feature maps during feature fusion. This results in insufficient perception of complex boundaries and small lesions, and the segmentation results are prone to blurry contours or local missegmentation. This is especially problematic in AI-driven computer vision and biometric recognition software where high segmentation accuracy and real-time performance are required.

Method used

By combining the dual attention mechanism with U-Net++'s medical image segmentation method, dual attention modules are embedded in dense skip connection paths to perform channel attention and spatial attention operations. This adaptively weights the same-scale features of the encoder and decoder, generating spatially weighted encoded feature maps to optimize feature fusion.

Benefits of technology

It significantly improves the accuracy and boundary integrity of medical image segmentation, is suitable for AI-optimized operating systems and middleware platforms, and can be integrated into computer vision and biometric recognition software, providing technical support for high-quality, high-value AI medical image analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505276B_ABST
    Figure CN121505276B_ABST
Patent Text Reader

Abstract

The application discloses a medical image segmentation method combining a double attention mechanism and a U-Net++, and related devices. The method comprises the following steps: acquiring a medical image and inputting the medical image into a segmentation network; extracting multi-scale coding features through an encoder, and generating multi-scale decoding features through a decoder; inputting the same-scale features into a double attention module, and sequentially executing channel attention and spatial attention; and finally, fusing the spatially weighted coding features to the decoder, and outputting a segmentation result. The application can be deployed in an artificial intelligence optimization operating system or an artificial intelligence middleware platform, high-efficiency calculation is realized by using a related function library, is suitable for computer audio-visual software, biological feature recognition software and other artificial intelligence application software, and the double attention mechanism and dense skip connection are combined, so that the feature expression capability is effectively enhanced, and the precision and robustness of medical image segmentation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medicine, artificial intelligence, and robotics, specifically a medical image segmentation method and related apparatus that combines a dual attention mechanism with U-Net++. Background Technology

[0002] Medical image segmentation is a key technology for assisted diagnosis, surgical planning, and lesion analysis, and also an important application direction of artificial intelligence in the field of medical imaging. Currently, encoder-decoder architectures based on U-Net and its improved models (such as U-Net++) have become the mainstream methods in this field. U-Net++ fuses multi-scale features through dense skip connections, which alleviates the semantic gap between the encoder and decoder to some extent. However, such methods often simply concatenate or add features from different sources during feature fusion, failing to fully consider the importance of differences in channels and spatial dimensions in the feature maps. There is an information mismatch between the rich contextual features extracted by the encoder and the fine localization features recovered by the decoder, resulting in insufficient perception of complex boundaries and small lesions, and the segmentation results are prone to blurry contours or local missegmentation. Especially in AI-driven computer vision and audiovisual software, biometric recognition software, and other application scenarios, higher requirements are placed on segmentation accuracy and real-time performance. Therefore, existing technologies urgently need a more efficient feature optimization mechanism that can adaptively calibrate and fuse features from the encoding and decoding paths to improve the accuracy and robustness of segmentation. Summary of the Invention

[0003] To address the aforementioned technical problems, the present invention relates to a medical image segmentation method and related apparatus that combines a dual attention mechanism with U-Net++, including but not limited to a medical image segmentation device, electronic device, computer-readable storage medium, and computer program product that combines a dual attention mechanism with U-Net++.

[0004] Firstly, a medical image segmentation method combining dual attention mechanism and U-Net++ is provided, including the following steps:

[0005] S1. Acquire a medical image and input the medical image into a segmentation network; the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder;

[0006] S2. The encoder extracts features from the medical image to obtain a multi-scale encoded feature map; the decoder upsamples the features to obtain a multi-scale decoded feature map.

[0007] S3. Input the encoded feature map and the decoded feature map from the same scale into the dual attention module and perform the dual attention operation:

[0008] S3.1. Channel attention operation: Based on the encoded feature map and the decoded feature map, generate a channel-weighted encoded feature map and a channel-weighted decoded feature map;

[0009] S3.2. Spatial attention operation: Based on the channel-weighted encoded feature map and the channel-weighted decoded feature map, a spatially weighted encoded feature map is generated;

[0010] S4. Input the spatially weighted encoded feature map into the corresponding layer of the decoder for feature fusion;

[0011] S5. The output layer of the segmentation network outputs the segmentation result.

[0012] In conjunction with any embodiment of this application, the channel attention operation includes:

[0013] The encoded feature map and the decoded feature map are concatenated along the channel dimension to obtain a concatenated feature map;

[0014] Global context information is extracted from the spliced ​​feature map to generate channel descriptors;

[0015] The channel descriptor is subjected to dimensionality reduction and dimensionality increase processing to generate a channel weight vector;

[0016] The channel weight vector is multiplied by the input encoded feature map and the decoded feature map respectively to complete the channel weighting.

[0017] In conjunction with any embodiment of this application, the spatial attention operation includes:

[0018] A linear transformation is performed on the channel-weighted decoded feature map to adjust its channel number to match the channel-weighted encoded feature map. Figure 1 Then, the mixed feature map is added element-wise to the channel-weighted encoded feature map to obtain a hybrid feature map;

[0019] The hybrid feature map is subjected to nonlinear activation and quadratic linear transformation to generate a spatial attention coefficient map;

[0020] The spatial attention coefficient map is multiplied element-wise with the channel-weighted coding feature map to generate the spatially weighted coding feature map.

[0021] In any embodiment of this application, the dual attention module is set in each skip connection path of U-Net++ in the segmentation network.

[0022] In any embodiment of this application, the channel weight vector is obtained by continuously processing the channel descriptor through two layers of one-dimensional convolution, wherein the first convolution reduces the number of channels to the input. The second convolutional layer restores the number of channels to the number of input channels; where r is a preset reduction ratio.

[0023] In any embodiment of this application, the encoder and decoder depths of the segmentation network can be adaptively adjusted according to the resolution of the medical image.

[0024] Secondly, a medical image segmentation device combining a dual attention mechanism and U-Net++ is provided, characterized by comprising:

[0025] An input unit is used to acquire medical images and input the medical images into a segmentation network; the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder.

[0026] The encoding unit is used to extract features from the medical image through the encoder to obtain a multi-scale encoded feature map;

[0027] The decoding unit is used to upsample features through the decoder to obtain a multi-scale decoded feature map; it also includes a dual attention module for performing a dual attention operation on the encoded feature map and the decoded feature map from the same scale, including:

[0028] Channel attention operation, based on the encoded feature map and the decoded feature map, generates channel-weighted encoded feature maps and channel-weighted decoded feature maps;

[0029] Spatial attention operation generates a spatially weighted encoded feature map based on the channel-weighted encoded feature map and the channel-weighted decoded feature map;

[0030] The fusion unit is used to input the spatially weighted encoded feature map into the corresponding layer of the decoder for feature fusion; it is also used to output the segmentation result.

[0031] Thirdly, an electronic device is provided, comprising: a processor, a communication module, a sensor, a user interface, and a storage unit, wherein the storage unit is used to store computer program code, the program code including computer instructions. When the processor executes these instructions, the electronic device performs the methods described in the second aspect above and any of its embodiments.

[0032] Fourthly, another electronic device is provided, comprising: a processor, a wireless communication module, a touchscreen, a speaker, and a storage unit, wherein the storage unit is used to store computer program code, the program code including computer instructions. When the processor executes these instructions, the electronic device performs the methods described in the second aspect above and any of its embodiments.

[0033] Fifthly, a computer-readable storage medium is provided, wherein a computer program is stored, the program comprising program instructions. When these instructions are executed by a processor, the processor performs the methods described in the second aspect above and any of its embodiments.

[0034] In a sixth aspect, a computer program product is provided, the computer program product comprising a computer program or instructions. When the computer program or instructions are executed on a computer, the computer will perform the methods described in the second aspect above and any of its embodiments.

[0035] This application presents a medical image segmentation method and related apparatus that combines a dual-attention mechanism with U-Net++, compared to existing technologies. The invention embeds a dual-attention module into the dense skip connection paths of the U-Net++ network. Channel attention adaptively weights the same-scale features of the encoder and decoder according to channel dimensions, enhancing the response of key features. Then, spatial attention fuses the weighted features to generate a spatial weight map, highlighting the significant spatial location of the target region. Finally, the optimized encoded features are fused into the decoding path. This method effectively solves the problem of insufficient utilization of channel and spatial information in traditional skip connections during feature fusion, significantly improving the accuracy and boundary integrity of medical image segmentation. This invention is particularly suitable for AI-optimized operating systems or middleware platforms and can be integrated into AI application systems such as computer vision and audiovisual software and biometric recognition software, providing technical support for high-quality, high-value AI medical image analysis. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to illustrate the technical solutions of this application.

[0038] Figure 1 This is a flowchart illustrating a medical image segmentation method combining dual attention mechanism and U-Net++, as provided in an embodiment of this application.

[0039] Figure 2 This is a schematic diagram of a medical image segmentation device combining a dual attention mechanism and U-Net++, provided as an embodiment of this application.

[0040] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0041] To enable those skilled in the art to more fully understand the technical solutions of this application, the technical solutions of this application will be explained in detail and clearly with reference to the accompanying drawings. It should be particularly noted that the described embodiments are only some examples of this application and do not represent all of them. Based on these embodiments, those skilled in the art can directly deduce all other possible implementation schemes without creative thinking, and these are also included within the protection scope of this application.

[0042] In the specification, claims, and related drawings of this application, the terms "first," "second," etc., are used only to distinguish different elements and do not imply any specific order. Furthermore, the use of "comprising" and "having," and their variations, indicates non-exclusive inclusion. This means that if a process, method, system, product, or device comprises a series of steps or components, it indicates that the process, method, system, product, or device is not limited to the listed steps or components and may also include other steps or components not listed, or other inherent steps or units thereof.

[0043] The term "embodiment" as used herein refers to any instance combining a particular feature, structure, or characteristic, which may be at least one embodiment of this application. The "embodiments" mentioned herein do not necessarily refer to the same specific case, nor do they imply that they are independent or exclusive alternatives. Those skilled in the art will understand that the embodiments described herein can be used with other embodiments. It should be clarified that in this application, "at least one" includes one or more instances, "multiple" means two or more instances, and "at least two" refers to two or more instances.

[0044] It should be understood that the method embodiments of this application can also be implemented by a processor executing computer program code. The embodiments of this application will now be described with reference to the accompanying drawings.

[0045] Please see Figure 1 , Figure 1 This is a flowchart illustrating a medical image segmentation method combining dual attention mechanism and U-Net++, as provided in an embodiment of this application.

[0046] 101. Data Import: Acquire medical images and input the medical images into the segmentation network.

[0047] In this embodiment, the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder.

[0048] In this embodiment, the format of the medical images includes, but is not limited to, CT, MRI, ultrasound, etc.

[0049] In another possible implementation, the medical image is first preprocessed, including at least cropping, rotating, and resizing.

[0050] In another possible implementation, before inputting the medical image into the segmentation network, the training dataset is augmented using data augmentation techniques, including but not limited to elastic deformation, brightness perturbation, and noise addition.

[0051] 102. Encoding and Decoding: The encoder extracts features from the medical image to obtain a multi-scale encoded feature map; the decoder upsamples the features to obtain a multi-scale decoded feature map.

[0052] In this embodiment, the multi-scale encoded feature map output by the encoder and the multi-scale decoded feature map generated by the decoder after upsampling at each level are both cached and correspond one-to-one according to spatial resolution, providing a data foundation for same-scale feature fusion in the dual attention module.

[0053] In this embodiment, the encoder and decoder depths of the segmentation network can be adaptively adjusted according to the resolution of the medical image.

[0054] In another possible implementation, the encoder's downsampling operation can be implemented by stride convolution or pooling operations; the decoder's upsampling operation can be implemented by transposed convolution or interpolation algorithms.

[0055] In another possible implementation, residual connections or dense connections are introduced between the convolutional layers of the encoder and decoder to alleviate the gradient vanishing problem in deep networks and promote feature reuse.

[0056] 103. Dual Attention: Input the encoded feature map and the decoded feature map from the same scale into the dual attention module to perform the dual attention operation:

[0057] Channel attention operation, based on the encoded feature map and the decoded feature map, generates channel-weighted encoded feature maps and channel-weighted decoded feature maps;

[0058] Spatial attention operation generates a spatially weighted encoded feature map based on the channel-weighted encoded feature map and the channel-weighted decoded feature map.

[0059] In this embodiment, the dual attention module is set in each skip connection path of U-Net++ in the segmentation network.

[0060] In this embodiment, the channel attention operation includes: concatenating the encoded feature map and the decoded feature map along the channel dimension to obtain a concatenated feature map; extracting global context information from the concatenated feature map to generate a channel descriptor; performing dimensionality reduction and dimensionality increase processing on the channel descriptor to generate a channel weight vector; and multiplying the channel weight vector by the input encoded feature map and the decoded feature map respectively to complete channel weighting.

[0061] In this embodiment, the channel weight vector is obtained by continuously processing the channel descriptor through two layers of one-dimensional convolution, wherein the first convolution reduces the number of channels to the input. The second convolutional layer restores the number of channels to the number of input channels; where r is a preset reduction ratio.

[0062] In this embodiment, the spatial attention operation includes: performing a linear transformation on the channel-weighted decoded feature map to adjust its number of channels to match the number of channels in the channel-weighted encoded feature map. Figure 1 Then, the mixed feature map is added element-wise to the channel-weighted encoded feature map to obtain a hybrid feature map; nonlinear activation and quadratic linear transformation are performed on the hybrid feature map to generate a spatial attention coefficient map; the spatial attention coefficient map is multiplied element-wise with the channel-weighted encoded feature map to generate the spatially weighted encoded feature map.

[0063] In another possible implementation, the extraction of global context information in the channel attention operation can be achieved by global max pooling or a combination of global averaging and max pooling.

[0064] In another possible implementation, the generation of the spatial attention coefficient map may rely on the calculation of feature correlations at different spatial locations in the hybrid feature map, rather than a simple linear transformation.

[0065] 104. Segmentation Output: The spatially weighted encoded feature map is input into the corresponding layer of the decoder for feature fusion; the segmentation network output layer outputs the segmentation result.

[0066] In this embodiment, the spatially weighted encoded feature map is passed to the corresponding level of the decoder through the dense skip connections and fused with the decoded feature map at the same level.

[0067] In this embodiment, the output layer of the segmentation network uses a convolutional operation to map the number of channels to the number of target categories, and uses an activation function to generate the final segmentation probability map.

[0068] In this embodiment, this embodiment can also be used as the patent "A method and related device for dynamic compensation of surgical robots based on multimodal real-time 4D digital twin" (Publication No.: CN120899400A).

[0069] In another possible implementation, the feature fusion operation can be performed by concatenation or weighted summation to integrate the spatially weighted encoded feature map with the same-level feature map of the decoder.

[0070] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0071] The methods of the embodiments of this application have been described in detail above, and the apparatus of the embodiments of this application is provided below.

[0072] Please see Figure 2 , Figure 2 This is a schematic diagram of a medical image segmentation device combining a dual attention mechanism and U-Net++, provided in an embodiment of this application. The image segmentation device 1 includes: an input unit 11, an encoding unit 12, a decoding unit 13, and a fusion unit 14. Specifically:

[0073] Input unit 11 is used to acquire medical images and input the medical images into a segmentation network; the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder.

[0074] Encoding unit 12 is used to extract features from the medical image through the encoder to obtain a multi-scale encoded feature map;

[0075] Decoding unit 13 is used to perform feature upsampling through the decoder to obtain a multi-scale decoded feature map; it also includes a dual attention module for performing a dual attention operation on the encoded feature map and the decoded feature map from the same scale, including:

[0076] Channel attention operation, based on the encoded feature map and the decoded feature map, generates channel-weighted encoded feature maps and channel-weighted decoded feature maps;

[0077] Spatial attention operation generates a spatially weighted encoded feature map based on the channel-weighted encoded feature map and the channel-weighted decoded feature map;

[0078] The fusion unit 14 is used to input the spatially weighted encoded feature map into the corresponding layer of the decoder for feature fusion; it is also used to output the segmentation result.

[0079] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0080] Please see Figure 3 , Figure 3 A schematic diagram of the hardware architecture of an electronic device according to an embodiment of this application is shown. The electronic device 2 mainly consists of a processor 21 and a memory 22. In addition, the device may also include an input device 23 and an output device 24. The processor 21, memory 22, input device 23, and output device 24 are interconnected via connecting components, which can be various interfaces, data lines, or communication buses, etc., and are not specifically specified in this embodiment.

[0081] Processor 21 may be one or more graphics processing units (GPUs). If processor 21 is a GPU, the GPU may be single-core or multi-core. Alternatively, processor 21 may also be a processor group consisting of multiple GPUs interconnected via one or more buses. Furthermore, the processor may be other types of processors, which are not specifically limited in this embodiment.

[0082] The memory 22 is designed to store the instructions of a computer program and various program codes required to execute the present application. Optionally, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or optical disc read-only memory (CD-ROM), which are used to store related instructions and data.

[0083] Input device 23 is used to input data and / or signals, and output device 24 is used to output data and / or signals. Input device 23 and output device 24 can be independent devices or an integrated device.

[0084] It should be understood that, in the embodiments of this application, the memory 22 can store not only related instructions but also related data. The embodiments of this application do not specify the specific data content stored in the memory.

[0085] It should be understood that Figure 3 This illustration only shows a simplified design of an electronic device. In actual use, the electronic device may also include other necessary components, such as different numbers of input / output devices, processors, memory, etc. All electronic devices capable of implementing the embodiments of this application are within the protection scope of this application.

[0086] Those skilled in the art will recognize that the components and algorithm steps of the various examples described in the embodiments disclosed herein can be implemented by electronic hardware or by a combination of computer software and electronic hardware. Whether these functions are implemented through hardware or software will be determined based on the specific application requirements and design constraints of the technical solution. Those skilled in the art can adopt different implementation methods according to the needs of each specific application, but such implementation should not be considered as exceeding the scope of protection of this application.

[0087] Those skilled in the art should understand that, for ease of description and simplification, the specific operational procedures of the aforementioned systems, devices, and components can be referred to the corresponding steps in the preceding method embodiments, and will not be repeated here. Furthermore, those skilled in the art should also understand that each embodiment in this application has its own focus, and for ease of description and simplification, the same or similar content may not be repeated in different embodiments. Therefore, if a part is not mentioned or not described in detail in a certain embodiment, it can be referred to the relevant description in other embodiments.

[0088] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can also be implemented through other means. For example, the described apparatus embodiments are merely exemplary, and the division of the units therein is only a logical functional division; different division methods may exist in actual implementation. For example, multiple units or components may be merged or integrated into another system, or certain features may be omitted, or certain steps may not be performed. Furthermore, the interconnections shown or discussed, whether direct or indirect, whether coupling or communication connections, may be implemented electrically, mechanically, or otherwise through interfaces, devices, or units.

[0089] Units described as independent components may or may not actually be physically separate; parts presented as units may or may not be physical entities, meaning they may be concentrated in one location or distributed across multiple network nodes. Depending on the actual needs, some or all of these units can be selected to achieve the objectives of this embodiment.

[0090] Furthermore, in the various embodiments of this application, each functional unit can be integrated into a single processing unit, exist independently, or two or more units can be merged into one unit. In the foregoing embodiments, the relevant functions can be fully or partially implemented through software, hardware, firmware, or any combination thereof. If software implementation is chosen, it can be implemented entirely or partially in the form of a computer program product. This computer program product contains one or more computer instructions. When these instructions are loaded and executed on a computer, they will produce all or part of the processes or functions described in the embodiments of this application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. These computer instructions can be stored in computer-readable storage media or transmitted through such media. Computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, DSL) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any computer-accessible available medium, or a data storage facility such as a server or data center that integrates one or more available media. These available media may include magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media (such as DVDs), semiconductor media (such as SSDs), etc. Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by computer program instructions and related hardware, and these programs can be stored in computer-readable storage media. When these programs are executed, they will contain the processes of the above method embodiments. The aforementioned storage media include, but are not limited to, various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A medical image segmentation method combining dual attention mechanism and U-Net++, comprising the following steps: S1. Acquire a medical image and input the medical image into a segmentation network; the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder; S2. The encoder extracts features from the medical image to obtain a multi-scale encoded feature map; the decoder upsamples the features to obtain a multi-scale decoded feature map. S3. Input the encoded feature map and the decoded feature map from the same scale into the dual attention module and perform the dual attention operation: S3.

1. Channel attention operation: Based on the encoded feature map and the decoded feature map, generate a channel-weighted encoded feature map and a channel-weighted decoded feature map; S3.

2. Spatial attention operation: Based on the channel-weighted encoded feature map and the channel-weighted decoded feature map, a spatially weighted encoded feature map is generated; S4. Input the spatially weighted encoded feature map into the corresponding layer of the decoder for feature fusion; S5. The output layer of the segmentation network outputs the segmentation result.

2. The method according to claim 1, characterized in that, The channel attention operation includes: The encoded feature map and the decoded feature map are concatenated along the channel dimension to obtain a concatenated feature map; Global context information is extracted from the spliced ​​feature map to generate channel descriptors; The channel descriptor is subjected to dimensionality reduction and dimensionality increase processing to generate a channel weight vector; The channel weight vector is multiplied by the input encoded feature map and the decoded feature map respectively to complete the channel weighting.

3. The method according to claim 1, characterized in that, The spatial attention operation includes: A linear transformation is performed on the channel-weighted decoded feature map to adjust its number of channels to match that of the channel-weighted encoded feature map. Then, the channel-weighted encoded feature map is added element by element to obtain a hybrid feature map. The hybrid feature map is subjected to nonlinear activation and quadratic linear transformation to generate a spatial attention coefficient map; The spatial attention coefficient map is multiplied element-wise with the channel-weighted coding feature map to generate the spatially weighted coding feature map.

4. The method according to claim 1, characterized in that, The dual attention module is set in each skip connection path of U-Net++ in the segmentation network.

5. The method according to claim 2, characterized in that, The channel weight vector is obtained by continuously processing the channel descriptor through two layers of one-dimensional convolutions, wherein the first convolution layer reduces the number of channels to the input. The second convolutional layer restores the number of channels to the number of input channels; where r is a preset reduction ratio.

6. The method according to claim 1, characterized in that, The encoder and decoder depths of the segmentation network are adaptively adjusted according to the resolution of the medical image.

7. A medical image segmentation device combining a dual attention mechanism and U-Net++, characterized in that, include: An input unit is used to acquire medical images and input the medical images into a segmentation network; the segmentation network includes an encoder, a decoder, and dense skip connections connecting the encoder and the decoder. The encoding unit is used to extract features from the medical image through the encoder to obtain a multi-scale encoded feature map; A decoding unit is used to perform feature upsampling through the decoder to obtain a multi-scale decoded feature map; It also includes a dual attention module for performing dual attention operations on the encoded feature map and the decoded feature map from the same scale, including: Channel attention operation, based on the encoded feature map and the decoded feature map, generates channel-weighted encoded feature maps and channel-weighted decoded feature maps; Spatial attention operation generates a spatially weighted encoded feature map based on the channel-weighted encoded feature map and the channel-weighted decoded feature map; The fusion unit is used to input the spatially weighted encoded feature map into the corresponding layer of the decoder for feature fusion; it is also used to output the segmentation result.

8. An electronic device, characterized in that, include: A processor and a storage unit for storing computer program code, the code containing computer instructions, wherein when the processor executes the computer instructions, the electronic device performs the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program containing program instructions that, when executed by a processor, cause the processor to perform the method described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1 to 6.