A method for predicting lumbar spine x-ray t-score and classifying osteoporosis
Patent Information
- Application Number
- CN202610980092.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-10-30
AI Technical Summary
[0018]如上所述,本发明的一种腰椎X光T值预测及骨质疏松分级方法,具有以下有益效果:本发明以腰椎L1~L4椎体为最小分析单元,通过掩码分割、ROI裁剪和归一化预处理精确提取目标区域,结合多任务神经网络结构同时执行T值回归与骨质疏松分类任务,并通过从回归输出生成伪标签构建一致性损失,实现分类与回归分支间的协同优化;此外,模型训练过程中采用患者级分层的交叉验证策略,确保同一患者的多椎体样本不会同时出现在训练集和验证集中,有效避免数据泄漏问题,显著提升模型的泛化性能和临床可靠性;所以本发明针对腰椎影像中骨组织结构复杂、影像信噪比低及样本分布不均等问题,通过精确的椎体掩码提取与多任务协同学习机制,使模型能够同时捕捉椎体的细粒度纹理特征和连续骨密度变化规律,从而显著提升T值预测的准确性和骨质疏松分级的稳定性。
Smart Images

Figure CN123015378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent analysis of medical images and clinical auxiliary diagnosis technology, and in particular to a method for predicting lumbar spine X-ray T-scores and grading osteoporosis. Background Technology
[0002] Osteoporosis is a metabolic bone disease characterized by decreased bone mass and deterioration of bone microstructure. Its main clinical harm is a significantly increased risk of fractures, especially vertebral and femoral neck fractures, which seriously impacts the quality of life of the elderly and the social healthcare system. Clinically, dual-energy X-ray absorptiometry (DXA) is the gold standard for bone mineral density measurement, providing bone mineral density values and corresponding T values for sites such as the lumbar spine and femur, with T ≤ -2.5 used as the diagnostic criterion for osteoporosis. However, DXA equipment is expensive, the testing process is complex, and its adoption rate in primary healthcare institutions is low. In contrast, lumbar spine anteroposterior X-rays are extremely common in physical examinations, trauma, and spinal disease diagnosis, offering advantages such as convenient acquisition, low cost, and abundant data accumulation. If it were possible to predict T values consistent with DXA based on ordinary X-ray images and complete osteoporosis grading, it would provide an efficient auxiliary approach for early screening and follow-up of osteoporosis.
[0003] In existing technologies, researchers have attempted to directly identify osteoporosis grades from X-ray images using convolutional neural networks (CNNs) or attention mechanisms, but several limitations remain. First, most existing methods use the entire X-ray image as input, without precise segmentation of the L1-L4 vertebrae, making the model highly susceptible to non-bone structures and background noise. Second, most models only output discrete classification results, failing to provide continuous T-score predictions and lacking direct correspondence with DXA data. Furthermore, X-ray data exhibits significant class imbalance, with far fewer osteoporosis samples than normal samples, making single-class classification tasks prone to low recall, overfitting, or insufficient minority class recognition. Moreover, the mixing of multiple vertebral images from different patients in the training and validation sets can easily lead to inflated model evaluations and insufficient generalization ability. In summary, existing X-ray image analysis methods still have significant shortcomings in terms of accuracy, interpretability, and clinical applicability. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a method for predicting lumbar spine X-ray T-scores and grading osteoporosis, in order to solve the problem that existing X-ray image analysis methods still have significant deficiencies in terms of accuracy, interpretability and clinical applicability.
[0005] To achieve the above and other related objectives, the present invention provides the following technical solution:
[0006] A method for predicting lumbar spine X-ray T-scores and grading osteoporosis includes the following steps: acquiring lumbar spine anteroposterior X-ray images of several patients, and cropping vertebral ROI sub-images from the lumbar spine anteroposterior X-ray images of several patients according to pre-labeled and segmented vertebral body mask images; obtaining T-scores corresponding to each vertebral body as regression labels according to the DXA report of dual-energy X-ray absorptiometry, and converting the T-scores into binary classification labels based on a preset threshold to construct a training label set; constructing a multi-task deep learning model including a shared backbone feature extraction network, a classification head, and a regression head; wherein, the classification head is used to output the classification probability of osteoporosis, and the regression head is used to output the predicted T-scores of the vertebral bodies;
[0007] The constructed multi-task deep learning model is trained using a training label set, and the trained multi-task deep learning model is obtained based on the training results; the lumbar spine anteroposterior X-ray image of the patient to be predicted is obtained, the vertebral body ROI sub-image is cropped from the lumbar spine anteroposterior X-ray image of the patient to be predicted, and the vertebral body ROI image to be predicted is input into the trained model, thereby obtaining the T-value prediction result and the probability of osteoporosis. The final classification can also be performed according to the preset threshold based on the T-value prediction result.
[0008] In one embodiment of the present invention, the step of acquiring lumbar spine anteroposterior X-ray images of several patients and cropping vertebral ROI sub-images from the lumbar spine anteroposterior X-ray images of several patients according to the pre-labeled segmented vertebral body mask images includes: acquiring lumbar spine anteroposterior X-ray images of several patients and preprocessing the lumbar spine anteroposterior X-ray images of several patients, wherein the preprocessing includes normalization processing of window width, window level and depth;
[0009] The mask images of the L1 to L4 vertebrae were segmented from the preprocessed lumbar spine anteroposterior X-ray images by manual annotation; the lumbar spine anteroposterior X-ray images of several patients were superimposed with the mask images of each vertebra, and the minimum bounding rectangle region of each vertebra was determined and pixel expanded to crop out the vertebral ROI sub-image.
[0010] In one embodiment of the present invention, in the masked image segmented from the preprocessed lumbar anteroposterior X-ray image of the lumbar spine using manual annotation to segment the L1 to L4 vertebrae, the masked image is defined as follows: ;in, It is the binary mask of the k-th cone; It is the vertebral body number, with values from 1 to 4. A value of 1 indicates that the pixel belongs to the vertebral body region, and 0 indicates the background.
[0011] In one embodiment of the present invention, the step of overlaying lumbar spine anteroposterior X-ray images of several patients with masked images of each vertebra, determining the minimum bounding rectangle region of each vertebra and performing pixel expansion to crop out the vertebral body ROI sub-image includes: determining the minimum bounding rectangle region of each vertebra and performing pixel expansion according to the following formula: , , ;in, The x-coordinate of the minimum bounding matrix; The ordinate of the minimum bounding matrix; It is the set of pixel coordinates with a mask of 1. , For pixel coordinates, It is the binary mask of the k-th cone; This is the expanded cropping area; To increase the number of pixels; The x-coordinate of the largest outermost matrix. ; The ordinate of the largest outer matrix. .
[0012] In one embodiment of the present invention, in constructing a multi-task deep learning model comprising a shared backbone feature extraction network, a classification head, and a regression head, the feature extraction formula of the backbone feature extraction network is: ,in, The feature vector of the cone body; For feature extraction networks; The input tensor is the standard input tensor; the parameters are... ;
[0013] The definition formula for the classification head is as follows: ,in, This is the output of the classification head; The classification head outputs two types of logits; the regression head is defined by the following formula: ,in, It is the predicted T value; It is a regression head, which outputs a predicted T-value.
[0014] In one embodiment of the present invention, the step of training the constructed multi-task deep learning model using the training label set and obtaining the trained multi-task deep learning model based on the training results includes: freezing the parameters of the backbone feature extraction network, training the classification head and regression head using the training label set; unfreezing some or all of the parameters of the backbone network, and jointly fine-tuning the overall model with a low learning rate to obtain the trained multi-task deep learning model.
[0015] In one embodiment of the present invention, the total loss function of the multi-task deep learning model is composed of a weighted sum of classification loss, regression loss and consistency loss; wherein, the classification loss is calculated based on the output of the classification head and the binary classification label; the regression loss is calculated based on the output of the regression head and the T-value regression label; and the consistency loss is calculated by converting the T-value predicted by the regression head into a pseudo-classification label and comparing it with the output of the classification head.
[0016] In one embodiment of the present invention, in the training of the constructed multi-task deep learning model using the training label set, a grouped hierarchical K-fold cross-validation method is used to train and evaluate the multi-task deep learning model; and when training and evaluating the multi-task deep learning model, a grouping strategy is used to ensure that the vertebral body sample of the same patient appears only in one of the training set or the validation set.
[0017] In one embodiment of the present invention, in the step of inputting the vertebral body ROI image to be predicted into the trained model to obtain the T-value prediction result and the probability of osteoporosis, and further performing final grading according to the preset threshold based on the T-value prediction result, the calculation formula for the TTA enhanced average is as follows: ,in, This is the prediction result of the original image. This is the prediction result of a horizontally flipped image; ,in, This is the final predicted T value. This is the final grading result of the vertebral body.
[0018] As described above, the lumbar spine X-ray T-score prediction and osteoporosis grading method of the present invention has the following beneficial effects: The present invention uses the L1-L4 vertebrae as the smallest analysis unit, accurately extracts the target region through mask segmentation, ROI clipping, and normalization preprocessing, and simultaneously performs T-score regression and osteoporosis classification tasks by combining a multi-task neural network structure, and constructs a consistency loss by generating pseudo-labels from the regression output to achieve collaborative optimization between the classification and regression branches; In addition, a patient-level hierarchical cross-validation strategy is adopted during model training to ensure that multiple vertebral body samples from the same patient do not appear in the training set and validation set at the same time, effectively avoiding data leakage problems and significantly improving the generalization performance and clinical reliability of the model; Therefore, the present invention addresses the problems of complex bone tissue structure, low image signal-to-noise ratio, and uneven sample distribution in lumbar spine imaging. Through precise vertebral body mask extraction and a multi-task collaborative learning mechanism, the model can simultaneously capture the fine-grained texture features and continuous bone density variation patterns of the vertebrae, thereby significantly improving the accuracy of T-score prediction and the stability of osteoporosis grading. Attached Figure Description
[0019] Figure 1This is a flowchart of the method for predicting lumbar spine X-ray T-scores and grading osteoporosis disclosed in an embodiment of the present invention;
[0020] Figure 2 This is an overall flowchart of the method for predicting lumbar spine X-ray T-values and grading osteoporosis disclosed in this embodiment of the invention;
[0021] Figure 3 This is a schematic diagram of the structure of the multi-task deep learning model in the lumbar spine X-ray T-score prediction and osteoporosis grading method disclosed in this embodiment of the invention.
[0022] Figure 4 This is a schematic diagram of mask extraction and ROI clipping in the lumbar spine X-ray T-score prediction and osteoporosis grading method disclosed in this embodiment of the invention.
[0023] Figure 5 This is a graph showing the model training loss and accuracy in the lumbar spine X-ray T-value prediction and osteoporosis grading method disclosed in this embodiment of the invention.
[0024] Figure 6 This is a scatter plot comparing the predicted T value with the actual T value in the lumbar spine X-ray T value prediction and osteoporosis grading method disclosed in this embodiment of the invention.
[0025] Figure 7 This is a graph showing the ROC performance of the model on the validation set in the lumbar spine X-ray T-score prediction and osteoporosis grading method disclosed in this embodiment of the invention. Detailed Implementation
[0026] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. It should be noted that, unless otherwise specified, the following embodiments and features described herein can be combined with each other.
[0027] This invention relates to a method for predicting lumbar spine X-ray T-scores and grading osteoporosis. It can predict the bone mineral density (BMD) T-scores of the lumbar vertebrae using only ordinary lumbar spine X-rays and automatically grade osteoporosis based on predetermined medical thresholds. The method features full utilization of labels, reasonable sample selection, high prediction accuracy, and fast response speed. The procedure is as follows: Figure 1 As shown, the details are as follows:
[0028] Step 101: Obtain anteroposterior X-ray images of the lumbar spine of several patients, and crop out the ROI sub-images of the vertebral bodies from the anteroposterior X-ray images of the lumbar spine of several patients according to the pre-labeled and segmented vertebral body mask images.
[0029] Step 102: Obtain the T value corresponding to each vertebra as a regression label based on the DXA report of dual-energy X-ray absorptiometry, and convert the T value into a binary label based on a preset threshold to construct a training label set.
[0030] Step 103: Construct a multi-task deep learning model including a shared backbone feature extraction network, a classification head, and a regression head; wherein the classification head is used to output the classification probability of osteoporosis, and the regression head is used to output the T-value prediction of the vertebral body.
[0031] Step 104: Train the constructed multi-task deep learning model using the training label set, and obtain the trained multi-task deep learning model based on the training results.
[0032] Step 105: Obtain the lumbar spine anteroposterior X-ray image of the patient to be predicted, crop out the vertebral body ROI sub-image from the lumbar spine anteroposterior X-ray image of the patient to be predicted, and input the vertebral body ROI image to be predicted into the trained model to obtain the T-value prediction result and the probability of osteoporosis. The final classification can also be performed according to the T-value prediction result and a preset threshold.
[0033] Specifically, Figure 2 This paper describes a method for predicting lumbar spine X-ray bone mineral density T-scores and grading osteoporosis based on vertebral body masking and multi-task deep learning. More detailed steps are included below:
[0034] S201. Obtain DICOM files of lumbar spine anteroposterior X-rays from several patients. Normalize the window width, window level, and depth of these DICOM files and convert them into image files of a preset format. The formula for window width and window level is: In this formula, Grayscale image after window width and window level adjustment. This means truncating the grayscale to a range. , For the original DICOM image in pixel coordinates grayscale value at that location For window position, For window width;
[0035] The normalized mapping formula is: In this formula, To normalize to a standard grayscale image of [0, 1], This is a grayscale image after window width and window level adjustments. For window position, For window width.
[0036] S202, mask images of the L1 to L4 vertebrae are segmented from the image file using manual annotation; where the mask is defined as: In this formula, It is the binary mask of the k-th cone. It is the vertebral body number, with values from 1 to 4. A value of 1 indicates that the pixel belongs to the vertebral body region, and 0 indicates the background.
[0037] S203, the original X-ray image is overlaid with the masked images of each vertebra, the minimum bounding rectangle region of each vertebra is determined and pixel-expanded, the ROI sub-images of the vertebrae are cropped, and all ROI sub-images are normalized to a uniform size; wherein, the foreground set is: In this formula, It is the set of pixel coordinates with a mask of 1. It is the binary mask of the k-th cone. These are pixel coordinates;
[0038] The coordinates of the minimum bounding rectangle are: , , , In the above formula, , , and The boundary coordinates are used; the extended rectangular region is defined as follows: In this formula, This is the expanded cropping area. To expand the number of pixels.
[0039] S204. Based on the dual-energy X-ray absorptiometry (DXA) report, T values corresponding to each vertebra are obtained as regression labels. These T values are then converted into binary labels based on a preset threshold to construct a training label set. The binary labels are defined as follows: In this formula, The corresponding binary labels are 1 for osteoporosis and 0 for non-osteoporosis. The T-value of the k-th vertebral body measured by DXA. The threshold for osteoporosis is set.
[0040] S205 describes the construction of a multi-task deep learning model comprising a shared backbone feature extraction network, a classification head, and a regression head. For details, please refer to [link to relevant documentation]. Figure 3 The classification head outputs the classification probability of osteoporosis, and the regression head outputs the predicted T-value of the vertebral body. The backbone network feature extraction formula is as follows: In this formula, For the vertebral body feature vector, For standard input tensors, This is a feature extraction network with the following parameters: ;
[0041] The formula for defining the classification head is as follows: In this formula, As the classification header, output two types of logits. The classification head is output; the regression head is defined as follows: In this formula, It is the predicted T value. It is a regression head that outputs the predicted T-value.
[0042] S206: First, freeze the parameters of the backbone feature extraction network and train the classification head and regression head; then, unfreeze some or all of the parameters of the backbone network and jointly fine-tune the overall model with a low learning rate.
[0043] S207, the total loss function of this multi-task deep learning model is composed of a weighted sum of classification loss, regression loss and consistency loss; wherein, the classification loss is calculated based on the output of the classifier head and the binary classification label; the regression loss is calculated based on the output of the regression head and the T-value regression label; the consistency loss is calculated by converting the T-value predicted by the regression head into a pseudo-classification label and comparing it with the output of the classifier head;
[0044] It should be noted that the classification loss (weighted cross-entropy) is defined as: In this formula, , and For positive and negative class weights, The smoothed label, The label smoothing factor (e.g., 0.1). and For predicting probabilities; smoothing loss is defined as: , In this formula, It is the regression residual. It is the true T value. It is a prediction of the T value. It is a smoothing loss. It is the smoothing threshold constant (e.g., 0.5);
[0045] The formula for calculating consistency loss is: , In the above formula, Pseudo-labels derived from predicted T-values The consistency loss is calculated using the following formula: In this formula, It is the loss weighting coefficient. It is the total loss of the model.
[0046] S208 uses a grouped and hierarchical K-fold cross-validation method to train and evaluate the model. The grouping strategy ensures that the vertebral body sample of the same patient appears in only one of the training set or the validation set.
[0047] The positive lower limit constraint is: In this formula, It is the first Fold the validation set, Indicates a positive sample. This is the lower limit of the number of positive cases in the validation set; the formula for calculating the average patient-level score is: The formula for calculating the majority vote for patient-level labels is: In the above formula, It is the patient's number. The patient The corresponding set of vertebral indexes, This is the average positive probability at the patient level. It is a patient-level label;
[0048] The grouping strategy is as follows: vertebral body samples from the same patient do not cross sets. In this formula, the patient Belongs to the entire patient set , For patients The set of vertebral body sample indexes, For the first The set of vertebral body sample indexes for folding training. For the first A set of vertebral body sample indexes for fold verification.
[0049] S209: Input the vertebral body ROI image to be predicted into the trained model to obtain the T-value prediction result and the probability of osteoporosis. The final classification can be performed based on the T-value prediction result according to a preset threshold. The formula for calculating the TTA enhanced average is as follows: In this formula, This is the prediction result of the original image. The results are the prediction results of the horizontally flipped image, and the TTA enhancement in this embodiment improves the generalization ability of the present invention;
[0050] In this formula, This is the final predicted T value. This is the final grading result of the vertebral body.
[0051] In practical applications, the accuracy and feasibility of the model are verified using a real lumbar spine X-ray dataset. a) Shanghai Geriatric Medical Center Lumbar Spine X-ray Dataset: This dataset includes 500 original training samples, including subjects aged 45-90 years who completed both lumbar spine X-ray and DXA bone mineral density measurements within six months. Patients with postoperative internal fixation, tumors, severe deformities, or poor image quality were excluded to ensure consistency between X-ray images and T-values in DXA. In this embodiment, the original training samples are divided into a training set and a validation set in an 8:2 ratio. The external validation data, used for evaluating the model's generalization ability, comes from individuals of the same age who plan to complete both examinations within six months and sign informed consent; the exclusion criteria are the same as for the training set.
[0052] b. Results Analysis: In this study, a 5-fold patient-level hierarchical cross-validation was used (CV_SPLITS=5), with a maximum of 200 training epochs per fold and a batch size of 8 (BATCH_SIZE=8). The input vertebral ROI was uniformly scaled to 224×224 pixels (CROP_SIZE=224) and expanded by 6 pixels in all directions based on the minimum bounding rectangle (PAD_PIXELS=6). Based on the DXA report, T≤-2.5 was defined as a positive osteoporosis sample (T_BIN_THRESH= -2.5), and during the segmentation process, at least 8 positive samples were constrained in the validation set of each fold (MIN_POS_VAL=8). The model backbone used a pre-trained ResNet18, whose final fully connected layer was replaced with Identity to output 512-dimensional features. Classification and regression heads were then connected to this backbone to simultaneously perform osteoporosis binary classification and T-value regression. The backbone network was frozen during the initial training phase, and only the task head was optimized for 8 epochs (HEAD_FREEZE_EPOCHS=8), with a learning rate of [missing information]. Then, layers 3 and 4 of ResNet18 were unfrozen, in order to The system employs a low learning rate for joint fine-tuning; the loss function consists of three weighted components: classification cross-entropy, smoothed L1 regression loss, and pseudo-label consistency loss mapped from the regression T̂ value, with weights of 1.0, 0.5, and 0.2, respectively. To mitigate the impact of the low proportion of osteoporosis samples, class weights are introduced for positive and negative samples during the training phase (USE_CLASS_WEIGHTS=True); and horizontal flipping test-time augmentation is used during the validation phase to improve prediction stability (USE_TTA=True).
[0053] like Figure 4 As shown, this study uses cone-shaped segments for masking; from the training process perspective, Figure 5The training / validation loss and accuracy curves of the model over several epochs are presented. It can be seen that the training loss shows a significant decreasing trend in the first few epochs, indicating that the multi-task network can quickly fit the mapping relationship between ROI images and DXA labels. The validation loss (Val Loss) remains within a relatively stable range after decreasing, without significant oscillations, indicating that the model does not exhibit severe overfitting. Meanwhile, both the training accuracy (Train Acc) and validation accuracy (Val Acc) show an overall increasing and stabilizing trend, demonstrating that the designed training strategy of "freezing the backbone first, then fine-tuning high-level features" effectively improves the model's convergence speed and generalization performance. Figure 5 It can be seen that the training process proposed in this invention is stable and reproducible, and can support subsequent regression and classification tasks.
[0054] Figure 6 A scatter plot comparing the predicted T-values and the actual T-values is presented. The scatter plots are generally distributed around the diagonal y=x, indicating that the network regression head can effectively recover the continuous bone mineral density levels detected by DXA. For samples with T-values in the low bone mass / osteoporosis range (-1 to -5), the scatter plots still maintain high consistency, indicating that the model can not only identify normal vertebrae but also has high discrimination against vertebrae with decreased bone mass. This is consistent with the design of this invention, which simultaneously introduces regression supervision and classification supervision during the training phase and uses consistency loss to semantically align the two branches: the regression branch ensures the model's sensitivity to continuous changes in bone mass, while the classification branch strengthens the ability to distinguish samples near the diagnostic threshold, thus making the overall scatter plot show a good linear fitting effect. This demonstrates that the multi-task structure proposed in this invention can effectively approximate the T-value measurement results of DXA under a single X-ray modality, providing a reliable numerical basis for subsequent automatic grading.
[0055] In terms of graded performance, Figure 7ROC curves are presented at both patient-level and sample-level granularities. The sample-level ROC curve shows a higher AUC, indicating that at the level of a single vertebral ROI, the model can accurately distinguish between "osteoporosis" and "non-osteoporosis" based on X-ray image features. The patient-level ROC curve also achieves a similar AUC, meaning that after pooling the outputs from multiple vertebrae of the same patient, the model maintains good diagnostic stability in clinical practice. Because this invention employs a patient-level grouping strategy during cross-validation, the performance in the validation set can be viewed as a simulation test of "unseen patients," thus the patient-level AUC is more convincing. Compared to traditional methods that only perform single-task classification, this invention maintains a high classification AUC while also outputting continuous T-values. Furthermore, through dual-threshold evaluation, it can simultaneously provide performance for two diagnostic lines: "osteoporosis below -1" and "osteoporosis below -2.5," which is also reflected in the upper left coverage of the curves in the attached figures, demonstrating the model's good discriminative power across different diagnostic thresholds.
[0056] Overall, based on the vertebral body mask ROI extraction, multi-task deep learning modeling, and patient-level hierarchical verification strategy proposed in this invention, the training curves demonstrate the trainability and convergence of the network structure, the T-value scatter plots demonstrate the fitting ability of the regression head to the DXA ground truth, and the ROC curves demonstrate the actual discriminative performance of the model in osteoporosis identification scenarios. Compared with existing X-ray intelligent analysis methods that only perform classification or only perform regression, this invention simultaneously completes continuous T-value prediction and discrete grading output in the same network, and achieves information complementarity between the two through consistency loss. This allows it to maintain high prediction accuracy and good generalization effect even with limited sample size and uneven label distribution, thus proving the accuracy and feasibility of the method proposed in this invention, thereby significantly improving the accuracy of bone mineral density prediction and the reliability of osteoporosis grading.
[0057] In summary, compared to traditional lumbar spine X-ray image classification or single regression methods, the proposed model based on vertebral body masking and multi-task deep learning can simultaneously output continuous T-value predictions and discrete osteoporosis grading results, achieving both accuracy and interpretability. By introducing a consistency constraint mechanism into the network structure, information complementarity between the classification and regression branches is achieved, enabling the model to maintain stable performance even under conditions of sample imbalance and label noise. Furthermore, by combining patient-level hierarchical cross-validation and ROI-level masking and pruning strategies, the model can fully capture the fine-grained texture features of the vertebral body and global bone mass distribution features, thereby significantly improving the accuracy of bone mineral density prediction and the reliability of osteoporosis grading.
[0058] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. All equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this invention should still be covered by the claims of this invention.
Claims
1. A method for predicting lumbar spine X-ray T-scores and grading osteoporosis, characterized in that, Includes the following steps: Acquire anteroposterior X-ray images of the lumbar spine of several patients, and crop out vertebral ROI sub-images from the anteroposterior X-ray images of the lumbar spine of several patients based on the pre-labeled and segmented vertebral body mask images; The T values corresponding to each vertebra are obtained from the DXA report of dual-energy X-ray absorptiometry as regression labels, and the T values are converted into binary labels based on a preset threshold to construct a training label set. A multi-task deep learning model is constructed, comprising a shared backbone feature extraction network, a classification head, and a regression head; wherein the classification head is used to output the classification probability of osteoporosis, and the regression head is used to output the T-value prediction of the vertebral body; The constructed multi-task deep learning model is trained using the training label set, and the trained multi-task deep learning model is obtained based on the training results. Obtain the lumbar spine anteroposterior X-ray image of the patient to be predicted, crop the vertebral body ROI sub-image from the lumbar spine anteroposterior X-ray image of the patient to be predicted, and input the vertebral body ROI image to be predicted into the trained model to obtain the T-value prediction result and the probability of osteoporosis. The final classification can also be performed according to the T-value prediction result and a preset threshold.
2. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 1, characterized in that: The process of acquiring lumbar spine anteroposterior X-ray images from several patients and cropping vertebral body ROI sub-images from these images based on pre-labeled and segmented vertebral body mask images includes: Acquire anteroposterior X-ray images of the lumbar spine of several patients and preprocess the anteroposterior X-ray images of the lumbar spine of several patients, wherein the preprocessing includes normalization of window width, window level and depth. The mask images of the L1 to L4 vertebrae were segmented from the preprocessed lumbar spine anteroposterior X-ray images using manual annotation; The lumbar spine anteroposterior X-ray images of several patients are superimposed with the mask images of each vertebra, and the minimum bounding rectangle region of each vertebra is determined and expanded by pixels to crop out the vertebral ROI sub-image.
3. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 2, characterized in that: In the masked image segmented from the preprocessed lumbar spine anteroposterior X-ray image using manual annotation to extract the L1 to L4 vertebrae, the masked image is defined as follows: ; in, It is the binary mask of the k-th cone; It is the vertebral body number, with values from 1 to 4. A value of 1 indicates that the pixel belongs to the vertebral body region, and 0 indicates the background.
4. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 2, characterized in that: The process involves overlaying lumbar spine anteroposterior X-ray images from several patients with masked images of each vertebra, determining the minimum bounding rectangle region of each vertebra, and performing pixel expansion to crop out the vertebral body ROI sub-image, including: The minimum bounding rectangle region of each vertebra is determined and then expanded pixel by the following formula: , , ; in, The x-coordinate of the minimum bounding matrix; The ordinate of the minimum bounding matrix; It is the set of pixel coordinates with a mask of 1. , For pixel coordinates, It is the binary mask of the k-th cone; This is the expanded cropping area; To increase the number of pixels; The x-coordinate of the largest outermost matrix. ; The ordinate of the largest outer matrix. .
5. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 1, characterized in that: In the construction of the multi-task deep learning model comprising a shared backbone feature extraction network, a classification head, and a regression head, the feature extraction formula of the backbone feature extraction network is: ,in, The feature vector of the cone body; For feature extraction networks; The input tensor is the standard input tensor; the parameters are... ; The definition formula for the classification head is as follows: ,in, This is the output of the classification head; This is the classification header, which outputs two types of logits; The formula for defining the regression head is as follows: ,in, It is the predicted T value; It is a regression head, which outputs a predicted T-value.
6. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 1, characterized in that: The step of training the constructed multi-task deep learning model using the training label set, and obtaining the trained multi-task deep learning model based on the training results, includes: Freeze the parameters of the backbone feature extraction network, and train the classification head and regression head using the training label set; Unfreeze some or all of the parameters of the backbone network and jointly fine-tune the overall model with a low learning rate to obtain a well-trained multi-task deep learning model.
7. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 6, characterized in that: The total loss function of the multi-task deep learning model is composed of a weighted sum of classification loss, regression loss and consistency loss. The classification loss is calculated based on the output of the classification head and the binary classification labels; the regression loss is calculated based on the output of the regression head and the T-value regression labels; and the consistency loss is calculated by converting the T-value predicted by the regression head into pseudo-classification labels and comparing them with the output of the classification head.
8. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 7, characterized in that: In the process of training the constructed multi-task deep learning model using the training label set, a grouped hierarchical K-fold cross-validation method is used to train and evaluate the multi-task deep learning model; and when training and evaluating the multi-task deep learning model, a grouping strategy is used to ensure that the vertebral body sample of the same patient appears only in either the training set or the validation set.
9. The method for predicting lumbar spine X-ray T-scores and grading osteoporosis according to claim 1, characterized in that: In the process of inputting the vertebral body ROI image to be predicted into the trained model to obtain the T-value prediction result and the probability of osteoporosis, and further performing the final classification according to the preset threshold based on the T-value prediction result, the calculation formula for the TTA enhanced average is as follows: ,in, This is the prediction result of the original image. This is the prediction result of a horizontally flipped image; ,in, This is the final predicted T value; This is the final grading result of the vertebral body.
