Medical image segmentation method based on edge-region collaborative lightweight network

CN122966966APending Publication Date: 2026-10-23CHENGDU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611428663.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0014]针对现有医学图像分割方法中存在的病灶边缘提取能力不足、边缘信息与区域语义信息融合不充分以及深层特征融合计算复杂度较高的问题,本发明提出一种基于边缘-区域协同轻量化网络的医学图像分割方法

Benefits of technology

[0129](1)本发明针对医学病灶边界形态复杂、固定采样方式难以适应不同病灶结构的问题,在浅层跳跃连接中引入可变形卷积,通过学习卷积采样位置对应的二维空间偏移量,使卷积采样区域能够根据输入医学图像中的病灶轮廓进行动态调整。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966966A_ABST
    Figure CN122966966A_ABST
Patent Text Reader

Abstract

The application relates to a medical image segmentation method based on an edge-region collaborative lightweight network, and belongs to the technical field of medical image processing and computer vision. The method extracts lesion edge features through deformable convolution, extracts region features through pyramid pooling, and realizes collaborative fusion of the edge features and the region features by using edge-guided modulation and attention gating. Meanwhile, deep layer features are grouped in channels, and are respectively processed by using an attention mechanism and a multi-scale deep separable dilated convolution, and after fusion, the segmentation mask is obtained by inputting a decoder. The application can improve lesion boundary positioning and region integrity, and reduce model parameter quantity and calculation cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of medical image processing and computer vision technology, specifically relating to a medical image segmentation method based on edge-region collaborative lightweight network, and more particularly to a method that uses deformable convolution to achieve adaptive extraction of medical lesion edges, guides region feature enhancement through edge information, and combines channel grouping strategy and multi-scale depth separable dilated convolution to achieve high-precision and low-complexity medical image segmentation. Background Technology

[0002] Medical image segmentation is a fundamental technology in the field of medical image analysis. Its purpose is to automatically identify and locate target tissues, organs or lesion areas from medical image data, providing important evidence for disease auxiliary diagnosis, quantitative analysis of lesions and formulation of treatment plans.

[0003] With the development of medical imaging equipment, the scale of medical image data such as computed tomography and magnetic resonance imaging is constantly increasing. Utilizing deep learning methods to achieve automated medical image segmentation has become an important research direction in the field of medical artificial intelligence. Among them, U-shaped networks based on encoder-decoder structures are widely used in medical image segmentation tasks because they can simultaneously utilize deep semantic information and shallow spatial information.

[0004] Existing U-shaped networks typically extract multi-scale features from input medical images layer by layer through an encoder, gradually restore the spatial resolution of the feature map through a decoder, and utilize skip connections between the encoder and decoder to pass shallow detail information in order to improve the spatial localization capability of the segmentation results.

[0005] However, lesion regions in medical images are often characterized by complex shapes, irregular boundaries, and significant grayscale variations. Existing medical image segmentation methods based on U-shaped networks still have the following problems.

[0006] First, existing methods are insufficient in extracting lesion edge features.

[0007] Medical lesions typically lack regular geometric boundaries; their edges may exhibit curvature, bifurcation, weak local gradients, or even discontinuous structures. Existing methods employ fixed convolution kernels or fixed-direction operators for edge information extraction. These methods have fixed sampling positions and cannot dynamically adjust the feature sampling range based on different lesion morphologies. When lesion boundaries undergo complex changes, fixed sampling methods can easily lead to missing local edge information, resulting in boundary offsets or incomplete contours in the final segmentation results.

[0008] Secondly, existing methods struggle to achieve effective coordination between edge information and regional semantic information.

[0009] In the process of medical image segmentation, lesion edge information is mainly used to determine the location and contour of the target region, while region semantic information is mainly used to describe the overall structure and category attributes inside the target region. The two have different information expression characteristics.

[0010] Existing U-shaped networks typically employ single-path feature fusion for skip connections, directly passing shallow spatial features to the decoder without distinguishing between edge and region information. Therefore, during network training, regions with strong edge responses tend to receive higher weights, while low-contrast regions within lesions suffer from insufficient semantic representation. This results in segmentation outcomes exhibiting internal voids, region fragmentation, and inconsistencies between boundaries and internal regions.

[0011] Furthermore, existing high-precision medical image segmentation networks typically suffer from high model complexity.

[0012] To improve the ability of networks to represent features of complex medical images, existing methods typically introduce attention mechanisms, multi-scale convolutional structures, or multiple parallel feature processing branches into deep networks. However, existing multi-branch structures usually process the complete input feature map separately, resulting in a large amount of redundant computation between different branches. This leads to an increase in the number of model parameters and computational overhead, which is not conducive to deployment in application environments with limited computing resources, such as portable medical devices and primary healthcare terminals.

[0013] Therefore, existing technologies still require a medical image segmentation method that can reduce the complexity of the network model while ensuring the accuracy of lesion boundary localization and the semantic integrity of the region, thus achieving a balance between high accuracy and lightweight design. Summary of the Invention

