Image segmentation method and device, equipment and storage medium

By using diagonal up-down sampling and semantic information fusion methods in medical image segmentation, the problem of information loss in image segmentation is solved, and segmentation accuracy and feature consistency are improved.

CN120495667APending Publication Date: 2025-08-15CHINA TOBACCO HUNAN IND CORP

Patent Information

Application Number
CN202510710587.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing medical image segmentation methods tend to lead to information loss during downsampling and upsampling, resulting in the missing details of the target to be segmented in the image and inaccurate boundaries.

Method used

The up-down sampling strategy based on diagonal lines is adopted and semantic information at different levels is fused for image segmentation. The feature representation ability is enhanced through the HSSAM-Net architecture, combined with the PRA mechanism and the maximum diagonal sampling strategy to reduce the loss of fine-grained information.

Benefits of technology

This improves image segmentation accuracy, reduces the loss of fine-grained information, and enhances feature consistency and position accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495667A_ABST
    Figure CN120495667A_ABST
Patent Text Reader

Abstract

The invention discloses an image segmentation method and device, equipment and a storage medium, and relates to the technical field of medical image processing, and the method comprises the steps: obtaining an initial medical image, and carrying out the enhancement of the initial bottom features of the initial medical image through a target neural network, so as to obtain a target medical image; performing down-sampling on the target medical image in the diagonal direction on different image scales so as to obtain target semantic information and target index values corresponding to the target medical image on different hierarchies; and performing weighted fusion on each piece of target semantic information to obtain fused semantic information, performing up-sampling on the fused semantic information based on the target index value to obtain a mask corresponding to the to-be-segmented target, and performing image segmentation based on the mask. According to the image segmentation method, up-down sampling is carried out based on diagonals, and semantic information of different levels is fused for image segmentation, so that loss of fine-grained information is reduced, and the image segmentation precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to an image segmentation method, apparatus, device and storage medium. Background Art

[0002] In the field of medical image segmentation, accurately identifying and segmenting regions of interest (such as polyps and tumors) in images is crucial for early disease diagnosis and treatment planning. In recent years, the U-Net architecture (a convolutional neural network architecture) and its variants have made significant progress in medical image segmentation tasks.

[0003] Currently, medical image segmentation is typically performed using neural networks and traditional image upsampling and downsampling. This approach can easily lead to information loss during the upsampling and downsampling processes, resulting in missing details and inaccurate boundaries of the segmented objects. Therefore, accurately segmenting medical images has become a technical challenge that remains unresolved. Summary of the Invention

[0004] In view of this, the present invention aims to provide an image segmentation method, apparatus, device, and storage medium. By performing up-sampling and down-sampling based on diagonals and fusing semantic information at different levels for image segmentation, the method reduces the loss of fine-grained information and improves image segmentation accuracy. The specific solution is as follows:

[0005] In a first aspect, the present application provides an image segmentation method, comprising:

[0006] Obtaining an initial medical image from a target database, and enhancing initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image;

[0007] Downsampling the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to a maximum value of a target pixel in the target medical image, and the target pixel maximum value is a maximum value of pixels on a main diagonal line of each target region in the target medical image;

[0008] The target semantic information is weightedly fused to obtain corresponding fused semantic information, the fused semantic information is upsampled based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and the target medical image is segmented based on the target mask.

[0009] Optionally, before enhancing the initial underlying features of the initial medical image using the target neural network, the method further includes:

[0010] Obtaining an initial neural network and setting a target learning rate corresponding to the initial neural network;

[0011] The initial neural network is trained based on a preset optimizer and the target learning rate to obtain the target neural network corresponding to the initial neural network.

[0012] Optionally, downsampling the target medical image includes:

[0013] Determining a target resolution of the target medical image, and selecting a pooling window of a target size according to the target resolution;

[0014] A target step size corresponding to the pooling window is determined, and a convolution operation is performed on each target region of the target medical image using the pooling window and the target step size to downsample the target medical image.

[0015] Optionally, performing weighted fusion on each target semantic information includes:

