Spine Cobb angle automatic measurement method and device based on fine shape characterization and dynamic data amplification

By employing refined shape characterization and dynamic data augmentation, the problems of insufficient structural modeling accuracy and data scarcity in scoliosis diagnosis have been solved. This approach enables high-precision Cobb angle measurement and improved model robustness, adapting to different imaging conditions and spinal shapes to meet clinical needs.

CN121707984APending Publication Date: 2026-03-20XUZHOU REHABILITATION HOSPITAL (XUZHOU GERONTOLOGY HOSPITAL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511924549.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies for scoliosis diagnosis suffer from insufficient structural modeling accuracy, unstable contour representation, large angle prediction errors, and a lack of training data, making it difficult to meet the accuracy, robustness, and interpretability required for clinical practice.

Method used

We employ a method based on fine shape representation and dynamic data augmentation. Through key point extraction, robust subspace recovery, multi-scale feature extraction, and sparse-dense sampling strategies, we construct a spinal contour detection and coefficient regression network. Combined with a dynamic data engine, we generate incremental images for pseudo-label prediction and automatic screening, forming a high-quality training dataset and optimizing the overall network model.

Benefits of technology

High-precision Cobb angle measurement was achieved under different imaging conditions and spine shapes, which improved the robustness and generalization ability of the model, reduced the data annotation cost, and enhanced the adaptability and interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707984A_ABST
    Figure CN121707984A_ABST
Patent Text Reader

Abstract

The invention discloses a spine Cobb angle automatic measurement method and device based on fine shape characterization and dynamic data amplification, and aims to construct an end-to-end deep learning framework for automatic measurement and structured analysis requirements of a Cobb angle in a spine X-ray image so as to realize integrated spine contour reconstruction and lateral bending angle prediction. According to the method, firstly, bone structure extraction and contour key point detection are performed on a spine X-ray image in an original training set, so that the contour shape of each segment of the spine is finely represented by using key points; constructing a training set spine segment contour matrix, and estimating robust contour shape subspace representation through robust subspace recovery; then, constructing a spine contour detection and regression network fusing multi-scale feature extraction and a sparse-dense sampling strategy, and realizing segment region positioning and basis vector regression; and reconstructing a spine contour through a coefficient so as to calculate a direction included angle between adjacent segments and an overall Cobb angle. Through robust subspace modeling, multi-scale feature fusion and circular data optimization strategies, the problems of discontinuous contour, large angle estimation error and data scarcity in traditional Cobb angle measurement are effectively solved, and the accuracy, stability and clinical availability of spine shape analysis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an automatic measurement method and device for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification, belonging to the application of computer vision technology in the medical field. Background Technology

[0002] Scoliosis is a common spinal developmental disorder characterized by an abnormal lateral curvature of the spine in the coronal plane, often accompanied by varying degrees of rotational deformity. Adolescents are in a period of rapid spinal development, and scoliosis can affect postural balance, lung function development, and quality of life; therefore, early screening and intervention are crucial. In clinical practice, the Cobb angle is the primary objective indicator for assessing the severity of scoliosis, and its calculation relies on the angular relationship between the upper and lower vertebral endplates in X-ray images. Meanwhile, the Lenke classification system, combined with spinal structural characteristics, is widely used for scoliosis type determination and surgical planning. However, these measurement and interpretation processes are highly dependent on clinical experience, and suffer from time-consuming procedures, strong subjectivity, and poor consistency of results, limiting the efficient diagnosis and large-scale screening of scoliosis.

[0003] With the development of artificial intelligence technology, deep learning has been widely applied in the field of medical image analysis. In the assisted diagnosis of scoliosis, existing research mainly focuses on three technical routes: spinal region extraction based on image segmentation, vertebral structure localization based on keypoint detection, and automatic prediction of Cobb angle based on regression networks. Segmentation-based methods use UNet and its variants for vertebral region segmentation, but they are prone to problems such as boundary discontinuities and structural defects under conditions of spinal tilt, rotation, or image blurring; keypoint detection-based methods reconstruct the spinal shape by locating vertebral angle points or center points, but are limited by changes in bony structures and occlusion interference, and keypoints are prone to shift; regression-based methods directly predict the Cobb angle from the image, which simplifies the processing flow, but ignores the spinal geometry and lacks interpretability.

[0004] Furthermore, the annotation of spinal X-ray images requires the participation of professional physicians, which is costly and inefficient, resulting in limited training data and failing to meet the needs of deep learning models for large-scale, high-quality samples. Under strict privacy regulations, large-scale sharing of medical images is difficult, further exacerbating the problem of insufficient training data for models. On the other hand, while natural images have advantages such as being radiation-free and easy to acquire, the lack of clear bony structural landmarks makes it difficult for existing methods to accurately extract spinal shape features in natural scenes, severely limiting their application value in initial screening.

[0005] Although the intelligent diagnostic technology for scoliosis has achieved initial results, existing methods still generally suffer from problems such as insufficient structural modeling accuracy, unstable contour representation, large angle prediction errors, and a lack of training data. They are still unable to meet the clinical needs for accuracy, robustness, and interpretability, and need to be further improved. Summary of the Invention

[0006] Purpose of the invention: In order to overcome the shortcomings of the existing technology, the present invention provides an automatic measurement method and device for the Cobb angle of the spine based on fine shape representation and dynamic data amplification. It can stably extract the contour of the spinal segments and achieve high-precision Cobb angle prediction under the conditions of limited training data, inconsistent image quality and complex and variable spinal structure. It is expected to significantly improve the robustness and generalization ability of the model under different imaging conditions, different spinal shapes and different equipment environments while maintaining high angle measurement accuracy.

[0007] Technical solution: To achieve the above objectives, the technical solution adopted by this invention is as follows:

[0008] An automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data augmentation includes the following steps:

[0009] S01: Extract the original artificial samples required for training from spinal X-ray images and perform manual annotation. Preprocess the original artificial samples to obtain spinal images and construct a standardized spinal image training dataset.

[0010] S02: Extract key bony structure points from spinal images using the key point extraction module, establish a contour matrix covering all spinal segments using the key bony structure points as contour points, and perform low-dimensional subspace estimation on the contour matrix using the robust subspace recovery module to obtain the subspace basis matrix that can robustly represent the spinal segments and the corresponding true subspace contour coefficients.

[0011] S03: Based on the real subspace contour coefficient, a spinal contour detection and coefficient regression network is constructed that integrates multi-scale feature extraction and sparse-dense sampling strategies to locate the spinal segment regions in spinal images and regress the predicted subspace contour coefficients of the corresponding spinal segments.

[0012] S04: Based on the predicted subspace contour coefficients, the contour prediction of spinal segments is performed using the subspace basis matrix; for the predicted spinal segments, the local Cobb angle and global Cobb angle between adjacent spinal segments are calculated through the Cobb angle prediction module to achieve geometric analysis of the severity of scoliosis.

[0013] S05: Build a dynamic data engine to generate incremental spinal images, and perform pseudo-label prediction, automatic screening and manual verification on the generated incremental spinal images. Use the incremental spinal images to continuously expand and clean the spinal image training dataset to obtain a high-quality training dataset.

[0014] S06: Based on a high-quality training dataset, the overall network model (spine shape estimation model) mainly composed of a key point extraction module, a robust subspace recovery module, a spine contour detection and coefficient regression network, and a Cobb angle prediction module is jointly trained and inferred to optimize the model.

[0015] S07: Input any spinal X-ray image into the trained overall network model, and automatically output the contours, local Cobb angles, and overall Cobb angles of each spinal segment to achieve geometric analysis of the severity of scoliosis.

[0016] Specifically, in step S02, key bony structural points are detected in the spinal images. An algorithm for bony edge enhancement and structural point extraction is used to identify each spinal segment. Key bony structural points include the superior endplate angle, the inferior endplate angle, the outer edge of the pedicle, and the central axis point, etc., through... The two-dimensional image coordinates of key bony structural points are used to discretize the spinal segment, denoted as a single point. 3D true contour vector :

[0017]

[0018] in: Indicates the first Two-dimensional image coordinates of key bony structural points.

[0019] All of the spinal image training dataset The contour vectors of each spinal segment are arranged in columns to obtain a contour matrix that describes the overall morphological distribution of the spinal segments. :

[0020]

[0021] Contour matrix As a statistical representation of the overall spinal structure, each column represents the two-dimensional structural features of a spinal segment. Then, the robust subspace recovery (RSR) method is used to extract the features from the contour matrix. To recover a low-dimensional subspace that is insensitive to outliers, we need to consider the set of orthogonal matrices. Solving for the optimal orthogonal basis:

[0022]

[0023] in: Indicates to Calculate each row The mixed norm, obtained by summing the norms, can effectively highlight the contribution of outliers, thus obtaining a low-dimensional subspace that is robust to anomalous contour points during the iteration process. This represents the dimension of the low-dimensional subspace. express An identity matrix of dimension 1 express An identity matrix of dimension 1.

[0024] Solving the above optimization problem using the projected Riemann subgradient method yields a subspace basis matrix that can robustly characterize the common variation patterns of spinal segment shapes. Subspace basis matrix The column vectors constitute the basic shape pattern of the spine contour, which can be used to describe the main structural change directions of the spine segments in the spine image training dataset.

[0025] The basis matrix of each spinal segment in the subspace is calculated using a projection method. Real subspace contour coefficients in:

[0026]

[0027] in: Indicates the first The true subspace contour coefficient of the vertebral segment is the morphological encoding of the vertebral segment in the low-dimensional subspace, used to represent the ... The coordinates of each spinal segment in the low-dimensional subspace are used to determine the contour coefficients of the real subspace. This serves as the structural and morphological prior for subsequent spinal segment classification, contour regression, and automatic Cobb angle measurement. It utilizes the subspace basis matrix... right Contour reconstruction can be performed to reconstruct the contour from the coefficients of the low-dimensional subspace to the high-dimensional contour space. The contour reconstruction formula is as follows:

[0028]

[0029] in: Indicates based on For the The reconstructed contour vector obtained by reconstructing the contours of each spinal segment is the true contour vector. The best approximation in a low-dimensional subspace. This low-dimensional subspace serves as the structural prior and morphological basis for subsequent spinal segment classification, contour regression, and automatic Cobb angle measurement.

[0030] Under the above parameterized representation, the subspace basis matrix column vectors This can be viewed as a typical spinal segment shape primitive, or "basic shape." Each characteristic spinal segment corresponds to a direction of morphological change, constituting the basic dimension of the spinal shape space; for any two-dimensional contour vector The subspace profile coefficients can be obtained by projecting onto the robust subspace. .

[0031] During the inference phase, only the predicted subspace profile coefficients obtained from regression are needed. This allows us to utilize the reconstruction formula. Obtain the predicted contour vector This transforms the prediction problem in high-dimensional contour space into a coefficient regression problem in low-dimensional subspace.

[0032] Specifically, in step S03, a spine contour detection and coefficient regression network is constructed based on the real subspace contour coefficients to simultaneously complete candidate anchor box classification and subspace contour coefficient regression prediction.

[0033] To adapt to the detection requirements of spinal X-ray images under scenarios with scale changes, morphological differences, and blurred edges, the spinal contour detection part adopts a structure that integrates the backbone feature extraction module and the feature pyramid fusion module. The input spinal images are processed by layer-by-layer convolution and downsampling through the convolutional neural network ResNet50 to obtain multi-scale deep semantic features that can characterize the shape change features, posture difference features, and edge blur features of spinal segments. Based on the multi-scale deep semantic features, a feature pyramid fusion structure is introduced to upsample high-level features to low-level features and fused laterally with local detail features to obtain fused features that have both multi-scale resolution and structural consistency, thereby improving the sensitivity of the overall network model to large morphological differences and vertebral structural details.

[0034] The coefficient regression component, based on the fused features, sets up a classification prediction branch and a subspace coefficient regression branch. The classification prediction branch is used to determine whether the candidate anchor boxes contain valid spinal segments and output the corresponding confidence distribution. The subspace coefficient regression branch is used to predict the predicted subspace contour coefficients of the spinal segments within the positive sample anchor boxes under the subspace basis matrix. .

[0035] Specifically, during the classification prediction branch, a sample allocation strategy combining dense normal samples and sparse difficult samples is adopted. The spinal segment instances corresponding to candidate anchor boxes are used as the basic sample units. Based on the imaging quality and structural complexity of the candidate anchor boxes, they are divided into normal samples and difficult samples. Normal samples refer to spinal segment instances with complete structures, clear boundaries, and obvious morphological features. Difficult samples refer to spinal segment instances that are difficult to classify due to blurred boundaries, low contrast, abnormal pose, or local occlusion. Generally, the number of normal samples is significantly greater than the number of difficult samples. Dense normal samples are used to improve the detection coverage of normal spinal segments, and standard cross-entropy loss is employed. As an optimization objective, sparse hard examples are used to enhance the overall network model's ability to discriminate spinal segments with blurred edges, abnormal poses, abnormal shapes, or low contrast through a differential weighting mechanism, employing Focal loss. As the optimization objective, the total loss of the classification prediction branch is: .

[0036] During the subspace coefficient regression branch execution, subspace coefficient regression is only performed on the positive sample anchor boxes determined by the classification prediction branch. This reduces noise interference from direct mapping of high-dimensional spinal segment shapes and ensures that the predicted contours are consistent with the subspace basis matrix. To maintain structural consistency; the subspace coefficient regression branch employs Smooth-L1 loss. As an optimization target ,in: Indicates the first The true contour vector of a positive sample anchor box. Indicates based on The first contour reconstruction obtained The reconstructed contour vector of a positive sample anchor box Indicates based on The predicted profile vector is obtained through the subspace coefficient regression branch. Indicates the first The true subspace contour coefficients of each positive sample anchor frame. Indicates the first The predicted subspace contour coefficients of a positive sample anchor box This represents the set of anchor boxes that are labeled as positive samples by the classification prediction branch.

[0037] Total loss of the overall network model Defined as a weighted sum of classification prediction loss and subspace coefficient regression loss. ;in: and These are the weighting coefficients for classification prediction loss and subspace coefficient regression loss, respectively.

[0038] Specifically, in step S04, based on the predicted subspace contour coefficients... Using the subspace basis matrix Contour prediction is performed on each spinal segment to predict its geometric boundaries in a two-dimensional image coordinate system; for the first segment... Each spinal segment is used to predict its contour vector. Represented as:

[0039]

[0040]

[0041] in: Indicates the first Two-dimensional image coordinate prediction values ​​of key bony structural points.

[0042] The predicted spinal segments are also composed of a series of key bony structural points, used to perform geometric analysis of the severity of scoliosis. For each predicted spinal segment, the direction vectors of the superior and inferior endplates are extracted. The direction of the line connecting the centers of the superior and inferior endplates is defined as the direction of the central axis of the spinal segment. The first spinal segment and the first The angle between each spinal segment is the corresponding local Cobb angle. The normal angle is calculated using vector dot product and inverse cosine function, and the overall Cobb angles of the main curve, upper secondary curve, and lower secondary curve are obtained by accumulating them segment by segment throughout the entire spine. In addition, by performing spline fitting and curvature derivative calculation on the predicted central axis of the spinal segment, the continuous curvature curve of the entire spine can be obtained. This allows us to obtain the overall curvature trend and morphological changes of the spine in the coronal plane.

[0043] The final output prediction results include a sequence of predicted two-dimensional image coordinates for key bony structures in each spinal segment, local Cobb angles, global Cobb angles, and continuous curvature curves. This is used to construct a quantitative index system for the severity of scoliosis.

[0044] Specifically, in step S05, a dynamic data engine composed of a generative diffusion model and an automatic pseudo-label process is constructed to continuously expand the spinal image training dataset, generate pseudo-labels, and perform quality screening to form a large-scale, high-quality training dataset.

[0045] The dynamic data engine first trains a spinal contour detection and coefficient regression network on a manually labeled spinal image training dataset. Simultaneously, it uses a generative diffusion model to generate unlabeled incremental spinal images in batches. Then, the initially trained spinal contour detection and coefficient regression network is used to predict pseudo-labels on these unlabeled incremental spinal images, obtaining corresponding pseudo-label samples and confidence distributions. Pseudo-label samples with confidence scores higher than a preset threshold are selected. Further automatic screening of pseudo-label samples is performed based on selection criteria, including the integrity of spinal segment contours, the number of spinal segments, the continuity of spinal segments, and the morphological rationality of spinal segments. Next, a manual verification mechanism is used to correct the image boundaries and complete the pseudo-labels of some pseudo-label samples (difficult examples) discovered during the automatic screening process, ensuring the anatomical rationality and usability of the retained pseudo-label samples. Finally, a dual similarity detection based on structure and pixel distribution filters out pseudo-label samples with similarity exceeding a set threshold to the original manually labeled samples. The retained pseudo-label samples are used to expand the spinal image training data, resulting in a high-quality training dataset.

[0046] Finally, the selected pseudo-label samples are used to expand the spinal image training dataset, resulting in a large-scale, high-quality training dataset. This dataset is then used to iteratively optimize the spinal contour detection and coefficient regression networks during subsequent training, forming a closed-loop data evolution mechanism of "generation-selection-retraining" to achieve self-growth of the overall network model performance and automatic expansion of the training dataset.

[0047] Specifically, in step S06, a high-quality training dataset is used to perform end-to-end joint training on the spinal shape estimation model, which consists of a key point extraction module, a robust subspace recovery module, a spinal contour detection and coefficient regression network, and a Cobb angle prediction module, so that the spinal shape estimation model can be optimized in both key point extraction capability and Cobb angle regression performance.

[0048] The loss function of the spine shape estimation model consists of classification prediction loss. Subspace coefficient regression loss It consists of three parts: angular consistency constraint based on contour prediction; classification prediction loss. Using cross-entropy loss With Focal loss A weighted combination is used to optimize the classification accuracy of spinal segments; subspace coefficient regression loss. The deviation between the predicted contour vector and the reconstructed contour vector is constrained by the Smooth-L1 loss to ensure the accuracy of contour prediction under the constraint of the subspace basis matrix; the angle consistency constraint guides the spine shape estimation model to establish stable geometric consistency between contour prediction and Cobb angle prediction by comparing the difference between the Cobb angle calculated from the reconstructed contour and the true Cobb angle.

[0049] An automatic measurement device for the Cobb angle of the spine based on fine shape representation and dynamic data augmentation includes a spinal image training dataset construction unit, a low-dimensional subspace construction unit, a spinal contour detection and coefficient regression unit, a Cobb angle prediction unit, a dynamic data engine unit, and a joint training and optimization unit.

[0050] The spinal image training dataset construction unit is used to extract the original artificial samples required for training from spinal X-ray images and perform artificial annotation. The original artificial samples are preprocessed, including grayscale normalization, bony edge enhancement, noise suppression and spinal region cropping, to obtain spinal images and construct a standardized spinal image training dataset.

[0051] The low-dimensional subspace construction unit includes a key point extraction module and a robust subspace recovery module. The key point extraction module is used to extract key bony structure points from spinal images and use the key bony structure points as contour points to establish a contour matrix covering all spinal segments. The robust subspace recovery module performs low-dimensional subspace estimation on the contour matrix to obtain a subspace basis matrix that can robustly represent spinal segments and the corresponding true subspace contour coefficients.

[0052] The spinal contour detection and coefficient regression unit integrates multi-scale feature extraction and sparse-dense sampling strategies to achieve spatial localization of spinal segment regions in spinal images and regress the predicted subspace contour coefficients of spinal segments.

[0053] The Cobb angle prediction unit uses a subspace basis matrix to predict the contour of the spinal segment. For the predicted spinal segment, the Cobb angle prediction module calculates the local Cobb angle and the global Cobb angle.

[0054] The dynamic data engine includes a pseudo-label generation module, an automatic filtering module, a manual verification module, and a privacy detection module. It sequentially performs pseudo-label prediction, automatic filtering, manual verification, and privacy detection on the incremental spinal images generated by the diffusion model, and adds the finally filtered incremental spinal images to the spinal image training dataset to form a high-quality training dataset.

[0055] The joint training and optimization unit calculates the network parameters and optimization objectives of the spinal shape estimation model, which is composed of a spinal image training dataset construction unit, a low-dimensional subspace construction unit, a spinal contour detection and coefficient regression unit, and a Cobb angle prediction unit, based on a high-quality training dataset. It then iteratively optimizes the network parameters based on a gradient update strategy to achieve end-to-end joint training and performance improvement.

[0056] Beneficial Effects: The automatic measurement method and device for the spine Cobb angle based on fine shape representation and dynamic data augmentation provided by this invention have the following advantages over existing technologies: 1. In the contour subspace modeling module, a low-dimensional subspace representation of the spine contour is obtained through robust subspace recovery, which can robustly extract the main morphological change patterns of vertebral segments, making the structural expression more compact, continuous, and consistent with the anatomical structure rules; 2. In the spine contour detection and regression module, by combining multi-scale feature extraction and sparse-dense sampling strategies, the spine segments can be accurately located in X-ray images with large pose changes and blurred edges, and continuous and consistent contour reconstruction is achieved through subspace coefficient regression, improving the accuracy and reliability of Cobb angle calculation; 3. The dynamic data engine module forms a data closed loop through generative image augmentation, pseudo-label prediction, automatic screening, and manual verification, significantly reducing the cost of high-quality data annotation and improving the scale, quality, and privacy security of training data, thereby enhancing the generalization performance of the model. Attached Figure Description

[0057] Figure 1 This is a schematic diagram illustrating the implementation process of the method of the present invention;

[0058] Figure 2 A schematic diagram of the structure of the spinal contour detection and coefficient regression network;

[0059] Figure 3 This is a schematic diagram of the dynamic data engine structure;

[0060] Figure 4 This is a schematic diagram of the structure of the spine shape estimation model. Detailed Implementation

[0061] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0062] This invention provides a method and apparatus for estimating the Cobb angle of the spine based on fine shape representation and dynamic data augmentation. During the low-dimensional subspace construction process, a contour matrix is ​​constructed and a robust subspace recovery method is used to estimate the subspace, embedding the complex spinal contour into the low-dimensional subspace. This yields a subspace basis matrix that describes typical spinal morphological changes and the corresponding true subspace contour coefficients. Using the subspace basis matrix, only a small number of spatial contour coefficients need to be predicted to achieve high-precision reconstruction of the spinal contour, ensuring the structural consistency and geometric coherence of spinal segment morphology. In the dynamic data engine, an iterative mechanism involving incremental spinal image generation, pseudo-label prediction, automatic screening, and privacy review is used to construct a data self-evolution closed loop, enabling dynamic updates from image generation and automatic annotation to model retraining. Finally, the spinal segment contours are calculated by predicting the subspace contour coefficients, and indices such as the Cobb angle are automatically calculated based on geometric fitting. By employing a design that combines robust subspace representation with dynamic data augmentation, this invention can adapt to diverse samples with varying shooting conditions, body size differences, and image quality variations. While maintaining high-precision angle estimation, it exhibits good generalization and robustness, enabling automatic measurement and assisted diagnosis of scoliosis.

