CT image segmentation method and system based on nonlinear shape prior

By introducing nonlinear shape prior and shape loss function into CT images, the noise and anatomical structure complexity problems in myocardial segmentation are solved, and myocardial segmentation with higher accuracy and consistency is achieved.

CN120726334AInactive Publication Date: 2025-09-30BEIJING UNIV OF POSTS & TELECOMM +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511232797.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-09-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies face challenges such as image noise, artifacts, low contrast, complex anatomical structures and individual differences when segmenting myocardium in CT images, resulting in limited segmentation accuracy.

Method used

A CT image segmentation method based on nonlinear shape prior is adopted. The shape prior map is calculated by the kernel principal component analysis algorithm. A weighted joint loss function of shape loss and similarity loss is combined to train the U-Net architecture model to generate accurate myocardial segmentation masks.

Benefits of technology

It improves the accuracy and shape consistency of myocardial segmentation, enhances anti-interference ability, reduces dependence on labeled data, and ensures that the segmentation results are consistent with the anatomical structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726334A_ABST
    Figure CN120726334A_ABST
Patent Text Reader

Abstract

The invention provides a CT image segmentation method and system based on nonlinear shape prior. The method comprises the steps of model pre-training and model reasoning. The model pre-training step comprises the following steps: inputting a CT image of the heart in training data into a segmentation model, and outputting a likelihood graph by the segmentation model; based on the likelihood graph and the tag graphs in the tag graph set, calculating a coefficient vector of each tag graph in the tag graph set after correction in the feature space by adopting a kernel principal component analysis algorithm, and calculating a shape prior graph based on the coefficient vectors; calculating shape loss based on the likelihood graph and the shape prior graph, calculating similarity loss based on the likelihood graph and the corresponding real label graph, calculating weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model; in the step of model reasoning, a CT image to be processed is input into a segmentation model to obtain an actual likelihood graph, and a final myocardial segmentation mask graph is obtained through binarization processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to a CT image segmentation method and system based on nonlinear shape prior. Background Art

[0002] Myocardial segmentation plays a vital role in clinical medicine and biomedical research, as accurately locating the myocardium in cardiac images is crucial. Myocardial segmentation involves extracting the myocardial region from cardiac images.

[0003] Despite its importance, automatically and accurately delineating the left ventricular myocardium in CT images still faces significant challenges. These challenges include interference from image noise and artifacts, low contrast between the myocardium and adjacent structures, complex anatomy, individual differences, and cardiac dynamics. Addressing these challenges requires advanced image processing techniques and robust algorithm design.

[0004] Existing technologies often use neural network models to process myocardial segmentation in CT images. However, the training process of existing neural network models often uses conventional loss functions, such as cross entropy functions, for training, and the segmentation results of the final model have limited accuracy. Summary of the Invention

[0005] In view of this, an embodiment of the present invention provides a CT image segmentation method and system based on nonlinear shape prior to eliminate or improve one or more defects in the prior art.

[0006] One aspect of the present invention provides a CT image segmentation method based on nonlinear shape prior, the method comprising the steps of model pre-training and model inference; The steps of model pre-training include: Inputting a CT image of a training data center into a segmentation model, the segmentation model outputting a likelihood map; Calculating a corrected coefficient vector of each label graph in the label graph set in the feature space based on the likelihood graph and the label graphs in the label graph set using a kernel principal component analysis algorithm, and calculating a shape prior map based on the coefficient vector; Calculating a shape loss based on the likelihood map and the shape prior map, calculating a similarity loss based on the likelihood map and the corresponding true label map, calculating a weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model; The CT image to be processed is input into the segmentation model to obtain the actual likelihood map, and the final myocardial segmentation mask map is obtained after binarization processing.

[0007] Adopting the above scheme, this scheme combines the KPCA-based shape prior to overcome the limitations of traditional supervised learning-based models. By designing a shape loss function, it forces the "shape-level" matching between the predicted segmentation results and the true labels during the model training process, aiming to improve the segmentation performance by maintaining the effectiveness of the output structure. The proposed model can learn the shape information of the myocardial anatomical structure, thereby guiding the model to generate segmentation results with reasonable shapes, rather than blindly pursuing traditional pixel-level consistency, thereby improving processing accuracy.

[0008] In some embodiments of the present invention, in the steps of calculating the shape loss based on the likelihood map and the shape prior map, calculating the similarity loss based on the likelihood map and the corresponding true label map, calculating the weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model, the shape loss is calculated using the following formula: in, represents the value of shape loss, and Represents the height and width of the image respectively, Represents the pixel value at height i and width j in the likelihood map; Represents the pixel value at height i and width j in the shape prior image; The similarity loss is calculated using the following formula: in, represents the likelihood graph, represents a label graph, The value representing the similarity loss.

