Hip joint CT image segmentation method based on improved nnUNet model

By improving the nnUNet model and introducing the convolutional attention module and Hausdorff distance loss, the problem of blurred anatomical structure boundaries in hip CT image segmentation is solved, and high-precision and adaptive segmentation effects are achieved, which is suitable for diverse hip CT image data.

CN120612337APending Publication Date: 2025-09-09SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 3 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies make it difficult to efficiently and accurately segment the complex anatomical structures in hip joint CT images, especially the femoral head and acetabulum areas. Traditional methods are inefficient and unstable, making it difficult to meet the needs of high-precision automated processing.

Method used

An improved nnUNet model is adopted to enhance the responsiveness to key anatomical structures by embedding a convolutional attention module (CBAM) in the skip connection, and Hausdorff distance loss (HD Loss) is used to optimize boundary accuracy, replacing the traditional loss function to improve boundary segmentation accuracy.

Benefits of technology

The segmentation accuracy and adaptability of complex anatomical structures in hip joint CT images are significantly improved, and the method can show stable segmentation performance on images with different resolutions and noise levels, providing accurate structural information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612337A_ABST
    Figure CN120612337A_ABST
Patent Text Reader

Abstract

The invention discloses a hip joint CT image segmentation method based on an improved nnUNet model, and the method comprises the steps: making a data set containing a hip joint CT image and a corresponding expert annotation segmentation mask through a public hip joint CT image data set, and carrying out the preprocessing of the data set, dividing the preprocessed data set to obtain a training set, a verification set and a test set; the training set is input into an improved nnUNet model for training, a model with the optimal performance is obtained, and improvement comprises the steps that a convolution attention module is introduced into jump connection between an encoder and a decoder, and meanwhile an original loss function is replaced with Hausdorff distance loss; and deploying the optimal model to a reasoning environment, reasoning the test image, and outputting a segmentation mask containing the thighbone and acetabulum structure. According to the method, the recognition capability of the complex structure area is improved while high precision is kept, and the method has good universality and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning and medical image processing, and in particular to a hip joint CT image segmentation method based on an improved nnUNet model. Background Art

[0002] In the field of medical image processing, structural segmentation of the hip joint region is fundamental for subsequent tasks such as image analysis, three-dimensional reconstruction, and decision support. This region contains multiple key bony structures such as the femoral head, acetabulum, and interspace, and has complex tissue morphology. Structural boundaries are often difficult to accurately identify due to image noise or image blur. Traditional segmentation methods that rely on manual manipulation are not only inefficient but also suffer from large human variability and poor stability, making it difficult to meet the actual demand for high-precision, automated processing of image structural information.

[0003] Deep learning-based image segmentation methods have made significant progress in recent years. nnUNet, in particular, has demonstrated excellent generalization performance across a variety of medical imaging tasks due to its adaptive preprocessing pipeline, versatile network architecture design, and optimized training strategies. However, directly applying nnUNet to the structural segmentation of hip joint images still faces challenges. Firstly, the region's structural boundaries are fuzzy, scales vary widely, and inter-channel information is insufficiently expressed, which can easily lead to insufficient feature representation. Secondly, traditional loss functions are limited in their sensitivity to boundary errors, making it difficult to accurately characterize the maximum deviation between the predicted mask and the true boundary, thus affecting the boundary accuracy of the segmentation results. Summary of the Invention

[0004] The purpose of this invention is to consider the complex anatomical structure and high precision requirements of hip joint CT image segmentation, and propose a hip joint CT image segmentation method based on the improved nnUNet model to solve the problem of complex anatomical structure segmentation and ensure the accuracy and generalization of segmentation.

[0005] To achieve the above objectives, the present invention provides a technical solution: a hip joint CT image segmentation method based on an improved nnUNet model, comprising the following steps:

[0006] S1: Use a publicly available hip CT dataset to create a dataset containing expert-annotated segmentation masks. Specifically, the dataset contains hip CT images and corresponding expert-annotated segmentation masks. Preprocess the dataset to obtain data with consistent spatial dimensions and intensity ranges. The dataset is then partitioned into training, validation, and test sets.

