An automatic measurement method for scoliosis parameters based on X-ray key point detection

Through multi-task deep learning network and correction algorithm, the problem of inaccurate prediction of vertebral coordinate point in scoliosis Cobb angle measurement is solved, and accurate detection of vertebral key point and fully automatic scoliosis parameter measurement is achieved, which is suitable for X-rays of different postures and imaging quality.

CN119671933BActive Publication Date: 2025-08-15QINGDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454710.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-08-15
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, in the Cobb angle measurement of scoliosis, there are many missed points in the prediction of vertebral coordinate points, especially in the case of vertebral deformity, injury or poor X-ray imaging quality, the vertebral tilt vector cannot be accurately obtained, resulting in inaccurate measurement.

Method used

The multi-task deep learning network is used to predict the key point heat map and offset map of the spine vertebrae, combined with the symmetric offset distance prior to explicitly capture the left and right symmetric feature information of the spine structure, and match the top-down and bottom-up aligning offset vectors, and correct the center and corner points of the vertebrae body by using ACIC and CFOF algorithms to achieve accurate matching and measurement.

Benefits of technology

Accurate central and corner positioning of vertebral body under different postures and imaging quality is achieved, the robustness of key point detection is improved, and the accuracy and real-time measurement of scoliosis parameters such as Cobb angle are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671933B_ABST
    Figure CN119671933B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology and relates to an automatic measurement method for scoliosis parameters based on X-ray key point detection. It simultaneously predicts the key point heat map and offset map of the spinal vertebrae based on a multi-task deep learning network, and uses the symmetric offset distance prior to explicitly capture the left-right symmetric feature information of the spinal structure, accurately identifies the vertebral center point and completes the correct pairing of the vertebral corner points. It can effectively solve various abnormal detection situations such as missing points, redundant points, and outliers, ensure the accuracy of vertebral key point detection, and realize fully automatic measurement of core scoliosis parameters such as Cobb angle parameters based on clinical measurement criteria. It has low computational complexity and high real-time performance, laying the foundation for subsequent intelligent diagnosis and treatment of spinal diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing and relates to a method for automatically measuring scoliosis parameters based on key point detection of X-ray films. Background Art

[0002] Modern lifestyles pose a significant challenge to spinal health. Prolonged sitting and poor daily habits lead to tight back muscles and improper posture. Lack of exercise weakens the back and abdominal muscles, significantly increasing the risk of spinal disorders. To alleviate the burden of seeking medical treatment and improve diagnostic efficiency for clinicians, AI-based assisted diagnosis and treatment technologies for spinal disorders have rapidly developed.

[0003] Currently, in clinical and AI-assisted diagnosis of spinal diseases, X-rays are widely used to diagnose spinal deformities, such as adolescent idiopathic scoliosis and lumbar degenerative scoliosis. Depending on diagnostic needs, spinal X-rays taken include 24 vertebrae (cervical vertebrae 1-7, thoracic vertebrae 1-12, lumbar vertebrae 1-5), the sacrum, and the ilium. Clinical spine surgeons measure a variety of medical indicators based on the anatomical structure of the spine, such as the Cobb angle, the C7 plumb line, the sacral median vertical line, the apical vertebral offset, the sacral tilt, the coronal plane balance, and the trunk inclination. They then diagnose the disease according to commonly used classification criteria, thereby formulating a reasonable treatment plan. Among these, the measurement of the Cobb angle is crucial and the most complex.