[0016] A pixel offset between each target semantic information is obtained, each target semantic information is aligned based on a deformable convolution technique and the pixel offset, and the aligned target semantic information is weightedly fused.

[0017] Optionally, upsampling the fused semantic information based on the target index value includes:

[0018] Performing semantic enhancement on the fused semantic information to obtain corresponding enhanced semantic information;

[0019] Based on the target index value, the maximum value of each target pixel is filled to the target coordinate point corresponding to each target index value, and based on the maximum value of each target pixel, bilinear interpolation is performed on the enhanced semantic information to upsample the enhanced semantic information.

[0020] Optionally, performing semantic enhancement on the fused semantic information includes:

[0021] Obtaining target weights of each channel corresponding to the fused semantic information, increasing a first weight value in the target weights, and reducing a second weight value in the target weights, so as to semantically enhance the fused semantic information; wherein the first weight value is a weight value of a channel corresponding to the object to be segmented, and the second weight value is a weight value of a channel corresponding to background noise in the fused semantic information;

[0022] The target underlying features corresponding to the target medical image are fused with the fused semantic information based on an attention gating mechanism to perform semantic enhancement on the fused semantic information.

[0023] In a second aspect, the present application provides an image segmentation device, comprising:

[0024] An underlying feature enhancement module is used to obtain an initial medical image from a target database and enhance the initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image;

[0025] An image downsampling module is configured to downsample the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to a maximum value of a target pixel in the target medical image, and the target pixel maximum value is a maximum value of pixels on a main diagonal line of each target region in the target medical image;

[0026] An image segmentation module is used to perform weighted fusion of each target semantic information to obtain corresponding fused semantic information, upsample the fused semantic information based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and perform image segmentation on the target medical image based on the target mask.

[0027] In a third aspect, the present application provides an electronic device, comprising:

[0028] Memory, used to store computer programs;

[0029] A processor is used to execute the computer program to implement the aforementioned image segmentation method.

[0030] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned image segmentation method when executed by a processor.

[0031] The present application first obtains an initial medical image from a target database, uses a target neural network to enhance the initial underlying features of the initial medical image to obtain a corresponding target medical image, and then downsamples the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to the maximum value of a target pixel in the target medical image, and the target pixel maximum value is the maximum value of pixels on the main diagonal of each target area in the target medical image. Finally, weighted fusion is performed on each target semantic information to obtain corresponding fused semantic information, and the fused semantic information is upsampled based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and image segmentation is performed on the target medical image based on the target mask. It can be seen that the present application can obtain the semantic information of medical images at different scales by downsampling medical images at different image scales respectively. By weighted fusion of semantics at different scales and image segmentation based on the fused semantic information, the loss of fine-grained information is reduced, thereby improving the accuracy of image segmentation. By downsampling the image along the diagonal direction and upsampling according to the target index value generated by downsampling, the feature consistency in the upsampling and downsampling processes is enhanced, and the position error is reduced, thereby improving the image segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0033] Figure 1 This is a flow chart of an image segmentation method disclosed in this application;

[0034] Figure 2 This is a flowchart of image up and down sampling disclosed in this application;

[0035] Figure 3 A schematic flow chart of an image segmentation method disclosed in this application;

[0036] Figure 4 This is a statistical graph of image segmentation score comparison results disclosed in this application;

[0037] Figure 5 A statistical graph comparing the performance of multiple neural networks disclosed in this application;

[0038] Figure 6 This is a structural diagram of an image segmentation device disclosed in this application;

[0039] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0041] Currently, methods for segmenting medical images are prone to information loss during downsampling and upsampling, which can lead to missing details and inaccurate boundaries of the objects to be segmented in the image. To address this issue, this application provides an image segmentation method that reduces the loss of fine-grained information and improves image segmentation accuracy by performing diagonal upsampling and downsampling and fusing semantic information from different levels of image segmentation.

[0042] See also Figure 1 As shown, an embodiment of the present invention discloses an image segmentation method, comprising:

[0043] Step S11: Acquire an initial medical image from a target database, and enhance the initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image.

[0044] To address the challenges of existing technologies, this paper proposes a novel U-Net architecture, HSSAM-Net (Hyper-Scale Feature Aggregation), a target neural network that significantly improves the performance of medical image segmentation through the following three key innovations:

[0045] 1. Superscale Shifted Aggregation Module (HSSAM): This module aggregates the encoded outputs of different stages and combines them with the Shifted Submaps Aggregation Module (SSAM) to effectively enhance the representation of multi-scale features while reducing the loss of fine-grained information. Specifically, the HSSAM module aggregates the encoded features of different stages and combines them with the Shifted Submaps Aggregation Module (SSAM) to generate multi-scale skip connections. SSAM calculates the shift ratios of different stages to ensure that the fine-grained information of high-resolution features is preserved during the aggregation process. The output of the HSSAM module is used in enhanced skip connections to further improve the effect of feature synthesis.

[0046] 2. PRA (Progressive Reusing Attention) Mechanism: This mechanism combines multi-level channel attention and multi-scale spatial attention, dynamically adjusting attention weights to adapt to feature information at different network depths, effectively suppressing multi-scale noise and highlighting key features. Specifically, the PRA mechanism consists of two parts: Progressive Global Channel Attention (PGCA) and Multi-Scale Reusing Spatial Attention (MRSA). PGCA converts one-dimensional channel features into a two-dimensional format, reducing interaction distances and generating a weight map for calibrating feature responses. MRSA enhances multi-scale spatial responses through a multi-branch structure, building large-scale perception capabilities by reusing the outputs of small-scale branches, thereby achieving more accurate attention calculations.

[0047] 3. Maximum Diagonal Sampling Strategy: A parameter-free two-branch sampling strategy is adopted, including Max-Diagonal Pooling (Max-DP) and Max-Diagonal Un-Pooling. While retaining fine-grained spatial details, it enhances feature consistency and reduces position error. The process of the maximum diagonal sampling strategy is as follows: Figure 2 shown.

[0048] It should be noted that the HSSAM-Net in this embodiment is based on the classic U-Net architecture and includes encoder and decoder modules. The encoder performs feature extraction and downsampling operations through the HSSAM module and Max-DP layer, while the decoder performs feature reconstruction and upsampling operations through the Max-DUP layer and decoding layer. Skip connections combine the outputs of the HSSAM and PRA modules, further enhancing the effect of feature synthesis.

[0049] In this embodiment, before enhancing the initial underlying features, it also includes: obtaining an initial neural network and setting a target learning rate corresponding to the initial neural network; training the initial neural network based on a preset optimizer and the target learning rate to obtain a target neural network corresponding to the initial neural network; specifically, HSSAM-Net uses a variety of medical image segmentation datasets (such as Kvasir, CVC-ClinicDB, ETIS, etc.) for training and verification. The network performance is optimized by adjusting parameters such as the learning rate, optimizer, such as Adam and SGD (Stochastic Gradient Descent), and batch size. Experimental results show that HSSAM-Net outperforms existing technologies in key indicators such as the Dice coefficient, mean intersection over union (mIoU), and Hausdorff distance (HD95). The training specifications for the initial neural network are shown in the following table:

[0050] Table 1 Model training specifications

[0051]

[0052] The key indicators during training are as follows:

[0053] Loss function: Dice Loss + BCE (a loss function) joint loss (weight ratio 0.6:0.4);

[0054] Training time: 15-25 hours (depending on the size of the dataset);

[0055] Regularization strategy: L2 regularization ( =0.001), Dropout rate 0.3;

[0056] Data augmentation: random rotation (±15 degrees), brightness jitter (±20%), elastic deformation;

[0057] For each image in the dataset, the above initial neural network is trained using the corresponding learning rate and training rounds.