[0007] S2: The training set is input into the improved nnUNet model for training. The model parameters are continuously adjusted and updated using the SGD optimizer of the training set data set. The model is then verified using the validation set to obtain the model with the best performance. Among them, the improvements of the nnUNet model include: first, embedding the convolutional attention module (CBAM) in the skip connection between the encoder and decoder, and improving the model's responsiveness to key anatomical structures by explicitly modeling spatial and channel attention mechanisms; second, replacing the original combined loss function with the Hausdorff distance loss (HD Loss), which optimizes the maximum boundary deviation between the predicted mask and the true label based on boundary similarity, making it more suitable for bony structure segmentation tasks with clear anatomical boundaries;

[0008] S3: The best-performing model is deployed in an inference environment with model loading and image processing capabilities. The standardized test set is input to the model, which automatically performs inference tasks on the hip joint CT images in the test set and outputs a predicted segmentation mask that is consistent with the input image space. The mask represents the spatial position and contours of the femoral and acetabulum structures.

[0009] Furthermore, in step S1, the preparation, preprocessing and division of the data set includes the following steps:

[0010] S11: Images containing the complete structure of the hip joint are screened from a publicly available hip CT dataset. Medical experts perform pixel-level annotation of target regions in the images, including the femoral head and acetabulum. This yields a dataset containing hip CT images and corresponding expert-annotated segmentation masks.

[0011] S12: Perform image preprocessing operations on the constructed dataset, including interpolation resampling, size unification, and intensity normalization steps to ensure the consistency of the image and the mask in spatial dimension and intensity range, and obtain the preprocessed dataset;

[0012] S13: The preprocessed dataset is divided into a training set and a test set according to a set ratio, and a five-fold cross-validation strategy is used based on the training set to further divide the training set and validation set for model training and performance evaluation. The test set is used for independent verification of the final model performance.

[0013] Furthermore, in step S2, the preprocessed training set is input into the improved nnUNet model for training. During the training process, the SGD optimizer is used to continuously update the model parameters and optimize the model weights by minimizing the loss function. During the training, a validation set is set to periodically verify the model performance, and the model with the best performance on the validation set is selected as the final segmentation model.

[0014] CBAM consists of a channel attention submodule and a spatial attention submodule, which respectively weight the channel dimension and spatial dimension of the feature map to improve the model's responsiveness to key anatomical regions;

[0015] For the hip CT image segmentation task, the Hausdorff distance loss HDloss is set as the loss function of the model. The input data is the predicted segmentation result and the true label, which are represented as point set A and point set B respectively. A is the boundary point set of the segmentation result predicted by the model, and B is the boundary point set of the true label. The Hausdorff distance is used to measure the maximum distance between the predicted boundary and the true boundary. Its calculation formula is:

[0016]

[0017] Wherein, the point set of the segmentation result is A, the point set of the true label is B, a∈A is any point in set A, b∈B is any point in set B, ||ab|| is the Euclidean distance between point a and point b, HD(A,B) is the distance value calculated by the above Hausdorff distance formula, the maximum distance between the predicted boundary and the true boundary, min means that for each point a in point set A, find its nearest point to the point set B, that is, calculate the distance from point a to all points in B and select the smallest one, max means that in the entire point set A, select the farthest minimum distance;

[0018] Hausdorff distance loss HD Loss The calculation formula is:

[0019]

[0020] Where, HD Loss The smaller the value, the closer the segmented boundary is to the true boundary.

[0021] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0022] 1. The primary advantage of the present invention lies in its high-precision segmentation capability. By improving the nnUNet model structure and adopting a convolutional attention module (CBAM), the present invention can accurately segment complex anatomical structures in hip CT images, such as the femoral head, acetabulum, and joint space, significantly improving boundary segmentation accuracy.

[0023] 2. The present invention has excellent adaptability and generalization capabilities. Through data preprocessing, the improved nnUNet model can adapt to hip CT images of varying resolutions, contrast, and noise levels, demonstrating stable segmentation performance on diverse data. This adaptability enables the present invention to be widely applied in different scenarios, making it highly valuable for promotion.

[0024] In summary, the present invention introduces a convolutional attention module (CBAM) at the jump connection of nnUNet. By jointly modeling the attention weights of the channel and spatial dimensions, it guides the model to focus on key structural areas, effectively enhancing the feature fusion capability. At the same time, it introduces the Hausdorff distance loss (HD Loss) to replace the traditional loss, using boundary distance as the optimization target to improve the model's performance in structural boundary recognition. The present invention has strong boundary characterization and structural recognition capabilities and can be widely applied to the task of automatic segmentation of hip joint structure in large-scale image data, providing a stable and accurate structural information foundation for subsequent processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Flowchart for preprocessing a dataset containing hip CT images and corresponding expert-annotated segmentation masks.