[0014] To address the problems of insufficient lesion edge extraction capability, inadequate fusion of edge information and region semantic information, and high computational complexity of deep feature fusion in existing medical image segmentation methods, this invention proposes a medical image segmentation method based on an edge-region collaborative lightweight network.

[0015] This invention constructs a shallow edge-region collaborative processing mechanism and a deep lightweight feature fusion mechanism, enabling the network to optimize the processing of spatial detail information and high-level semantic information in medical images, respectively.

[0016] Among them, the shallow edge-region collaborative processing mechanism is used to solve the problem that it is difficult to simultaneously ensure the localization of lesion boundaries and regional integrity. It achieves adaptive extraction of lesion edges through deformable convolution and uses edge information to guide the optimization of regional features, so that edge information no longer participates in the fusion as a simple auxiliary feature, but serves as the adjustment basis in the process of regional feature enhancement.

[0017] The deep lightweight feature fusion mechanism is used to solve the problem of large number of parameters and high computational cost in high-precision networks. By dividing the input features into different feature subspaces through channel grouping, different channel groups can undertake attention modeling and multi-scale context extraction tasks respectively, thus maintaining the feature expressive ability of the network while reducing redundant computation.

[0018] Through the above-mentioned shallow and deep collaborative optimization methods, the present invention can improve the ability to locate lesion boundaries and regional continuity in the process of medical image segmentation, while reducing the number of model parameters and computational complexity.

[0019] To address the above objectives, this invention proposes a medical image segmentation method based on an edge-region collaborative lightweight network, comprising the following steps:

[0020] A medical image to be segmented is acquired and input into a preset medical image segmentation network. The encoder in the medical image segmentation network performs layer-by-layer feature extraction to obtain coded features at different levels.

[0021] The medical image segmentation network includes an encoder, a decoder, and skip connections between the encoder and the decoder; the skip connections are divided into shallow skip connections and deep skip connections according to the feature level.

[0022] For the shallow feature map in the shallow skip connection, the shallow feature map is input into the edge-region collaboration module.

[0023] The edge-region collaboration module includes edge branches and region branches.

[0024] In the edge branch, the shallow feature map is input into the deformable convolution module. The two-dimensional spatial offset corresponding to the convolution sampling position is learned through the offset prediction branch. The sampling position of the convolution kernel is adjusted according to the two-dimensional spatial offset so that the sampling area can adapt to the contour of the medical lesion and obtain the edge features.

[0025] In the region branch, the shallow feature map is input into the pyramid pooling module, and contextual information within different receptive fields is obtained through pooling operations at multiple scales to obtain region features.

[0026] A spatial modulation weight map is generated based on the edge features, and the regional features are modulated pixel by pixel using the spatial modulation weight map to obtain the modulated regional features.

[0027] Furthermore, the edge features are used as a gating signal, and the modulated region features are used as features to be fused and input into the attention gating module. Corresponding fusion weights are generated according to different spatial locations, and the region features are adaptively adjusted using the fusion weights.

[0028] The gated region features are fused with the edge features to obtain shallow fused features.

[0029] For the input features in the deep skip connections and bottleneck layers, the input features are divided into a first channel group and a second channel group along the channel direction.

[0030] The first channel group is input into the attention submodule, and feature importance is redistributed through channel attention and spatial attention.

[0031] The second channel group is input into the multi-scale depth-separable dilated convolution branch, and contextual information within different scale ranges is obtained through multiple depth-separable dilated convolutions with different dilation rates.

[0032] The output features corresponding to the first channel group and the output features corresponding to the second channel group are concatenated, and cross-channel information fusion is achieved through convolution operation to obtain deep fused features.

[0033] The shallow fusion features and the deep fusion features are input into the decoder, and the spatial resolution is restored by upsampling to obtain the final medical image segmentation result.

[0034] Furthermore, the medical image segmentation network adopts an encoder-decoder structure.

[0035] The encoder is used to extract features from the input medical image layer by layer, obtaining feature representations at different spatial scales through continuous convolution and downsampling operations. Shallow-layer encoded features retain richer spatial location and edge detail information, while deep-layer encoded features contain more abstract semantic information.

[0036] The decoder is used to gradually restore the spatial resolution of the medical image based on the different levels of features output by the encoder, and to generate a segmentation mask corresponding to the input medical image by fusing different scale features obtained in the encoding stage through skip connections.

[0037] This invention differs from the traditional direct fusion method of skip connections. Based on the information characteristics contained in features at different levels, different feature processing mechanisms are designed for shallow skip connections and deep skip connections.

[0038] For shallow skip connections, since shallow features mainly include lesion edges, textures, and local spatial structure information, an edge-region collaborative processing mechanism is adopted.

[0039] For deep skip connections, a lightweight channel grouping feature fusion mechanism is adopted because deep features have a high number of channels and strong semantic expression capabilities.

[0040] By applying differentiated processing to features at different levels, the network can fully utilize shallow spatial detail information and deep semantic information, thereby improving the segmentation effect of medical images.

[0041] Furthermore, the deformable convolution module is used to replace the ordinary convolution structure with a fixed sampling position.

[0042] When performing feature extraction, the sampling position of the convolution kernel in ordinary convolution is determined by the preset convolution structure. That is, for any input image, the convolution kernel always samples the neighborhood position according to a fixed rule.