[0063] like Figure 1 The diagram shows a flowchart of the spine Cobb angle estimation method based on fine shape representation and dynamic data augmentation. The specific steps are explained below.

[0064] S01: Extract the original artificial samples required for training from spinal X-ray images and perform manual annotation. Preprocess the original artificial samples to obtain spinal images and construct a standardized spinal image training dataset.

[0065] The original artificial samples for training, extracted from clinical spinal X-ray images, were manually labeled with spinal regions (ROIs). Due to significant differences in spinal X-ray images obtained from different devices, patient body types, and exposure conditions, uniform preprocessing of the original artificial samples was necessary to avoid grayscale drift and inconsistent distribution during the overall network model training process. This included grayscale normalization, histogram equalization, and contrast enhancement. Simultaneously, data augmentation strategies such as random rotation, translation, scaling, horizontal flipping, and random cropping were employed to expand sample diversity and improve the network model's generalization ability to pose variations. Furthermore, to ensure data consistency, the size of all original artificial samples was adjusted to a uniform resolution.

[0066] The result of this step is the formation of a preprocessed, standardized spinal image training dataset, which provides stable input for subsequent low-dimensional subspace modeling, spinal contour detection and coefficient regression network training, Cobb angle prediction, etc.

[0067] S02: Construct a low-dimensional subspace network and extract the contour matrix. Calculate the subspace basis matrix and the true subspace contour coefficient of the spinal segment .