[0058] In this embodiment, the target neural network is used to enhance the initial underlying features of the initial medical image. Specifically, the input initial medical image is processed through the convolutional layer of the target neural network and the local-aware block enhances shallow spatial features (such as edge features and texture features) to obtain the corresponding target medical image. That is, in stage 1, the input image is processed through a 3×3 convolution kernel, and the local-aware block enhances the characteristic response of the tumor region through spatial attention. By enhancing the initial underlying features of the initial medical image, the neural network's understanding of the image can be improved, thereby improving the accuracy of image segmentation.

[0059] Step S12: downsample the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to the maximum value of a target pixel in the target medical image, and the target pixel maximum value is the maximum value of pixels on the main diagonal of each target area in the target medical image.

[0060] In this embodiment, the process of downsampling the target medical image may specifically include: determining the target resolution of the target medical image, and selecting a pooling window of target specifications based on the target resolution; determining a target step size corresponding to the pooling window, and using the pooling window and the target step size to perform a convolution operation on each target area of the target medical image to downsample the target medical image; specifically, sliding a 4×4 window (pooling window of target specifications) along the diagonal direction of the image (such as from the upper left to the lower right) with a step size of 2, and within each window, selecting the maximum value along the diagonal direction, retaining key structures on the diagonal (such as continuous edges), and recording the position index of the maximum value (i.e., the target index value) for subsequent depooling.

[0061] This embodiment uses the encoder in the target neural network to gradually downsample in 5 levels, thereby using residual blocks to extract multi-scale features of the image (i.e., the target semantic information corresponding to the image at different levels). Among them, stage 1 is responsible for enhancing the underlying features of the image, and stages 2-4 (feature extraction): each level contains 3 residual blocks and maximum diagonal pooling (Max-DP), gradually downsampling (resolution halved), extracting semantic features from the middle layer to the high layer (i.e., target semantic information), and finally in stage 5, the target semantic information at different levels is fused. Among them, the layered coding specifications during the downsampling process are shown in the following table:

[0062] Table 2 Layered coding specifications

[0063]

[0064] It should be noted that the multi-scale features of an image include deep semantic features and key information about the tumor's boundary structure. Deep semantic information refers to abstract features extracted by higher layers of the network (e.g., stages 4-5), including global information such as the target region's category (e.g., polyp / tumor), overall morphology (e.g., size, shape), and lesion severity. Key structural information about the tumor boundary refers to the fine edge information retained in lower-layer features (e.g., stages 1-2), such as the boundary between polyps and normal tissue and the burr-like structure at the tumor's edge. By extracting semantic information from the target medical image at different scales, the integrity of the acquired semantic information is ensured, avoiding the loss of fine-grained details. This, in turn, deepens the neural network's understanding of the image and improves the accuracy of image segmentation.

[0065] Step S13: perform weighted fusion on each target semantic information to obtain corresponding fused semantic information, upsample the fused semantic information based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and perform image segmentation on the target medical image based on the target mask.

[0066] In this embodiment, the target neural network upsamples the fused semantic information based on the target index value, and can obtain the target mask corresponding to the target to be segmented in the target medical image. The overall process of the target neural network processing the image is as follows: Figure 3 As shown in the figure, the input image is processed by a 3×3 convolution kernel to extract target semantic information at different levels and generate a target mask based on it.

[0067] In this embodiment, target semantic information at different levels needs to be weighted and fused. This process is handled by the aforementioned super-scale shift aggregation module. It should be noted that the functional features of the super-scale shift aggregation module include: spatially aligning the output features of multi-stage encoders; weighted fusion of multi-resolution features through shifting; and synchronously capturing fine-grained details and global contextual information. Specifically, the input of the super-scale shift aggregation module is the feature maps (i.e., target semantic information) from three intermediate encoding stages. The processing flow is as follows: 1. spatial shift operation (±3 pixel range); 2. multi-scale feature channel splicing; 3. 1×1 convolution to achieve feature compression. The final output result is 256-channel enhanced features (i.e., fused semantic information). Accordingly, the aforementioned weighted fusion process of target semantic information at different levels can specifically include: obtaining pixel offsets between each target semantic information, aligning each target semantic information based on deformable convolution technology and the pixel offsets, and weighted fusion of the aligned target semantic information.