[0043] However, medical lesions typically have irregular boundaries, and there are significant morphological differences between different lesions. Fixed sampling methods cannot adjust the sampling range according to changes in the target area.

[0044] Therefore, this invention introduces deformable convolution in the shallow edge branch, and learns the two-dimensional spatial offset corresponding to each sampling position through an additional offset prediction branch.

[0045] For the k-th sampling position in the convolution kernel, the deformable convolution output is represented as:

[0046]

[0047] in: Indicates the position in the output feature map Output feature value at; This represents the input shallow feature map; Indicates the current output position; This represents the k-th basic sampling position in the convolution kernel; This represents the convolution weight corresponding to the k-th sampling position; This represents the two-dimensional spatial offset learned from the offset prediction branch.

[0048] By introducing the aforementioned two-dimensional spatial offset, the actual sampling position is determined by:

[0049]

[0050] It becomes:

[0051]

[0052] This enables the convolutional sampling region to dynamically change according to the morphology of lesions in the input medical image.

[0053] When the offset sampling coordinates are non-integer coordinates, the feature values ​​at the corresponding positions are calculated by bilinear interpolation, so that the deformable convolution process remains continuous and differentiable, thus enabling it to participate in the network training process.

[0054] Through the above methods, the network can automatically adjust the feature sampling range according to different lesion boundary morphologies, thereby improving the feature extraction capabilities for curved boundaries, bifurcation structures, and weak boundary regions.

[0055] Furthermore, the regional branch includes a pyramid pooling module.

[0056] Since medical lesion areas not only need to have their boundaries accurately located, but also need to ensure the continuity of the internal areas of the lesion, relying solely on edge features cannot fully describe the lesion area.

[0057] This invention utilizes a pyramid pooling module to extract multi-scale contextual information from shallow features.

[0058] Specifically, the shallow feature map is input into multiple pooling paths of different scales, and each pooling path obtains local and global region information according to different spatial ranges.

[0059] After feature fusion, the pooling results at different scales form regional features that contain multi-scale contextual information.

[0060] Small-scale pooling results are mainly used to preserve the local texture and detail information of lesions, while large-scale pooling results are used to enhance the network's understanding of the overall structure of the lesion region.

[0061] Therefore, regional branches can effectively supplement the problem of edge branches that only focus on contour information and lack regional semantic expression.

[0062] Furthermore, this invention does not simply concatenate edge features with region features, but actively adjusts the response of region features using edge features.

[0063] Specifically, for edge features Perform convolutional mapping and generate a spatially modulated weight map using the Sigmoid activation function:

[0064]

[0065] in: Represents the spatial modulation weighting map; This represents the Sigmoid activation function; This indicates a convolution operation.

[0066] Different pixel positions in the spatial modulation weighting map correspond to different regional response weights.

[0067] Using the spatial modulation weight map to analyze regional features Perform pixel-by-pixel modulation:

[0068]

[0069] in Indicates the modulated regional characteristics; This indicates pixel-by-pixel multiplication.

[0070] Through the above processing method, edge features are no longer just additional input information, but participate in the region feature optimization process.

[0071] When a spatial location has a strong lesion edge response, the regional feature weight of the corresponding location is enhanced; when a region has a weak association with the lesion edge, the corresponding regional feature response is reduced.

[0072] Therefore, this invention can utilize edge information to constrain the semantic expression of regions, enabling the network to focus more on regions related to the target lesion.

[0073] Furthermore, to avoid edge information completely covering regional semantic information, this invention further sets up an attention gating fusion mechanism.

[0074] Specifically, edge features As gating reference information, the modulated regional features As features to be fused.

[0075] The fusion information corresponding to edge features and region features is extracted through convolution operations, and spatial fusion coefficients are generated.

[0076]

[0077] in: Represents the spatial fusion coefficient diagram; This indicates the bias term.

[0078] Gating the modulated regional features based on the spatial fusion coefficient map:

[0079]

[0080] Then, edge features and gating area features The components are stitched together along the channel direction and then fused using a 1×1 convolution:

[0081]

[0082] in: Indicates shallow fusion characteristics; This indicates a channel dimension splicing operation.

[0083] Through the above fusion method, the network can automatically adjust the contribution ratio of edge information and regional information according to different spatial locations.

[0084] Edge features are used to guide regional feature responses at the lesion boundary, and effective regional semantic information is preserved through a gating mechanism within the lesion region. In the lesion region, the weight of regional semantic features is increased to maintain the continuity of the lesion region.

[0085] Therefore, this invention achieves a dynamic balance between precise boundary positioning and complete region representation.

[0086] Furthermore, for deep skip connections and high-dimensional features in bottleneck layers, this invention employs a lightweight channel grouping feature fusion module.

[0087] Traditional multi-branch networks typically input the complete input features into multiple processing modules simultaneously, such as simultaneously inputting the attention module and the multi-scale convolution module.

[0088] While this method can improve feature representation capabilities, it results in a large amount of redundant computation because different modules process complete features.

[0089] To address this problem, the present invention first divides the input features according to the channel dimension.