[0068] The low-dimensional subspace network consists of two parts: a key point extraction module and a robust subspace restoration module. The key point extraction module extracts key bony structural points from spinal images and uses these key bony structural points as contour points to establish a contour matrix covering all spinal segments. The robust subspace restoration module performs low-dimensional subspace estimation on the contour matrix to obtain a subspace basis matrix that can robustly represent spinal segments and the corresponding true subspace contour coefficients.

[0069] (a) Key Point Extraction Module

[0070] The key point extraction module employs a bony edge enhancement and structural point extraction algorithm to identify key bony structural points for each spinal segment, including the superior endplate corner, inferior endplate corner, pedicle outer edge, and central axis point. These key bony structural points allow for precise contour mapping of the spinal segment. Specifically, assuming each spinal segment is... Key bony structural points are discretized and represented using... Two-dimensional image coordinates of key bony structural points are used to construct a... 3D true contour vector :

[0071]

[0072] in: Indicates the first Two-dimensional image coordinates of key bony structural points.

[0073] All of the spinal image training dataset The contour vectors of each spinal segment are arranged in columns to obtain a contour matrix that describes the overall morphological distribution of the spinal segments. :

[0074]

[0075] Contour matrix The contour changes of different spinal segments in the spinal image training dataset were recorded, which can be used to characterize the overall distribution pattern of spinal segments in terms of shape.

