A second to ninth rib cartilage segmentation deep learning model and a method for establishing and application thereof

By employing a two-stage cascaded architecture based on deep learning, and utilizing nnUNet and 3D TransUNet models to segment the costal cartilage, the problem of inaccurate segmentation of costal cartilage in CT images is solved, achieving high-precision costal cartilage segmentation and reconstruction, which is suitable for 3D printing and surgical design.

CN123160874APending Publication Date: 2026-11-24SHANGHAI NINTH PEOPLES HOSPITAL SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510671286.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In existing technologies, the CT values ​​of costal cartilage in CT images are similar to those of surrounding tissues, with large structural variations and blurred boundaries. This makes it impossible for traditional reconstruction methods to accurately segment and extract data labels, resulting in a lack of high-precision costal cartilage reconstruction techniques.

Method used

A two-stage cascaded architecture based on deep learning is adopted, including a coarse region localization module and a fine segmentation module. The nnUNet and 3D TransUNet models are used to segment the costal cartilage. Combined with data augmentation and loss function optimization, high-precision costal cartilage segmentation is achieved.

Benefits of technology

It achieves high-precision costal cartilage segmentation, accurately distinguishing each costal cartilage and obtaining its geometric parameters and calcification information, which is suitable for 3D printing and surgical design, improving the accuracy and operability of costal cartilage transplantation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160874A_ABST
    Figure CN123160874A_ABST
Patent Text Reader

Abstract

The application discloses a deep learning-based second to ninth rib cartilage segmentation deep learning model with data labels, and has the characteristics that the following steps are included: step 1, sample pretreatment; step 2, rib cartilage segmentation deep learning model establishment; the model adopts a two-stage cascade architecture, including a region coarse positioning module and a fine segmentation module; the model segments rib cartilage through mask classification; step 3, training and evaluation of the rib cartilage segmentation deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical imaging technology, and relates to a deep learning model for segmenting the 2nd to 9th rib cartilages based on deep learning and adapted for 3D printing, as well as its establishment method and application. Background Technology

[0002] Autologous rib cartilage transplantation is widely used in the repair and reconstruction of facial deformities such as auricle reconstruction, rhinoplasty and reconstruction, orbital reconstruction, and jawbone defects. CT is the most commonly used method for rib cartilage evaluation. CT can fully present the morphology of the rib cartilage and show the internal calcification, providing clinicians with precise structural information for designing surgeries such as auricle reconstruction.

[0003] However, the CT values ​​of costal cartilage are similar to those of surrounding tissues, exhibiting significant structural variability and blurred boundaries. Therefore, CT value-based segmentation methods are not highly accurate, and currently, there is a lack of accurate and effective costal cartilage reconstruction techniques. Furthermore, traditional reconstruction methods cannot extract data labels from the costal cartilage. Therefore, this invention utilizes deep learning to achieve a high-precision segmentation method for the 2nd to 9th costal cartilages. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a deep learning-based system and method for reconstructing the 2nd to 9th costal cartilages, solving the problems identified in the prior art. This invention is achieved through the following technical solutions:

[0005] This invention proposes a deep learning-based method for establishing a data-labeled deep learning model for segmenting the 2nd to 9th costal cartilages, comprising the following steps:

[0006] Step 1: Preprocess the sample;

[0007] Step 2: Establish a deep learning model for costal cartilage segmentation; the model adopts a two-stage cascaded architecture, including: a coarse region localization module and a fine segmentation module; the coarse region localization module performs coarse localization of the costal cartilage region and performs preliminary region division of the costal cartilage in the sample image; the fine segmentation module, based on the coarse localization results, transforms the costal cartilage segmentation problem into a mask classification problem and segments the costal cartilage.

[0008] Step 3: Train and evaluate the deep learning model for costal cartilage segmentation.

[0009] In this invention, the preprocessing in step 1 includes the following sub-steps:

[0010] Step 1.1: All acquired image data is extracted and converted to nii format;

[0011] Step 1.2: Normalize and resample all image data;

[0012] Step 1.3: Perform data augmentation to improve the generalization performance of the model, using methods including: random flipping, random brightness, contrast transformation flipping, resizing and / or normalization;

[0013] Step 1.4: Manually label the bilateral 2nd to 9th costal cartilages in all chest image data.

[0014] The sample does not have one or more of the following characteristics:

[0015] Chest CT scans may reveal rib fractures, bifurcation ribs, costal cartilage deformities, pneumothorax, hemothorax, empyema, significant inflammation, or obvious space-occupying lesions.

[0016] The costal cartilage was not fully visible on the chest CT scan;