[0009] In some embodiments of the present invention, in the step of calculating a weighted joint loss based on the shape loss and the similarity loss.

[0010] In some embodiments of the present invention, in the step of calculating the total loss based on the shape loss and the similarity loss, the following formula is used to calculate the joint loss: in, represents the value of the joint loss, Represents the value of similarity loss, represents the value of shape loss, Represents the weight parameter of the shape loss part.

[0011] In some embodiments of the present invention, the segmentation model is a U-Net architecture model, which includes an encoder and a decoder. In the step of inputting the CT image in the training data into the segmentation model and the segmentation model outputting the likelihood map, the original CT image is received by the encoder of the segmentation model, and the decoder of the segmentation model outputs the likelihood map.

[0012] In some embodiments of the present invention, the step of calculating a corrected coefficient vector of each label graph in the label graph set in the feature space based on the likelihood graph and the label graph in the label graph set using a kernel principal component analysis algorithm, and calculating a shape prior map based on the coefficient vector includes: constructing any two label graphs in the label graph set into a second graph group, calculating a kernel function value of each second graph group, and obtaining a kernel matrix based on the kernel function values ​​of all second graph groups; Performing centralization processing on the kernel matrix to obtain a kernel-centered matrix, performing singular value decomposition on the kernel-centered matrix to obtain a corresponding orthogonal matrix and a diagonal matrix, and constructing a diagonal matrix based on the eigenvalues ​​in the eigenvector; Constructing the likelihood graph and each label graph in the label graph set into a first graph group, calculating a kernel function value of each first graph group, determining a first column vector based on the kernel function value of the first graph group, and determining a first matrix based on the first column vector and the kernel centering matrix; Calculate a coefficient vector based on the orthogonal matrix and the first matrix, calculate a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculate projection coordinates based on the coefficient vector and the orthogonal matrix, and calculate a correction coefficient vector based on the projection coordinates; A shape prior map is calculated based on the correction coefficient vector.

[0013] In some embodiments of the present invention, in the step of calculating the kernel function value of each second image group or calculating the kernel function value of each first image group, the kernel function value is calculated using the following formula: in, Indicates the first or second group of images, and represents two figures in the first figure group or the second figure group, Indicates the kernel function value corresponding to the first or second image group, Represents the parameter that controls the width of the Gaussian kernel.

[0014] In some embodiments of the present invention, in the step of performing centralization processing on the kernel matrix to obtain a kernel centralization matrix, the kernel centralization matrix is ​​calculated using the following formula: The centralization matrix is ​​determined using the following formula: in, express vector, Indicates the number of label maps in the label map set, represents the kernel centering matrix, represents the kernel matrix, represents a centralized matrix.

[0015] In some embodiments of the present invention, in the step of determining the first matrix based on the first column vector and the kernel centering matrix, the first matrix is ​​calculated using the following formula: in, represents the first matrix, represents the centralized matrix, represents the first column vector, represents the kernel centering matrix, express vector.

[0016] In some embodiments of the present invention, in the steps of calculating a coefficient vector based on the orthogonal matrix and the first matrix, calculating a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculating projection coordinates based on the coefficient vector and the orthogonal matrix, and calculating a correction coefficient vector based on the projection coordinates, the following formulas are used to calculate the coefficient vector, the reconstruction matrix, the projection coordinates, and the correction coefficient vector: in, represents the coefficient vector, 、 are all eigenvectors in an orthogonal matrix, 、 and are all eigenvalues ​​in a diagonal matrix, represents the first matrix, represents the reconstruction matrix, represents the number of eigenvectors in an orthogonal matrix and the number of eigenvalues ​​in a diagonal matrix, represents the projection coordinates, Indicates the number of label maps in the label map set, express vector, represents the correction coefficient vector.

[0017] In some embodiments of the present invention, in the step of calculating the shape prior map based on the correction coefficient vector, the shape prior map is calculated using the following formula: in, represents the value in the correction coefficient vector, Indicates the number of label maps in the label map set, represents the transformation graph of label graph i into SDF representation, represents the shape prior map, represents the first matrix, represents the centralized matrix, represents the kernel centering matrix, express vector, express represents the matrix element at row i and column i in the kernel centering matrix, Represents the reconstruction matrix.

[0018] The second aspect of the present invention also provides a CT image segmentation system based on nonlinear shape prior, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps implemented by the method described above.

[0019] The third aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps implemented by the aforementioned CT image segmentation method based on nonlinear shape prior.