[0076] (ii) Robust Subspace Recovery Module

[0077] Because spinal images may contain noise, annotation errors, or anomalous contours, directly using traditional L2 decomposition methods (such as SVD) for low-dimensional subspace estimation is easily affected by anomalous contour points, leading to instability in the low-dimensional subspace estimation. To obtain a more stable shape representation of spinal segments, the robust subspace recovery module employs the robust subspace recovery (RSR) method to extract the shape from the contour matrix. To recover a low-dimensional subspace that is insensitive to outliers, thus suppressing the interference of outlier contour points on the low-dimensional subspace; for this purpose, an orthogonal matrix set is used. Solve the following optimization problem:

[0078]

[0079] in: Indicates to Calculate each row The mixed norm, obtained by summing the norms, can effectively highlight the contribution of outliers, thus obtaining a low-dimensional subspace that is robust to anomalous contour points during the iteration process. This represents the dimension of the low-dimensional subspace. express An identity matrix of dimension 1 express An identity matrix of dimension 1.

[0080] Solving the above optimization problem using the projected Riemann subgradient method yields a subspace basis matrix that can robustly characterize the common variation patterns of spinal segment shapes. Subspace basis matrix The column vectors constitute the basic shape pattern of the spine contour, which can be used to describe the main structural change directions of the spine segments in the spine image training dataset.