[0017] Chest CT imaging of costal cartilage is affected by metal artifacts;

[0018] The middle layer of the chest CT scan is missing.

[0019] Chest CT slice thickness greater than 2mm.

[0020] In this invention, the region coarse localization module uses the nnUNet network to perform preliminary region division of the costal cartilage in CT images, and its training includes the following sub-steps:

[0021] Step 2.1: Divide the input image data into multiple image blocks with a voxel size of [96, 160, 128];

[0022] Step 2.2: Random patch training: During the training process, image patches are randomly selected for training;

[0023] Step 2.3: Use a sliding window strategy to predict the entire CT image.

[0024] The region coarse localization module adopts the default 3D U-Net structure of nnUNet as the basic architecture. This architecture includes an encoder and a decoder. The encoder is responsible for extracting image features, and the decoder is responsible for recovering the segmentation results from the features. The input of the region coarse localization module is preprocessed chest CT image data with a single channel, and the output is a two-channel segmentation result, which represents the probability maps of the background and costal cartilage regions, respectively.

[0025] The dataset used for training the region coarse localization module is the image dataset obtained and preprocessed in step 1, which is randomly divided into a training set and a validation set in a ratio of 8:2.

[0026] And / or,

[0027] The network employs the SGD optimizer to optimize module parameters, with an initial learning rate of 0.01 and a weight decay coefficient of 0.00003. A linear learning rate adjustment strategy is used to dynamically adjust the learning rate during training, accelerating module convergence and improving module performance. The module loss function is a weighted combination of cross-entropy loss and Dice loss, balancing segmentation accuracy and region overlap. The total number of training epochs is set to 400, and the batch size is set to 2. After each training epoch, image patches from the validation set are used to evaluate model performance. The moving average method is used to smooth the model's validation loss curve. The epoch model with the lowest moving average of the validation loss curve is selected as the final coarse localization model.

[0028] In this invention, the fine segmentation module uses a decoder-only 3D TransUNet model for fine segmentation, and its training includes the following sub-steps:

[0029] Step 2.4: Set the initial learning rate to 0.08, the weight decay coefficient to 0.00003, and train using the AdamW optimizer; train for 250 epochs; batch size is 2; loss function is a weighted combination of cross-entropy loss and Dice coefficient;

[0030] Step 2.4: Enhance the data using random rotation, Gaussian noise, and contrast enhancement methods;

[0031] Step 2.5: The ratio of training set to validation set is 8:2. The performance of the fine segmentation module on the validation set is optimized by the moving average method, and the model with the best performance is selected as the final model.

[0032] In step 2.5, the moving average method is used to smooth the model's validation loss curve to avoid overfitting or underfitting caused by fluctuations in a single validation, thereby selecting the most stable and accurate model.

[0033] The fine segmentation module's CNN encoder is used to extract multi-scale features from the input image, employing a UNet architecture. The Transformer decoder consists of 9 transformer blocks, each containing a cross-attention layer, a self-attention layer, and a linear layer. The module input is the cropping of single-channel CT image data into the coarse localization region of the costal cartilage according to the steps. The module output is a 17-channel segmentation result, representing the background and the mask probability maps of the left and right 2nd to 9th costal cartilages, respectively.

[0034] In this invention, in step 3, all manually annotated image data are divided into training and testing sets in an 8:2 ratio; during model training, cross-entropy loss function and Dice loss function are selected as the main loss functions; at the same time, Dice coefficient and accuracy are used as evaluation indicators to comprehensively measure the segmentation effect of the model.

[0035] Based on the above methods, this invention also proposes a deep learning model for costal cartilage segmentation established by the aforementioned methods, and its application in the reconstruction of the 2nd to 9th costal cartilages.

[0036] Based on the above methods, this invention also proposes a deep learning-based data-labeled 3D printing system for the reconstruction of the 2nd to 9th costal cartilages, the system comprising:

[0037] The input unit includes receiving and preprocessing chest CT image data;

[0038] The analysis and reconstruction unit performs the segmentation and reconstruction tasks of the costal cartilage using the costal cartilage segmentation deep learning model as described in claim 9.

[0039] The output unit is responsible for converting the output of the analysis and reconstruction unit into a format that is easy to understand and use.

[0040] The system proposed in this invention further includes:

[0041] A 3D adaptation unit that uses the results of segmentation and reconstruction to provide users with 3D views and interactive tools;

[0042] And / or,

[0043] An integration unit is used to interface with an image storage and transmission system to upload CT image data and obtain rapid segmentation and reconstruction results.

[0044] Based on the above methods, this invention proposes a deep learning-based method for reconstructing the 2nd to 9th costal cartilages with data labels and adapted for 3D printing, comprising the following steps:

[0045] Step 1: After acquiring chest CT image data, the image data is first preprocessed;

[0046] Step 2: Perform the segmentation and reconstruction of the costal cartilage using the deep learning model for costal cartilage segmentation as described in claim 11;

[0047] Step 3: Convert the output of the analysis and reconstruction unit into an easy-to-understand and use format.

[0048] In step two, after obtaining the reconstruction information of the costal cartilage, 187.5 HU is used as the division threshold. The part of the costal cartilage above 187.5 HU is divided into calcified parts, and the part below 187.5 HU is divided into normal parts of the costal cartilage.

[0049] In step three, the segmentation results are converted into a visualization format, including images and videos, and related reports or suggestions are generated; at the same time, information reports on the relevant costal cartilages are output, including geometric information and calcification-related information for each costal cartilage.

[0050] Step 4: Utilize the results of segmentation and reconstruction to provide 3D views and interactive tools; combine with 3D modeling software or virtual reality technology to view the structure of the costal cartilage from different angles and levels; also provide surgical planning and simulation, preoperative assessment and postoperative follow-up.

[0051] Step 5: Upload CT image data through an automated workflow, obtain rapid segmentation and reconstruction results, and integrate them into the electronic medical record.

[0052] In this invention, autologous rib cartilage transplantation for plastic surgery typically selects the 6th, 7th, and 8th rib cartilages. This is because harvesting anterior rib cartilages may affect the supporting structure of the thoracic cavity, thus adversely impacting the patient's health; while the posterior 9th and 10th rib cartilages are too small to meet the material requirements for sculpting. However, due to the similarity in morphology among rib cartilages, and the potential for variations in rib cartilage morphology in different patients (for example, the 9th rib cartilage in some patients may resemble the 8th, or the 8th rib cartilage may connect to the sternum, resulting in an anatomical difference from normal anatomy), directly locating and segmenting the 6th, 7th, and 8th rib cartilages is extremely challenging.

[0053] On the other hand, the second costal cartilage usually has a relatively clear location, generally situated at the junction of the manubrium and body of the sternum, providing a good anatomical basis for localization. Therefore, by segmenting the second to ninth costal cartilages, this invention enables precise localization of the sixth, seventh, and eighth costal cartilages at the anatomical level, thereby improving the accuracy and operability of costal cartilage transplantation surgery.

[0054] The deep learning-based method for reconstructing the 2nd to 9th costal cartilages using data labels and adapted for 3D printing proposed in this invention has the following beneficial effects:

[0055] 1. High-precision reconstruction: Deep learning-based methods enable high-precision segmentation of the costal cartilage region in chest CT scans. Utilizing 3D TransUNet, the pixel-by-pixel segmentation problem is transformed into a mask classification problem, improving the overall segmentation performance of the costal cartilage. This means that reconstructing the 2nd to 9th costal cartilages using this method can yield structures very close to the original costal cartilage, which is crucial for subsequent 3D printing and surgical applications.

[0056] 2. Data Labeling: The three-dimensional reconstruction results of costal cartilage obtained in this invention can distinguish each costal cartilage (e.g., the 6th costal cartilage on the left, the 7th costal cartilage on the left). Furthermore, this invention can obtain the CT value and voxel size of each voxel in the costal cartilage region in CT scans, and then calculate the corresponding costal cartilage's volume, length along the long axis, average cross-sectional area, and other geometric parameters, as well as the average CT value, average CT value of the calcified portion, and calcification-related parameters such as the calcification percentage.

[0057] 3. Adaptable to 3D printing: Since it can extract the data tags of the corresponding rib cartilage, this invention can directly generate a corresponding STL file format 3D model of rib cartilage using the input chest CT data. This model can be directly used to 3D print a solid model of rib cartilage, which facilitates the design of rib cartilage transplantation-related surgeries. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a schematic diagram of the 3D TransUnet neural network structure of the present invention.

[0060] Figure 2 This is a schematic diagram of the nnUNet neural network structure of the present invention.

[0061] Figure 3 This is a schematic diagram of the three-dimensional structure of the costal cartilage obtained from the three-dimensional reconstruction model of this invention.

[0062] Figure 4 This is a schematic diagram of the three-dimensional structure of the costal cartilage, which distinguishes between the normal and calcified portions.

[0063] Figure 5 This is a schematic diagram of the interactive interface of the present invention.

[0064] Figure 6 This is a schematic diagram of the application structure of the model of the present invention.

[0065] Figure 7 This is a specific implementation example of the application of the model of the present invention. Detailed Implementation