[0020] Additional advantages, objects, and features of the present invention will be described in part in the following description and will become apparent to those skilled in the art after studying the following or may be learned by practice of the present invention. The objects and other advantages of the present invention may be particularly pointed out and attained in the description and drawings.

[0021] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present invention are not limited to the above specific descriptions, and the above and other purposes that can be achieved by the present invention will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.

[0023] Figure 1This is a schematic diagram of an implementation of the CT image segmentation method based on nonlinear shape priors in this scheme; Figure 2 for Figure 1 Specific step diagram of step S120; Figure 3 Schematic diagram of the overall architecture of the CT image segmentation method based on nonlinear shape prior in this scheme; Figure 4 Schematic diagram of some images in the dataset; Figure 5 For different Schematic diagram of Dice similarity coefficient when the value is ; Figure 6 Schematic diagram of the mean square error loss curve between the pre-image and the original input shape; Figure 7 For parameter setting Below is a schematic diagram of the changing trends of Dice loss, shape loss and total loss during training; Figure 8 A schematic diagram comparing the segmentation results of the real mask, the baseline model, and the segmentation results of the method studied in this paper; Figure 9 for Schematic diagram of the curve changing with training iterations; Figure 10 is the kernel parameter Schematic diagram of the shape loss curve changing with training when set to fixed and learnable; Figure 11 is the true mask and fixed kernel parameters The segmentation result of the model can be used to learn the kernel parameters Schematic diagram of the comparison of model segmentation results. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0025] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, the accompanying drawings only show structures and / or processing steps closely related to the solutions according to the present invention, while other details that are not closely related to the present invention are omitted.

[0026] like Figure 1 and 3 As shown, the present invention proposes a CT image segmentation method based on nonlinear shape prior, the steps of which include model pre-training and model inference; The steps of model pre-training include: Step S110, inputting the CT image of the central dirty part of the training data into the segmentation model, and the segmentation model outputs a likelihood map; In the specific implementation process, the segmentation model is built on the U-Net architecture, which is specially designed for biomedical image segmentation and provides a robust framework to capture local and global contextual information through its symmetrical encoder-decoder structure. The encoder performs feature extraction through a sequence of feature extraction, batch normalization, dropout to prevent overfitting, and LeakyReLU activation function. Next, dimensionality reduction is performed through downsampling with a stride of 2, batch normalization, and LeakyReLU. The decoder mirrors this structure and concatenates the corresponding encoder feature map to the decoder feature map through upsampling including bilinear interpolation and convolutional layers and skip connections. The final output is obtained through Convolution is performed to reduce the feature channels to the required number of output categories, and then a sigmoid activation function is used to obtain the confidence of the predicted segmentation result.

[0027] Step S120, calculating a corrected coefficient vector of each label graph in the label graph set in the feature space using a kernel principal component analysis algorithm based on the likelihood graph and the label graphs in the label graph set, and calculating a shape prior map based on the coefficient vector; In a specific implementation process, the label map in the label map set is the mask map.

[0028] Specifically, a nonlinear shape prior is performed based on the kernel principal component analysis algorithm.

[0029] Step S130, calculating a shape loss based on the likelihood map and the shape prior map, calculating a similarity loss based on the likelihood map and the corresponding true label map, calculating a weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model; In step S200 , the CT image to be processed is input into the segmentation model to obtain an actual likelihood map, and a final myocardial segmentation mask map is obtained through binarization processing.

[0030] Adopting the above scheme, this scheme combines the KPCA-based shape prior to overcome the limitations of traditional supervised learning-based models. By designing a shape loss function, it forces the "shape-level" matching between the predicted segmentation results and the true labels during the model training process, aiming to improve the segmentation performance by maintaining the effectiveness of the output structure. The proposed model can learn the shape information of the myocardial anatomical structure, thereby guiding the model to generate segmentation results with reasonable shapes, rather than blindly pursuing traditional pixel-level consistency, thereby improving processing accuracy.

[0031] In some embodiments of the present invention, in the steps of calculating the shape loss based on the likelihood map and the shape prior map, calculating the similarity loss based on the likelihood map and the corresponding true label map, calculating the weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model, the shape loss is calculated using the following formula: in, represents the value of shape loss, and Represents the height and width of the image respectively, Represents the pixel value at height i and width j in the likelihood map; Represents the pixel value at height i and width j in the shape prior image; The similarity loss is calculated using the following formula: in, represents the likelihood graph, represents a label graph, The value representing the similarity loss.

[0032] In some embodiments of the present invention, in the step of calculating a weighted joint loss based on the shape loss and the similarity loss.

[0033] In some embodiments of the present invention, in the step of calculating the total loss based on the shape loss and the similarity loss, the following formula is used to calculate the joint loss: in, represents the value of the joint loss, Represents the value of similarity loss, represents the value of shape loss, Represents the weight parameter of the shape loss part.