[0068] It should be noted that the above-mentioned fine-grained details refer to local pixel-level information, such as the micro-texture on the surface of the polyp, blood vessel distribution, edge jaggedness, etc. (e.g. Figure 1 Global context refers to the overall scene information, such as the location of the lesion in the image and its relationship to other organs (e.g., the global relationship between a polyp and the intestinal wall in a colonoscopy image). For example, in polyp segmentation, fine-grained details are used to accurately delineate the boundaries, while global context helps distinguish polyps from surrounding normal tissue.

[0069] In this embodiment, the process of upsampling the fused semantic information based on the target index value may specifically include: semantically enhancing the fused semantic information to obtain corresponding enhanced semantic information; filling the maximum value of each target pixel to the target coordinate point corresponding to each target index value based on the target index value, and performing bilinear interpolation on the enhanced semantic information based on the maximum value of each target pixel to upsample the enhanced semantic information; that is, in the decoder stage, the target index value recorded in the maximum diagonal unpooling stage is used to fill the eigenvalue (i.e., the maximum value of the target pixel) to the corresponding position, and bilinear interpolation is performed on the uncovered area to ensure the spatial continuity of the upsampled feature map. By performing up and down sampling along the diagonal direction, the maximum response can be retained and edge breaks caused by traditional pooling (such as breaks at the polyp boundary) can be reduced.

[0070] It should be noted that the semantic enhancement process described above is handled by the PRA mechanism. The PRA mechanism includes: 1. semantically enhancing aggregated features (i.e., fused semantic information); 2. dynamically allocating attention weights to suppress background interference; and 3. improving the localization accuracy of the region to be segmented, such as a tumor or polyp. Accordingly, the semantic enhancement process for the fused semantic information can specifically include: obtaining target weights for each channel corresponding to the fused semantic information, increasing a first weight value within the target weights, and decreasing a second weight value within the target weights to semantically enhance the fused semantic information; wherein the first weight value is the weight value of the channel corresponding to the target to be segmented, and the second weight value is the weight value of the channel corresponding to background noise in the fused semantic information; and fusing the underlying target features corresponding to the target medical image with the fused semantic information based on an attention gating mechanism to semantically enhance the fused semantic information.

[0071] Specifically, the PRA mechanism is implemented through the following steps:

[0072] Progressive Global Channel Attention (PGCA): Convert channel features into a two-dimensional matrix, generate a weight map through long-range dependency modeling, and adjust the weights of different channels to highlight important channels (such as channels focusing on polyp areas).

[0073] Multi-scale Spatial Response Enhancement (MRSA): Use multi-branch convolution (1×1, 3×3, 5×5) to extract features of different scales, and generate a spatial attention map after fusion to suppress background noise.

[0074] Cross-layer feature reuse: shallow details (i.e., underlying target features, such as stage 1 features) and deep semantics (i.e., fused semantic information, such as stage 5 features) are fused through attention gating to enhance the coherence of the target area.

[0075] In this embodiment, HSSAM enhances scale representation capabilities through different downsampling ratios, while PRA focuses on key features. The maximum diagonal pooling / unpooling (Max-DP / Max-DUP) strategy ensures efficient texture transfer and feature consistency, reducing position errors. Figure 4 As shown in the figure, HSSAM-Net outperforms the existing state-of-the-art methods on any of the five benchmark datasets (Kvasir, CVC-ClinicDB, ETIS, CVC-300, and EndoCV2020), with a Dice score of 0.949-0.952, a mean intersection-over-union (mIoU) score of 0.924-0.930, and a Hausdorff distance (HD95) value of 16.50-17.20. Figure 5 As shown in the figure, by introducing the super-scale shift aggregation module and the progressive reuse attention mechanism, the representation ability of multi-scale features and the retention ability of fine-grained information are significantly improved; these results verify the effectiveness of the proposed HSSAM+PRA+Max-DP+Max-DUP framework in advancing medical image segmentation and provide a solid foundation for future research.

[0076] It can be seen that the present application can obtain the semantic information of medical images at different scales by downsampling medical images at different image scales respectively. By weighted fusion of semantics at different scales and image segmentation based on the fused semantic information, the loss of fine-grained information is reduced, thereby improving the accuracy of image segmentation. By downsampling the image along the diagonal direction and upsampling according to the target index value generated by downsampling, the feature consistency in the upsampling and downsampling processes is enhanced, and the position error is reduced, thereby improving the image segmentation accuracy.

[0077] See also Figure 6 As shown, the present application provides an image segmentation device, comprising:

[0078] The underlying feature enhancement module 11 is used to obtain an initial medical image from a target database and enhance the initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image;

[0079] An image downsampling module 12 is configured to downsample the target medical image along a diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to a maximum value of a target pixel in the target medical image, and the target pixel maximum value is a maximum value of pixels on a main diagonal line of each target region in the target medical image;

[0080] The image segmentation module 13 is used to perform weighted fusion on each target semantic information to obtain corresponding fused semantic information, upsample the fused semantic information based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and perform image segmentation on the target medical image based on the target mask.

[0081] It can be seen that the present application can obtain the semantic information of medical images at different scales by downsampling medical images at different image scales respectively. By weighted fusion of semantics at different scales and image segmentation based on the fused semantic information, the loss of fine-grained information is reduced, thereby improving the accuracy of image segmentation. By downsampling the image along the diagonal direction and upsampling according to the target index value generated by downsampling, the feature consistency in the upsampling and downsampling processes is enhanced, and the position error is reduced, thereby improving the image segmentation accuracy.

[0082] In some specific embodiments, the underlying feature enhancement module 11 further includes:

[0083] a learning rate setting unit, configured to obtain an initial neural network and set a target learning rate corresponding to the initial neural network;

[0084] A neural network training unit is used to train the initial neural network based on a preset optimizer and the target learning rate to obtain the target neural network corresponding to the initial neural network.

[0085] In some specific embodiments, the image downsampling module 12 may specifically include:

[0086] a resolution determination unit, configured to determine a target resolution of the target medical image and select a pooling window of a target size according to the target resolution;

[0087] An image downsampling unit is configured to determine a target step size corresponding to the pooling window, and perform a convolution operation on each target region of the target medical image using the pooling window and the target step size to downsample the target medical image.

[0088] In some specific embodiments, the image segmentation module 13 may specifically include:

[0089] The first semantic information fusion unit is used to obtain the pixel offset between each target semantic information, align each target semantic information based on the deformable convolution technology and the pixel offset, and perform weighted fusion on the aligned target semantic information.

[0090] In some specific embodiments, the image segmentation module 13 may specifically include:

[0091] A semantic enhancement submodule, configured to perform semantic enhancement on the fused semantic information to obtain corresponding enhanced semantic information;

[0092] A numerical filling unit is used to fill the maximum value of each target pixel to the target coordinate point corresponding to each target index value based on the target index value, and to perform bilinear interpolation on the enhanced semantic information based on the maximum value of each target pixel to upsample the enhanced semantic information.

[0093] In some specific embodiments, the semantic enhancement submodule may specifically include:

[0094] a weight adjustment unit, configured to obtain a target weight of each channel corresponding to the fused semantic information, increase a first weight value in the target weight, and reduce a second weight value in the target weight, so as to semantically enhance the fused semantic information; wherein the first weight value is the weight value of the channel corresponding to the object to be segmented, and the second weight value is the weight value of the channel corresponding to the background noise in the fused semantic information;

[0095] The second semantic information fusion unit is used to fuse the target underlying features corresponding to the target medical image with the fused semantic information based on an attention gating mechanism to semantically enhance the fused semantic information.

[0096] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.

[0097] Figure 7This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the image segmentation method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may be a computer.

[0098] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0099] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0100] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the image segmentation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program capable of performing other specific tasks.