[0066] The invention will be further described in detail below with reference to the specific embodiments and accompanying drawings. Except for the contents specifically mentioned below, the processes, conditions, and experimental methods for implementing the invention are all common knowledge and general knowledge in the art, and the invention does not have any particular limitations.

[0067] This invention proposes a deep learning-based method for segmenting the 2nd to 9th costal cartilages in chest CT scans, comprising the following steps:

[0068] 1. Sample preprocessing

[0069] 1.1) All acquired DICOM image data were extracted and converted to nii format.

[0070] 1.2) Normalize and resample all images.

[0071] 1.3) Perform data augmentation to improve the generalization performance of the model, using methods including random flipping, random brightness, contrast transformation flipping, resizing, and normalization.

[0072] 1.4) The bilateral 2nd to 9th costal cartilages were manually labeled in all chest CT image data.

[0073] 2. Construction and training of the costal cartilage segmentation model

[0074] This invention proposes a deep learning model for costal cartilage segmentation, employing a two-stage cascaded architecture: a coarse region localization stage and a fine segmentation stage. This two-stage architecture transforms the traditional pixel-level segmentation problem into a mask classification problem, thereby better preserving the integrity of the costal cartilage, especially in complex CT images, reducing costal cartilage structural fractures caused by pixel-level errors. The first stage uses nnUNet for coarse localization of the costal cartilage region, providing high-quality input for the fine segmentation in the second stage and significantly reducing computational resource consumption. The second stage uses a decoder-only 3D TransUNet model, combining the advantages of CNN and Transformer to more accurately capture the spatial structure and global contextual information of the costal cartilage.

[0075] 2.1) Coarse localization model of costal cartilage

[0076] nnUNet is an adaptive deep learning segmentation framework that can automatically configure the network structure and training parameters according to the characteristics of the dataset, and has good generalization and segmentation performance.

[0077] The main task of the first stage is to perform coarse localization of the costal cartilage region, using the nnUNet network to perform preliminary region segmentation of the costal cartilage in the CT images. The specific steps are as follows:

[0078] Input processing:

[0079] ● Divide the input CT image into multiple image patches with a voxel size of [96, 160, 128].

[0080] ● The image patch size was chosen considering both the spatial resolution of CT images and the complexity of the costal cartilage region. This size allows the model to effectively learn local features of the costal cartilage region while avoiding the waste of computational resources caused by excessively large input image patches, thus balancing memory usage and training efficiency.

[0081] Training strategy:

[0082] ● Random patch training: During training, patches are randomly selected from the input CT images for training. This training method helps the model extract effective features from local information, enhancing the model's generalization ability.

[0083] Test method:

[0084] ● During the testing phase, a sliding window strategy was used to predict the entire CT image. This method allows for progressive scanning of the CT image, yielding more refined prediction results and effectively avoiding memory overload.

[0085] 2.2) Fine division of costal cartilage

[0086] Based on the coarse localization results of the first stage, the plane (coronal plane) where the costal cartilage is predicted to be present is extracted, and a more refined prediction is made on this basis.

[0087] The second stage uses a decoder-only 3D TransUNet model for fine segmentation. This model transforms the costal cartilage segmentation problem into a mask classification problem, thus more accurately preserving the overall structure of each costal cartilage. Specific technical features are as follows:

[0088] Mask classification: The segmentation task is treated as a mask classification problem, rather than pixel-level segmentation. Each costal cartilage is treated as a whole mask for classification, which can better preserve the integrity of the costal cartilage.

[0089] Combining CNN and Transformer: This model combines the local feature extraction capabilities of CNNs with the global context modeling capabilities of Transformers, further improving segmentation accuracy. CNNs can effectively extract local features from images, especially the boundary and shape information of the costal cartilage. Transformers can handle the global spatial relationships of the costal cartilage in the entire CT image, ensuring the integrity and accuracy of the segmented costal cartilage. In each decoding layer, the model fuses the multi-scale features extracted by CNNs with the global features of Transformers through a cross-attention mechanism, enabling the decoder to progressively optimize the mask prediction of the costal cartilage in each layer.

[0090] Training settings:

[0091] Learning rate: The initial learning rate is 0.08, and the AdamW optimizer is used for training.

[0092] Training epochs: The model was trained for 250 epochs.

[0093] Batch size: 2.

[0094] Loss function: The loss function is a weighted combination of cross-entropy loss (CE) and Dice coefficient, which balances the segmentation accuracy and the processing of background regions.

[0095] Data augmentation: Methods such as random rotation, Gaussian noise, and contrast enhancement are employed.

[0096] Verification method:

[0097] The ratio of training set to validation set is 8:2. The model's performance on the validation set is optimized using the moving average method, and the model with the best performance is selected as the final model. At the same time, the moving average method is used to smooth the model's validation loss curve to avoid overfitting or underfitting problems caused by fluctuations in a single validation, thereby selecting the most stable and accurate model.

[0098] 2.3) Model Training and Evaluation

[0099] All data with completed costal cartilage labeling were divided into training and test sets in an 8:2 ratio. During model training, cross-entropy loss and Dice loss were selected as the primary loss functions to evaluate model performance. Simultaneously, the Dice coefficient and precision were used as evaluation metrics to comprehensively measure the model's segmentation effectiveness.

[0100] 3. Model Application Mode

[0101] The main body of the model includes input units, analysis and reconstruction units, output units, 3D adaptation units, and integration units.

[0102] The input unit includes receiving and preprocessing chest CT image data. After acquiring the chest CT data, the model first performs necessary preprocessing, including but not limited to noise reduction, contrast enhancement, and size normalization, to ensure the quality of the input data. This preprocessing step is crucial for improving the model's accuracy and robustness.

[0103] The analysis and reconstruction unit is the core of the model, responsible for performing the segmentation and reconstruction of the costal cartilage. This unit first uses the coarse localization model described in Section 2.1 to perform preliminary localization of the ribs and costal cartilage regions. Then, it uses the fine segmentation model described in Section 2.2 to precisely segment each rib and cartilage. Furthermore, after obtaining the reconstructed information of the costal cartilage, a segmentation threshold of 187.5 HU is used. The portion of the costal cartilage above 187.5 HU is classified as calcified, while the portion below 187.5 HU is classified as normal.

[0104] The output unit is responsible for converting the output of the analysis and reconstruction unit into an easily understandable and usable format. This may include converting segmentation results into images, videos, or other visualization formats, as well as generating relevant diagnostic reports or clinical recommendations. It also outputs information reports related to the costal cartilage, including geometric information (length along the long axis, average cross-sectional area, and volume) and calcification-related information (average CT value, average CT value of the calcified portion and the percentage of calcified portion, and the percentage of calcification in the anterior, middle, and posterior thirds of the costal cartilage).

[0105] The 3D adaptor is an advanced feature of the model that utilizes the results of segmentation and reconstruction to provide users with a 3D view and interactive tools. This unit can be integrated with existing 3D modeling software or virtual reality (VR) technology, allowing physicians and researchers to view the structure of the costal cartilage from different angles and levels, thereby gaining a better understanding of its morphology and positional relationships. The 3D adaptor can also support surgical planning and simulation, providing more accurate preoperative assessments and postoperative follow-up.

[0106] To enable effective application of the model in clinical settings, it also includes an integration unit that allows seamless integration with hospital image storage and transmission systems (PACS). Through an automated workflow, physicians can easily upload CT image data, obtain rapid segmentation and reconstruction results, and integrate them into patients' electronic medical records. Furthermore, the model provides a user-friendly interface, allowing even non-specialist users to operate it easily.

[0107] Example 1: Establishment of a Deep Learning Model for Costal Cartilage Segmentation

[0108] This embodiment describes the process of establishing a specific deep learning model for segmenting the 2nd to 9th costal cartilages, including the following steps:

[0109] Step 1, Acquisition and preprocessing of chest CT image source data:

[0110] The chest CT images used in this embodiment for developing the rib cartilage segmentation model were obtained from the Department of Plastic and Reconstructive Surgery, Ninth People's Hospital, affiliated with Shanghai Jiao Tong University School of Medicine. The data consisted of thin-slice CT scans from patients aged 6-35 years, and inclusion criteria included the following exclusion criteria:

[0111] ① Chest CT may show rib fractures, bifurcation ribs, costal cartilage deformities, pneumothorax, hemothorax, empyema, obvious inflammation, or obvious space-occupying lesions;

[0112] ② The costal cartilage is not fully visualized on chest CT scan;

[0113] ③ Chest CT costal cartilage imaging is affected by metal artifacts;

[0114] ④ The middle layer of the chest CT scan is missing;

[0115] ⑤ Chest CT slice thickness greater than 2mm.

[0116] After screening and exclusion, a total of 4012 cases were identified.

[0117] All acquired DICOM image data were extracted and converted to nii format.

[0118] Step 1.1: Normalize and resample all image data.

[0119] Step 1.2: Perform data augmentation to improve the generalization performance of the model, using methods including random flipping, random brightness, contrast transformation flipping, resizing, and normalization.