[0090] Let the input features be:

[0091]

[0092] Where: C represents the number of input feature channels; H represents the feature map height; W represents the feature map width.

[0093] The input features are divided into:

[0094]

[0095] in: Indicates the first channel group; This indicates the second channel group.

[0096] The two channel groups satisfy:

[0097]

[0098] That is, there are no duplicate channels between the two channel groups.

[0099] The first channel group input attention submodule.

[0100] The attention submodule includes an efficient channel attention unit and a spatial attention unit.

[0101] The efficient channel attention unit is used to analyze the importance of different channels and generate channel weights based on channel responses.

[0102] Spatial attention units are used to analyze the importance of different spatial locations and generate spatial weights.

[0103] By combining channel weights and spatial weights, the features of the first channel group are recalibrated.

[0104] The first output feature is obtained after processing:

[0105]

[0106] in: This indicates an attention enhancement operation.

[0107] The second channel group inputs multi-scale depth-separable dilated convolution branches.

[0108] The multi-scale depth-separable dilated convolution branch includes multiple convolution paths with different dilation rates.

[0109] In one implementation, the expansion rates for each path are 1, 2, and 5, respectively.

[0110] Different expansion rates correspond to different sizes of effective receptive fields.

[0111] A smaller expansion rate is used to extract local structural information;

[0112] A larger expansion rate is used to obtain a wider range of contextual information.

[0113] Depth-separable dilated convolutions include:

[0114] Channel-wise depthwise convolution;

[0115] Pointwise convolution.

[0116] Among them, channel-wise depthwise convolution is used to complete the spatial dimension feature extraction;

[0117] Pointwise convolution is used to fuse information between different channels.

[0118] Compared to ordinary convolution methods, this structure can reduce the number of parameters and computational cost.

[0119] The second output feature is obtained by fusing the outputs of multi-scale convolutions.

[0120]

[0121] in: This represents the multi-scale depth-separable dilated convolution process.

[0122] The first output feature Second output features Perform channel splicing:

[0123]

[0124] Then, cross-channel information exchange is achieved through 1×1 convolution:

[0125]

[0126] The final deep fusion features are obtained.

[0127] Through the above structure, the present invention does not simply reduce the network size, but rather, while ensuring the learning ability of different features, it allocates different tasks to different feature subspaces, thereby reducing computational redundancy.

[0128] Compared with existing medical image segmentation methods, the present invention has at least the following beneficial effects:

[0129] (1) In view of the problem that the boundary shape of medical lesions is complex and the fixed sampling method is difficult to adapt to different lesion structures, the present invention introduces deformable convolution in shallow skip connections. By learning the two-dimensional spatial offset corresponding to the convolution sampling position, the convolution sampling area can be dynamically adjusted according to the lesion contour in the input medical image.

[0130] Compared to edge extraction methods that use fixed-direction filtering or fixed convolution kernels, the deformable convolution in this invention does not require pre-setting the direction of the lesion edge and can automatically adjust the feature sampling position according to the actual lesion morphology. Therefore, it can improve the adaptability to curved, bifurcated and irregular lesion boundaries and improve the accuracy of segmentation boundaries.

[0131] (2) In view of the problem that edge information and region semantic information are difficult to be effectively taken into account in existing medical image segmentation networks, the present invention inputs shallow features into the edge branch and the region branch respectively, so that the edge features and the region features are extracted in a targeted manner.

[0132] Among them, the edge branch is used to enhance the ability to locate the lesion contour, and the region branch is used to enhance the semantic expression ability of the internal region of the lesion.

[0133] Furthermore, this invention utilizes edge features to generate a spatial modulation weight map, enabling edge information to participate in the regional feature optimization process, and dynamically adjusts the fusion ratio of edge features and regional features through an attention gating mechanism.

[0134] Therefore, this invention does not simply splice edge features and region features together, but establishes a collaborative processing relationship driven by edge information to enhance region features, enabling the network to maintain both the accuracy of lesion boundaries and the integrity of the internal regions of lesions.

[0135] (3) In view of the problems of repetitive calculation and large number of parameters in traditional deep multi-branch feature fusion structure, the present invention adopts a lightweight channel grouping feature fusion structure in deep jump connection and bottleneck layer.

[0136] This invention first divides the input features into multiple non-overlapping feature subspaces according to the channel dimension, and then uses attention mechanism and multi-scale depth-separable dilated convolution to process the features of different channel groups respectively.

[0137] Since different processing modules only operate on the corresponding channel subsets, without having to process the complete input features at the same time, redundant calculations in multi-branch structures can be effectively reduced.

[0138] Meanwhile, information interaction between different feature subspaces is restored through subsequent channel fusion operations, which reduces network complexity while maintaining good feature representation ability.

[0139] (4) This invention enables the network to simultaneously meet the requirements of boundary localization capability, regional continuity and model deployment efficiency in medical image segmentation tasks through the collaborative design of shallow spatial detail optimization and deep semantic lightweight fusion.

[0140] Compared to methods that simply increase network depth or the number of network branches, this invention achieves a balance between segmentation accuracy and computational complexity by designing different processing strategies for different levels of features.