[0004] To measure the Cobb angle, physicians must empirically determine the end vertebra of the scoliosis, thereby identifying the superior endplate of the superior vertebra and the inferior endplate of the inferior vertebra. The angle between these two lines is the Cobb angle. Depending on the severity of the patient's scoliosis, there may be one to three Cobb angles: the superior thoracic curve, the primary thoracic curve, and the thoracolumbar curve. Existing fully automated Cobb angle measurement technologies fall into two main categories: one directly predicts the Cobb angle using a deep regression network, but this approach lacks a clear measurement method and has limited clinical guidance. The other utilizes deep learning image processing technology to obtain morphological information about the spinal structure, such as vertebral masks, vertebral coordinates, and vertebral identification information. This information is then parsed and calculated to provide a detailed display consistent with clinical measurements, making it the current mainstream approach. Although different methods employ varying means to predict results, the ultimate goal is to accurately predict or measure the inclination slope of each vertebra to calculate the Cobb angle. Although the method of using vertebral masks and coordinate fields to calculate the Cobb angle has achieved certain success, when encountering vertebral deformities, injuries, or poor X-ray imaging quality, the prediction of vertebral coordinate points often suffers from missing points, multiple points, and errors. In addition, the coordinate points cannot be effectively identified, resulting in the inability to accurately obtain the vertebral tilt vector in subsequent processing. Summary of the Invention

[0005] The purpose of the present invention is to overcome the shortcomings of the existing technology, and to provide an automatic measurement method for scoliosis parameters based on X-ray key point detection. Based on a multi-task deep learning network, the key point heat map and offset map of the spinal vertebrae are simultaneously predicted, and the symmetric offset distance prior is used to explicitly capture the left-right symmetric feature information of the spinal structure, accurately identify the vertebral center point and complete the correct pairing of the vertebral corner points. It can effectively solve various abnormal detection situations such as missing points, redundant points, and outliers, ensure the accuracy of vertebral key point detection, and realize fully automatic measurement of core scoliosis parameters such as Cobb angle parameters according to clinical measurement criteria.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for automatically measuring scoliosis parameters based on X-ray key point detection comprises the following steps:

[0008] S1. Dataset collection: Obtain the spinal X-ray dataset (SpineX-C dataset), annotate the spinal X-rays, and then perform Gaussian filtering to obtain the corner mask map of the spinal region;

[0009] S2. Data processing: Obtain the vertebral center point mask based on the corner point mask, and construct the center point adjacent offset vector using both top-down and bottom-up methods. Then, use the matching relationship between the center point and the corner point to construct the corner point offset vector corresponding to each center point.

[0010] S3. Deep neural network construction: Build a deep neural network (KLAP-Net) and add a symmetric offset distance constraint loss to the deep neural network to constrain the offset distance of key points;

[0011] S4. Spine key point detection: The deep neural network constructed in step S3 is trained using the AISpine-XC dataset. Using the trained deep neural network model, four key point feature maps are obtained for any input spinal X-ray: the vertebral center point, corner point, center point adjacent offset vector field, and corner point offset vector.

[0012] S5. Adaptive correction of vertebral center points: Using the adjacent offset field information of each center point, the ACIC algorithm is used to automatically correct the vertebral center points for missing points, multiple points, and incorrect points to obtain the corrected center point;

[0013] S6, corner point correction and matching: Use the CFOF algorithm to correct the predicted corner points to obtain the corrected corner points, and complete the matching between the center point and the corner point;

[0014] S7, Automatic Cobb Angle Measurement: Based on the vertebral center and corner information, a vertebral position constraint matrix is constructed to find the maximum tilt angle in the matrix. The vertebral position index is gradually modified to ultimately obtain the three largest angles. Based on the positional relationship of the three angles, the Cobb angle values for thoracic scoliosis, primary thoracic curve, and thoracolumbar curve are ultimately determined.

[0015] S8. Other parameter measurements: Based on the positions of the vertebral center and corner points and according to the clinical measurement method of scoliosis parameters, measure the C7 plumb line, sacral median vertical line, apical vertebral offset, sacral tilt, coronal plane balance, and trunk inclination.

[0016] As a further technical solution of the present invention, the spinal X-ray film in step S1 includes a coronal X-ray film and a left and right oblique X-ray film. When marking the spinal X-ray film, the corner points of 17 vertebrae from T1 to L5 are marked. The four corner points of the 17 vertebrae from T1 to L5 are marked separately, and a total of 68 vertebrae are marked key point positions. m=1,2,...,68, and Gaussian filtering is performed on the key points to obtain the corner mask map C={C1,C2,C3,C4} of the spine area, where C1, C2, C3 and C4 correspond to the upper left, upper right, lower left and lower right corner points respectively.