[0120] Step 1.3: Manually label the bilateral 2nd to 9th costal cartilages in all chest CT image data.

[0121] Step 2: Construction and training of the costal cartilage segmentation model, which includes:

[0122] Step 2.1: Construction, training, and validation of a coarse localization model of the costal cartilage;

[0123] Step 2.1.2 Construction of the coarse localization model:

[0124] In this embodiment, the coarse localization model of the costal cartilage is constructed using the nnUNet network framework.

[0125] Network Architecture: The default 3D U-Net structure of nnUNet is adopted as the basic architecture of the coarse localization model. This architecture consists of two parts: an encoder and a decoder. The encoder is responsible for extracting image features, and the decoder is responsible for recovering the segmentation results from the features. The model input is preprocessed chest CT image data in a single channel. The model output is a two-channel segmentation result, representing the probability maps of the background and costal cartilage regions, respectively.

[0126] Step 2.1.2 Training of the coarse localization model

[0127] Dataset partitioning: The CT image dataset obtained and preprocessed in step 1 is randomly divided into training set and validation set in a ratio of 8:2.

[0128] Model training: The input CT image is divided into image patches of size [96, 160, 128] and fed into the network for training. To improve the robustness and generalization ability of the model, data augmentation techniques are used during training, including random rotation, Gaussian noise, random contrast enhancement, and Gaussian blur.

[0129] The network uses the SGD optimizer to optimize model parameters, with an initial learning rate of 0.01 and a weight decay coefficient of 0.00003. A linear learning rate adjustment strategy is employed, dynamically adjusting the learning rate during training to accelerate model convergence and improve model performance. The model's loss function is a weighted combination of Cross-Entropy Loss and Dice Loss, balancing segmentation accuracy and region overlap. The total number of training epochs is set to 400. The batch size is set to 2. Model training is performed on a single NVIDIA GeForce RTX 3090 GPU.

[0130] Step 2.1.3 Validation of the coarse localization model

[0131] After each training epoch, model performance is evaluated using image patches from the validation set. A moving average method is used to smooth the model's validation loss curve. The model from the 357th epoch with the lowest moving average of the validation loss curve is selected as the final coarse localization model.

[0132] Step 2.2: Construction, training, and validation of a fine segmentation model for the costal cartilage;

[0133] Step 2.2.1 Construction of the fine segmentation model

[0134] In this embodiment, the fine segmentation model of the rib cartilage is constructed using a decoder-only 3D TransUNet model.

[0135] Network Architecture: A decoder-only 3D TransUNet model is used, with its CNN encoder extracting multi-scale features from the input image using a UNet architecture. Transformer Decoder: Composed of 9 transformer blocks, each containing a cross-attention layer, a self-attention layer, and a linear layer. Model input consists of single-channel CT image data cropped according to the coarse localization region of the costal cartilage output in step 2.1. Model output is a 17-channel segmentation result, representing the background and the mask probability maps of the left and right 2nd to 9th costal cartilages.

[0136] Step 2.2.2 Training of the fine segmentation model

[0137] Using the coarse localization model trained in step 2.1, coarse localization of the costal cartilage region is performed on the CT images in the training and validation sets. Based on the coarse localization results, the CT images of the costal cartilage region are cropped as training data for the fine segmentation model. The cropped CT images of the costal cartilage region are then divided into image blocks of size [96, 160, 128].

[0138] Model Training: The segmentation task was treated as a mask classification problem, rather than pixel-level segmentation. Each rib cartilage was treated as a whole mask for classification. The AdamW optimizer was used to optimize model parameters, with an initial learning rate of 0.08 and a weight decay coefficient of 0.00003. A warm-start cosine annealing strategy was used to dynamically adjust the learning rate. A weighted combination of cross-entropy loss and Dice loss was used to balance segmentation accuracy with background region handling. The total number of training epochs was set to 250. The batch size was set to 2. The same data augmentation methods as the coarse localization model were used, including random rotation, Gaussian noise, and contrast enhancement. Model training was completed on an NVIDIA GeForce RTX 3090 GPU.

[0139] Step 2.2.3 Validation of the fine segmentation model

[0140] Similar to coarse segmentation, the moving average method is used to smooth the model's validation loss curve, and the model with the lowest moving average of the validation loss curve in the 113th epoch is selected as the final fine segmentation model.

[0141] Example 2: Reconstruction system for the 2nd to 9th costal cartilages based on a deep learning model for costal cartilage segmentation

[0142] This embodiment describes the actual workflow of the model established in Embodiment 1, including the following processes:

[0143] 1. Input CT image: Input a patient's chest CT image, such as... Figure 3 As shown in the image, the CT image clearly shows the cartilage structures of the 2nd to 9th costal ribs.