[0081] After solving the above optimization problem, the contour matrix It can be approximated by projecting it onto a lower-dimensional subspace:

[0082]

[0083] in: Represents the contour matrix Projection onto a low-dimensional subspace It is the true contour vector The best approximation in a low-dimensional subspace. (This is in the context of obtaining the subspace basis matrix.) Subsequently, the basis matrix of each spinal segment in the spinal image training dataset in the subspace can be calculated using a projection method. Real subspace contour coefficients in:

[0084]

[0085] in: Indicates the first The true subspace contour coefficient of the vertebral segment is the morphological encoding of the vertebral segment in the low-dimensional subspace, used to represent the ... The coordinates of each spinal segment in the low-dimensional subspace are used to determine the contour coefficients of the real subspace. This serves as the structural and morphological prior for subsequent spinal segment classification, contour regression, and automatic Cobb angle measurement. It utilizes the subspace basis matrix... right Contour reconstruction can be performed to reconstruct the contour from the coefficients of the low-dimensional subspace to the high-dimensional contour space. The contour reconstruction formula is as follows:

[0086]

[0087] in: Indicates based on For the The reconstructed contour vector is obtained by reconstructing the contour of each spinal segment.

[0088] Under the above parameterized representation, the subspace basis matrix column vectors These can be viewed as typical spinal segment shape primitives learned from a spinal image training dataset, i.e., "basic shapes." Each characteristic spinal segment corresponds to a direction of morphological change, such as segmental lateral curvature, vertical tilt, or morphological stretching, constituting the basic dimension of the spinal shape space; for any two-dimensional contour vector The subspace profile coefficients can be obtained by projecting onto the robust subspace. .

[0089] During the inference phase, only the predicted subspace profile coefficients obtained from regression are needed. This allows us to utilize the reconstruction formula. Obtain the predicted contour vector This transforms the prediction problem in high-dimensional contour space into a coefficient regression problem in low-dimensional subspace, thereby significantly improving the stability and generalization ability of the overall network model.

[0090] Through the robust subspace recovery and parametric modeling process described above, this step completes the derivation of coefficients from the high-dimensional contour space to the low-dimensional subspace, providing reliable morphological priors and interpretable structural support for subsequent spinal contour detection, shape regression, and Cobb angle calculation.

[0091] S03: Construct a spinal contour detection and coefficient regression network to calculate the contour coefficients of the predicted subspace.

[0092] Because spinal segments in spinal X-ray images exhibit large scale variations, diverse postures, and blurred edges, the obtained subspace basis matrix... Based on the corresponding subspace contour coefficients, a neural network-based spinal contour detection and regression network is constructed to achieve spatial localization of spinal segments and regression prediction of subspace contour coefficients, such as... Figure 2 As shown, the spinal contour detection and coefficient regression network mainly consists of three parts: a backbone feature extraction module, a feature pyramid fusion module, and a dual-branch prediction module (classification prediction branch and subspace coefficient regression branch).

[0093] (I) Main Feature Extraction Module

[0094] First, the spinal X-ray image is input into the backbone feature extraction module. The backbone feature extraction module uses ResNet50, a convolutional neural network based on residual structure, as the base network to perform multi-layer convolution and downsampling operations on the input spinal X-ray image, and extracts deep semantic features of the spine at different scales layer by layer.

[0095] (ii) Feature Pyramid Fusion Module

[0096] To balance local detail with overall structural awareness, a Feature Pyramid Network (FPN) structure is introduced after the output of the backbone feature extraction module. High-level semantic features are upsampled layer by layer through a top-down path and then horizontally connected and fused with low-level detail features to generate a fused feature map that balances multi-scale spatial resolution and semantic hierarchy. This multi-scale feature fusion structure helps to enhance the adaptability of the spinal contour detection and regression network to different spinal segment sizes and morphological variations.

[0097] (III) Two-branch prediction module

[0098] To simultaneously perform segment identification and contour regression, based on the fused features, two parallel prediction branches are set up: a classification prediction branch and a subspace coefficient regression branch. The classification prediction branch is used to determine whether the candidate anchor boxes contain valid spinal segments and output the corresponding confidence distribution, i.e., to identify positive sample anchor boxes; the subspace coefficient regression branch is used to predict the predicted subspace contour coefficients of the spinal segments within the positive sample anchor boxes under the subspace basis matrix. This enables parameterized mapping from a two-dimensional image space to a low-dimensional subspace.

[0099] To improve the sample utilization and generalization ability of the classification prediction branch, a sample allocation strategy combining dense normal samples and sparse hard sample samples is adopted: In the dense sampling stage, a comprehensive classification judgment is performed on all candidate anchor boxes on all spinal X-ray images, and standard cross-entropy loss is used. As an optimization objective, to ensure sufficient coverage of normal samples and to learn the discrimination ability of normal samples; in the sparse sampling stage, to balance the distribution of difficult samples and normal samples, a special sampling strategy is set for spinal segment samples with blurred boundaries, abnormal morphology, or rare structures, using Focal loss. As an optimization objective, hard examples are assigned higher weights for weighted selection to alleviate quantity imbalance and enhance the model's learning ability on hard examples. Two sampling phases cover normal and hard examples respectively, and loss fusion is used to jointly optimize the recognition ability of the classification prediction branch. The total loss of the classification prediction branch... Represented as:

[0100]

[0101] in: The cross-entropy loss represents the cross-entropy loss in dense regions. The Focal loss represents the sparse region. This loss fusion strategy can enhance the sensitivity of the classification prediction branch to boundary regions and low-contrast spinal segments while ensuring the classification performance of the classification prediction branch.

[0102] The subspace coefficient regression branch performs subspace coefficient regression only on the positive sample anchor boxes determined by the classification prediction branch; for the first... The predicted subspace silhouette coefficient is denoted as (n positive sample anchor boxes). The predicted contour vector obtained through the subspace coefficient regression branch Compare predicted contour vectors and reconstructed contour vector Smooth-L1 loss is used As an optimization objective:

[0103]

[0104] in: Indicates the first The true contour vector of a positive sample anchor box. Indicates based on The first contour reconstruction obtained The reconstructed contour vector of a positive sample anchor box Indicates based on The predicted profile vector is obtained through the subspace coefficient regression branch. Indicates the first The true subspace contour coefficients of each positive sample anchor frame. Indicates the first The predicted subspace contour coefficients of a positive sample anchor box This represents the set of anchor boxes that are labeled as positive samples by the classification prediction branch.

[0105] By regressing the subspace contour coefficients instead of directly fitting the original high-dimensional keypoints, the spine contour detection and coefficient regression network can significantly reduce the dimensionality of parameters while maintaining structural consistency and significantly reducing the impact of prediction noise.