[0017] As a further technical solution of the present invention, the specific process of step S2 is:

[0018] S21. First obtain the coordinates of the vertebral center point n=0,1,...,N, where N+1 is the number of vertebral center points. Then Gaussian filtering is performed on the vertebral center points to obtain the vertebral center point mask Q cen ;

[0019] S22. Construct a bidirectional center point adjacent offset vector (AOF) to obtain the top-down offset vector V TD and the bottom-up offset vector V BU , the specific calculation method is: j=0,1,...,N-1;

[0020] S23, by constructing the corner point offset vector O m To achieve the matching of center points and corner points, such as Figure 2 As shown in (d), the corner offset vector O m The calculation process is: in represents the coordinates of the corner points, Represents the corresponding center point coordinates, m=1,2,...,68.

[0021] As a further technical solution of the present invention, the working process of the deep neural network (KLAP-Net) constructed in step S3 is as follows: the spinal X-ray is input into the deep neural network, first undergoes two layers of convolution operations to extract low-level image features, and then passes through an encoder and decoder designed with a U-shaped architecture, wherein the encoder (Encoders) uses a multi-scale residual downsampling module to extract key point features of the spinal X-ray, and adds a self-attention (SA) module in the highest dimension to enhance the expression of spinal semantic information; the decoder (Decoders) uses a residual upsampling fusion module, and finally passes through a fully connected layer to obtain a 17-layer feature map; then four different feature mapping heads are set based on the feature map, and the four feature mapping heads all include convolution, batch normalization, and Relu activation functions, and the convolution kernels are 1×1, 3×3, 7×7, and 3×3, respectively. After feature mapping, four key point feature maps of vertebral center points, vertebral corner points, center point adjacent offset vector fields, and corner point offset vector fields predicted by the network are obtained.

[0022] As a further technical solution of the present invention, the process of limiting the offset distance of the loss constraint key point by the symmetrical offset distance in step S3 is as follows:

[0023] First define the predicted vertebral center and corner loss function L h : in, is the predicted vertebral corner feature, i=1,2,3,4, is the predicted vertebral center feature;

[0024] Then design the offset loss L0 for the diagonal point offset vector and the center point adjacent offset vector:

[0025]

[0026] in, and are the predicted corner offset vector and center point adjacent offset vector, O and V are the corner offset vector and center point adjacent offset vector obtained in step S2, respectively;

[0027] Then, using the symmetric relationship between the vertebral corners and the center point, the symmetric offset distance limit loss L is designed. s :

[0028]

[0029] Where eps = 1 × e -4 , For the predicted vertebral center point, the final comprehensive loss is set as the weighted loss function: L hos =λ1L h+λ2L0+λ3L s , where λ1, λ2 and λ3 are weight coefficients.

[0030] As a further technical solution of the present invention, in the process of training the deep neural network in step S4, random flipping, random scaling, and contrast change are used for data enhancement. The Adam optimizer is used for training, the learning rate is set to 0.001, the number of batch samples is 8, and a total of 400 rounds of training are performed.

[0031] As a further technical solution of the present invention, the specific process of step S5 is:

[0032] S51, offset vector based on center point adjacency Get the average adjacent distance D of the center point adj : Redundant points are deleted from top to bottom according to the average adjacent distance of the center points. If the distance between two adjacent center points is less than D thr =τD adj , then delete the following redundant points; where τ is the threshold setting parameter;

[0033] S52, using the top-down center point adjacent offset vector predicted in step S4 Calculate the current point The corresponding lower adjacent point Q i ′ +1 , If the predicted neighboring points With Q i ′ +1 The distance d between them is less than τD adj , then it is believed that If the prediction is correct, keep this point unchanged and use it as the new current point. Otherwise, it is considered that there is a missed point. The missing points are filled by comprehensively using the center point adjacent offset vectors from top to bottom and bottom to top to obtain a new point: Update the index of all Q vectors and take the new point as the current point. Repeat the above process until the detection is completed and the corrected center point Q is obtained. c .