[0144] 2. Data preprocessing: The image first enters the input unit for basic preprocessing, and the image pixel size is adjusted.

[0145] 3. Coarse localization prediction: The image is divided into blocks using a sliding window method, and the blocks are input into the network to obtain the approximate area of ​​the costal cartilage.

[0146] 4. Fine-grained segmentation prediction: Based on the coarse localization results, the costal cartilage region is cropped out. The image patch is then input into the fine-grained segmentation model using a sliding window approach for precise segmentation. The model accurately segments precise masks for the 2nd to 9th costal cartilages.

[0147] 5. 3D Reconstruction and Visualization: Based on the fine segmentation results, precise masks of the 2nd to 9th costal cartilages are fused to reconstruct 3D models of the 2nd to 9th costal cartilages, which are then overlaid on the original CT images. Doctors can observe the 3D structure of the costal cartilages from multiple angles through rotation, zoom, and other operations.

[0148] Example 3: Extended Functionality

[0149] like Figure 7 As shown, the invention first obtains the segmentation results of the bilateral 2nd to 9th costal cartilages, and extracts the data labels for each voxel to obtain the corresponding 3D reconstruction model. Then, based on the data labels, the geometric and calcification properties of the costal cartilage are analyzed, a relevant costal cartilage analysis report is generated, and 3D printing adaptation is performed. The 3D reconstruction results are output in STL file format for subsequent 3D printing.

[0150] The scope of protection of this invention is not limited to the above embodiments. Any variations and advantages that can be conceived by those skilled in the art without departing from the spirit and scope of the inventive concept are included in this invention and are protected by the appended claims.

Claims

1. A method for establishing a deep learning-based deep learning model for segmenting the 2nd to 9th costal cartilages with data labels, characterized in that, Includes the following steps: Step 1: Preprocess the sample; Step 2: Establish a deep learning model for costal cartilage segmentation; The model adopts a two-stage cascaded architecture, including a region coarse localization module and a fine segmentation module. The region coarse localization module performs coarse localization of the costal cartilage region and performs preliminary region division of the costal cartilage in the sample image. Based on the coarse localization results, the fine segmentation module transforms the costal cartilage segmentation problem into a mask classification problem and segments the costal cartilage. Step 3: Train and evaluate the deep learning model for costal cartilage segmentation.

2. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 1, characterized in that, The preprocessing in step 1 includes the following sub-steps: Step 1.1: All acquired image data is extracted and converted to nii format; Step 1.2: Normalize and resample all image data; Step 1.3: Perform data augmentation to improve the generalization performance of the model, using methods including: random flipping, random brightness, contrast transformation flipping, resizing and / or normalization; Step 1.4: Manually label the bilateral 2nd to 9th costal cartilages in all chest image data.

3. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 1, characterized in that, The sample does not have one or more of the following characteristics: Chest CT scans may reveal rib fractures, bifurcation ribs, costal cartilage deformities, pneumothorax, hemothorax, empyema, significant inflammation, or obvious space-occupying lesions. The costal cartilage was not fully visible on the chest CT scan; Chest CT imaging of costal cartilage is affected by metal artifacts; The middle layer of the chest CT scan is missing. Chest CT slice thickness greater than 2mm.

4. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 1, characterized in that, The coarse region localization module uses the nnUNet network to perform preliminary region segmentation of the costal cartilage in CT images. Its training includes the following sub-steps: Step 2.1: Divide the input image data into multiple image blocks with a voxel size of [96, 160, 128]; Step 2.2: Random patch training: During the training process, image patches are randomly selected for training; Step 2.3: Use a sliding window strategy to predict the entire CT image.

5. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 4, characterized in that, The region coarse localization module adopts the default 3D U-Net structure of nnUNet as the basic architecture. This architecture includes an encoder and a decoder. The encoder is responsible for extracting image features, and the decoder is responsible for recovering the segmentation results from the features. The input of the region coarse localization module is preprocessed chest CT image data with a single channel, and the output is a two-channel segmentation result, which represents the probability maps of the background and costal cartilage regions, respectively.

6. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 4, characterized in that, The dataset used to train the region coarse localization module is the image dataset obtained and preprocessed in step 1, which is randomly divided into a training set and a validation set in a ratio of 8:

2. And / or, The network employs the SGD optimizer to optimize module parameters, with an initial learning rate of 0.01 and a weight decay coefficient of 0.00003. A linear learning rate adjustment strategy is used to dynamically adjust the learning rate during training, accelerating module convergence and improving module performance. The module loss function is a weighted combination of cross-entropy loss and Dice loss, balancing segmentation accuracy and region overlap. The total number of training epochs is set to 400, and the batch size is set to 2. After each training epoch, image patches from the validation set are used to evaluate model performance. The moving average method is used to smooth the model's validation loss curve. The epoch model with the lowest moving average of the validation loss curve is selected as the final coarse localization model.

7. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 1, characterized in that, The fine segmentation module uses a decoder-only 3D TransUNet model for fine segmentation, and its training includes the following sub-steps: Step 2.4: Set the initial learning rate to 0.08, the weight decay coefficient to 0.00003, and train using the AdamW optimizer; train for 250 epochs; batch size is 2; loss function is a weighted combination of cross-entropy loss and Dice coefficient; Step 2.4: Enhance the data using random rotation, Gaussian noise, and contrast enhancement methods; Step 2.5: The ratio of training set to validation set is 8:

2. The performance of the fine segmentation module on the validation set is optimized by the moving average method, and the model with the best performance is selected as the final model.

8. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 7, characterized in that, Step 2.5 simultaneously employs a moving average method to smooth the model's validation loss curve, avoiding overfitting or underfitting issues caused by fluctuations in a single validation, thereby selecting the most stable and accurate model.

9. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 7, characterized in that, The fine segmentation module's CNN encoder is used to extract multi-scale features from the input image, employing a UNet architecture; the Transformer decoder consists of 9 Transformer blocks, each containing a cross-attention layer, a self-attention layer, and a linear layer; the module input is the cropping of single-channel CT image data into the coarse localization region of the costal cartilage according to the steps; the module output is a 17-channel segmentation result, representing the background and the mask probability maps of the left and right 2nd to 9th costal cartilages, respectively.

10. The method for establishing a deep learning model for rib cartilage segmentation as described in claim 1, characterized in that, In step 3, all manually annotated image data are divided into training and testing sets in an 8:2 ratio. During model training, cross-entropy loss function and Dice loss function are selected as the main loss functions. At the same time, Dice coefficient and accuracy are used as evaluation indicators to comprehensively measure the segmentation effect of the model.

11. A deep learning model for rib cartilage segmentation established by the method of any one of claims 1-10.

12. The application of the deep learning model for costal cartilage segmentation as described in claim 11 in the reconstruction of the 2nd to 9th costal cartilages.

13. A deep learning-based, data-labeled system adapted for 3D printing for the reconstruction of the 2nd to 9th costal cartilages, characterized in that... The system includes: The input unit includes receiving and preprocessing chest CT image data; The analysis and reconstruction unit performs the segmentation and reconstruction tasks of the costal cartilage using the costal cartilage segmentation deep learning model as described in claim 9. The output unit is responsible for converting the output of the analysis and reconstruction unit into a format that is easy to understand and use.

14. The system as described in claim 13, characterized in that, The system further includes: A 3D adaptation unit that uses the results of segmentation and reconstruction to provide users with 3D views and interactive tools; And / or, An integration unit is used to interface with an image storage and transmission system to upload CT image data and obtain rapid segmentation and reconstruction results.

15. A deep learning-based method for reconstructing the 2nd to 9th costal cartilages with data labels and adapted for 3D printing, characterized in that... Includes the following steps: Step 1: After acquiring chest CT image data, the image data is first preprocessed; Step 2: Perform the segmentation and reconstruction of the costal cartilage using the deep learning model for costal cartilage segmentation as described in claim 11; Step 3: Convert the output of the analysis and reconstruction unit into an easy-to-understand and use format.

16. The method as described in claim 15, characterized in that, In step two, after obtaining the reconstruction information of the costal cartilage, 187.5 HU is used as the division threshold. The part of the costal cartilage above 187.5 HU is divided into calcified parts, and the part below 187.5 HU is divided into normal parts of the costal cartilage.

17. The method as described in claim 15, characterized in that, In step three, the segmentation results are converted into a visualization format, including images and videos, and related reports or suggestions are generated; at the same time, information reports on the relevant costal cartilages are output, including geometric information and calcification-related information for each costal cartilage.

18. The method as described in claim 15, characterized in that, The method further includes: Step 4: Utilize the results of segmentation and reconstruction to provide 3D views and interactive tools; combine with 3D modeling software or virtual reality technology to view the structure of the costal cartilage from different angles and levels; also provide surgical planning and simulation, preoperative assessment and postoperative follow-up.

19. The method as described in claim 15, characterized in that, The method further includes: Step 5: Upload CT image data through an automated workflow, obtain rapid segmentation and reconstruction results, and integrate them into the electronic medical record.