[0141] (5) This invention is applicable to medical auxiliary diagnosis scenarios with limited computing resources, such as portable computed tomography imaging devices and auxiliary diagnosis terminals in primary healthcare institutions. While ensuring the effectiveness of medical image segmentation, it can reduce the number of model parameters and computational overhead, and improve the feasibility of model deployment.

[0142] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0143] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0144] Figure 1 This is a schematic diagram of the overall structure of the medical image segmentation network based on the edge-region collaborative lightweight network in an embodiment of the present invention;

[0145] Figure 2 This is a schematic diagram of the deformable convolution module structure in an embodiment of the present invention;

[0146] Figure 3 This is a schematic diagram of the edge-region feature collaboration module structure in an embodiment of the present invention;

[0147] Figure 4 This is a schematic diagram of the lightweight channel grouping feature fusion module in an embodiment of the present invention. Detailed Implementation

[0148] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0149] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0150] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0151] Example 1

[0152] This embodiment provides a medical image segmentation method based on edge-region collaborative lightweight network.

[0153] The segmentation network in this embodiment adopts an encoder-decoder structure, including an encoder, a decoder, and multi-level skip connections connecting the encoder and the decoder.

[0154] like Figure 1As shown, the medical image segmentation network of this invention adopts an encoder-decoder structure. The input medical image is processed by the encoder to extract features step-by-step. An edge-region collaboration module is set at shallow skip connections, and a lightweight channel grouping feature fusion module is set at deep skip connections and bottleneck layers. The encoder output features are processed accordingly and then passed to the decoder, which performs feature recovery and segmentation result generation.

[0155] The encoder is used to extract multi-scale features from the input medical image layer by layer. During the encoding stage, as the network depth increases, the spatial size of the feature map gradually decreases, while the number of feature channels gradually increases. Shallow encoded features have high spatial resolution, containing lesion edges, texture, and local structural information; deep encoded features have strong semantic expressive power, containing lesion category and regional context information. Based on the characteristics of features at different levels, this embodiment designs a shallow edge-region collaboration module and a deep lightweight feature fusion module, respectively.

[0156] (1) Shallow edge-region collaborative processing process

[0157] In shallow skip connections, the shallow feature map output by the encoder is input into the edge-region collaboration module.

[0158] like Figure 3 As shown, the same shallow feature map is input into the edge branch and the region branch respectively. The edge-region collaboration module includes an edge branch, a region branch, an edge-guided modulation module, and an attention-gated fusion module. The edge branch outputs edge features, and the region branch outputs region features. After edge-guided modulation and attention gating, the two are used to generate shallow fused features.

[0159] (2) Edge branch processing process

[0160] In the edge branches, shallow feature maps are input into the deformable convolutional module. For example... Figure 2 As shown, the deformable convolution module includes input features, an offset prediction unit, and a feature sampling unit. The offset prediction unit predicts the two-dimensional spatial offset based on the input features, and the feature sampling unit obtains the corresponding features based on the offset sampling positions. The deformable convolution module includes an offset prediction unit and a feature sampling unit. The offset prediction unit learns the spatial offset corresponding to each sampling position based on the input shallow feature map. In ordinary convolution, the sampling positions of the convolution kernel are fixed. Assuming that the convolution kernel contains N basic sampling positions, each basic sampling position corresponds to two offset parameters: a horizontal offset and a vertical offset. Therefore, the offset prediction branch outputs 2N offset channels; for a 3×3 convolution kernel, N=9.

[0161] In this embodiment, each sampling point has a corresponding two-dimensional offset: Therefore, the actual sampling location becomes: When the lesion boundary changes, the network can automatically adjust the offset direction based on the training data, making the sampling area fit the lesion contour better. Edge features are obtained in this way. .

[0162] (3) Regional branching process

[0163] Simultaneously, the same shallow feature map is input into the region branch. The region branch employs a pyramid pooling module. The pyramid pooling module includes multiple pooling paths at different scales. Different pooling paths acquire contextual information within different ranges. After pooling and feature fusion, the region features are obtained: Among them, smaller-scale pooling paths are used to preserve local details of the lesion; larger-scale pooling paths are used to obtain information about the overall lesion region.

[0164] The above methods enable regional features to more accurately describe the internal structure of lesions.

[0165] (4) Edge-guided modulation process

[0166] Obtain edge features and regional characteristics Subsequently, this embodiment further utilizes edge information to modulate the regional features.

[0167] First, perform a 1×1 convolution mapping on the edge features:

[0168]

[0169] Then, spatial modulation weights are generated using the Sigmoid function:

[0170]

[0171] in: This represents the spatial modulation weighting map.

[0172] Adjusting regional features using spatial modulation weight maps:

[0173]

[0174] After modulation:

[0175] For locations related to the lesion area, the spatial modulation weight is relatively high, which preserves the features of the corresponding area to a greater extent; for background locations unrelated to the target lesion, the spatial modulation weight is relatively low, which suppresses the features of the corresponding area, thereby relatively strengthening the feature expression of the area related to the target lesion.

[0176] Therefore, regional features can achieve semantic optimization under the constraint of edge information.