[0034] As a further technical solution of the present invention, the specific process of step S6 is: through the trained deep neural network (KLAP-Net), the positions of the four corner points are obtained. At the same time, the confidence of each corner point prediction can be obtained according to the network output The predicted corner offset vector based on the prediction confidence value Make adjustments to get the adjusted corner offset vector m=1,2…,M;then based on the corrected center point Qc and the adjusted corner offset vector Calculate the corrected corner point position K ′ m : Then the predicted corner position and the corrected corner position K ′ m Perform comprehensive weighting to obtain the final corner point position K m : Where α is the weighted weight; all predicted corner points are traversed and verified, and the matching of each vertebral center point and corner point is completed during the verification process. The positions of all predicted corner points are corrected to obtain the accurate detection positions of all corner points and mark them.

[0035] As a further technical solution of the present invention, the specific process of step S7 is as follows: Based on the center point corrected in step S5 and the corner point information corrected in step S6, the angle matrix A of the 17 vertebrae and the vertebrae position constraint matrix T are constructed, where the vertebrae position constraint matrix T is:

[0036]

[0037] Where i and j represent the index of the center point of the first and last vertebra in a bend, and tanθ represents the degree of inclination of each vertebra; the angle matrix A is: A[i,j] = |θ i -θ j |,θ i ,θ j is the inclination angle of the i, j vertebral body, and the angle matrix A and the vertebral position constraint matrix T are operated to obtain the new angle matrix A new =A*T, and according to the new angle matrix, the three maximum tilt angles are retrieved, namely the Cobb angles corresponding to the thoracic scoliosis, main thoracic curve and thoracolumbar curve.

[0038] Compared with the existing technology, the present invention has the following advantages:

[0039] (1) For coronal, left-right and right-angle spinal X-ray images, the present invention can achieve precise positioning and identification matching of the center points and corner points of 17 vertebrae (first thoracic vertebra to fifth lumbar vertebra) without any human-computer interaction;

[0040] (2) The present invention adopts an automatic correction algorithm for key points that integrates prior knowledge of vertebral structure, which improves the robustness of key point detection and ensures the feasibility of subsequent parameter measurement. It is particularly suitable for spinal images with occlusion, blur and large tilt;

[0041] (3) The present invention is combined with clinical judgment criteria, with low computational complexity and high real-time performance, laying the foundation for subsequent intelligent diagnosis and treatment of spinal diseases. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of the method for automatically measuring scoliosis parameters based on X-ray key point detection provided by the present invention.

[0043] Figure 2 Schematic diagram of vertebral key points and structural information according to an embodiment of the present invention.

[0044] Figure 3 This is a structural diagram of the deep neural network framework of an embodiment of the present invention.

[0045] Figure 4 Schematic diagram of the vertebral center point adaptive correction process according to an embodiment of the present invention.

[0046] Figure 5 This is an example diagram of the vertebral key point detection results of an embodiment of the present invention.

[0047] Figure 6 This is an example diagram of the vertebral Cobb angle and core parameter measurement results according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0049] Example:

[0050] like Figure 1 As shown, a method for automatically measuring scoliosis parameters based on X-ray key point detection includes the following steps:

[0051] S1. Dataset collection:

[0052] A spinal X-ray dataset (SpineX-C dataset) was obtained. The spinal X-rays were annotated and then Gaussian filtered to obtain a corner mask map of the spinal region. The dataset in this embodiment was provided by the hospital's spine surgery department and contains a total of 294 spinal X-rays. Each spinal X-ray has different spinal curvature postures and clarity. The spinal surgeons annotated the dataset images and annotated the four corner points of the 17 vertebrae, obtaining a total of 68 vertebrae annotated key point positions. m=1,2,...,68, and perform Gaussian filtering on the key points to obtain the ground truth mask map C={C1,C2,C3,C4} of the corner area, which corresponds to the upper left, upper right, lower left, and lower right corner points respectively, such as Figure 2(a)