[0106] Total loss of spinal contour detection and coefficient regression network Defined as a weighted sum of classification prediction loss and subspace coefficient regression loss:

[0107]

[0108] in: and These are the weighting coefficients for the classification prediction loss and the subspace coefficient regression loss, respectively, used to balance the contributions of the two tasks during training; in the embodiment, , .

[0109] Through multi-scale deep semantic feature extraction, sparse-dense sampling strategy and bi-branch prediction mechanism, the spinal contour detection and coefficient regression network can achieve efficient mapping from spinal X-ray images to subspace contour coefficients, providing accurate structural input and interpretable morphological basis for subsequent spinal curvature calculation and Cobb angle geometric analysis.

[0110] S04: Based on the predicted subspace contour coefficients, predict the contours of the spinal segments and calculate the Cobb angle.

[0111] In the inference phase, firstly, based on the confidence output of the classification prediction branch in step S03, candidate anchor boxes with high confidence are selected as positive sample anchor boxes; subsequently, the subspace coefficient regression branch is used to calculate the... The predicted contour vector of each positive sample anchor box The subspace basis matrix is ​​obtained through step S02. Calculate the predicted contour vector :

[0112]

[0113] in: Representation based on subspace basis matrix The predicted sequence of contour points in the two-dimensional image coordinate system. Indicates the first Two-dimensional image coordinate prediction values ​​for key bony structural points; the prediction formula for all spinal segments can be written as:

[0114]

[0115] After predicting all spinal segments, the two-dimensional image coordinate estimation results of each spinal segment can be obtained. The predicted spinal segments are also composed of a series of key bony structural points and strictly follow the shape prior obtained by the robust subspace recovery method. Therefore, they can maintain good geometric continuity, noise resistance and consistency with the contour morphology in the actual image.

[0116] Subsequently, a geometric relationship analysis was performed on the contours of adjacent spinal segments. By calculating the direction vectors and normal angles between the superior and inferior endplates of each segment, the tilt differences between spinal segments can be obtained. The direction of the line connecting the centers of the superior and inferior endplates is defined as the direction of the central axis of the spinal segment. The first spinal segment and the first The angle between each spinal segment is the corresponding local Cobb angle. To ensure computational stability, the normal angle is calculated using a vector dot product and an inverse cosine function, and the overall Cobb angles of the main curve, upper secondary curve, and lower secondary curve are accumulated segment by segment across the entire spine.

[0117] Furthermore, by performing spline fitting and curvature derivative calculation on the predicted central axes of the spinal segments, a continuous curvature curve of the entire spine can be obtained. This allows us to obtain the overall curvature trend and morphological changes of the spine in the coronal plane. This continuous curvature curve... In clinical analysis, it can help assess the degree of deformation in different spinal regions and be cross-validated with the Cobb angle.

[0118] The final output prediction results include a sequence of predicted two-dimensional image coordinates for key bony structures in each spinal segment, local Cobb angles, global Cobb angles, and continuous curvature curves. The calculation of Cobb angle-related indicators has achieved a precise conversion from low-dimensional shape parameters to clinical measurement indicators.

[0119] S05: Construct a dynamic data engine module to generate incremental spinal images, perform pseudo-label prediction, automatic screening and manual verification on the generated incremental spinal images, and continuously expand and clean the spinal image training dataset.

[0120] like Figure 3 As shown, a "dynamic data engine" based on a generative diffusion model and a cyclic automatic pseudo-labeling mechanism was designed to automatically generate, filter, and clean large-scale spinal X-ray image data, achieving self-supervised data expansion with low privacy risks. This dynamic data engine consists of four parts: a pseudo-label generation submodule, an automatic filtering submodule, a manual verification submodule, and a privacy detection submodule, forming a closed-loop data evolution process of "generation—filtering—retraining".

[0121] First, a training set of manually annotated spinal images was used. The spinal contour detection and coefficient regression network was initially trained to obtain initial network parameters. Subsequently, incremental spinal images (hereinafter referred to as samples) that conform to the statistical characteristics of spinal X-ray images are generated in batches using a stable diffusion model, forming an unlabeled generated set. Initialize the sample selection index set Then, in In the cycle, according to the first Network parameters obtained from round loop For unlabeled generated sets The samples in the dataset undergo pseudo-label prediction to obtain the corresponding pseudo-label samples and confidence distribution. Samples with confidence scores higher than a preset threshold are then included. The pseudo-labeled samples are determined to be valid samples, and the remaining pseudo-labeled samples are not included in subsequent training to avoid accumulating errors, thus obtaining the preliminary sample set. .

[0122] During the automatic screening phase, the initial sample set was further refined based on screening criteria such as the integrity of the spinal segment outline, the number of spinal segments, the continuity of spinal segments, and the morphological rationality of spinal segments. A multi-level screening process was conducted, retaining only samples that met the constraints of structural continuity and statistical distribution. Subsequently, a manual verification mechanism was used to manually revise samples with ambiguous boundaries or abnormal morphology from the automatic screening stage to ensure medical semantic consistency. After automatic screening and manual verification, all pseudo-labeled samples that passed the screening were integrated into a high-quality sample set. Its definition is:

[0123]

[0124] in: Indicates the first A sample of pseudo-labels Retained in the high-quality sample set after automatic screening and manual verification middle.

[0125] Subsequently, on the expanded training set The above training and fine-tuning of the volumetric network model yields the first... Network parameters of the round cycle network parameters For the The generation and automatic selection of pseudo-labels form a self-iterative closed loop of "generation—selection—retraining". When the sample selects the index set... Upon convergence, the loop process ends, and the expanded training set is... As a high-quality training dataset after final cleaning The dynamic data engine outputs high-quality training datasets. A stable and highly generalizable spine shape estimation model was developed.

[0126] (a) Pseudo-tag generation

[0127] First, an image generation network based on a diffusion model is used as the source of incremental spinal images. The task of the pseudo-label generation network is to utilize the network parameters output from the previous round. For unlabeled generated sets Perform pseudo-label prediction, generating pseudo-label samples and their corresponding confidence scores. For the first... A sample of pseudo-labels Output the corresponding predicted subspace contour coefficients and the corresponding confidence level ;like Then the pseudo-label sample These are recorded as positive samples and temporarily included in the preliminary sample set. ;like Then, pseudo-label samples will not be used for the time being. To reduce the propagation of false label errors; thus obtaining a preliminary sample set. .

[0128] (ii) Automatic Filtering