[0177] (5) Attention Gated Fusion Process

[0178] To further prevent edge information from excessively influencing regional features, this embodiment employs an attention gating mechanism.

[0179] edge features and modulated regional features Input attention gating module.

[0180] First, generate the fusion coefficients:

[0181]

[0182] Then:

[0183]

[0184] The characteristics of the gated region are obtained.

[0185] Subsequently:

[0186]

[0187] Obtaining shallow fusion features .

[0188] This process achieves the following: strengthening edge representation in boundary regions; and strengthening semantic representation in internal regions.

[0189] This improves the completeness of medical image segmentation results.

[0190] (6) Deep lightweight feature fusion process

[0191] In deep skip connections and bottleneck layers, this embodiment employs a lightweight channel grouping feature fusion module.

[0192] like Figure 4 As shown, the lightweight channel grouping feature fusion module includes a channel partitioning structure, an attention submodule, a multi-scale deep separable dilated convolution branch, and a feature fusion structure. The input features are first divided into two channel groups along the channel dimension. The two channel groups undergo different types of feature processing, and then a fusion operation is performed to obtain the final deep fused features.

[0193] Let the input features be:

[0194]

[0195] Where: C represents the number of channels; H represents the height; W represents the width.

[0196] First, divide along the direction of the channel:

[0197]

[0198] in: This is the first channel group; This is the second channel group.

[0199] (7) Processing of the first channel group

[0200] The first channel group input attention submodule.

[0201] The attention submodule includes: efficient channel attention; spatial attention.

[0202] The efficient channel attention adjusts the channel weights according to the importance of different channels.

[0203] Spatial attention adjusts spatial responses based on the importance of spatial locations.

[0204] After joint enhancement, we obtain:

[0205]

[0206] (8) Second channel group processing

[0207] The second channel group inputs multi-scale depth-separable dilated convolution branches.

[0208] This embodiment sets up multiple convolutional paths with different dilation rates.

[0209] The expansion rates include: 1; 2; 5.

[0210] Different expansion rates are used to obtain information within different receptive field ranges.

[0211] After multi-scale fusion, the following was obtained:

[0212]

[0213] (9) Feature fusion

[0214] Will: and To splice:

[0215]

[0216] Subsequently passed:

[0217]

[0218] Complete cross-channel information fusion.

[0219] The deep fusion features are ultimately obtained.

[0220] Example 2

[0221] This embodiment further illustrates the specific application process of the medical image segmentation method based on edge-region collaborative lightweight network in lung computed tomography image segmentation tasks.

[0222] In this embodiment, the medical image to be segmented is a lung computed tomography (CT) image.

[0223] First, the acquired lung computed tomography images are preprocessed to meet the requirements for network input.

[0224] In one specific implementation, the input medical image is adjusted to a two-dimensional image with a size of 256×256, and the processed image is input into the medical image segmentation network constructed in this invention.

[0225] The medical image segmentation network includes: an encoder; a decoder; a shallow edge-region collaboration module; and a deep lightweight channel grouping feature fusion module. The encoder extracts multi-level features from the input lung computed tomography (CT) image. The shallow edge-region collaboration module enhances lesion edge localization and improves the representation of lesion internal regions. The deep lightweight channel grouping feature fusion module reduces model computational complexity while maintaining deep semantic information extraction capabilities. After network processing, a single-channel lesion segmentation mask is output.

[0226] (1) Network training process

[0227] In this embodiment, during the network training phase, the medical image segmentation network is trained using a labeled medical image dataset.

[0228] During training, the original medical images are used as network input, and the corresponding lesion annotation masks are used as supervision labels.

[0229] The network generates predicted segmentation results based on the input medical image and calculates the difference between the predicted results and the true labels.

[0230] Specifically, this embodiment uses binary cross-entropy loss with Logits (BCEWithLogitsLoss).

[0231] During the training phase, the decoder outputs a single-channel segmentation logit map, which is then directly input into BCEWithLogitsLoss to calculate the loss. During the inference phase, the segmentation logit map is subjected to Sigmoid mapping to obtain a lesion probability map, and binarized according to a preset threshold to obtain a single-channel lesion segmentation mask.

[0232] By minimizing the above loss function, the network prediction results gradually approach the actual lesion area.

[0233] (2) Parameter optimization process

[0234] This embodiment uses the Adam optimizer to update network parameters.

[0235] The Adam optimizer can adaptively adjust the update magnitude of different parameters based on historical gradient information, thereby improving the stability of network training.

[0236] In one specific implementation, the initial learning rate is set to: Set the batch size to 4 and the training rounds to 100.

[0237] Through multiple rounds of iterative training, the deformable convolution offset parameters, convolution weights, attention parameters, and feature fusion parameters in the network are gradually optimized.

[0238] The two-dimensional spatial offset in the deformable convolution module is not set manually, but is automatically learned during the training process based on the edge features of lesions in medical images.

[0239] Therefore, different lesion shapes can correspond to different sampling offset patterns, improving the network's adaptability to complex lesion structures.

[0240] (3) Data augmentation process