[0101] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned image segmentation method. The specific steps of this method can be referred to the corresponding contents disclosed in the aforementioned embodiments and will not be repeated here.

[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0103] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0104] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0105] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0106] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An image segmentation method, characterized in that: include: Obtaining an initial medical image from a target database, and enhancing initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image; Downsampling the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to a maximum value of a target pixel in the target medical image, and the target pixel maximum value is a maximum value of pixels on a main diagonal line of each target region in the target medical image; The target semantic information is weightedly fused to obtain corresponding fused semantic information, the fused semantic information is upsampled based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and the target medical image is segmented based on the target mask.

2. The image segmentation method according to claim 1, wherein: Before enhancing the initial underlying features of the initial medical image using the target neural network, the method further includes: Obtaining an initial neural network and setting a target learning rate corresponding to the initial neural network; The initial neural network is trained based on a preset optimizer and the target learning rate to obtain the target neural network corresponding to the initial neural network.

3. The image segmentation method according to claim 1, wherein: The downsampling of the target medical image comprises: Determining a target resolution of the target medical image, and selecting a pooling window of a target size according to the target resolution; A target step size corresponding to the pooling window is determined, and a convolution operation is performed on each target region of the target medical image using the pooling window and the target step size to downsample the target medical image.

4. The image segmentation method according to claim 1, wherein: The weighted fusion of each target semantic information includes: A pixel offset between each target semantic information is obtained, each target semantic information is aligned based on a deformable convolution technique and the pixel offset, and the aligned target semantic information is weightedly fused.