[0129] After initial screening, the system automatically filters segments to ensure the structural integrity and morphological rationality of the pseudo-labeled samples. The automatic filtering process is divided into three levels: segmental, image, and structural. Segmental filtering removes pseudo-labeled samples with excessively small areas, key points exceeding boundaries, incomplete contours, or abnormal distortions, retaining only geometrically resolvable pseudo-labeled samples. Image filtering removes pseudo-labeled samples with fewer than a threshold (e.g., 10 segments) of effective spinal segments or discontinuous intersegment spacing to ensure the overall structural continuity of the spine. Structural filtering performs spline fitting and morphological statistical analysis on the centerlines of the remaining pseudo-labeled samples, using structural similarity constraints to remove morphologically abnormal pseudo-labeled samples, making the filtered pseudo-labeled samples more consistent with the morphological characteristics of the real clinical spine in terms of structural distribution.

[0130] After automatic filtering, a high-quality sample set is formed. Each pseudo-labeled sample satisfies the basic requirements of morphological consistency and structural validity.

[0131] (iii) Manual verification

[0132] To further improve the accuracy and medical consistency of data annotation, the system introduces a manual annotation mechanism to manually intervene in pseudo-labeled samples that have potential errors after automatic screening. Annotators verify the screened pseudo-labeled samples through a visualization platform, mainly including the following three operations: error correction, missing data completion, and anomaly removal. Pseudo-labeled samples that have undergone manual review and correction are marked as high-confidence and are directly added to the high-quality sample set. .

[0133] (iv) Privacy detection

[0134] To prevent the generative model from memorizing raw privacy data during training, which could lead to potential information leakage, this step involves processing the obtained high-quality sample set. Perform dual similarity detection based on structure and pixel distribution. For each pseudo-label sample... Compared with the original artificial sample Calculate the overall similarity score:

[0135]

[0136] in: It is a structural similarity index. Pixel similarity index and This is a weighting factor. The overall similarity between any pseudo-labeled sample and any original artificial sample is... Higher than the set threshold If a sample is identified as a potential leak sample, it will be selected from the high-quality sample set. This process eliminates unnecessary steps to ensure the privacy and security of data expansion throughout the entire process.

[0137] In addition, through memory indicators The number of potentially leaked samples is statistically evaluated to assess the overfitting of the generative diffusion model. If the detected privacy leakage risk exceeds the security threshold, the generative model is automatically retrained to update the parameters.

[0138] After completing the entire process of the above four steps, the system retains all samples that have passed automatic screening, manual review, and privacy checks in the high-quality sample set. Pseudo-labeled samples and spinal image training set Together, they are used for retraining and fine-tuning of the overall network model, updating network parameters. :

[0139]

[0140] The updated overall network model then undergoes another round of pseudo-label generation and automatic selection, thus forming a continuous evolutionary closed loop for the overall network model and dataset. This cyclical process involves selecting an index set of samples. The process terminates upon convergence, and the expanded training set is then used. The final output is a high-quality training dataset. .

[0141] Through this dynamic data engine mechanism, the model continuously absorbs structural knowledge from the generated images and achieves self-iterative optimization, gradually improving the detection accuracy and robustness of complex spinal shapes, providing reliable data and model support for subsequent Cobb angle prediction and structured diagnosis.

[0142] S06: Based on high-quality training datasets The overall network model is jointly trained and optimized through inference.

[0143] The overall network model (spine shape estimation model) includes a keypoint extraction module, a robust subspace recovery module, a spine contour detection and coefficient regression network, and a Cobb angle prediction module. Its loss function consists of a classification prediction loss. Subspace coefficient regression loss It consists of three parts: angular consistency constraint based on contour prediction; classification prediction loss. Using cross-entropy loss With Focal loss The weighted combination is used to optimize the localization and classification accuracy of spinal segments; subspace coefficient regression loss. The deviation between the predicted contour vector and the reconstructed contour vector is constrained by the Smooth-L1 loss to ensure the accuracy of contour prediction under the constraint of the subspace basis matrix; the angle consistency constraint guides the spine shape estimation model to establish stable geometric consistency between contour prediction and Cobb angle prediction by comparing the difference between the Cobb angle calculated from the reconstructed contour and the true Cobb angle.

[0144] Training in an end-to-end manner, such as Figure 4 The spinal shape estimation model shown first uses a spinal contour detection and coefficient regression network to extract fusion features from spinal X-ray images and predict subspace contour coefficients; then, in the Cobb angle prediction module, it estimates the Cobb angle and curvature distribution based on the predicted directional change patterns between spinal segments; finally, it combines a dynamic data engine to continuously fine-tune the overall network model, enabling the overall network model to achieve synergistic optimization in both contour prediction and angle regression.

[0145] S07: Spinal Shape Estimation Model Test

[0146] By inputting any spinal X-ray image into the trained network model, the model automatically outputs the contours, local Cobb angles, and global Cobb angles of each spinal segment, enabling geometric analysis of the severity of scoliosis.

[0147] The method of this invention can be implemented entirely by computer without the need for manual assistance; this indicates that the invention can achieve batch automatic processing, which can greatly improve processing efficiency and reduce labor costs.

[0148] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.

Claims

1. An automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification, characterized in that: Includes the following steps: S01: Extract the original artificial samples required for training from spinal X-ray images and perform manual annotation. Preprocess the original artificial samples to obtain spinal images and construct a standardized spinal image training dataset. S02: Extract key bony structure points from spinal images using the key point extraction module, establish a contour matrix covering all spinal segments using the key bony structure points as contour points, and perform low-dimensional subspace estimation on the contour matrix using the robust subspace recovery module to obtain the subspace basis matrix that can robustly represent the spinal segments and the corresponding true subspace contour coefficients. S03: Based on the real subspace contour coefficient, a spinal contour detection and coefficient regression network is constructed that integrates multi-scale feature extraction and sparse-dense sampling strategies to locate the spinal segment regions in spinal images and regress the predicted subspace contour coefficients of the corresponding spinal segments. S04: Based on the predicted subspace contour coefficients, the contour prediction of spinal segments is performed using the subspace basis matrix; for the predicted spinal segments, the local Cobb angle and the global Cobb angle are calculated through the Cobb angle prediction module to achieve geometric analysis of the severity of scoliosis. S05: Build a dynamic data engine to generate incremental spinal images, and perform pseudo-label prediction, automatic screening and manual verification on the generated incremental spinal images. Use the incremental spinal images to continuously expand and clean the spinal image training dataset to obtain a high-quality training dataset. S06: Based on a high-quality training dataset, the overall network model consisting of a key point extraction module, a robust subspace recovery module, a spinal contour detection and coefficient regression network, and a Cobb angle prediction module is jointly trained and inferred to optimize the model. S07: Input any spinal X-ray image into the trained overall network model, and automatically output the contours, local Cobb angles, and overall Cobb angles of each spinal segment to achieve geometric analysis of the severity of scoliosis.