[0053] S2. Data processing:

[0054] Based on the corner mask, the vertebral center mask is obtained, and the center point adjacent offset vector is constructed using two methods: top-down and bottom-up. Then, the corner offset vector corresponding to each center point is constructed using the matching relationship between the center point and the corner point. Specifically:

[0055] Taking into account the rigid structure characteristics of the spine, auxiliary structure information is constructed based on the marked corner key points. The auxiliary structure information includes the vertebral center point, the two-way adjacent center point offset vector field and the corner point offset vector, where the vertebral center point position coordinates n=0,1,...N, the acquisition method is:

[0056]

[0057] Where n=0,1,2,...N,N+1 is the number of vertebral center points, and Gaussian filtering is performed on the vertebral center points to obtain the center point mask Q cen ,like Figure 2 (b) In order to make full use of the structural similarity between vertebrae, a bidirectional adjacent center point offset vector field (AOF) is constructed to obtain the top-down offset vector V TD and the bottom-up offset vector V BU ,like Figure 2 (c) is shown in the figure. The specific calculation method is as follows: j=0,1,...,N-1; To achieve accurate pairing of center point and corner point, such as Figure 2 As shown in (d), construct the corner offset vector O m , calculated as follows: in represents the coordinates of the corner points, Represents the corresponding center point coordinates, m = 1, 2, ..., 68, and the corner point offset vector contains the direction information of the four corner points relative to the center point.

[0058] S3. Deep neural network construction:

[0059] like Figure 3As shown in the figure, the working process of the constructed deep neural network (KLAP-Net) is as follows: the spinal X-ray is input into the deep neural network, and the low-level image features are extracted through two layers of convolution operations, and then the encoder and decoder are designed with a U-shaped architecture. The encoder (Encoders) uses a multi-scale residual downsampling module to extract the key point features of the spinal X-ray, and adds a self-attention (SA) module in the highest dimension to enhance the expression of spinal semantic information; the decoder (Decoders) uses a residual upsampling fusion module, and finally passes through a fully connected layer to obtain a 17-layer feature map; then four different feature mapping heads are set based on the feature map. The four feature mapping heads all include convolution, batch normalization, and Relu activation functions, and the convolution kernels are 1×1, 3×3, 7×7, and 3×3 respectively. After feature mapping, four key point feature maps of vertebral center, vertebral corner, center point adjacent offset vector field, and corner point offset vector field predicted by the network are obtained.

[0060] At the same time, a symmetric offset distance constraint loss is added to the deep neural network to constrain the offset distance of the key points, so that the network can explicitly learn the prior knowledge of the vertebral structure. First, the loss function L for center point and corner point prediction is defined. h , the specific calculation is as follows: in, is the predicted vertebral corner feature, i=1,2,3,4, is the predicted vertebral center feature;

[0061] Then design the offset loss L0 for the diagonal point offset vector and the center point adjacent offset vector:

[0062]

[0063] in, and are the predicted corner offset vector and center point adjacent offset vector, O and V are the corner offset vector and center point adjacent offset vector obtained in step S2, respectively;

[0064] Then, in order to make full use of the symmetric relationship between the vertebral corners and the center point, a symmetric offset distance limit loss L is designed. s : Where eps = 1 × e -4 , For the predicted vertebral center point, the final comprehensive loss is set as the weighted loss function: L hos =λ1L h +λ2L0+λ3L s , where λ1, λ2 and λ3 are weight coefficients.

[0065] S4. Spine key point detection:

[0066] The deep neural network constructed in step S3 of the AISpine-XC dataset training was used. Random flipping, random scaling, and contrast change were used for data augmentation during training. The Adam optimizer was used for training, the learning rate was set to 0.001, the batch size was 8, and a total of 400 rounds of training were performed. The trained deep neural network model was used to obtain four key point feature maps of the predicted vertebral center point, corner point, center point adjacent offset vector field, and corner point offset vector in any input original spinal X-ray.

