Image segmentation method and system based on boundary enhancement and global modeling
Patent Information
- Application Number
- CN202611426920.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-10-30
AI Technical Summary
然而,目前临床上淋巴结区域仍主要依赖人工逐层勾画,过程耗时耗力且易受主观因素影响,导致结果一致性不足
本发明的一种基于边界增强与全局建模的图像分割方法及系统,优化了头颈部淋巴结小目标分割中存在的边界清晰性,提升局部细节表达,减少长距离上下文建模能力有限以及输出结果边界偏差的情况。
Smart Images

Figure CN123015528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing, specifically to an image segmentation method and system based on boundary enhancement and global modeling. Background Technology
[0002] Head and neck cancers are a common type of malignant tumor that occurs in the oral cavity, pharynx, larynx, nasal cavity, sinuses, and salivary glands. According to data from the International Agency for Research on Cancer (IARC), head and neck cancer ranks as the seventh most common cancer worldwide and is one of the malignant tumors with a high incidence and mortality risk. Due to the complex anatomy of the head and neck, tumors are often located near critical functional structures such as swallowing, breathing, vocalization, and important blood vessels and nerves. Their progression or improper treatment can seriously affect the patient's quality of life and survival prognosis. The involvement of cervical lymph nodes is an important basis for the diagnosis, staging assessment, and treatment planning of head and neck cancers. Inaccurate identification of lymph node regions may lead to missed radiotherapy targets or excessive irradiation of normal tissues, thereby affecting treatment efficacy and increasing the risk of adverse reactions. Therefore, accurate segmentation of lymph node regions is of significant clinical importance.
[0003] Computed tomography (CT) images, as an important imaging tool in the diagnosis and radiotherapy planning of head and neck cancers, provide clear two-dimensional or three-dimensional structural information and are widely used in the evaluation of tumors and surrounding tissues. However, in clinical practice, lymph node regions still mainly rely on manual layer-by-layer delineation, a time-consuming, labor-intensive process susceptible to subjective factors, leading to inconsistent results. Although deep learning methods have made significant progress in medical image segmentation in recent years, with convolutional neural network-based models capable of fusing multi-layer features and utilizing three-dimensional spatial information, they still face many challenges in head and neck lymph node segmentation tasks, such as class imbalance due to a low proportion of small targets, missegmentation caused by blurred boundaries, insufficient local feature modeling, and inadequate utilization of global information. Furthermore, while some lightweight models reduce computational complexity, they still have shortcomings in fine-grained feature extraction and handling of uncertain regions.
[0004] Therefore, there is an urgent need for an automated segmentation method that balances efficiency and accuracy to improve the accuracy, stability, and clinical application value of head and neck lymph node segmentation. Summary of the Invention
[0005] The purpose of this invention is to provide an image segmentation method and system based on boundary enhancement and global modeling, which can enhance the feature representation of small targets, blurred boundary regions and low contrast regions in head and neck lymph node images, improve the accuracy and stability of lymph node segmentation, and at the same time take into account computational efficiency.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an image segmentation method based on boundary enhancement and global modeling, comprising the following steps: Acquire head and neck CT image data and corresponding lymph node annotation data to form three-dimensional paired samples, and preprocess the three-dimensional paired samples; A 3D encoder-decoder segmentation network is constructed, which includes an encoder, a bottleneck layer, a decoder, and a refined output structure. In the shallow feature extraction stage of the encoder, a boundary feature enhancement unit is set up. The local texture, multi-scale context, directional structure and boundary response in the shallow features are enhanced by the multi-branch convolution structure in the boundary feature enhancement unit. A global context modeling unit is set in the bottleneck layer to divide the bottleneck features into local feature branches and global feature branches, and to perform sequence modeling on the global feature branches along different directions in three-dimensional space. The output refinement structure includes setting a boundary-guided residual refinement unit at the output end, generating a coarse segmentation output, a boundary-guided weight map, and a refinement residual based on the decoder output features, and using the boundary-guided weight map to weight the refinement residual to perform boundary-guided correction on the coarse segmentation output and output the lymph node segmentation result. A pre-trained 3D encoder-decoder segmentation network was used to automatically segment the lymph node region in the head and neck CT images to be segmented, and the final lymph node segmentation result was obtained.
[0007] In a preferred embodiment of the present invention, the preprocessing includes: acquiring a three-dimensional paired sample consisting of head and neck CT image data and corresponding lymph node annotation data; dividing the three-dimensional paired sample into a training set, a validation set, and a test set; reading the head and neck CT image data and corresponding lymph node annotation data in each three-dimensional paired sample, and adding channel dimensions respectively; performing grayscale truncation and normalization processing on the head and neck CT image data; and performing binarization processing on the corresponding lymph node annotation data, wherein annotation values greater than 0 are set to 1, and other annotation values are set to 0.
[0008] In a preferred embodiment of the present invention, the 3D encoder-decoder segmentation network adopts a U-shaped structure. The encoder is used to extract 3D image features step by step and reduce spatial resolution, and the decoder is used to restore spatial resolution step by step. The encoder and decoder fuse shallow spatial features and deep semantic features through skip connections.
[0009] In a preferred embodiment of the present invention, the multi-branch convolutional structure includes four parallel feature extraction branches, namely a partial channel 3D convolutional branch, an expanded partial channel 3D convolutional branch, an anisotropic convolutional branch, and a boundary gating branch; The partial channel 3D convolutional branch is used to extract local spatial features; The expanded portion of the channel 3D convolutional branch is used to expand the feature receptive field; The anisotropic convolutional branches are used to extract intra-layer spatial information and inter-layer continuous information; The boundary gating branch is used to generate boundary enhancement weights; The boundary gating branch includes an implicit boundary extraction path and an explicit boundary extraction path. The implicit boundary extraction path generates boundary candidate responses through learnable convolution, while the explicit boundary extraction path extracts regions with significant grayscale changes through fixed edge operators. The two are fused to generate a boundary enhancement weight map.
[0010] In a preferred embodiment of the present invention, the output features of four parallel feature extraction branches are concatenated, and channel fusion and compression are performed through pointwise convolution to obtain shallow features with enhanced boundaries.
[0011] In a preferred embodiment of the present invention, the boundary feature enhancement unit is disposed in the first two feature extraction stages of the encoder, and is used to preserve and enhance the lymph node boundary, texture and spatial details in the shallow features; The boundary feature enhancement unit also includes a lightweight channel-spatial attention structure, which is used to weight the spliced multi-branch features in terms of channel and spatial dimensions to enhance the response of suspected lymph node regions and boundary regions, and suppress the response of background regions.
[0012] In a preferred embodiment of the present invention, a global context modeling unit is disposed in the bottleneck layer between the encoder and the decoder. The global context modeling unit includes a channel partitioning subunit, a global sequence modeling branch, a local convolution branch, and a feature fusion subunit. The channel partitioning subunit is used to partition the input bottleneck features into global features and local features according to the channel dimension. The global sequence modeling branch is used to perform state space sequence modeling along the height, width, and depth directions of the three-dimensional feature map, respectively. The local convolution branch is used to extract local neighborhood features through depthwise convolution and pointwise convolution. The feature fusion subunit is used to fuse the global sequence features and local neighborhood features and output bottleneck enhancement features. And / or, The boundary-guided residual refinement unit includes a shared refinement backbone, a coarse segmentation output branch, a boundary-guided branch, and a residual refinement branch. The shared refinement backbone is used to perform lightweight feature refinement on the decoder output features to obtain shared refined features. The coarse segmentation output branch is used to generate a coarse segmentation output based on the shared refined features. The boundary-guided branch is used to generate a boundary-guided weight map based on the shared refined features. The residual refinement branch is used to generate refined residuals based on the shared refined features.
[0013] In a preferred embodiment of the present invention, the boundary guiding branch generates a boundary guiding weight map, which is mapped to a range of 0 to 1 using the Sigmoid function to represent the guiding strength of different spatial locations for residual refinement; wherein, the suspected lymph node boundary area corresponds to a higher guiding weight, and the background area or the area that does not require obvious correction corresponds to a lower guiding weight.
[0014] In a preferred embodiment of the present invention, the final lymph node segmentation result is obtained by combining the coarse segmentation output and the boundary-guided residual, and the calculation method is as follows: Where Y represents the final output, C represents the coarse segmentation output, and B represents the boundary guiding weight graph. This indicates a refined residual; When training the 3D encoder-decoder segmentation network, the Dice loss function is used as the optimization objective; the network parameters are updated through the AdamW optimizer, and the head and neck lymph node image segmentation model is output after training is completed. The Dice loss function is specifically as follows: ; in, This represents the probability value predicted by the model. ; The binary value representing the true label. N represents the total number of voxels involved in the calculation in the current batch; This is the smoothing term, with a value of 1.
[0015] In a preferred embodiment of the present invention, an image segmentation system based on boundary enhancement and global modeling is used to implement the steps of an image segmentation method based on boundary enhancement and global modeling; including: The image acquisition and preprocessing unit is used to acquire head and neck CT image data and corresponding lymph node annotation data, and to preprocess the head and neck CT image data to generate three-dimensional image blocks and corresponding labels. Network structure building units are used to construct 3D encoder-decoder segmentation networks; Boundary feature enhancement unit, used to enhance local texture, multi-scale context, directional structure and boundary response in the shallow layer of the encoder through multi-branch convolutional structure; The global context modeling unit is used to perform partial channel three-directional sequence modeling of the 3D feature map at the bottleneck layer of the 3D encoder-decoder segmentation network in order to obtain global context information. The boundary uncertainty refinement unit is used to generate boundary response maps and prediction uncertainty maps based on the coarse segmentation results, and to refine and correct the coarse segmentation results. The training unit is used to train the 3D encoder-decoder segmentation network using the training set; The segmentation output unit is used to automatically segment the lymph node region in the head and neck CT image to be segmented using the trained 3D encoder-decoder segmentation network.
[0016] The present invention has at least the following beneficial effects: The present invention provides an image segmentation method and system based on boundary enhancement and global modeling, which optimizes the boundary clarity in the segmentation of small targets such as head and neck lymph nodes, improves the expression of local details, and reduces the limited long-distance context modeling capabilities and the boundary deviation of the output results.
[0017] 1. This invention enhances the texture, boundary, and spatial details of lymph node segments by setting boundary feature enhancement units in the shallow layer of the encoder, thereby reducing the loss of boundary information of small targets during downsampling. 2. By setting up a global context modeling unit in the bottleneck layer, the present invention performs three-way sequence modeling only in the low-resolution, high-semantic feature stage, which can supplement global context information while controlling the amount of computation and improve the model's ability to judge the overall structure of the lymph node region. 3. This invention improves the boundary accuracy and stability of the segmentation results by setting a boundary-guided residual refinement unit at the output end and using boundary-guided information to correct the residual of the coarse segmentation output. This makes the network pay more attention to the blurred and biased regions of the lymph node boundary. 4. This invention combines shallow boundary enhancement, bottleneck global modeling, and output boundary guided refinement, which can improve the automatic segmentation effect of small volume, low contrast lymph node regions in head and neck CT images while taking into account computational efficiency.
[0018] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall structure of the three-dimensional encoder-decoder segmentation network described in this invention; Figure 2 This is a schematic diagram of the boundary feature enhancement unit described in this invention; Figure 3 This is a schematic diagram of the structure of the global context modeling unit described in this invention; Figure 4 This is a schematic diagram of the boundary-guided residual refinement unit described in this invention; Figure 5 This is a schematic diagram comparing the two-dimensional segmentation results of the method of the present invention with those of existing methods; Figure 6 This is a schematic diagram comparing the three-dimensional surface distance visualization results of the method of the present invention and existing methods; Figure 7This table compares the performance of the present invention with mainstream 3D medical image segmentation methods. Figure 8 This is a table showing the overall module ablation experiment results of the present invention; Figure 9 This is a table comparing the model complexity of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0021] Example 1, as Figures 1-6 As shown, the image segmentation method based on boundary enhancement and global modeling includes the following steps: Head and neck CT image data and corresponding lymph node annotation data (i.e., lymph node label data) are acquired to form three-dimensional paired samples, and the three-dimensional paired samples are preprocessed.
[0022] Furthermore, each 3D paired sample includes head and neck CT image data and corresponding lymph node annotation data. Preprocessing includes acquiring a 3D paired sample composed of head and neck CT image data and corresponding lymph node annotation data. Specifically, in this embodiment, the SimpleITK medical image processing library in Python is used to spatially align the original 3D CT image and its corresponding lymph node annotations. First, a target 3D template with a size of 64×64×48 is established, and the spatial transformation parameters between the original CT image and the target template are calculated based on the SimpleITK 3D image registration method, including the positional offset and rotation relationship in 3D space. According to the obtained spatial transformation parameters, the original CT image and corresponding lymph node annotations are mapped to the same target space. Subsequently, a unified spatial grid is generated using the Resample method, where linear interpolation is used for the CT grayscale image and nearest neighbor interpolation is used for the lymph node binary annotations to avoid generating new non-integer class values during label interpolation. The resampled CT image and the annotation image maintain the same size, spatial position, and orientation information, thus forming a 64×64×48 3D CT-mask paired sample. The 3D paired samples were divided into training, validation, and test sets. Head and neck CT image data and corresponding lymph node annotation data were read from each 3D paired sample. A channel dimension was added to the head and neck CT image data. The 3D CT image with a spatial size of 64×64×48 was converted into a single-channel CT image data with a size of 1×64×64×48 by inserting a channel dimension of length 1 in the first dimension. A channel dimension was also added to the lymph node annotation data. The 3D lymph node annotation with a spatial size of 64×64×48 was converted into a single-channel annotation data with a size of 1×64×64×48 by inserting a channel dimension of length 1 in the first dimension.
[0023] Furthermore, the CT image data undergoes grayscale truncation and normalization; the processing algorithm is as follows: Where I represents the grayscale value of the original CT image. represents the grayscale truncation function, and I' represents the normalized grayscale value of the CT image. The lymph node annotation data is binarized, where annotation values greater than 0 are set to 1, and all other annotation values are set to 0.
[0024] A pre-trained 3D encoder-decoder segmentation network is used to automatically segment the lymph node region in the head and neck CT image to be segmented.
[0025] Specifically, the 3D encoder-decoder segmentation network comprises an encoder, a bottleneck layer, a decoder, and an output refinement structure. The 3D encoder-decoder segmentation network adopts a U-shaped structure. The input head and neck CT image data is first converted into an initial feature map through an input mapping layer, and then sequentially passes through a multi-level encoding stage of the encoder, a bottleneck stage of the bottleneck layer, and a multi-level decoding stage of the decoder. Downsampling layers are used between the multi-level encoding stages to reduce spatial resolution and increase the number of channels, while upsampling layers are used between the multi-level decoding stages to restore spatial resolution. Shallow features are passed to the corresponding decoding stage through skip connections to supplement boundary and spatial detail information that may be lost during decoding.
[0026] Specifically, the encoder is used to progressively extract 3D CT image features from head and neck CT image data and reduce the feature map resolution (i.e., spatial resolution). Further, a boundary feature enhancement unit is set in the shallow feature extraction stage of the encoder. This unit uses a multi-branch convolutional structure to enhance local texture, multi-scale context, directional structure, and boundary response in the shallow features.
[0027] The multi-branch convolutional structure includes four parallel feature extraction branches: a partial-channel 3D convolution branch, a dilated partial-channel 3D convolution branch, an anisotropic convolution branch, and a boundary gating branch. The partial-channel 3D convolution branch extracts local spatial features. It divides the input features along the channel dimension into a convolutional feature subset and a retained feature subset, where the convolutional feature subset accounts for 1 / 4 of the total input channels, and the retained feature subset accounts for 3 / 4. A 3D convolution operation with a kernel size of 3×3×3, a stride of 1, and padding of 1 is performed on the convolutional feature subset, while the retained feature subset is not subjected to spatial convolution processing. Subsequently, the convolutional feature subset and the unprocessed retained feature subset are concatenated along the channel dimension to obtain output features with the same number of input channels. The expanded partial-channel 3D convolution branch uses the same 1 / 4-channel convolution method as the partial-channel 3D convolution branch, but with a 3×3×3 kernel size, stride of 1, dilation rate of 2, and padding of 2 to expand the feature receptive field. The anisotropic convolution branch extracts intra-layer spatial information and inter-layer continuity information. It sequentially sets one 1×3×3 intra-slice depth convolution and one 3×1×1 inter-layer depth convolution. Both convolutions have C input and output channels (C represents the number of input feature channels), a stride of 1, and padding of (0,1,1) and (1,0,0) respectively, using zero-value padding. The number of groups is C. Instance normalization and LeakyReLU activation are applied after each convolution, and channel fusion is performed through 1×1×1 pointwise convolution. By performing feature extraction in both intra-slice and inter-layer directions, the design adapts to the potential differences in intra-layer and inter-layer resolution in head and neck CT body data. The boundary-gated branch is used to generate boundary enhancement weights (i.e., generate boundary enhancement features). This branch includes an implicit boundary extraction path and an explicit boundary extraction path. The implicit path uses a 3×3×3 depthwise convolution to extract boundary features, which, after instance normalization and LeakyReLU activation, are generated through a 1×1×1 convolution to produce single-channel boundary candidate responses. The explicit path uses a fixed 3×3×3 six-neighbor 3D Laplacian operator to extract high-frequency boundary responses, with a center weight of -6, six adjacent weights of 1, and the rest of the weights of 0. The two types of boundary responses are fused and then processed through a 1×1×1 convolution and a Sigmoid function to generate boundary-gated weights (i.e., generate boundary enhancement weights), which are used to enhance the feature representation of suspected lymph node boundary regions.
[0028] The outputs of four parallel branches—partial-channel 3D convolution branch, dilated partial-channel 3D convolution branch, anisotropic convolution branch, and boundary-gated branch—are fused using a channel-dimensional concatenation method. That is, while maintaining the same spatial size of each branch, the four sets of C-channel features are sequentially concatenated along the channel dimension to form 4C-channel features. Then, the number of channels is compressed from 4C to C through 1×1×1 pointwise convolution to obtain the fused features.
[0029] Furthermore, the boundary feature enhancement unit also includes a lightweight channel-spatial attention structure. The fused features are further input into the lightweight channel-spatial attention structure to obtain shallow features with enhanced boundaries. Specifically, the lightweight channel-spatial attention structure is used to weight the concatenated multi-branch features by both channel and spatial dimensions to enhance the response of suspected lymph node regions and boundary regions, while suppressing the response of background regions. The boundary feature enhancement unit is set in the first two stages of feature extraction in the encoder to preserve and enhance lymph node boundaries, textures, and spatial details in high-resolution shallow features, obtaining shallow features with enhanced boundaries. The lightweight channel-spatial attention structure includes channel attention and spatial attention sequentially. Specifically, channel attention compresses the spatial features of each channel to 1×1×1 using adaptive global average pooling, then uses a one-dimensional convolution with a kernel size of 3 to perform inter-channel information interaction, and generates channel attention weights using the Sigmoid function. Spatial attention performs average aggregation and maximum aggregation along the channel dimension, and the resulting two single-channel feature maps are spliced along the channel dimension to form dual-channel features. These features are then mapped to single-channel features using a three-dimensional convolution with a kernel size of 7×7×7, a stride of 1, and padding of 3, and generate spatial attention weights using the Sigmoid function.
[0030] Specifically, a global context modeling unit (GUMM) is set in the bottleneck layer (i.e., the GUMM is set in the low-resolution, high-semantic-feature stage of the bottleneck layer between the encoder and decoder) to supplement long-distance dependency information in three-dimensional space and improve the network's ability to judge the overall structure of the lymph node region while controlling the computational load. The GUMM divides the bottleneck features into local feature branches and global feature branches, and performs sequence modeling on the global feature branches along different directions in three-dimensional space.
[0031] The global context modeling unit includes an input projection subunit, a channel partitioning subunit, a global sequence modeling branch, a local convolution branch, and a feature fusion subunit.
[0032] Specifically, the channel partitioning subunit is used to divide the input bottleneck feature into global and local features in a 1:1 ratio according to the channel dimension. Let the bottleneck input feature be... After input projection, it is divided into global features along the channel dimension. and local features , represented as: ;in, This indicates a channel partitioning operation.
[0033] Specifically, the global sequence modeling branch is used to project the global branch 3D features obtained from the bottleneck layer through 1×1×1 convolution and partitioning them from the channel dimension. These features are then sequentially expanded along the height, width, and depth directions, and a selective state-space sequence modeling structure is used for feature modeling (i.e., state-space sequence modeling). Specifically, the global branch 3D features are sequentially expanded along the depth, height, and width directions, with each direction using the full length of the corresponding spatial axis as the sequence length. After layer normalization, these sequences are input into the Mamba state-space model for modeling, where the state dimension is set to 16, the width of the internal 1D convolution is set to 4, and the feature expansion factor is set to 2. The outputs of each direction are restored to their original 3D spatial arrangement after residual connection, yielding depth, height, and width features, respectively. Subsequently, the three-directional features are concatenated along the channel dimension and fused through 1×1×1 convolution to obtain the global context features. .
[0034] Specifically, the local convolutional branch first uses a 3×3×3 depthwise convolution to extract local neighborhood features. The number of input and output channels is the same as the number of local branch channels, with a stride of 1 and padding of 1. The number of groups equals the number of local branch channels. Then, a 1×1×1 pointwise convolution is used to fuse channel features, with a stride of 1 and padding of 0. After both convolutional layers, instance normalization and the LeakyReLU activation function are applied to obtain local detail features. .
[0035] The feature fusion subunit is used to fuse global sequence features and local neighborhood features to output bottleneck enhancement features. Global context features and local detail features are concatenated and fused, and then residually connected with the bottleneck input features to obtain the bottleneck enhancement features. The formula is: ; where [ ] represents the feature concatenation operation, This represents the feature fusion operation. Based on these operations, the 3D encoder-decoder segmentation network can simultaneously obtain local detail information and global context information.
[0036] Specifically, the decoder is used to progressively restore the feature map resolution (i.e., spatial resolution), and the encoder and decoder fuse shallow spatial features (i.e., shallow spatial details) and deep semantic features through skip connections.
[0037] Specifically, the output-end refinement structure includes setting a boundary-guided residual refinement unit at the output end. This unit is used to perform lightweight refinement of the decoder output features and to correct the residuals of the coarse segmentation output through boundary guidance, thereby improving the segmentation accuracy of blurred boundary regions. The specific steps include: generating a coarse segmentation output, a boundary-guided weight map, and refined residuals from the decoder output features; and using the boundary-guided weight map to weight the refined residuals to perform boundary-guided correction on the coarse segmentation output, obtaining the final lymph node segmentation result.
[0038] The boundary-guided residual refinement unit comprises a shared refinement backbone, a coarse segmentation output branch, a boundary-guided branch, and a residual refinement branch. The shared refinement backbone is used to perform lightweight feature refinement on the decoder output features, obtaining shared refined features. The shared refinement backbone sequentially includes a 3×3×3 transposed convolution, a 1×1×1 pointwise convolution, a 7×7×7 depthwise convolution, a normalization layer, an activation function layer, and another 1×1×1 pointwise convolution to obtain the shared refined features. The coarse segmentation output branch, the boundary-guided branch, and the residual refinement branch each use an independent 1×1×1 convolution for feature mapping, with convolution parameters not shared. The coarse segmentation output branch generates a coarse segmentation output based on the shared refinement features. The boundary guidance branch is used to generate a boundary response based on shared refinement features, and the boundary response is mapped to a range of 0 to 1 using the Sigmoid function to obtain a boundary guidance weight map, which is used to represent the guidance intensity of different spatial locations on residual refinement. Suspected lymph node boundary areas correspond to higher guidance weights, while background areas or areas that do not require significant correction correspond to lower guidance weights. The residual refinement branch is used to generate refinement residuals based on shared refinement features.
[0039] Define shared refinement features as For any voxel position i, the coarse segmentation output Boundary-guided weights and refine residuals They are represented as follows: ; ; ; in, This represents the eigenvalue at the i-th voxel position of the shared refinement feature. and This represents the learnable weights and biases corresponding to the coarse segmentation output. and This represents the learnable weights and biases corresponding to the boundary-guided weights. and This represents the learnable weights and biases corresponding to the refined residuals. These learnable weights and biases are obtained by iteratively updating the training dataset from the 3D paired samples through backpropagation of the loss function. This represents the Sigmoid function. The final output is as follows: ; By using the above boundary-guided residual refinement method, the network can focus on correcting the boundary areas prone to bias based on the coarse segmentation results. The 3D encoder-decoder segmentation network is trained using the training set, and the model parameters with better segmentation performance during training are selected using the validation set. The Dice loss function is used as the optimization objective during training, and the Dice loss function is expressed as: ;
[0040] in, This represents the probability value predicted by the model, and ; Represents the binary annotation value of the real label, and N represents the total number of voxels involved in the calculation in the current batch; ε is the smoothing term, which is set to 1 in this embodiment.
[0041] Furthermore, the AdamW optimizer is used to update the network parameters. After training, the trained 3D encoder-decoder segmentation network is used to automatically segment the lymph node regions in the head and neck CT images to be segmented.
[0042] Example 2, based on Example 1, such as Figures 1-6 As shown, the image segmentation method based on boundary enhancement and global modeling includes the following steps: S1. Acquire head and neck CT image data and corresponding lymph node annotation data as three-dimensional paired samples; and perform preprocessing.
[0043] The data used in this embodiment consists of head and neck CT images and their corresponding lymph node annotations, encompassing 152 patients and 664 lymph node samples. Each sample is stored in a paired manner, including CT image data and corresponding lymph node annotation data. The samples are divided into training, validation, and test sets according to a preset ratio for model training, model selection, and performance testing.
[0044] The read 3D paired samples are preprocessed. The preprocessing includes: adjusting the channel dimensions of the CT image data and lymph node annotation data to meet the input format of the 3D convolutional network; truncating and normalizing the gray values of the CT images; and binarizing the lymph node annotation data, setting annotation values greater than 0 to 1 and other annotation values to 0.
[0045] S2, construct a 3D encoder-decoder segmentation network.
[0046] like Figure 1 As shown, the 3D encoder-decoder segmentation network described in this embodiment adopts a U-shaped structure, including an input mapping layer, an encoder, a bottleneck layer, a decoder, and an output refinement structure. The input 3D paired sample CT image blocks are first mapped to initial feature maps via 1×1×1 convolutions, and then sequentially enter different stages of the encoder. The encoder is used to progressively extract 3D spatial features and reduce spatial resolution; the bottleneck layer is used to extract low-resolution, high-semantic features; the decoder is used to progressively restore spatial resolution and fuse shallow spatial details from the encoder and deep semantic features from the decoder through skip connections. Finally, the decoder output features enter the output boundary-guided residual refinement unit to generate lymph node segmentation results.
[0047] In this embodiment, the size of the network input image block (i.e., the CT image block) is 64×64×48. The number of feature channels in the network is 32, 64, 128, and 256, respectively. The first two stages of the encoder are equipped with boundary feature enhancement units, the bottleneck layer is equipped with a global context modeling unit, and the output is equipped with a boundary-guided residual refinement unit.
[0048] S3, set boundary feature enhancement units in the shallow layer of the encoder.
[0049] like Figure 2 As shown, the boundary feature enhancement unit is located in the first two high-resolution feature extraction stages of the encoder to enhance the local texture, multi-scale context, directional structure, and boundary response of the lymph node region. This unit includes four parallel feature extraction branches: a partial-channel 3D convolution branch, a dilated partial-channel 3D convolution branch, an anisotropic convolution branch, and a boundary gating branch.
[0050] The partial-channel 3D convolution branch performs 3×3×3 convolutions only on a subset of the input features, leaving the remaining channels unchanged. This reduces computational cost while extracting local spatial features. The expanded partial-channel 3D convolution branch uses expanded partial-channel convolution to enlarge the receptive field and enhance the network's ability to model the context of lymph node regions of different sizes. The anisotropic convolution branch extracts spatial information within CT slices and continuity information between adjacent slices, suitable for situations where intra-slice and inter-slice resolutions in CT volume data may differ. The boundary gating branch includes implicit and explicit boundary extraction paths. The implicit boundary extraction path obtains candidate boundary responses through learnable convolutions, while the explicit boundary extraction path extracts high-frequency boundary responses using a fixed 3D Laplacian operator. The fusion of these two paths generates boundary enhancement weights to enhance suspected lymph node boundary regions.
[0051] The output features from the four branches are concatenated and then fused and compressed using 1×1×1 pointwise convolutions to restore the original number of channels. Subsequently, the fused features are fed into a lightweight channel-spatial attention structure. This structure first recalibrates the feature channels related to the lymph node foreground through channel attention, and then highlights suspected small target regions and boundary regions through spatial attention, suppressing background tissue responses. Through this structure, the network can retain more boundary and fine-grained structural information in the shallow layers, reducing the loss of small target information during downsampling.
[0052] S4, set up a global context modeling unit in the bottleneck layer.
[0053] like Figure 3 As shown, the global context modeling unit is located in the bottleneck layer between the encoder and decoder. Since the feature map space size of the bottleneck layer is small and the semantic information is strong, performing global modeling at this location can supplement long-distance dependency information while controlling computational overhead.
[0054] The global context modeling unit includes an input projection subunit, a channel partitioning subunit, a global sequence modeling branch, a local convolution branch, and a feature fusion subunit. Let the bottleneck input feature be... After input projection, it is divided into global features along the channel dimension. and local features , represented as: ;in, This indicates a feature partitioning operation along the channel dimension.
[0055] The global sequence modeling branch performs sequence unfolding along the depth, height, and width directions of the 3D feature map, and uses a selective state-space sequence modeling structure to model features, obtaining depth, height, and width features respectively. These three features are then fused to obtain the global context features. The local convolution branch extracts local neighborhood details through depthwise convolution and pointwise convolution. Finally, the global context features and local neighborhood features are fused and residually connected to the input bottleneck features to obtain the bottleneck enhancement features.
[0056] Through the above structure, the global context modeling unit can supplement long-distance dependency information in three-dimensional space while preserving local details, thereby improving the network's ability to judge the overall structure of the lymph node region in the context of complex head and neck anatomy.
[0057] S5 sets a boundary-guided residual refinement unit at the output end.
[0058] like Figure 4As shown, the boundary-guided residual refinement unit is located at the network output end to perform lightweight refinement of the decoder output features and to perform residual correction on the coarse segmentation output through boundary guidance. The boundary-guided residual refinement unit includes a shared refinement backbone, a coarse segmentation output structure, a boundary guidance structure, and a residual refinement structure.
[0059] The shared thinning backbone comprises 3×3×3 transposed convolutions, 1×1×1 pointwise convolutions, 7×7×7 depthwise convolutions, normalization layers, activation function layers, and 1×1×1 pointwise convolutions to obtain shared thinning features. Based on these shared thinning features, the network generates a coarse segmentation output, a boundary-guided weight map, and a thinning residual. The thinning residual is then weighted by the boundary-guided weight map and superimposed onto the coarse segmentation output to obtain the final segmentation result. Its output relationship can be expressed as: Where Y represents the final output, C represents the coarse segmentation output, and B represents the boundary guiding weight graph. This indicates a refined residual.
[0060] Example 3: Based on Example 2, a 3D encoder-decoder segmentation network is trained.
[0061] In this embodiment, the model is implemented based on the PyTorch deep learning framework, with a GPU configuration of an NVIDIA RTX 4090 with 24GB of RAM. The optimizer used is AdamW, with a learning rate of 0.0003, a batch size of 6, 200 training epochs, and an input image patch size of 64×64×48. During training, the Dice loss function is used as the optimization objective, and the segmentation threshold is set to 0.94.
[0062] The Dice loss function is expressed as: ; in, This represents the probability value predicted by the model, and ; Represents the binary annotation value of the real label, and N represents the total number of voxels involved in the calculation in the current batch; ε is the smoothing term, which is set to 1 in this embodiment.
[0063] Example 4: Based on Example 2 or Example 3, a quantitative evaluation of the image segmentation method based on boundary enhancement and global modeling is performed.
[0064] To quantitatively evaluate the segmentation performance of the image segmentation method based on boundary enhancement and global modeling proposed in this invention, this embodiment uses the Dice coefficient (DSC), intersection-to-union ratio (IoU), recall, precision, and accuracy as the metrics for measuring experimental results. The Dice coefficient is used to evaluate the degree of overlap and similarity between the model's predicted segmentation results and the manually labeled results; a higher value indicates that the predicted region is closer to the real region. The Dice coefficient is defined as: ; Wherein, TP (True Positive) represents the number of voxels correctly predicted as lymph node regions, FP (False Positive) represents the number of background voxels incorrectly predicted as lymph node regions, FN (False Negative) represents the number of voxels that are actually lymph node regions but were not correctly predicted by the model; and TN (True Negative) represents the number of voxels that are actually lymph node regions and were correctly predicted by the model.
[0065] The intersection-over-union ratio (IoU) is used to evaluate the overlap between predicted and ground truth regions. A higher IoU value indicates better consistency between the predicted and ground truth regions. IoU is expressed as: ; Recall is used to evaluate a model's ability to detect real lymph node regions; a higher recall value indicates fewer missed segments. Recall is expressed as: ; Precision is used to evaluate how many of the predictions made by the model as lymph node regions are actually lymph node regions. A higher precision value indicates fewer instances of misclassification by the model. Precision is expressed as: ; Accuracy is used to evaluate the proportion of all voxels correctly classified by the model, and it reflects the overall correctness of the prediction results. Accuracy is expressed as: ; To verify the segmentation performance of the method described in this embodiment, it was compared with baseline models such as V-Net, 3D UX-Net, UNETR++, Ulike Mamba_3dMT, and 3D Partial U-Net. Experimental results are as follows: Figure 7 As shown.
[0066] Depend on Figure 7It can be seen that the method in this embodiment achieves the best results in terms of Dice similarity coefficient, intersection-over-union ratio, and accuracy. Among them, compared with the 3D Partial U-Net baseline model, the DSC of this embodiment method is improved from 64.95% to 68.70%, and the IoU is improved from 51.00% to 54.93%, indicating that the joint design of shallow boundary enhancement, bottleneck global modeling, and output boundary-guided residual refinement can effectively improve the performance of head and neck lymph node segmentation.
[0067] To further verify the effectiveness of each innovative structure, this embodiment uses 3D Partial U-Net as the baseline model for overall module ablation experiments. For ease of tabular presentation, the shallow boundary feature enhancement unit is denoted as MSBA, the bottleneck global context modeling unit as PTHMamba, and the output boundary guided residual refinement unit as BGRM. By adding the above modules respectively and comparing the segmentation performance, the contribution of each module to the final segmentation result is analyzed. Experimental results are as follows: Figure 8 As shown.
[0068] Depend on Figure 8 As can be seen, the model performance shows a continuous improvement trend after gradually introducing each module. Adding the bottleneck global context modeling module improves DSC, IoU, and Recall, indicating that this module enhances global context modeling capabilities and improves the overall perception of the target region. Further adding the multi-scale boundary enhancement module further improves DSC and IoU, indicating that this module strengthens multi-scale information and boundary detail representation in the shallow feature stage, helping to improve the segmentation effect of small targets and regions with blurred boundaries. The combination of these two modules further improves performance, demonstrating a good complementary effect between global semantic information and local detail information. Further introducing the boundary-guided residual refinement module achieves the best results, with further improvements in DSC and IoU, and improved precision, indicating that this module can effectively refine the boundaries and correct errors in the segmentation results. Overall, the three modules play a role at different levels, synergistically improving the overall segmentation performance of the model.
[0069] To evaluate model complexity, this embodiment further analyzes the number of parameters, computational cost, inference time per image patch, and GPU memory usage for different models. The results are as follows: Figure 9 As shown.
[0070] Depend on Figure 9 As can be seen, the method in this embodiment maintains a low parameter count even after introducing shallow boundary enhancement, global bottleneck modeling, and output boundary-guided residual refinement. Compared with models such as V-Net, 3D UX-Net, and UNETR++, the method in this embodiment improves segmentation performance while maintaining a relatively low parameter size and acceptable computational cost.
[0071] Example 5: Based on any of Examples 2 to 3, a qualitative visualization analysis is performed on the method described in this example.
[0072] To visually demonstrate the segmentation effect, this embodiment visualizes the test samples using two-dimensional slices and three-dimensional surface distances. In the two-dimensional slice visualization, for example, the green area represents the manually labeled real lymph node area, the red area represents the model-predicted area, and the yellow area represents the overlapping part of the real and predicted areas.
[0073] like Figure 5 As shown in the two-dimensional visualization results, the method of this embodiment can obtain segmentation results that are more consistent with manual annotation in areas with small lymph nodes, blurred boundaries, and low contrast, reducing missed segmentation and boundary deviation.
[0074] Furthermore, this embodiment uses a three-dimensional surface distance visualization to display the Euclidean distance between the predicted segmented surface and the manually labeled surface. Color bars are used to reflect the magnitude of the surface distance; for example, blue indicates a smaller distance, and red indicates a larger distance.
[0075] like Figure 6 As shown in the figure, the three-dimensional surface distance map shows that the method in this embodiment has a smaller boundary error in most samples, and the predicted surface is closer to the real surface.
[0076] In summary, the image segmentation method based on boundary enhancement and global modeling described in this embodiment can effectively enhance shallow boundary details, supplement deep global context information, and further improve the boundary accuracy of the segmentation results through output boundary-guided residual refinement. In the head and neck CT lymph node segmentation task, this method achieves better overall segmentation performance than the baseline model and various mainstream 3D medical image segmentation models, and has good clinical auxiliary application value.
[0077] Example 6: This example provides an image segmentation system based on boundary enhancement and global modeling. This system can be used to execute the image segmentation method based on boundary enhancement and global modeling described in Example 1 or Example 2, namely the head and neck lymph node image segmentation method. It includes an image acquisition and preprocessing unit, a network structure construction unit, a boundary feature enhancement unit, a global context modeling unit, a boundary-guided residual refinement unit, a training unit, and a segmentation output unit.
[0078] The image acquisition and preprocessing unit is used to acquire head and neck CT image data and their corresponding lymph node annotation data, forming three-dimensional paired samples, and preprocessing the three-dimensional paired samples. The preprocessing includes channel dimension adjustment, CT image grayscale processing, and label binarization. The image acquisition and preprocessing unit is also used to divide the samples into training set, validation set, and test set according to a preset ratio.
[0079] The network structure building unit is used to construct a 3D encoder-decoder segmentation network. This network includes an input mapping layer, an encoder, a bottleneck layer, a decoder, and an output refinement structure. The encoder extracts 3D image features at different scales, the bottleneck layer extracts deep semantic features, and the decoder restores spatial resolution and fuses shallow features from the encoder.
[0080] The boundary feature enhancement unit, located in the shallow feature extraction stage of the encoder, is used to enhance local texture, multi-scale context, directional structure, and boundary response features through a multi-branch structure. The boundary feature enhancement unit includes partial-channel 3D convolution branches, dilated partial-channel 3D convolution branches, anisotropic convolution branches, and boundary gating branches. After multi-branch feature fusion, a lightweight channel-spatial attention structure is used to enhance the responses of suspected lymph node regions and boundary regions.
[0081] The global context modeling unit, located in the bottleneck layer, is used to perform partial channel three-directional sequence modeling of bottleneck features. The global context modeling unit divides the input bottleneck features into global features and local features; the global features are sequentially modeled along the depth, height, and width directions to obtain long-distance dependency information; the local features extract neighborhood spatial details through a convolutional structure; and the global context features and local detail features are fused to output bottleneck enhancement features.
[0082] The boundary-guided residual refinement unit is located at the network output and is used to generate a coarse segmentation output, a boundary-guided weight map, and a refined residual based on the decoder output features. The refined residual is then weighted using the boundary-guided weight map to perform boundary-guided correction on the coarse segmentation output, resulting in the final lymph node segmentation result.
[0083] The training unit is used to train the 3D encoder-decoder segmentation network using the training set and to select model parameters with better segmentation performance using the validation set. During training, the Dice loss function is used as the optimization objective, and the network parameters are updated using the AdamW optimizer.
[0084] The segmentation output unit is used to automatically segment the lymph node region in the head and neck CT image to be segmented using a trained 3D encoder-decoder segmentation network, and outputs a lymph node segmentation probability map or a binary segmentation mask. Furthermore, the segmentation output unit can also be used to generate 2D slice visualization results and 3D surface distance visualization results to help display the differences between the model prediction results and manually labeled results.
[0085] Specifically, the image acquisition and preprocessing unit, network structure construction unit, boundary feature enhancement unit, global context modeling unit, boundary-guided residual refinement unit, training unit, and segmentation output unit described above can be embedded into a computer processing system. The computer processing system can then use the methods described in Embodiment 1 to automatically segment the lymph node region in head and neck CT images by calling these units.
[0086] It should be noted that the division of the various units in the above system is only a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. They can be implemented entirely through software programs, entirely through hardware, or partially through software and partially through hardware. The various units can be stored in memory as program code, and the processor can call and execute the corresponding functions.
[0087] In one implementation, the system can be deployed on a medical image processing workstation, server, or radiotherapy planning support system with a graphics processor. The processor can be a central processing unit, graphics processor, digital signal processor, application-specific integrated circuit (ASIC), or field-programmable gate array (FPGA). The memory stores an executable program that, when executed by the processor, implements the image segmentation method based on boundary enhancement and global modeling as described in Embodiment 1.
[0088] The system may also include a display unit for displaying CT images, manually annotated results, model prediction results, overlapping regions, and visualization results of 3D surface distances; and a data management unit for managing sample data, model weights, and segmentation results. Through this system, automatic segmentation, result display, and auxiliary analysis of lymph node regions in head and neck CT images can be achieved.
[0089] Working principle: This invention discloses an image segmentation method and system based on boundary enhancement and global modeling, which can enhance the feature representation of small targets, blurred boundary regions and low contrast regions in head and neck lymph node images, improve the accuracy and stability of lymph node segmentation, and take into account computational efficiency.
[0090] This invention employs a three-stage optimization architecture: First, a boundary feature enhancement unit is introduced in the shallow layer of the encoder to enhance lymph node texture, edges, and spatial details at the high-resolution feature stage, avoiding the loss of boundary information for small targets caused by downsampling; second, a global context modeling unit is configured in the network bottleneck layer to perform three-directional sequence modeling only for low-resolution, high-semantic features, supplementing global context features with lower computational cost and improving the model's ability to recognize and judge the overall structure of lymph nodes; third, a boundary-guided residual refinement unit is added at the network output end to perform residual correction on the coarse segmentation results based on boundary prior information, guiding the network to focus on areas with blurred or easily shifted boundaries, significantly improving the accuracy of segmentation boundaries.
[0091] like Figure 1 As shown, the encoder and decoder structures are on both sides, connected by jumpers. Specifically, in the first encoder layer, the original CT 3D block (input size: 64×64×48) is fed into the MSBA module, with an output feature of 64×64×48×32 (H×W×D×channel C1), where H is the height, W is the width, D is the depth, and C1, C2, C3, and C4 are the corresponding channels. In the second encoder layer, after downsampling, it is fed into two stacked MSBAs; the output is 32×32×24×64 (H / 2×W / 2×D / 2×C2). The dashed jumper connects to the second layer of the decoder. In the third encoder layer, after downsampling, it enters the 3D Partialmodule; the output is 16×16×12×128 (H / 4×W / 4×D / 4×C3). The dashed jumper connects to the third layer of the decoder. The lowest bottleneck layer of the fourth layer, after further downsampling, enters the 3DPartialmodule and is fed into PTH-Mamba (a three-way Mamba global modeling module), outputting 8×8×6×256 (H / 8×W / 8×D / 8×C4). THMamba performs 3D long-range global context modeling on the minimum resolution feature map, capturing the global spatial distribution of lymph nodes. Specifically, the decoder performs element-wise addition of upsampled features and corresponding encoder skip connection features. The shallow MSBA output carries fine-grained boundary information and is directly injected into the decoder through skip connections, specifically addressing the problem of blurred boundaries for small lymph nodes. The top-level output of the decoder is fed into the BGRM boundary-guided residual refinement module, ultimately outputting a 3D binary segmentation mask.
[0092] like Figure 1 As shown, the encoder employs a four-layer progressive downsampling approach; the first two layers use the MSBA boundary enhancement module to specifically extract weak boundaries from head and neck CT scans; the bottom layer uses PTH-Mamba for global long-range modeling. The decoder progressively upsamples to restore resolution, fusing multi-scale boundary features from the encoder's corresponding layer at each layer (element-wise addition and fusion). BGRM at the output performs boundary residual correction, outputting the final lymph node segmentation result.
[0093] This invention integrates three optimization modules: shallow boundary enhancement, bottleneck global modeling, and output boundary refinement, achieving a balance between computational efficiency and segmentation performance, and effectively improving the automatic segmentation effect of small-volume, low-contrast lymph nodes in head and neck CT images.
[0094] Based on the preferred embodiments of the present invention, and through the above description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. An image segmentation method based on boundary enhancement and global modeling, characterized in that, Includes the following steps: Acquire head and neck CT image data and corresponding lymph node annotation data to form three-dimensional paired samples, and preprocess the three-dimensional paired samples; A 3D encoder-decoder segmentation network is constructed, which includes an encoder, a bottleneck layer, a decoder, and a refined output structure. In the shallow feature extraction stage of the encoder, a boundary feature enhancement unit is set up. The local texture, multi-scale context, directional structure and boundary response in the shallow features are enhanced by the multi-branch convolution structure of the boundary feature enhancement unit. A global context modeling unit is set in the bottleneck layer to divide the bottleneck features into local feature branches and global feature branches, and to perform sequence modeling on the global feature branches along different directions in three-dimensional space. The output refinement structure includes setting a boundary-guided residual refinement unit at the output end, generating a coarse segmentation output, a boundary-guided weight map, and a refinement residual based on the decoder output features, and using the boundary-guided weight map to weight the refinement residual to perform boundary-guided correction on the coarse segmentation output and output the lymph node segmentation result. A pre-trained 3D encoder-decoder segmentation network was used to automatically segment the lymph node region in the head and neck CT images to be segmented, and the final lymph node segmentation result was obtained.
2. The image segmentation method based on boundary enhancement and global modeling according to claim 1, characterized in that, The preprocessing includes: acquiring three-dimensional paired samples composed of head and neck CT image data and corresponding lymph node annotation data; dividing the three-dimensional paired samples into training set, validation set, and test set; reading the head and neck CT image data and corresponding lymph node annotation data in each three-dimensional paired sample, and adding channel dimensions respectively; performing grayscale truncation and normalization processing on the head and neck CT image data; and performing binarization processing on the corresponding lymph node annotation data, wherein annotation values greater than 0 are set to 1, and other annotation values are set to 0.
3. The image segmentation method based on boundary enhancement and global modeling according to claim 1, characterized in that, The 3D encoder-decoder segmentation network adopts a U-shaped structure. The encoder is used to extract 3D image features step by step and reduce spatial resolution, while the decoder is used to restore spatial resolution step by step. The encoder and decoder fuse shallow spatial features and deep semantic features through skip connections.
4. The image segmentation method based on boundary enhancement and global modeling according to claim 1, characterized in that, The multi-branch convolutional structure includes four parallel feature extraction branches: a partial-channel 3D convolution branch, a dilated partial-channel 3D convolution branch, an anisotropic convolution branch, and a boundary gating branch. The partial channel 3D convolutional branch is used to extract local spatial features; The expanded portion of the channel 3D convolutional branch is used to expand the feature receptive field; The anisotropic convolutional branches are used to extract intra-layer spatial information and inter-layer continuous information; The boundary gating branch is used to generate boundary enhancement weights; the boundary gating branch includes an implicit boundary extraction path and an explicit boundary extraction path, wherein the implicit boundary extraction path generates boundary candidate responses through learnable convolution, and the explicit boundary extraction path extracts regions with obvious grayscale changes through fixed edge operators, and the two are fused to generate a boundary enhancement weight map.
5. The image segmentation method based on boundary enhancement and global modeling according to claim 4, characterized in that, The output features of the four parallel feature extraction branches are concatenated, and channel fusion and compression are performed through pointwise convolution to obtain shallow features with enhanced boundaries.
6. The image segmentation method based on boundary enhancement and global modeling according to claim 5, characterized in that, The boundary feature enhancement unit is set in the first two feature extraction stages of the encoder to preserve and enhance lymph node boundaries, textures and spatial details in shallow features; The boundary feature enhancement unit also includes a lightweight channel-spatial attention structure, which is used to weight the spliced multi-branch features in terms of channel and spatial dimensions to enhance the response of suspected lymph node regions and boundary regions, and suppress the response of background regions.
7. The image segmentation method based on boundary enhancement and global modeling according to claim 1, characterized in that, The global context modeling unit is located in the bottleneck layer between the encoder and the decoder. The global context modeling unit includes a channel partitioning subunit, a global sequence modeling branch, a local convolution branch, and a feature fusion subunit. The channel partitioning subunit is used to partition the input bottleneck features into global features and local features according to the channel dimension. The global sequence modeling branch is used to perform state space sequence modeling along the height, width, and depth directions of the 3D feature map, respectively. The local convolution branch is used to extract local neighborhood features through depthwise convolution and pointwise convolution. The feature fusion subunit is used to fuse the global sequence features and local neighborhood features and output the bottleneck enhancement features. And / or, The boundary-guided residual refinement unit includes a shared refinement backbone, a coarse segmentation output branch, a boundary-guided branch, and a residual refinement branch. The shared refinement backbone is used to perform lightweight feature refinement on the decoder output features to obtain shared refined features. The coarse segmentation output branch is used to generate a coarse segmentation output based on the shared refined features. The boundary-guided branch is used to generate a boundary-guided weight map based on the shared refined features. The residual refinement branch is used to generate refined residuals based on the shared refined features.
8. The image segmentation method based on boundary enhancement and global modeling according to claim 7, characterized in that, The boundary guidance branch generates a boundary guidance weight map, which is mapped to a range of 0 to 1 using the Sigmoid function to represent the guidance intensity of different spatial locations for residual refinement; among them, the suspected lymph node boundary area corresponds to a higher guidance weight, while the background area or the area that does not require obvious correction corresponds to a lower guidance weight.
9. The image segmentation method based on boundary enhancement and global modeling according to claim 8, characterized in that, The final lymph node segmentation result is obtained by combining the coarse segmentation output and the boundary-guided residual, and its calculation method is as follows: ; Where Y represents the final output, C represents the coarse segmentation output, and B represents the boundary guiding weight graph. This indicates a refined residual; When training the 3D encoder-decoder segmentation network, the Dice loss function is used as the optimization objective; the network parameters are updated through the AdamW optimizer, and the head and neck lymph node image segmentation model is output after training is completed. The Dice loss function is specifically as follows: ; in, This represents the probability value predicted by the model. ; The binary value representing the true label. N represents the total number of voxels involved in the calculation in the current batch; This is the smoothing term, with a value of 1.
10. An image segmentation system based on boundary enhancement and global modeling, characterized in that, The steps for implementing the image segmentation method based on boundary enhancement and global modeling as described in any one of claims 1-9 include: The image acquisition and preprocessing unit is used to acquire head and neck CT image data and corresponding lymph node annotation data, and to preprocess the head and neck CT image data to generate three-dimensional image blocks and corresponding labels. Network structure building units are used to construct 3D encoder-decoder segmentation networks; Boundary feature enhancement unit, used to enhance local texture, multi-scale context, directional structure and boundary response in the shallow layer of the encoder through multi-branch convolutional structure; The global context modeling unit is used to perform partial channel three-directional sequence modeling of the 3D feature map at the bottleneck layer of the 3D encoder-decoder segmentation network in order to obtain global context information. The boundary uncertainty refinement unit is used to generate boundary response maps and prediction uncertainty maps based on the coarse segmentation results, and to refine and correct the coarse segmentation results. The training unit is used to train the 3D encoder-decoder segmentation network using the training set; The segmentation output unit is used to automatically segment the lymph node region in the head and neck CT image to be segmented using the trained 3D encoder-decoder segmentation network.