[0034] In some embodiments of the present invention, the segmentation model is a U-Net architecture model, which includes an encoder and a decoder. In the step of inputting a CT image of a training data center into the segmentation model and the segmentation model outputting a likelihood map, the encoder of the segmentation model receives a binary mask map, and the decoder of the segmentation model outputs a likelihood map.

[0035] like Figure 2 As shown, in some embodiments of the present invention, the step of calculating the corrected coefficient vector of each label map in the label map set in the feature space based on the likelihood map and the label map in the label map set using the kernel principal component analysis algorithm, and calculating the shape prior map based on the coefficient vector includes: Step S121, constructing any two label graphs in the label graph set into a second graph group, calculating the kernel function value of each second graph group, and obtaining a kernel matrix based on the kernel function values ​​of all second graph groups; In the specific implementation process, in the step of obtaining the kernel matrix based on the kernel function values ​​of all the second graph groups, the kernel function values ​​are used as the matrix parameters in the kernel matrix to obtain The kernel matrix.

[0036] Step S122: performing centralization processing on the kernel matrix to obtain a kernel-centered matrix, performing singular value decomposition on the kernel-centered matrix to obtain a corresponding orthogonal matrix and a diagonal matrix, and constructing a diagonal matrix based on the eigenvalues ​​in the eigenvector; In the specific implementation process, the singular value decomposition (SVD) of the centralized kernel matrix is ​​performed, that is, ,in is an orthogonal matrix, the eigenvector , is a diagonal matrix consisting of eigenvalues.

[0037] Step S123: constructing the likelihood graph and each label graph in the label graph set into a first graph group, calculating the kernel function value of each first graph group, determining a first column vector based on the kernel function value of the first graph group, and determining a first matrix based on the first column vector and the kernel centering matrix; In a specific implementation process, in the step of determining the first column vector based on the kernel function value of the first graph group, the first column vector is determined using the following formula: in, represents the first column vector, Representation likelihood graph and The kernel function value of the first graph group composed of 、 and These are all graphs obtained by performing SDF representation on the label graphs in the label graph set.

[0038] Step S124, calculating a coefficient vector based on the orthogonal matrix and the first matrix, calculating a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculating projection coordinates based on the coefficient vector and the orthogonal matrix, and calculating a correction coefficient vector based on the projection coordinates; Step S125 : calculating a shape prior map based on the correction coefficient vector.

[0039] In some embodiments of the present invention, in the step of calculating the kernel function value of each second image group or calculating the kernel function value of each first image group, the kernel function value is calculated using the following formula: in, Indicates the first or second group of images, and represents two figures in the first figure group or the second figure group, Indicates the kernel function value corresponding to the first or second image group, Represents the parameter that controls the width of the Gaussian kernel.

[0040] In the specific implementation process, the kernel function of this scheme can adopt Gaussian kernel, polynomial kernel, Laplace kernel or Sigmoid kernel. In the actual task application of this scheme, the commonly used choice of kernel function is Gaussian radial basis function (RBF).

[0041] In some embodiments of the present invention, in the step of performing centralization processing on the kernel matrix to obtain a kernel centralization matrix, the kernel centralization matrix is ​​calculated using the following formula: The centralization matrix is ​​determined using the following formula: in, express A vector of all 1s, Indicates the number of label maps in the label map set, represents the kernel centering matrix, represents the kernel matrix, represents a centralized matrix.

[0042] In the specific implementation process, yes vector.

[0043] In some embodiments of the present invention, in the step of determining the first matrix based on the first column vector and the kernel centering matrix, the first matrix is ​​calculated using the following formula: in, represents the first matrix, represents the centralized matrix, represents the first column vector, represents the kernel centering matrix, express vector.

[0044] In some embodiments of the present invention, in the steps of calculating a coefficient vector based on the orthogonal matrix and the first matrix, calculating a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculating projection coordinates based on the coefficient vector and the orthogonal matrix, and calculating a correction coefficient vector based on the projection coordinates, the following formulas are used to calculate the coefficient vector, the reconstruction matrix, the projection coordinates, and the correction coefficient vector: in, represents the coefficient vector, 、 are all eigenvectors in an orthogonal matrix, 、 and are all eigenvalues ​​in a diagonal matrix, represents the first matrix, represents the reconstruction matrix, represents the number of eigenvectors in an orthogonal matrix and the number of eigenvalues ​​in a diagonal matrix, represents the projection coordinates, Indicates the number of label maps in the label map set, express vector, represents the correction coefficient vector.