[0067] S5, vertebral center point adaptive correction:

[0068] By using the adjacent offset field information of each center point, the ACIC algorithm is used to automatically correct the missing points, multiple points, and wrong points of the vertebral center point to obtain the corrected center point; specifically:

[0069] S51, offset vector based on center point adjacency Get the average adjacent distance D of the center point adj : Redundant points are deleted from top to bottom according to the average adjacent distance of the center points. If the distance between two adjacent center points is less than τD adj , then delete the following redundant points; where τ is the threshold setting parameter.

[0070] S52, using the top-down center point adjacent offset vector predicted in step S4 like Figure 4 As shown, calculate the current point The corresponding lower adjacent point Q i ′ +1 , If the predicted neighboring points With Q i ′ +1 The distance d between them is less than τD adj , then it is believed that If the prediction is correct, keep this point unchanged and use it as the new current point. Otherwise, it is considered that there is a missed point. The missing points are filled by comprehensively using the top-down and bottom-up center point adjacent offset vectors to obtain a new point: Update the indexes of all Q vectors and take the new point as the current point. Repeat the above process until the detection is completed and obtain the corrected center point set Q c .

[0071] S6. Corner point correction and matching:

[0072] The predicted corner points are corrected using the CFOF algorithm to obtain the corrected corner points, and the center point and corner point matching are completed at the same time; specifically: the positions of the four corner points are obtained through KLAP-Net At the same time, the confidence of each corner prediction can be obtained according to the network output The predicted corner offset vector based on the prediction confidence value Make adjustments to get the adjusted corner offset vector m=1,2…,M;then based on the corrected center point Q c and the adjusted corner offset vector Calculate the corrected corner point position K ′ m : Then the predicted corner position and the corrected corner position K ′ m Perform comprehensive weighting to obtain the final corner point position K m : Where α is the weighted weight; all predicted corner points are traversed and verified, and the matching of each vertebral center point and corner point is completed during the verification process. The positions of all predicted corner points are corrected to obtain the accurate detection positions of all corner points and mark them, such as Figure 5 shown.

[0073] S7, Cobb angle automatic measurement:

[0074] According to the center point corrected in step S5 and the corner point information corrected in step S6, the angle matrix A of the 17 vertebrae and the vertebrae position constraint matrix T are constructed, where the vertebrae position constraint matrix T is:

[0075]

[0076] Where i and j represent the index of the center point of the first and last vertebra in a bend, and tanθ represents the degree of inclination of each vertebra; the angle matrix A is: A[i,j] = |θ i -θ j |,θ i ,θ j is the inclination angle of the i, j vertebral body, and the angle matrix A and the vertebral position constraint matrix T are operated to obtain the new angle matrix A new =A*T, and according to the new angle matrix, the three maximum tilt angles are retrieved, namely the Cobb angles corresponding to the thoracic scoliosis, main thoracic curve and thoracolumbar curve.

[0077] S8. Other parameter measurements:

[0078] Based on the center points and corner points of 17 vertebrae (C7-L5), multiple spinal structural parameters can be measured according to the clinical measurement method of scoliosis parameters, such as Figure 6 As shown in the figure, the automatically measured parameters include Cobb angle, C7 plumb line, sacral median perpendicular line, apical vertebral offset, sacral tilt, coronal plane balance, trunk inclination, etc. For example, based on the center points of the C7 and L5 vertebrae, the C7 plumb line and sacral median perpendicular line can be drawn. The apical vertebral translation (AVT) can be calculated based on the relative position relationship between the apical vertebra and the C7 plumb line and the sacral median perpendicular line. The remaining parameters can also be calculated based on the corresponding key points according to clinical measurement methods.

[0079] The algorithms, systems, and network structures not described in detail in the present invention are all common technologies in the field.

[0080] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