[0026] Figure 2 Structural diagram for improving the nnUNet model. DETAILED DESCRIPTION

[0027] The present invention will be further described below with reference to specific embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0028] like Figure 1 and Figure 2 As shown, this embodiment discloses a hip joint CT image segmentation method based on an improved nnUNet model, using a deep learning algorithm, which includes the following steps:

[0029] A dataset containing expert-annotated segmentation masks is created using a publicly available hip CT dataset, i.e., the dataset includes hip CT images and corresponding expert-annotated segmentation masks. The dataset is preprocessed to obtain data with consistent spatial dimensions and intensity ranges, and then the dataset is divided into a training set, a validation set, and a test set. In this example, hip CT images of 100 patients are used, each containing 400 consecutive slices. The dataset is divided into a training set and a test set in a ratio of 9:1, and a five-fold cross-validation strategy is used based on the training set to further divide the dataset into a training set and a test set.

[0030] The steps for acquiring and annotating the dataset are as follows: Images containing the complete structure of the hip joint are screened from a publicly available and licensable hip CT dataset. Medical experts then perform pixel-level annotation of target areas in the images, including the femoral head and acetabulum.

[0031] The steps for preprocessing the dataset are: Figure 1As shown, the constructed dataset is subjected to image preprocessing operations, including interpolation resampling, size unification, and intensity normalization steps, to ensure consistency between the image and the mask in spatial dimension and intensity range, thereby obtaining a preprocessed dataset. In this embodiment, all images and corresponding labels are uniformly resampled to a voxel spacing of 0.7 mm × 0.7 mm × 1.0 mm to eliminate spatial resolution differences caused by different scanning devices; the image size is cropped or padded to 96 × 96 × 128 to meet the model input requirements; for the grayscale range of the CT image, the Z-score normalization method is used, that is, the grayscale value of each voxel is subtracted from the mean of the entire image and divided by the standard deviation to unify the image intensity distribution and enhance the model's adaptability to different images;

[0032] The steps of dividing the data set are as follows: the labeled data set is divided into a training set and a test set according to the preset ratio of 9:1, and the training set is further divided into a training set and a validation set using a 5-fold cross-validation strategy for model training and performance evaluation. The test set is used for final model evaluation.

[0033] The training set was input into the improved nnUNet model for training. The model parameters were continuously adjusted and updated using the SGD optimizer on the training set data set. The model was then validated using the validation set to obtain the optimal performance model. The improvements to the nnUNet model included: first, embedding a convolutional attention module (CBAM) in the skip connection between the encoder and decoder to enhance the model's responsiveness to key anatomical structures by explicitly modeling spatial and channel attention mechanisms; second, replacing the original combined loss function with the Hausdorff distance loss (HD Loss), which optimizes the maximum boundary deviation between the predicted mask and the true label based on boundary similarity, making it more suitable for bony structure segmentation tasks with clear anatomical boundaries.

[0034] The convolutional attention module sequentially includes a channel attention submodule and a spatial attention submodule for adaptively adjusting the channel weight and spatial weight of the feature map in the skip connection;

[0035] For the hip CT image segmentation task, the Hausdorff distance loss (HD loss) is set as the model's loss function. The input data is the predicted segmentation result and the true label, represented as point set A and point set B respectively. Among them, A is the boundary point set of the segmentation result predicted by the model, and B is the boundary point set of the true label. The Hausdorff distance is used to measure the maximum distance between the predicted boundary and the true boundary. Its calculation formula is:

[0036]

[0037] Wherein, the point set of the segmentation result is A, the point set of the true label is B, a∈A is any point in set A, b∈B is any point in set B, ||ab|| is the Euclidean distance between point a and point b, HD(A,B) is the distance value calculated by the above Hausdorff distance formula, the maximum distance between the predicted boundary and the true boundary, min means that for each point a in point set A, find the nearest point to it in point set B, that is, calculate the distance from point a to all points in B and select the smallest one, max means that in the entire point set A, select the farthest minimum distance.

[0038] Hausdorff distance loss HD Loss The calculation formula is:

[0039]

[0040] Where, HD Loss The smaller the value, the closer the segmented boundary is to the true boundary.