[0045] Specifically, by selecting the front Principal component analysis is performed on the principal components, that is, the eigenvectors are sorted according to their eigenvalues, and the top eigenvectors and their corresponding eigenvalues, It is from the front The reconstruction matrix consists of eigenvectors and eigenvalues.

[0046] Specifically, Represents the distance from the test point to the previous point in the feature space The coefficient vector is obtained by projecting the eigenvectors. It combines the eigenvalues ​​and eigenvectors of the kernel matrix with the kernel function values ​​of the test points and training samples. It is from the front The reconstruction matrix composed of eigenvectors and eigenvalues ​​makes it easy to map points in the feature space back to the original space. Represents the projection coordinates of the data in the principal component space. is the corrected coefficient vector in the feature space, adjusted to improve the accuracy of pre-image reconstruction by considering the mean projection of the data.

[0047] In some embodiments of the present invention, in the step of calculating the shape prior map based on the correction coefficient vector, the shape prior map is calculated using the following formula: in, represents the value in the correction coefficient vector, Indicates the number of label maps in the label map set, represents the transformation graph of label graph i into SDF representation, represents the shape prior map, represents the first matrix, represents the centralized matrix, represents the kernel centering matrix, express vector, express represents the matrix element at row i and column i in the kernel centering matrix, Represents the reconstruction matrix.

[0048] Specifically, Binarization is required to obtain the desired binary shape .

[0049] In its implementation, the core idea of ​​the SDF (Signed Distance Field) algorithm is to use a mathematical function to describe the shortest distance from any point in space to the surface of an object, and to use a sign (positive / negative) to distinguish whether a point is inside or outside the object.

[0050] Specifically, the shape prior obtained by using SDF to represent the shape can accurately represent the shape structure of the predicted image. The specific steps are as follows. First, the label Convert to their respective SDF representations to obtain the training shape set for KPCA Then, use As a binary mask The SDF representation of Shape prior .

[0051] The beneficial effects of this program include: 1. Enhanced anti-interference capabilities: In scenarios with noise interference (such as artifacts in medical images), partial occlusion (such as when the target is covered by an obstruction), or low contrast (such as blurred soft tissue edges), the shape prior significantly reduces the model's sensitivity to local errors by constraining the geometric rationality of the output results. For example, in cardiac MRI segmentation, the shape prior can enforce that the segmentation results maintain the closed shape and anatomical topology of the ventricles.

[0052] 2. Physical plausibility: Constraints based on anatomical rules can prevent the model from generating shapes that are not realistic. For example, in liver segmentation, shape priors can prevent the model from misidentifying blood vessels as liver edges, ensuring that the segmentation results are consistent with the organ's physiological structure.

[0053] 3. Improved Data Efficiency: In scenarios where labeled data is scarce (e.g., images of rare diseases), shape priors reduce the reliance on large amounts of labeled data by introducing prior knowledge. For example, Active Shape Models (ASMs) can be used to generalize reasonable shape distributions from a small number of samples.

[0054] In summary, the input image in this scheme is fed into the segmentation model to generate a likelihood map, i.e., the probability of each pixel being foreground or background, as the predicted segmentation result. The shape prior algorithm takes the segmentation result and the true label as input, encodes their shapes into an SDF representation, from which a shape prior is generated via KPCA. To train the segmentation model, a weighted sum of the Dice loss and the shape loss is added to the total loss. The former is used to evaluate pixel-level segmentation accuracy, and the latter is used to evaluate shape consistency. By minimizing this objective function, the segmentation model is expected to simultaneously meet the requirements of pixel-level segmentation accuracy and anatomical shape consistency.

[0055] Experimental example The dataset was collected from 60 subjects in the hospital, and consists of 9712 cardiac CT image slices. The size of each slice is All CT images were preprocessed by windowing and normalization. The former is to eliminate potential interference by thresholding the pixel values, and the latter is to unify all image slices in terms of intensity. In the experiment, the dataset was divided into two subsets: a training set containing 7744 images from 48 patients to be tested, and a test set containing 1968 images from 12 patients. Some fragments in the dataset are shown as follows Figure 4 shown.

[0056] The experiments were implemented using the PyTorch framework and conducted on three NVIDIA GTX 4090 GPUs. The shape loss function benefited from PyTorch's automatic differentiation and backpropagation capabilities. The Adam algorithm was used as the optimizer to minimize the loss function. Two models with identical architectures (with and without shape loss) were trained for 200 iterations and a batch size of 20.

[0057] In the experimental example, It plays a key role in the total loss function, used to balance the importance of Dice loss and the proposed shape loss. Specifically, The weight of shape loss relative to Dice loss is controlled to achieve an appropriate balance between pixel-level accuracy and anatomical shape consistency. Figure 5 As shown, on the test set, four different The value verifies the Dice similarity coefficient under the same number of iterations. The best performance was obtained, so in the experimental example Fixed to this value.