[0241] To improve the network's adaptability to different medical image imaging conditions and lesion morphology changes, this embodiment employs an online data augmentation strategy during training.

[0242] The data augmentation methods include: random rotation; horizontal flipping; and vertical flipping.

[0243] Specifically: the random rotation range is ±35 degrees; the horizontal flip probability is 0.5; and the vertical flip probability is 0.1.

[0244] The above data augmentation methods can increase the spatial variation of training samples and improve the network's generalization ability.

[0245] (4) Process of generating segmentation results

[0246] When a trained medical image segmentation network is used for a real-world medical image segmentation task, the following process is involved:

[0247] First, acquire the medical images to be analyzed.

[0248] The medical image is then input into the encoder.

[0249] The encoder extracts low-level spatial information and high-level semantic information from medical images layer by layer.

[0250] For shallow features: processing is performed using an edge-region collaborative module. Specifically: deformable convolution dynamically adjusts the sampling position based on the lesion contour; region branching extracts semantic information within the lesion; an edge-guided modulation mechanism optimizes region features using edge information; and an attention gating mechanism completes the adaptive fusion of edge and region information. This yields shallow fused features.

[0251] For deep features: These are processed using a lightweight channel-grouped feature fusion module. Specifically, the first channel group undergoes attention enhancement, while the second channel group is processed using multi-scale depth-separable dilated convolution. The two groups of features are fused to form a deep fused feature. Subsequently, the shallow and deep fused features are input into the decoder. The decoder gradually restores the spatial resolution through multi-level upsampling and outputs the final lesion segmentation mask.

[0252] Example 3

[0253] To further illustrate the technical effects of the present invention, the method of the present invention will be compared with traditional medical image segmentation methods.

[0254] Traditional U-shaped medical image segmentation networks typically employ a single-path skip connection method.

[0255] While this method can transmit shallow spatial information, it does not distinguish between edge information and regional information. Therefore, in cases where the lesion boundary is complex or the internal grayscale changes are significant, the following problems may occur: blurred lesion boundary; missing local areas; and broken internal areas.

[0256] This invention employs an edge-region collaborative module to separate and model shallow features. Specifically: deformable convolution enhances edge feature extraction; pyramid pooling enhances regional semantic representation; edge-guided modulation establishes the constraint relationship between edge information and regional information; and attention gating enables dynamic fusion of the two types of information. Therefore, compared to traditional direct fusion methods, this invention improves the overall consistency of lesion regions.

[0257] On the other hand, traditional high-precision medical image segmentation networks typically improve performance by increasing network depth or adding parallel feature processing branches.

[0258] However, this approach leads to: an increase in the number of model parameters; an increase in inference time; and difficulties in device deployment.

[0259] This invention employs a channel grouping strategy. By dividing the input features into different channel subspaces, different modules process different feature sets. Specifically, the attention module focuses on feature importance, while the multi-scale depthwise separable dilated convolution focuses on contextual information. Since neither module needs to repeatedly process all input features, computational redundancy is reduced. Simultaneously, cross-channel fusion is achieved through subsequent 1×1 convolutions, maintaining information interaction between different feature subspaces. Therefore, this invention can maintain good medical image segmentation capabilities while reducing model complexity.

[0260] The medical image segmentation method proposed in this invention, based on edge-region collaborative lightweight network, addresses the unique challenges of boundary irregularities, regional semantic complexity, and computational resource constraints in medical image segmentation tasks by designing a hierarchical optimization structure consisting of shallow edge-region collaborative processing and deep lightweight feature fusion.

[0261] In the shallow stage, this invention uses deformable convolution to achieve adaptive modeling of lesion edges and uses edge information to guide the optimization of regional features, enabling the network to simultaneously focus on lesion boundaries and internal structures.

[0262] In the deep layer stage, this invention utilizes channel grouping to reduce redundant computations in multi-branch structures, and combines attention mechanisms and multi-scale depth-separable dilated convolutions to enhance semantic expressive capabilities.

[0263] Through the above technical solution, the present invention can reduce the number of network parameters and computational complexity while ensuring the accuracy of medical image segmentation, thereby improving the feasibility of applying the medical image segmentation model in actual clinical auxiliary diagnostic equipment.