[0081] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.

Claims

1. A method for automatically measuring scoliosis parameters based on X-ray key point detection, characterized in that: The following steps are involved: S1. Dataset collection: Obtain a spinal X-ray dataset, annotate the spinal X-rays, and then perform Gaussian filtering to obtain a corner mask map of the spinal region; S2. Data processing: Obtain the vertebral center point mask map based on the corner point mask map, and construct the center point adjacent offset vector using two methods, top-down and bottom-up. Then, use the matching relationship between the center point and the corner point to construct the corner point offset vector corresponding to each center point. S3. Deep neural network construction: Build a deep neural network and add a symmetric offset distance limit loss to constrain the offset distance of key points in the deep neural network; S4. Spine key point detection: The deep neural network constructed in step S3 is trained using the AISpine-XC dataset. Using the trained deep neural network model, four key point feature maps are obtained for any input spinal X-ray: the vertebral center point, corner point, center point adjacent offset vector field, and corner point offset vector. S5. Adaptive correction of vertebral center points: Using the adjacent offset field information of each center point, the ACIC algorithm is used to automatically correct the vertebral center points for missing points, multiple points, and incorrect points to obtain the corrected center point; S6, corner point correction and matching: Use the CFOF algorithm to correct the predicted corner points to obtain the corrected corner points, and complete the matching between the center point and the corner point; S7, Automatic Cobb Angle Measurement: Based on the vertebral center and corner information, a vertebral position constraint matrix is constructed to find the maximum tilt angle in the matrix. The vertebral position index is gradually modified to ultimately obtain the three largest angles. Based on the positional relationship of the three angles, the Cobb angle values for thoracic scoliosis, primary thoracic curve, and thoracolumbar curve are ultimately determined. S8. Other parameter measurements: Based on the positions of the vertebral center and corner points and according to the clinical measurement method of scoliosis parameters, measure the C7 plumb line, sacral median vertical line, apical vertebral offset, sacral tilt, coronal plane balance, and trunk inclination.

2. The method for automatic measurement of scoliosis parameters based on X-ray key point detection according to claim 1, characterized in that: Step S1: The spinal X-ray film includes coronal and left and right oblique X-ray films. When marking the spinal X-ray film, mark the corner points of 17 vertebrae from T1 to L5. Mark the four corner points of the 17 vertebrae from T1 to L5 separately, and get a total of 68 vertebrae marked key point positions. m=1,2,...,68, and Gaussian filtering is performed on the key points to obtain the corner mask map C={C1,C2,C3,C4} of the spine area, where C1, C2, C3 and C4 correspond to the upper left, upper right, lower left and lower right corner points respectively.

3. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 2, characterized in that: The specific process of step S2 is: S21. First obtain the coordinates of the vertebral center point n=0,1,...,N, where N+1 is the number of vertebral center points. Then Gaussian filtering is performed on the vertebral center points to obtain the vertebral center point mask Q cen ; S22. Construct a bidirectional center point adjacent offset vector, Adjacent Offset Field, AOF, and obtain the top-down offset vector V TD and the bottom-up offset vector V BU , the specific calculation method is: j=0,1,...,N-1; S23, by constructing the corner point offset vector O m To achieve the matching between the center point and the corner point, the corner point offset vector O m The calculation process is: in represents the coordinates of the corner points, Represents the corresponding center point coordinates, m=1,2,...,68.

4. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 3, characterized in that: The working process of the deep neural network constructed in step S3 is as follows: the spinal X-ray is input into the deep neural network, and the low-level image features are first extracted through two layers of convolution operations, and then passed through the encoder and decoder designed with a U-shaped architecture. The encoder uses a multi-scale residual downsampling module to extract the key point features of the spinal X-ray, and adds a self-attention module in the highest dimension to enhance the expression of spinal semantic information; the decoder uses a residual upsampling fusion module, and finally passes through a fully connected layer to obtain a 17-layer feature map; then four different feature mapping heads are set based on the feature map. The four feature mapping heads all include convolution, batch normalization, and Relu activation functions, and the convolution kernels are 1×1, 3×3, 7×7, and 3×3 respectively. After feature mapping, four key point feature maps of vertebral center point, vertebral corner point, center point adjacent offset vector field, and corner point offset vector field predicted by the network are obtained.

5. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 4, characterized in that: The process of limiting the offset distance of the loss constraint key point by the symmetrical offset distance in step S3 is as follows: First define the predicted vertebral center and corner loss function L h : in, is the predicted vertebral corner feature, i=1,2,3,4, is the predicted vertebral center feature; Then design the offset loss L0 for the diagonal point offset vector and the center point adjacent offset vector: in, and are the predicted corner offset vector and center point adjacent offset vector, O and V are the corner offset vector and center point adjacent offset vector obtained in step S2, respectively; Then, using the symmetric relationship between the vertebral corners and the center point, the symmetric offset distance limit loss L is designed. s : Where eps = 1 × e -4 , For the predicted vertebral center point, the final comprehensive loss is set as the weighted loss function: L hos =λ1L h +λ2L0+λ3L s , where λ1, λ2 and λ3 are weight coefficients.

6. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 5, characterized in that: During the deep neural network training process in step S4, random flipping, random scaling, and contrast change are used for data enhancement. The Adam optimizer is used for training, the learning rate is set to 0.001, the batch size is 8, and a total of 400 rounds of training are performed.

7. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 6, characterized in that: The specific process of step S5 is: S51, offset vector based on center point adjacency Get the average adjacent distance of the center point Redundant points are deleted from top to bottom according to the average adjacent distance of the center points. If the distance between two adjacent center points is less than D thr =τD adj , then delete the following redundant points; where τ is the threshold setting parameter; S52, using the top-down center point adjacent offset vector predicted in step S4 Calculate the current point The corresponding lower adjacent point Q i ′ +1 , If the predicted neighboring points With Q i ′ +1 The distance d between them is less than τD adj , then it is believed that If the prediction is correct, keep this point unchanged and use it as the new current point. Otherwise, it is considered that there is a missed point. The missed point is filled by combining the top-down and bottom-up center point adjacent offset vectors to obtain a new point: Update the index of all Q vectors and take the new point as the current point. Repeat the above process until the detection is completed and the corrected center point Q is obtained. c .

8. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 7, characterized in that: The specific process of step S6 is: through the trained deep neural network (KLAP-Net), the positions of the four corner points are obtained At the same time, the confidence of each corner point prediction can be obtained according to the network output The predicted corner offset vector based on the prediction confidence value Make adjustments to get the adjusted corner offset vector m=1,2…,M;then based on the corrected center point Q c and the adjusted corner offset vector Calculate the corrected corner position Then the predicted corner position and the corrected corner position K ′ m Perform comprehensive weighting to obtain the final corner point position K m : Where α is the weighted weight; all predicted corner points are traversed and verified, and the matching of each vertebral center point and corner point is completed during the verification process. The positions of all predicted corner points are corrected to obtain the accurate detection positions of all corner points and mark them.

9. The method for automatically measuring scoliosis parameters based on X-ray key point detection according to claim 8, characterized in that: The specific process of step S7 is as follows: Based on the center point corrected in step S5 and the corner point information corrected in step S6, the angle matrix A of the 17 vertebrae and the vertebrae position constraint matrix T are constructed, where the vertebrae position constraint matrix T is: Where i and j represent the index of the center point of the first and last vertebra in a bend, and tanθ represents the degree of inclination of each vertebra; the angle matrix A is: A[i,j] = |θ i -θ j |,θ i ,θ j is the inclination angle of the i, j vertebral body, and the angle matrix A and the vertebral position constraint matrix T are operated to obtain the new angle matrix A new =A*T, and according to the new angle matrix, the three maximum tilt angles are retrieved, namely the Cobb angles corresponding to the thoracic scoliosis, main thoracic curve and thoracolumbar curve.