[0041] The optimal model is deployed in an inference environment equipped with model loading and image processing capabilities. A standardized test set is fed into the model, which then automatically performs inference on the hip CT images in the test set, outputting a predicted segmentation mask that is spatially consistent with the input image. This mask represents the spatial position and contours of the femur and acetabulum structures. In this example, a hip CT image is input and the inferred femur and acetabulum segmentation masks are generated.

[0042] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A hip joint CT image segmentation method based on an improved nnUNet model is characterized by: The following steps are involved: S1: Use a publicly available hip CT dataset to create a dataset containing expert-annotated segmentation masks. Specifically, the dataset contains hip CT images and corresponding expert-annotated segmentation masks. Preprocess the dataset to obtain data with consistent spatial dimensions and intensity ranges. The dataset is then partitioned into training, validation, and test sets. S2: The training set is input into the improved nnUNet model for training. The model parameters are continuously adjusted and updated using the SGD optimizer of the training set data set. The model is then verified using the validation set to obtain the model with the best performance. Among them, the improvements of the nnUNet model include: first, embedding the convolutional attention module (CBAM) in the skip connection between the encoder and decoder, and improving the model's responsiveness to key anatomical structures by explicitly modeling spatial and channel attention mechanisms; second, replacing the original combined loss function with the Hausdorff distance loss (HD Loss), which optimizes the maximum boundary deviation between the predicted mask and the true label based on boundary similarity, making it more suitable for bony structure segmentation tasks with clear anatomical boundaries; S3: The best-performing model is deployed in an inference environment with model loading and image processing capabilities. The standardized test set is input to the model, which automatically performs inference tasks on the hip joint CT images in the test set and outputs a predicted segmentation mask that is consistent with the input image space. The mask represents the spatial position and contours of the femoral and acetabulum structures.

2. The hip joint CT image segmentation method based on the improved nnUNet model according to claim 1 is characterized in that: In step S1, the preparation, preprocessing and partitioning of the data set includes the following steps: S11: Images containing the complete structure of the hip joint are screened from a publicly available hip CT dataset. Medical experts perform pixel-level annotation of target regions in the images, including the femoral head and acetabulum. This yields a dataset containing hip CT images and corresponding expert-annotated segmentation masks. S12: Perform image preprocessing operations on the constructed dataset, including interpolation resampling, size unification, and intensity normalization steps to ensure the consistency of the image and the mask in spatial dimension and intensity range, and obtain the preprocessed dataset; S13: The preprocessed dataset is divided into a training set and a test set according to a set ratio, and a five-fold cross-validation strategy is used based on the training set to further divide the training set and validation set for model training and performance evaluation. The test set is used for independent verification of the final model performance.

3. The hip joint CT image segmentation method based on the improved nnUNet model according to claim 1, characterized in that: In step S2, the preprocessed training set is input into the improved nnUNet model for training. During the training process, the SGD optimizer is used to continuously update the model parameters and optimize the model weights by minimizing the loss function. During training, a validation set is set to periodically verify the model performance, and the model with the best performance on the validation set is selected as the final segmentation model; CBAM consists of a channel attention submodule and a spatial attention submodule, which respectively weight the channel dimension and spatial dimension of the feature map to improve the model's responsiveness to key anatomical regions; For the hip CT image segmentation task, the Hausdorff distance loss HD loss is set as the loss function of the model. The input data is the predicted segmentation result and the true label, which are represented as point set A and point set B respectively. A is the boundary point set of the segmentation result predicted by the model, and B is the boundary point set of the true label. The Hausdorff distance is used to measure the maximum distance between the predicted boundary and the true boundary. Its calculation formula is: Wherein, the point set of the segmentation result is A, the point set of the true label is B, a∈A is any point in set A, b∈B is any point in set B, ||ab|| is the Euclidean distance between point a and point b, HD(A,B) is the distance value calculated by the above Hausdorff distance formula, the maximum distance between the predicted boundary and the true boundary, min means that for each point a in point set A, find its nearest point to the point set B, that is, calculate the distance from point a to all points in B and select the smallest one, max means that in the entire point set A, select the farthest minimum distance; Hausdorff distance loss HD Loss The calculation formula is: Where, HD Loss The smaller the value, the closer the segmented boundary is to the true boundary.

Citation Information

Cited By

  • Dental image segmentation method and device based on semi-supervised learning and nnU-Net

    CN121304702A

  • Airway path planning method and device based on laryngeal CT image and computer equipment

    CN121937681A

  • Airway pathway planning method, device, and computer equipment based on laryngeal CT images

    CN121937681B