5. The image segmentation method according to claim 3, wherein: The upsampling of the fused semantic information based on the target index value includes: Performing semantic enhancement on the fused semantic information to obtain corresponding enhanced semantic information; Based on the target index value, the maximum value of each target pixel is filled to the target coordinate point corresponding to each target index value, and based on the maximum value of each target pixel, bilinear interpolation is performed on the enhanced semantic information to upsample the enhanced semantic information.

6. The image segmentation method according to claim 5, characterized in that: The performing semantic enhancement on the fused semantic information includes: Obtaining target weights of each channel corresponding to the fused semantic information, increasing a first weight value in the target weights, and reducing a second weight value in the target weights, so as to semantically enhance the fused semantic information; wherein the first weight value is a weight value of a channel corresponding to the object to be segmented, and the second weight value is a weight value of a channel corresponding to background noise in the fused semantic information; The target underlying features corresponding to the target medical image are fused with the fused semantic information based on an attention gating mechanism to perform semantic enhancement on the fused semantic information.

7. An image segmentation device, characterized in that: include: An underlying feature enhancement module is used to obtain an initial medical image from a target database and enhance the initial underlying features of the initial medical image using a target neural network to obtain a corresponding target medical image; An image downsampling module is configured to downsample the target medical image along the diagonal direction at different image scales to obtain target semantic information corresponding to the target medical image at different levels and a target index value corresponding to the target medical image; wherein the target index value is an index value corresponding to a maximum value of a target pixel in the target medical image, and the target pixel maximum value is a maximum value of pixels on a main diagonal line of each target region in the target medical image; An image segmentation module is used to perform weighted fusion of each target semantic information to obtain corresponding fused semantic information, upsample the fused semantic information based on the target index value to obtain a target mask corresponding to the target to be segmented in the target medical image, and perform image segmentation on the target medical image based on the target mask.

8. The image segmentation device according to claim 7, characterized in that: The image segmentation module comprises: The information fusion unit is used to obtain the pixel offset between each target semantic information, align each target semantic information based on the deformable convolution technology and the pixel offset, and perform weighted fusion on the aligned target semantic information.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the image segmentation method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the image segmentation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Medical image segmentation method, electronic equipment and storage medium

    CN116934771A

  • Image semantic segmentation method and device and storage medium

    CN117095167A

  • Medical image segmentation model establishment method based on harmonic attention and medical image segmentation method

    CN118967714A

Cited By

  • Image segmentation method and device based on channel shuffling, equipment and medium

    CN122115872A