2. The automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification according to claim 1, characterized in that: In step S02, key bony structural points are detected on the spinal images to obtain the data for each spinal segment. Key bony structural points, including the superior endplate corner, the inferior endplate corner, the outer edge of the pedicle, and the central axis point, are accessed via... The two-dimensional image coordinates of key bony structural points are used to discretize the spinal segments, denoted as the true contour vector. Arrange the true contour vectors of all spinal segments in the spinal image training dataset column-wise to construct a contour matrix. ; Using the robust subspace recovery module to analyze the contour matrix Low-dimensional subspace estimation is performed, and the subspace basis matrix that can robustly represent spinal segments is obtained by solving for the optimal orthogonal basis. Simultaneously, the basis matrix of each spinal segment in the subspace is obtained. True subspace profile coefficients in .

3. The automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification according to claim 1, characterized in that: In step S03, a spinal contour detection and coefficient regression network is constructed based on the real subspace contour coefficients. The input spinal image is processed by layer-by-layer convolution and downsampling using a ResNet50 convolutional neural network to obtain multi-scale deep semantic features that characterize spinal segments. Based on these multi-scale deep semantic features, a feature pyramid fusion structure is introduced, upsampling high-level features to lower levels and laterally fusing them with local detail features to obtain fused features that combine multi-scale resolution and structural consistency. Based on these fused features, a classification prediction branch and a subspace coefficient regression branch are set. The classification prediction branch determines whether candidate anchor boxes contain valid spinal segments and outputs the corresponding confidence distribution. The subspace coefficient regression branch predicts the predicted subspace contour coefficients of spinal segments within positive sample anchor boxes under the subspace basis matrix. .

4. The automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification according to claim 3, characterized in that: During the classification prediction branch, a sample allocation strategy combining dense normal samples and sparse hard sample samples is adopted to divide the spinal images in the spinal image training dataset into two categories: normal samples and hard sample samples. Dense normal samples are used to improve the detection coverage of normal spinal segments, and standard cross-entropy loss is employed. As an optimization target; Sparse and hard examples are used to enhance the overall network model's ability to distinguish spinal segments through a differential weighting mechanism, employing Focal loss. As an optimization target; The total loss of the classification prediction branch is ; During the execution of the subspace coefficient regression branch, subspace coefficient regression is performed only on the positive sample anchor boxes determined by the classification prediction branch. The subspace coefficient regression branch uses Smooth-L1 loss. As an optimization objective: , in: Indicates the first The true contour vector of a positive sample anchor box. Indicates based on The first contour reconstruction obtained The reconstructed contour vector of a positive sample anchor box Indicates based on The predicted profile vector is obtained through the subspace coefficient regression branch. Indicates the first The true subspace contour coefficients of each positive sample anchor frame. Indicates the first The predicted subspace contour coefficients of a positive sample anchor box This represents the set of anchor boxes labeled as positive samples in the classification prediction branch; Total loss of the overall network model Defined as a weighted average of classification prediction loss and subspace coefficient regression loss: , in: and These are the weighting coefficients for classification prediction loss and subspace coefficient regression loss, respectively.

5. The automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification according to claim 1, characterized in that: In step S04, based on the predicted subspace contour coefficients Using the subspace basis matrix Contour prediction is performed on each spinal segment, which is composed of a series of key bony structural points. For each predicted spinal segment, the endplate direction vector is extracted, and the local tilt difference of the spine is calculated based on the angle between the endplate direction vectors of adjacent spinal segments, thereby obtaining the local Cobb angle between continuous spinal segments. Simultaneously, by fitting the central axis of the predicted spinal segments, a continuous curvature curve of the entire spine is established. It acquires the curvature trend and morphological changes of the entire spine in the coronal plane, and finally outputs the predicted contours of the spinal segments, local Cobb angles, global Cobb angles, and continuous curvature curves. .

6. The automatic measurement method for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification according to claim 1, characterized in that: In step S05, a dynamic data engine composed of a generation and diffusion model and an automatic pseudo-label process is constructed to continuously expand the data, generate pseudo-labels and screen the quality of the spinal image training dataset to form a high-quality training dataset. The dynamic data engine first trains a spinal contour detection and coefficient regression network on a manually labeled spinal image training dataset. Simultaneously, it uses a generative diffusion model to generate unlabeled incremental spinal images in batches. Then, it uses the initially trained spinal contour detection and coefficient regression network to predict pseudo-labels on these unlabeled incremental spinal images, obtaining corresponding pseudo-label samples and confidence distributions. Pseudo-label samples with confidence scores higher than a preset threshold are selected. Further automatic filtering of pseudo-label samples is performed based on selection criteria. A manual verification mechanism is then used to correct image boundaries and complete pseudo-labels for some pseudo-label samples discovered during the automatic filtering process. Finally, a dual similarity detection based on structure and pixel distribution filters out pseudo-label samples with similarity exceeding a set threshold to the original manually labeled samples. The retained pseudo-label samples are used to expand the spinal image training data, resulting in a high-quality training dataset.

7. An automatic measurement device for the Cobb angle of the spine based on fine shape characterization and dynamic data amplification, characterized in that: It includes a spinal image training dataset construction unit, a low-dimensional subspace construction unit, a spinal contour detection and coefficient regression unit, a Cobb angle prediction unit, a dynamic data engine unit, and a joint training and optimization unit; The spinal image training dataset construction unit is used to extract the original artificial samples required for training from spinal X-ray images and perform artificial annotation. The original artificial samples are preprocessed, including gray-level normalization, bony edge enhancement, noise suppression and spinal region cropping, to obtain spinal images and construct a standardized spinal image training dataset. The low-dimensional subspace construction unit includes a key point extraction module and a robust subspace recovery module. The key point extraction module is used to extract key bony structure points from spinal images and use the key bony structure points as contour points to establish a contour matrix covering all spinal segments. The robust subspace recovery module performs low-dimensional subspace estimation on the contour matrix to obtain a subspace basis matrix that can robustly represent spinal segments and the corresponding true subspace contour coefficients. The spinal contour detection and coefficient regression unit integrates multi-scale feature extraction and sparse-dense sampling strategies to achieve spatial localization of spinal segment regions in spinal images and regress the predicted subspace contour coefficients of spinal segments. The Cobb angle prediction unit uses a subspace basis matrix to predict the contour of the spinal segment. For the predicted spinal segment, the Cobb angle prediction module calculates the local Cobb angle and the global Cobb angle. The dynamic data engine includes a pseudo-label generation module, an automatic filtering module, a manual verification module, and a privacy detection module. It sequentially performs pseudo-label prediction, automatic filtering, manual verification, and privacy detection on the incremental spinal images generated by the diffusion model, and adds the finally filtered incremental spinal images to the spinal image training dataset to form a high-quality training dataset. The joint training and optimization unit calculates the network parameters and optimization objectives of the spinal shape estimation model, which is composed of a spinal image training dataset construction unit, a low-dimensional subspace construction unit, a spinal contour detection and coefficient regression unit, and a Cobb angle prediction unit, based on a high-quality training dataset. It then iteratively optimizes the network parameters based on a gradient update strategy to achieve end-to-end joint training and performance improvement.