[0058] In the experimental example, the Gaussian kernel parameters plays a key role in the final segmentation performance because it is essential for accurately computing the shape prior, which significantly enhances the consistency of the model's shape predictions. Therefore, both fixed and learnable .

[0059] To determine the fixed Gaussian kernel parameters The value of introduces reconstruction loss when mapping KPCA back to the original space, which can quantitatively evaluate the reconstruction accuracy and determine the optimal kernel parameters. , the reconstructed pre-image was calculated in the experiment With the original input shape The mean square error (MSE) between Figure 6 As shown in the figure, The left and right reconstruction losses are almost stable at a low value, so it is determined that .

[0060] In this experimental example, comprehensive experimental results of the shape loss function proposed in this study are presented. The convergence of the shape loss function during the training phase is verified. In addition, the segmentation consistency between the proposed method and the baseline is further checked through comparative analysis. Finally, this work also analyzes the effect of setting the parameters to The parameters are set as learnable parameters to influence the model output performance.

[0061] Training performance: Figure 7 Shows the parameter settings Below, the overall trend of Dice loss, shape loss and total loss during training. Figure 7It can be clearly observed that after approximately the 75th training round, all three loss curves converge, indicating that the model has essentially completed the learning process in terms of feature representation learning and shape alignment. The overall decline in the loss curve is smooth and without significant oscillation, reflecting the good stability and consistency of the training process. This stable convergence behavior further verifies that the proposed method can effectively achieve joint optimization of segmentation accuracy and shape consistency under this parameter setting. In particular, the coordinated decrease in shape loss and Dice loss indicates that the introduced shape prior helps the model capture more structural anatomical information without interfering with pixel-level supervision, providing support for subsequent higher-quality segmentation results.

[0062] Segmentation performance: Select representative test images for comparative analysis. Each image contains three sub-images for comparison of experimental results. Figure 8 The ground truth mask is the input image and its corresponding label. The baseline model shows the output of a model trained using only the Dice loss function, while the proposed method shows the output of a model trained using a combination of the Dice loss and the proposed shape loss function. Both models were trained with the same number of iterations and settings. Yellow boxes mark areas where the segmentation results differ for the same region.