[0264] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A medical image segmentation method based on edge-region collaborative lightweight network, characterized in that, Includes the following steps: A medical image to be segmented is acquired and input into a preset medical image segmentation network. The encoder of the medical image segmentation network extracts features from the medical image layer by layer to obtain encoded features at different levels. The medical image segmentation network includes an encoder, a decoder, and skip connections connecting the encoder and the decoder. The skip connections include shallow skip connections and deep skip connections. For the shallow feature map corresponding to the shallow skip connection, the same shallow feature map is input into the edge branch and the region branch respectively. The deformable convolution in the edge branch predicts the two-dimensional spatial offset corresponding to the convolution sampling position based on the shallow feature map, and adjusts the convolution sampling position based on the two-dimensional spatial offset to perform adaptive feature sampling on the shallow feature map to obtain edge features. The pyramid pooling module in the region branch performs multi-scale context feature extraction on the shallow feature map to obtain region features. A spatial modulation weight map is generated based on the edge features. The spatial modulation weight map is then used to modulate the region features pixel by pixel, so that the spatial response of the region features is guided by the spatial distribution corresponding to the edge features, thereby obtaining the modulated region features. The edge features are used as a gate signal, and the modulation region features are used as features to be weighted. The attention gate module is then used to generate spatial fusion coefficients based on the edge features and the modulation region features. The modulation region features are then gated and weighted using the spatial fusion coefficients. Finally, the gated and weighted region features are fused with the edge features to obtain shallow fused features. For the input features corresponding to the deep skip connections and the bottleneck layer between the encoder and the decoder, the input features are divided into a first channel group and a second channel group that do not overlap along the channel dimension. The first channel group is input into the attention submodule for channel feature and spatial feature recalibration. The second channel group is input into the multi-scale depth-separable dilated convolution branch for multi-scale context feature extraction. The output features corresponding to the first channel group and the second channel group are concatenated along the channel dimension and cross-channel feature fusion is performed to obtain deep fused features. The shallow fusion features and the deep fusion features corresponding to the deep skip connections are passed to the decoder through the corresponding skip connections, and the deep fusion features corresponding to the bottleneck layer are input into the decoder. The decoder performs layer-by-layer upsampling decoding to obtain the segmentation mask corresponding to the medical image to be segmented.

2. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 1, characterized in that, The medical image segmentation network adopts a U-shaped encoder-decoder structure. The encoder includes a multi-layer downsampling structure, and the decoder includes a multi-layer upsampling structure corresponding to the multi-layer downsampling structure. The shallow skip connections are used to transmit shallow encoded features containing spatial detail information, and an edge-region collaborative processing structure is set in the shallow skip connections. The deep skip connections and the bottleneck layer are used to process deep features containing high-level semantic information, and a lightweight channel grouping feature fusion structure is set.

3. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 1, characterized in that, The deformable convolution includes an offset prediction process and a feature sampling process. The offset prediction process predicts the two-dimensional spatial offset corresponding to each basic sampling position in the convolution kernel based on the input shallow feature map. The corresponding basic sampling position is adjusted to the offset sampling position based on each two-dimensional spatial offset. When the offset sampling position is a non-integer coordinate, bilinear interpolation is used to obtain the corresponding feature value, so that the sampling grid of the deformable convolution can adaptively deform according to the lesion contour.

4. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 1, characterized in that, The pyramid pooling module includes multiple pooling paths of different scales. The shallow feature map is processed in parallel through these multiple pooling paths of different scales to obtain contextual information in different spatial ranges. The contextual information of different scales is then aggregated to obtain the regional features used to characterize the semantic information of the lesion's internal region.

5. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 1, characterized in that, Generating a spatial modulation weight map based on the edge features and using the spatial modulation weight map to perform pixel-wise modulation on the region features includes: performing a 1×1 convolution mapping on the edge features, generating the spatial modulation weight map through a Sigmoid activation function, performing element-wise multiplication of the spatial modulation weight map with the region features to obtain the modulated region features, so as to adjust the feature responses at different spatial locations in the region features according to the spatial responses corresponding to the edge features.

6. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 5, characterized in that, The attention gating module performs convolutional mapping on the edge features and the modulation region features respectively, sums the corresponding convolutional mapping results, activates them with ReLU, maps them through 1×1 convolution, and generates the spatial fusion coefficients through Sigmoid activation. The spatial fusion coefficients are then multiplied element-wise with the modulation region features to obtain the gated region features. The gated region features and the edge features are then concatenated along the channel dimension and fused through 1×1 convolution to obtain the shallow fusion features.

7. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 1, characterized in that, For the deep skip connections and the input features in the bottleneck layer with a channel number of C and C being even, the input features are divided along the channel dimension into a first channel group and a second channel group with C / 2 channels respectively, and the feature channels contained in the first channel group and the second channel group do not overlap.

8. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 7, characterized in that, The attention submodule includes an efficient channel attention unit and a spatial attention unit. The efficient channel attention unit performs channel feature recalibration on different feature channels in the first channel group, and the spatial attention unit performs spatial feature recalibration on different spatial locations in the first channel group to obtain a first output feature after joint channel and spatial feature recalibration.

9. The medical image segmentation method based on edge-region collaborative lightweight network according to claim 7, characterized in that, The multi-scale depth-separable dilated convolution branch includes multiple depth-separable dilated convolution paths with different dilation rates. The multiple depth-separable dilated convolution paths extract contextual features of different receptive field ranges for the second channel group. Each depth-separable dilated convolution path includes a channel-wise depth-separable dilated convolution for spatial feature extraction and a pointwise convolution for channel information fusion. The features obtained by each depth-separable dilated convolution path are fused to obtain a second output feature. The first output feature and the second output feature are concatenated along the channel dimension and then cross-channel information fusion is performed through a 1×1 convolution.

10. The medical image segmentation method based on edge-region collaborative lightweight network according to any one of claims 1-9, characterized in that, The medical image to be segmented is a computed tomography (CT) image of the lungs. The medical image segmentation network segments the lesion region in the CT image of the lungs and outputs a corresponding single-channel lesion segmentation mask.