A lung nodule medical image segmentation method based on nodule symmetry constraint
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN POLYTECHNIC UNIV
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-05
AI Technical Summary
Existing lung nodule segmentation methods lack geometric constraints, resulting in inaccurate segmentation results, easy confusion between blood vessels and nodules, and strong dependence on post-processing, leading to a large computational burden.
Radial feature sampling and symmetry loss are introduced into deep neural networks. By forcing the learning of the geometric characteristics of nodules through differentiable operations, and combining center prediction and boundary regression, a symmetry mask is constructed for end-to-end segmentation.
It achieves high-precision, interference-resistant lung nodule segmentation, reduces post-processing steps, and improves adaptability and segmentation accuracy for nodules of different sizes.
Smart Images

Figure CN122156227A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and computer-aided diagnosis technology, and more specifically, to a method for medical image segmentation of lung nodules based on deep learning and incorporating prior geometric morphology. Background Technology
[0002] Accurate segmentation of lung nodules is a crucial step in the early screening and diagnosis of lung cancer. Currently, most mainstream segmentation methods are based on fully convolutional neural networks (FCNs) or U-Net architectures, driving network learning through pixel-level classification loss. However, existing technologies have the following significant drawbacks:
[0003] First, there is a lack of geometric constraints. Existing models mainly rely on local texture features for pixel classification, ignoring the inherent morphological features of lung nodules as solid lesions (such as spheroidal shape and radial symmetry), which often results in segmentation results with rough edges, internal cavities, or irregular shapes.
[0004] Second, there is the issue of easily confused structures. Pulmonary blood vessel cross-sections and small nodules are highly similar in grayscale values and appearance, making them difficult to distinguish based on pixel intensity alone. Blood vessels are typically tubular and lack radial symmetry in all directions, and existing methods lack mechanisms to identify such topological differences, leading to a high false-positive rate.
[0005] Third, it is highly dependent on post-processing. Traditional methods often rely on complex morphological post-processing (such as opening and closing operations) to correct the results, which not only increases the computational burden but also makes it impossible to optimize the model's ability to recognize difficult samples during the training phase.
[0006] Therefore, there is an urgent need for a lung nodule segmentation method that can embed geometric symmetry constraints within the network to achieve end-to-end, high-precision, and interference-resistant results. Summary of the Invention
[0007] The purpose of this invention is to provide a lung nodule medical image segmentation method based on nodule symmetry constraints. By constructing a differentiable radial feature sampling and boundary modeling mechanism, the symmetry of the nodules is explicitly constrained in the feature space, thereby solving the problems of inaccurate segmentation and misidentification of blood vessels in the prior art.
[0008] To achieve the above objectives, this invention provides a method for medical image segmentation of lung nodules based on nodule symmetry constraints, comprising the following steps: Step S1: Perform voxel spacing resampling, intensity clipping and normalization on the input chest CT volume data, and extract two-dimensional slices of fixed size along the axis; Step S2: Construct a deep neural network to extract features from the input slices and generate a high-dimensional feature map and a basic segmentation response map; Step S3: Use the network to predict the heat map of nodule centers and combine it with the center supervision loss to determine the center location of candidate nodules; Step S4: Using the determined center as the origin, perform differentiable radial sampling on the feature map to construct a radial feature sequence, and generate a radial boundary supervision signal based on the real mask to predict the boundary radius distribution in each direction; Step S5: Calculate the radius consistency loss based on radius variance and the opposing profile consistency loss based on feature differences, construct a symmetry mask, and fuse it with the basic segmentation response to obtain the final segmentation probability map. Step S6: Threshold the final segmentation probability map and perform connected component extraction based on the center point to output a single reasonable node mask.
[0009] Preferably, in step S1, the normalization formula is:
[0010] Preferably, in step S4, a bilinear grid sampling mechanism is used to extract features, and a one-dimensional convolutional subnetwork is used to predict the boundary log-odds sequence.
[0011] Preferably, in step S5, the symmetry consistency constraint includes a radius consistency loss L. var And the consistency loss of the opposing profile L prof It is used to penalize asymmetric geometric shape predictions.
[0012] The present invention has the following beneficial effects: 1) Innovatively, radial sampling and symmetry loss are introduced into the network to force the model to learn the "star-convex" geometric characteristics of nodules, effectively distinguishing nodules from blood vessels. 2) By decoupling the design of center prediction and boundary regression, the adaptability to nodules of different scales is improved. 3) All geometric constraints are differentiable operations and can directly participate in gradient backpropagation, outputting high-quality segmentation results without offline post-processing. Attached Figure Description
[0013] Since the text-based patent specification cannot directly include drawings, only a brief description of the drawings is provided here: Figure 1 This is a complete flowchart of the implementation of the present invention. Figure 2 This is a schematic diagram of the overall system architecture of the present invention. Figure 3 This is a schematic diagram of the radial feature sampling mechanism proposed in this invention. Figure 4 This is a schematic diagram of the symmetry constraint mechanism proposed in this invention. Detailed Implementation
[0014] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0015] The implementation environment for this embodiment is as follows: the operating system is Ubuntu 22.04, the hardware configuration is an NVIDIA A100 40GB graphics card, the deep learning framework is PyTorch 2.1.0, and the floating-point precision is set to FP32. The data comes from the LIDC-IDRI public database. All parameter settings in this embodiment are fixed values and do not rely on manual dynamic adjustment.
[0016] Step S1: CT volume data acquisition and preprocessing
[0017] S11. Voxel spacing resampling: Obtain the original chest CT volume data V, and resample it to an isotropic voxel spacing using a trilinear interpolation algorithm. Set the resampled spacing to 1.0mm×1.0mm×1.0mm.
[0018] S12. Intensity Clipping and Normalization: Clip the gray values of the voxels to the range of [-1000, 400] Hounsfield units (HU), and then linearly normalize them to the interval [0, 1] to obtain the normalized volume data V. n The normalization calculation formula is as follows:
[0019] In the formula, I n (x, y, z) represents the normalized voxel value at coordinates (x, y, z); I(x, y, z) represents the original HU value at that location; clip(·) is a truncation function used to force the value to be limited to a specified range.
[0020] S13, Slice Extraction: Along the axial direction from V n Extracting two-dimensional slices Fix the size of all input slices to H=256, W=256.
[0021] Step S2: Feature Extraction and Basic Segmentation Response Generation
[0022] S21. Backbone Network Construction: Construct a five-layer U-shaped two-dimensional convolutional neural network. The encoder channel number is set to [32, 64, 128, 256, 512].
[0023] S22. Basic segmentation head generation: Based on the highest resolution feature map F output by the decoder... seg Connect a 1×1 convolutional layer above it to output the basic log-odds map Z of the segmentation. seg . Zseg (x, y, z) = Conv 1×1 (F seg (x,y))
[0024] In the formula, F seg (x, y) represents the eigenvector at coordinates (x, y); Conv 1×1 Z represents a 1×1 convolution operation; seg (x, y) represents the raw logits of the pixel at that coordinate belonging to the nodule category.
[0025] Step S3: Nodule center thermogram prediction and center determination
[0026] S31, Center Prediction: The highest-level feature F of the encoder... ctr After upsampling, a 1×1 convolutional layer is connected to a sigmoid activation function, outputting a center heatmap H∈(0,1). 256×256 .
[0027] S32. Center Surveillance Signal Generation: Let the true binary mask be M, and calculate its centroid coordinates.
[0028] In the formula, x and y represent the coordinates of all pixels in the image; M(x,y) is the truth label (0 or 1) at that location; H and W are the height and width of the image, respectively. A two-dimensional Gaussian heatmap H is constructed based on the centroid. * As a label, the Gaussian standard deviation σ is set. ctr = 3.0 pixels. Center supervision loss L ctr Defined as:
[0029] In the formula, H(x, y) represents the heatmap value predicted by the network; H * (x, y) are Gaussian truth labels.
[0030] Step S4: Center-based radial feature sampling and boundary distribution modeling
[0031] S41. Differentiable radial sampling: Set the number of radial sampling angles K = 36, and the maximum detection radius R. max = 32 pixels. Define the direction unit vector u(θ) k )=(cosθ k sinθ k For each direction k∈1,...,K and each radius r∈0,...,R max Features are extracted using the bilinear interpolation function GridSample:
[0032] In the formula, F rcm This is the feature map of the intermediate layer of the decoder; The center of the nodule predicted by S3; f k (r) represents the extracted radial feature sequence; θ k Let be the k-th sampling angle.
[0033] S42. Boundary Position Prediction: Input the radial feature sequence into a one-dimensional convolutional sub-network, output the boundary probability distribution, and calculate the predicted boundary radius.
[0034] In the formula, b k (r) represents the boundary confidence score at radius r corresponding to the output of the subnetwork; τ sa =0.1 represents the temperature coefficient; Softmax is the normalized exponential function; Let be the predicted boundary radius in the k-th direction.
[0035] S43. Boundary Supervision Signal Generation and Loss Calculation: For each angle θ k From the real center Starting from this point, determine the boundary radius of the true mask M in this direction. Construct the target distribution y k (r), which is in The boundary classification loss L is 1 at the boundary and 0 elsewhere. bnd Defined as:
[0036] In the formula, K represents the total number of angles; y k (r) represents the one-hot label of the true boundary in the k-th direction.
[0037] Step S5: Fusion of Symmetry Consistency Constraint Loss Calculation and Segmentation Decision
[0038] S51. Radius Consistency Loss Calculation: Define radius consistency loss L var :
[0039] In the formula, Indicates the predicted radius in all directions A set; Let V be the variance of the set; Let ε be the mean of the set; ε = 10 -4 To prevent tiny constants with a denominator of zero.
[0040] S52. Calculation of Consistency Loss of Opposing Profiles: Define the consistency loss L of opposing profiles.prof :
[0041] In the formula, Let |·|1 represent the L2-normalized eigenvector in the k-th direction; |·|1 represents the L1 norm distance. This is the opposite index of the k-th direction (i.e., the direction rotated 180 degrees).
[0042] S53, Segmentation Decision Fusion: Constructing a binary symmetric mask M using the predicted boundary point set. sym And generate suppression / enhancement signal S sym =2·M sym -1. Final split log-odds plot Z fIn The calculation is as follows: Z fin (x, y) = Z seg (x, y) + α·S sym (x, y)
[0043] In the formula, α = 1.2 is the fusion weight coefficient; S sym (x,y) is a binary symmetric mask M sym The resulting suppressed / enhanced signal.
[0044] S54. Construction of the total loss function: The total loss L for network training is defined as follows: L=λ seg ·L seg +λ ctr ·L ctr +λ bnd· L bnd +λ sym ·(L var +L prof )
[0045] In the formula, L seg The segmentation loss is based on Dice and BCE; λ seg , λ ctr , λ bnd , λ sym These are the balancing weights for each loss component, with fixed values of 1.0, 1.0, 0.5, and 0.5.
[0046] Step S6: Final Mask Generation and Output
[0047] S61. Binarization processing of the final log-odds plot Z fin Applying the Sigmoid function to obtain the probability map P fin Reapply threshold T seg =0.5 generates a preliminary binary image B.
[0048] S62. Center-based connected component extraction: Identify all connected regions in B, retaining only those containing the predicted centers from step S3. For the connected region, set all pixel values in other regions to 0.
[0049] S63. Output result: The binary image after the above filtering is the final lung nodule segmentation mask.
[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for medical image segmentation of lung nodules based on nodule symmetry constraints, characterized in that, Includes the following steps: Step S1: Perform voxel spacing resampling, intensity clipping and normalization on the input chest CT volume data, and extract two-dimensional slices of fixed size along the axis; Step S2: Construct a deep neural network to extract features from the input slices and generate a high-dimensional feature map and a basic segmentation response map; Step S3: Use the network to predict the heat map of nodule centers and combine it with the center supervision loss to determine the center location of candidate nodules; Step S4: Using the determined center as the origin, perform differentiable radial sampling on the feature map to construct a radial feature sequence, and generate a radial boundary supervision signal based on the real mask to predict the boundary radius distribution in each direction; Step S5: Calculate the radius consistency loss based on radius variance and the opposing profile consistency loss based on feature differences, construct a symmetry mask, and fuse it with the basic segmentation response to obtain the final segmentation probability map. Step S6: Threshold the final segmentation probability map and perform connected component extraction based on the center point to output a single reasonable node mask.
2. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, In step S1, the specific calculation formula for the normalization process is as follows: In the formula, I n (x, y, z) represents the normalized voxel value at coordinates (x, y, z); I(x, y, z) represents the original Hounsfield unit value at that location. The clip(·) function is used to force a value to be limited to the range [-1000, 400].
3. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, Step S3 includes: Using the network to predict the centroid heatmap H(x,y), and based on the centroid of the true mask M. Construct Gaussian truth labels H * (x, y); Computational Center Supervision Loss L ctr The formula is as follows: In the formula, H and W represent the height and width of the image, respectively.
4. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, In step S4, the specific process of differentiable radial sampling and boundary radius prediction is as follows: For each sampling angle θ k Given a radius r, features are extracted using a bilinear interpolation function: In the formula, F rcm For feature maps, For the predicted nodule center, u(θ) k () is the direction unit vector; Boundary radius prediction based on extracted features In the formula, b k (r) represents the boundary confidence level, τ sa R is the temperature coefficient. max This is the maximum detection radius.
5. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 4, characterized in that, Step S4 also includes calculating the boundary classification loss L. bnd : In the formula, K represents the total number of angles; y k (r) represents the target distribution, which lies within the true boundary radius. The value at point 1 is 0, and the value at the rest is 0. It is the true boundary radius determined based on the true center and the true mask.
6. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, In step S5, the radius consistency loss L var The calculation formula is: In the formula, Indicates the predicted radius in all directions A set; Let V be the variance of the set; This is the mean of the set; ε is a small constant.
7. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, In step S5, the opposing profile consistency loss L prof The calculation formula is: In the formula, Let |·|1 represent the L2-normalized eigenvector in the k-th direction; |·|1 represents the L1 norm distance. This is the opposite index for the k-th direction.
8. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, In step S5, the specific formula for constructing and fusing the symmetric mask is as follows: Z fin (x,y)=Z seg (x,y)+α·S sym (x,y) In the formula, Z fin (x,y) is the final log-odds plot of the splits; Z seg (x, y) is the basic segmentation log-odds plot; α is the fusion weight coefficient; S sym (x,y) represents the suppression / enhancement signal, which is transmitted through S... sym =2·M sym -1 is determined by the binary symmetric mask M. sym Obtained through conversion.
9. The lung nodule medical image segmentation method based on nodule symmetry constraints according to claim 1, characterized in that, The specific operation of step S6 is as follows: S61. Apply a threshold τ to the final segmentation probability map. seg =0.5 generates a preliminary binary image B; S62. Identify all connected regions in B, and retain only those containing the prediction centers determined in step S3. Find the connected regions, and set all pixel values of other connected regions to 0 to obtain the final node mask.
10. The lung nodule medical image segmentation method based on nodule symmetry constraints according to any one of claims 1 to 9, characterized in that, The total training loss L of the deep neural network is defined as: L=λ seg ·L seg +λ ctr ·L ctr +λ bnd ·L bnd +λ sym ·(L var +L prof ) In the formula, L seg The segmentation loss is based on Dice and BCE; λ seg , λ ctr , λ bnd , λ sym These are the balancing weights for each loss component.