[0063] Compared to the baseline model, the output shape of the proposed method more faithfully reflects the true myocardial shape shown in the ground truth mask. In addition, the study also consulted with cardiologists to evaluate the rationality of the results in clinical diagnosis. The areas with differences were annotated using medical terminology to highlight the differences in shape fidelity between different methods. This method enables the model to focus on the shape of specific cardiac regions, such as Figure 8 As shown, the left ventricular endocardial border ( Figure 8 01 and 04), the bottom of my heart ( Figure 8 02), apex ( Figure 8 03), ventricular septum ( Figure 8 05 and 10), mitral valve ( Figure 8 06 and 11), left ventricle ( Figure 8 07) and papillary muscles ( Figure 8 Experts evaluated the segmentation output and confirmed that the introduction of shape prior significantly improved the anatomical consistency of myocardial segmentation.

[0064] In addition, Figure 5 As shown, when When the shape loss function is not included in the model, the Dice similarity coefficient on the test set is significantly lower than that of the model containing the shape loss function, indicating that the introduction of the shape loss function can improve the accuracy of the model prediction.

[0065] In some treatments, in KPCA Set to a constant to calculate the shape prior, and use the predefined kernel for KPCA during model training. If it is not suitable for the dataset of model training, this predefined kernel may lead to inaccurate shape prior calculation of some batches of training data, thereby reducing segmentation performance. Therefore, you can also set Set as a learnable parameter and use a gradient-based optimizer to train the other parameters of the segmentation network. In this way, it is possible to determine The adaptive value of t is used to meet the needs of the training dataset for better segmentation performance.

[0066] like Figure 9 As shown, when the kernel parameters When considered as a learnable variable, during the training process It can adaptively converge to a stable value, indicating that the model can automatically find the most suitable distribution of data. Size. Figure 10 As can be seen, the learnable kernel parameters are used When the shape loss is 0.000, it is always lower than the fixed kernel parameter after 60 iterations. The shape loss value under the condition of . Combining the two figures, after 125 iterations, tends to be stable, and the shape loss also converges to a stable value. These phenomena further illustrate that the learnable kernel parameters It can more accurately characterize shape priors, thereby improving the measurement and optimization effects of shape consistency in reconstruction and segmentation tasks.

[0067] Select representative test images for comparison and fix the kernel parameters and learnable kernel parameters The results are compared with the ground-truth mask for each image. Figure 11 The results shown are obtained using the same settings used in model training. Yellow boxes mark the same regions where the segmentation results are inconsistent.

[0068] Compared with the segmentation results of fixed kernel parameters, the learnable The output shape in clearly more accurately presents the true myocardial shape in the true mask. Experimental results show that when When the parameters are set to fixed values, the generated shape prior cannot adapt to the changes in different batches in the dataset, which leads to poor prediction performance to a certain extent. When parameters are set as learnable variables, they are dynamically adjusted based on feedback from the loss function, automatically optimizing to the ideal value and ensuring that the model learns the optimal shape prior. This dynamic adjustment mechanism significantly improves the model's prediction accuracy and shape consistency, effectively overcoming the inherent limitations and suboptimal nature of static parameter settings. Compared to manual parameter setting, it reduces operational complexity and potential errors.

[0069] To verify the effectiveness and generalization of the proposed method, comparative experiments were conducted on three typical segmentation architectures: convolution-based U-Net, Transformer-based TransUNet, and MedT. In the experiment, the evaluation indicators of each model under three loss functions were compared. As shown in Table 1, the original loss of each model was used as the baseline, and a fixed parameter was added to the original loss. The shape loss and the original loss plus the learnable parameters The segmentation effects of the shape loss are compared. Evaluation metrics include Dice score, Intersection over Union (IoU), Recall, F1 score, and 95% Hausdorff distance (HD95).

[0070] The definitions of each indicator are as follows, and the Dice score is defined as: IoU is defined as: Recall is defined as: Precision is defined as: The F1 score is defined as: in Indicates the number of pixels that are correctly predicted as foreground; Indicates the number of pixels that are mistakenly predicted as background as foreground; Indicates the number of pixels that are correctly predicted as background; The Hausdorff distance measures the maximum and minimum distance between the predicted and true boundaries. HD95 represents the 95th percentile distance after removing outliers and is often used to measure shape boundary consistency.

[0071] Table 1 These metrics verify the effectiveness of incorporating KPCA-based shape priors into the segmentation framework. Compared with the baseline model, the fixed The introduction of parameter shape prior improves segmentation accuracy and boundary accuracy. In addition, the shape prior based on KPCA The parameter, acting as another learnable parameter, further improves the model, demonstrating its ability to adapt to diverse anatomical structures. These results confirm the proposed method's potential to significantly improve segmentation performance in terms of both accuracy and shape composition. Furthermore, the introduction of shape priors leads to stable and consistent performance improvements across both pure convolutional networks like U-Net and models incorporating Transformer mechanisms like TransUNet and MedT, demonstrating the proposed approach's excellent generalization across diverse deep segmentation frameworks.

[0072] An embodiment of the present invention also provides a CT image segmentation system based on nonlinear shape prior, which includes a computer device, wherein the computer device includes a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps implemented by the method described above.

[0073] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the steps of the aforementioned nonlinear shape prior-based CT image segmentation method. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, floppy disk, hard disk, removable storage disk, CD-ROM, or any other form of storage medium known in the art.

[0074] It should be understood by those skilled in the art that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether to implement the system in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention. When implemented in hardware, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via a data signal carried in a carrier wave.

[0075] It should be understood that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted. In the above embodiments, several specific steps are described and illustrated as examples. However, the method of the present invention is not limited to the specific steps described and illustrated. Those skilled in the art may make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present invention.

[0076] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.

[0077] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations to the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A CT image segmentation method based on nonlinear shape prior, characterized in that: The steps of the method include model pre-training and model inference; The steps of model pre-training include: Inputting a CT image of a training data center into a segmentation model, the segmentation model outputting a likelihood map; Calculating a corrected coefficient vector of each label graph in the label graph set in the feature space based on the likelihood graph and the label graphs in the label graph set using a kernel principal component analysis algorithm, and calculating a shape prior map based on the coefficient vector; Calculating a shape loss based on the likelihood map and the shape prior map, calculating a similarity loss based on the likelihood map and the corresponding true label map, calculating a weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model; The CT image to be processed is input into the segmentation model to obtain the actual likelihood map, and the final myocardial segmentation mask map is obtained after binarization processing.

2. The CT image segmentation method based on nonlinear shape prior according to claim 1, characterized in that: In the steps of calculating the shape loss based on the likelihood map and the shape prior map, calculating the similarity loss based on the likelihood map and the corresponding true label map, calculating the weighted joint loss based on the shape loss and the similarity loss, and training the segmentation model, the shape loss is calculated using the following formula: in, represents the value of shape loss, and Represents the height and width of the image respectively, Represents the pixel value at height i and width j in the likelihood map; Represents the pixel value at height i and width j in the shape prior image; The similarity loss is calculated using the following formula: in, represents the likelihood graph, represents a label graph, The value representing the similarity loss.

3. The CT image segmentation method based on nonlinear shape prior according to claim 2, characterized in that: In the step of calculating a weighted joint loss based on the shape loss and the similarity loss; The joint loss is calculated using the following formula: in, represents the value of the joint loss, Represents the value of similarity loss, represents the value of shape loss, Represents the weight parameter of the shape loss part.

4. The CT image segmentation method based on nonlinear shape prior according to any one of claims 1 to 3, characterized in that: The step of calculating a corrected coefficient vector of each label graph in the label graph set in the feature space based on the likelihood graph and the label graphs in the label graph set using a kernel principal component analysis algorithm, and calculating a shape prior map based on the coefficient vector comprises: constructing any two label graphs in the label graph set into a second graph group, calculating a kernel function value of each second graph group, and obtaining a kernel matrix based on the kernel function values ​​of all second graph groups; Performing centralization processing on the kernel matrix to obtain a kernel-centered matrix, performing singular value decomposition on the kernel-centered matrix to obtain a corresponding orthogonal matrix and a diagonal matrix, and constructing a diagonal matrix based on the eigenvalues ​​in the eigenvector; Constructing the likelihood graph and each label graph in the label graph set into a first graph group, calculating a kernel function value of each first graph group, determining a first column vector based on the kernel function value of the first graph group, and determining a first matrix based on the first column vector and the kernel centering matrix; Calculate a coefficient vector based on the orthogonal matrix and the first matrix, calculate a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculate projection coordinates based on the coefficient vector and the orthogonal matrix, and calculate a correction coefficient vector based on the projection coordinates; A shape prior map is calculated based on the correction coefficient vector.

5. The CT image segmentation method based on nonlinear shape prior according to claim 4, characterized in that: In the step of calculating the kernel function value of each second image group or calculating the kernel function value of each first image group, the kernel function value is calculated using the following formula: in, Indicates the first or second group of images, and represents two figures in the first figure group or the second figure group, Indicates the kernel function value corresponding to the first or second image group, Represents the parameter that controls the width of the Gaussian kernel.

6. The CT image segmentation method based on nonlinear shape prior according to claim 4, characterized in that: In the step of performing centralization processing on the kernel matrix to obtain the kernel centralization matrix, the kernel centralization matrix is ​​calculated using the following formula: The centralization matrix is ​​determined using the following formula: in, express A vector of all 1s, Indicates the number of label maps in the label map set, represents the kernel centering matrix, represents the kernel matrix, represents a centralized matrix.

7. The CT image segmentation method based on nonlinear shape prior according to claim 4, characterized in that: In the step of determining the first matrix based on the first column vector and the kernel centering matrix, the first matrix is ​​calculated using the following formula: in, represents the first matrix, represents the centralized matrix, represents the first column vector, represents the kernel centering matrix, express vector.

8. The CT image segmentation method based on nonlinear shape prior according to claim 4, characterized in that: In the steps of calculating a coefficient vector based on the orthogonal matrix and the first matrix, calculating a reconstruction matrix based on the orthogonal matrix and the diagonal matrix, calculating projection coordinates based on the coefficient vector and the orthogonal matrix, and calculating a correction coefficient vector based on the projection coordinates, the coefficient vector, reconstruction matrix, projection coordinates, and correction coefficient vector are calculated using the following formulas: in, represents the coefficient vector, 、 are all eigenvectors in an orthogonal matrix, 、 and are all eigenvalues ​​in a diagonal matrix, represents the first matrix, represents the reconstruction matrix, represents the number of eigenvectors in an orthogonal matrix and the number of eigenvalues ​​in a diagonal matrix, represents the projection coordinates, Indicates the number of label maps in the label map set, express vector, represents the correction coefficient vector.

9. The CT image segmentation method based on nonlinear shape prior according to claim 4, characterized in that: In the step of calculating the shape prior map based on the correction coefficient vector, the shape prior map is calculated using the following formula: in, represents the value in the correction coefficient vector, Indicates the number of label maps in the label map set, represents the transformation graph of label graph i into SDF representation, represents the shape prior map, represents the first matrix, represents the centralized matrix, represents the kernel centering matrix, express vector, express The corresponding first column vector is, represents the matrix element at row i and column i in the kernel centering matrix, Represents the reconstruction matrix.

10. A CT image segmentation system based on nonlinear shape prior, characterized in that: The system includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps implemented by the method according to any one of claims 1 to 9.