Cervical vertebra quantitative detection method based on cervical vertebra image
By employing a quantitative detection method based on cervical spine imaging and utilizing the SpineNet_v2 model to extract key points and calculate structural parameters, this method solves the problem of time-consuming and labor-intensive cervical spine disease diagnosis in existing technologies. It achieves automated, precise, and quantitative cervical spine disease detection, making it suitable for large-scale screening and daily monitoring.
Patent Information
- Application Number
- CN202511087740.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-10-31
AI Technical Summary
The diagnosis of cervical spine diseases in the current technology relies on the direct analysis and measurement of medical images, which is time-consuming and labor-intensive, and is prone to misdiagnosis and missed diagnosis, making it difficult to meet the needs of large-scale screening and daily monitoring.
A quantitative detection method based on cervical spine imaging is adopted. The SpineNet_v2 model is used to extract the set of predicted key points from standardized pixel values, calculate structural parameters and optimize the model. Heatmaps and visualization overlays are combined to assist in diagnosis and reduce manual intervention.
It enables automated, precise, and quantitative detection of cervical spine diseases, reducing the burden on doctors and making it suitable for large-scale screening and daily monitoring.
Smart Images

Figure CN120876997A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cervical spine detection technology, and in particular to a quantitative cervical spine detection method based on cervical spine imaging. Background Technology
[0002] Currently, the diagnosis of cervical spine diseases mainly relies on medical imaging technology (X-rays, CT scans, or MRI). The interpretation of these images depends primarily on doctors' direct analysis and measurement of X-rays, CT scans, or MRI results to determine the anatomical structure and curvature of the cervical spine. This diagnostic process is time-consuming, labor-intensive, and prone to misdiagnosis and missed diagnosis. Relying solely on manual analysis and measurement of medical images is extremely time-consuming, especially when dealing with a large number of cases or complex cervical spine conditions. Doctors need to focus on discerning subtle differences in images for extended periods, which can easily lead to fatigue, resulting in low diagnostic efficiency and making it difficult to meet the needs of large-scale screening and daily monitoring. Summary of the Invention
[0003] Therefore, it is necessary to propose a quantitative detection method for the cervical spine based on cervical spine imaging to address the above problems.
[0004] A quantitative cervical spine detection method based on cervical spine imaging, the method comprising: Acquire raw images of the cervical spine, and preprocess the raw images of the cervical spine to obtain standardized pixel values; multiple standardized pixel values constitute a target image; The SpineNet_v2 model is used to extract a set of predicted keypoints from the normalized pixel values. The average regression error of the predicted key points is determined based on the two-dimensional Euclidean distance between the predicted key points and the actual key points in the predicted key point set. The SpineNet_v2 model is trained using the average regression error to train and optimize the predicted keypoint set to obtain the target keypoint set. The structural parameters of the cervical spine are determined based on the target key points in the target key point set, and the structural parameters constitute a structural vector; the predicted probability of the disease type of the cervical spine is determined based on the target image and the target key point set. The classification loss value is determined based on the predicted probability and the true probability of the disease to which the cervical spine belongs; the auxiliary regression loss value is determined based on the predicted value of each structural parameter and the true reference value of each structural parameter; the classification loss value and the auxiliary regression loss value are weighted and combined to obtain the joint loss value to optimize the SpineNet_v2 model; A heatmap is determined based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values. A visualization overlay is determined based on the heatmap and the standardized pixel values.
[0005] In one embodiment, the preprocessing of the original cervical spine image to obtain standardized pixel values includes: Multiple original image pixels of the original cervical spine image are standardized to obtain multiple corresponding target image pixels; The target image pixels are offset to obtain offset pixels; the pixel grayscale value of the target image pixels is determined based on the offset pixels. The pixel grayscale values are normalized to obtain standardized pixel values.
[0006] In one embodiment, the multiple original image pixels of the original cervical spine image Standardization processing yields multiple corresponding target image pixels. This can be achieved using the following expression: in, For target image pixels; These are the original image pixels; The width of the original cervical spine image; The height of the original cervical spine image; The width of the target image; The height of the target image.
[0007] In one embodiment, the process of offsetting the target image pixels to obtain offset pixels, and determining the pixel grayscale value of the target image pixels based on the offset pixels, is achieved through the following expression: in, The pixel grayscale value; For the target image pixels Centered, horizontal offset Vertical offset The resulting pixel value; The standard deviation of the Gaussian kernel; The radius of the filter kernel; It is a natural exponential function.
[0008] In one embodiment, The normalization of the pixel grayscale values to obtain standardized pixel values is achieved through the following expression: in, Standardized pixel values; The pixel grayscale value; The standard deviation of the Gaussian kernel; The mean value of all pixel values in the target image; The extraction of the predicted keypoint set from the normalized pixel values using the SpineNet_v2 model is achieved through the following expression: in, For predicting the set of key points; These are standardized pixel values.
[0009] In one embodiment, the step of determining the average regression error of the predicted keypoints based on the two-dimensional Euclidean distance between the predicted keypoints and the actual keypoints in the predicted keypoint set is achieved by the following expression: in, This represents the average regression error; To predict the total number of key points; To predict the coordinates of key points; These are the actual coordinates of the key points.
[0010] In one embodiment, the structural parameters include: left-right distance, upper-lower distance, intervertebral angle, angle between adjacent points, angle between non-adjacent points, relative horizontal displacement between any two points, Cobb angle, cervical curvature index, CCL angle, and vertebral alignment regularity.
[0011] In one embodiment, The determination of the classification loss value based on the predicted probability and the true probability of the cervical spine disease is achieved through the following expression: in, The classification loss value is N; N is the total number of samples in the batch. For the first Predictive probability of disease states; For the first The true label of the disease state (0 or 1); The determination of the auxiliary regression loss value based on the predicted value and the true reference value of each structural parameter is achieved through the following expression: in, To assist in regression loss values; This represents the total number of structural parameters; This is a predicted value; These are actual reference values; The weighted combination of the classification loss value and the auxiliary regression loss value to obtain the joint loss value is achieved by the following expression: in, This is the joint loss value; These are the weighting coefficients for the classification loss; This is the classification loss value; These are the weighting coefficients for the regression loss; This is used to assist in regression loss values.
[0012] In one embodiment, the determination of the heatmap based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values is achieved by the following expression: in, For heatmaps; Both (x, y) are key points of the target; To control the standard deviation of Gaussian diffusion.
[0013] In one embodiment, the step of basing the data on the heatmap and the standardized pixel values... Determine the visualization overlay. This can be achieved using the following expression: in, For visualization overlay; Standardized pixel values; For heatmaps; This is the heatmap transparency control coefficient.
[0014] This invention extracts features from X-ray images (i.e., raw images of the cervical spine) and combines image processing and machine learning algorithms to achieve automated, precise, and quantitative detection and measurement of multiple cervical spine diseases. The structural parameters, heat maps, and visualization overlays obtained in this application can assist doctors in quickly diagnosing cervical spine diseases and significantly reducing their workload. It can also diagnose multiple cervical spine-related diseases simultaneously and is suitable for large-scale screening and daily monitoring. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] in: Figure 1 This is an application environment diagram of a cervical spine quantitative detection method based on cervical spine imaging in one embodiment; Figure 2 This is a flowchart of a quantitative cervical spine detection method based on cervical spine imaging in one embodiment; Figure 3 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Currently, the diagnosis of cervical spine diseases mainly relies on medical imaging technology (X-rays, CT scans, or MRI). The interpretation of these images depends primarily on doctors' direct analysis and measurement of X-rays, CT scans, or MRI results to determine the anatomical structure and curvature of the cervical spine. This diagnostic process is time-consuming, labor-intensive, and prone to misdiagnosis and missed diagnosis. Relying solely on manual analysis and measurement of medical images is extremely time-consuming, especially when dealing with a large number of cases or complex cervical spine conditions. Doctors need to focus on discerning subtle differences in images for extended periods, which can easily lead to fatigue, resulting in low diagnostic efficiency and making it difficult to meet the needs of large-scale screening and daily monitoring.
[0019] To address the aforementioned technical issues, this application provides a quantitative cervical spine detection method based on cervical spine imaging.
[0020] Figure 1 This is a diagram illustrating the application environment of a quantitative cervical spine detection method based on cervical spine imaging in one embodiment. (Refer to...) Figure 1This cervical spine quantitative detection method based on cervical spine imaging is applied to a cervical spine quantitative detection system based on cervical spine imaging. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, specifically a mobile phone, tablet computer, laptop computer, etc. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 is used to acquire raw cervical spine images, preprocess the raw images to obtain standardized pixel values; multiple standardized pixel values constitute a target image; the server 120 is used to extract a set of predicted keypoints from the standardized pixel values using a SpineNet_v2 model; determine the average regression error of the predicted keypoints based on the two-dimensional Euclidean distance between the predicted keypoints and the real keypoints in the set; train the SpineNet_v2 model using the average regression error to optimize the set of predicted keypoints and obtain a target keypoint set; and then, based on the target keypoints... The target key points in the set determine the structural parameters of the cervical spine, and the structural parameters constitute a structural vector; based on the target image and the set of target key points, the predicted probability of the disease type to which the cervical spine belongs is determined; based on the predicted probability and the true probability of the disease to which the cervical spine belongs, a classification loss value is determined; based on the predicted value of each structural parameter and the true reference value of each structural parameter, an auxiliary regression loss value is determined; the classification loss value and the auxiliary regression loss value are weighted and combined to obtain a joint loss value to optimize the model; a heatmap is determined based on the target key points in the set of target key points, the coordinates of the original pixels, and the standardized pixel values; a visualization overlay is determined based on the heatmap and the standardized pixel values.
[0021] like Figure 2 As shown, in one embodiment, a quantitative cervical spine detection method based on cervical spine imaging is provided. This method can be applied to both terminals and servers; this embodiment illustrates its application to a terminal. The specific steps of this quantitative cervical spine detection method based on cervical spine imaging include: S10: Acquire raw images of the cervical spine, preprocess the raw images of the cervical spine to obtain standardized pixel values; multiple standardized pixel values constitute a target image; Specifically, the system imports the patient's original cervical spine images (original cervical spine X-ray images) and performs standardized processing on them. This module not only ensures compatibility and readability of image formats but also expands the dataset through enhancement techniques such as random rotation, cropping, and flipping, improving the model's generalization ability during training. Its output is uniformly sized, formatted, and includes diverse transformations of the original image data, providing a unified input foundation for subsequent modules.
[0022] S20: Extract a set of predicted keypoints from the normalized pixel values using the SpineNet_v2 model; S30: Determine the average regression error of the predicted key points based on the two-dimensional Euclidean distance between the predicted key points and the actual key points in the predicted key point set. S40: Train the SpineNet_v2 model using the average regression error to train and optimize the predicted keypoint set to obtain the target keypoint set; S50: Determine the structural parameters of the cervical spine based on the target key points in the target key point set, wherein the structural parameters constitute a structural vector; determine the predicted probability of the disease type of the cervical spine based on the target image and the target key point set. S60: Determine the classification loss value based on the predicted probability and the true probability of the disease to which the cervical spine belongs; determine the auxiliary regression loss value based on the predicted value of each structural parameter and the true reference value of each structural parameter; and obtain the joint loss value by weighting the classification loss value and the auxiliary regression loss value to optimize the SpineNet_v2 model. S70: Determine the heatmap based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values; S80: Determine a visualization overlay based on the heatmap and the standardized pixel values.
[0023] The structural parameters, heatmaps, and visualization overlays obtained in this application can assist doctors in quickly diagnosing cervical spine diseases and obtaining diagnostic results, significantly reducing the burden on doctors. It can also diagnose multiple cervical spine-related diseases simultaneously and is suitable for large-scale screening and daily monitoring.
[0024] In one embodiment, the preprocessing of the original cervical spine image to obtain standardized pixel values in step S10 includes: S101: Standardize multiple original image pixels of the original cervical spine image to obtain multiple corresponding target image pixels; S102: Offset the target image pixels to obtain offset pixels; determine the pixel grayscale value of the target image pixels based on the offset pixels; S103: Normalize the pixel grayscale values to obtain standardized pixel values.
[0025] In one embodiment, for the multiple original image pixels of the original cervical spine image in step S10... Standardization processing yields multiple corresponding target image pixels. This can be achieved using the following expression: (1) in, For target image pixels; These are the original image pixels; The width of the original cervical spine image; The height of the original cervical spine image; The width of the target image; The height of the target image. and This is a standardized size set according to the requirements of subsequent model training or data processing. Its purpose is to convert raw images of different sizes into a standard size for easier subsequent processing and analysis.
[0026] In one embodiment, the offsetting of the target image pixels in step S102 to obtain offset pixels is achieved by determining the pixel grayscale value of the target image pixels based on the offset pixels using the following expression: (2) in, The pixel grayscale value; For the target image pixels Centered, horizontal offset Vertical offset The resulting pixel value; The standard deviation of the Gaussian kernel; The radius of the filter kernel; It is a natural exponential function.
[0027] In one embodiment, the normalization of the pixel grayscale value to obtain the standardized pixel value in step S103 is achieved by the following expression: (3) in, Standardized pixel values; The pixel grayscale value; The standard deviation of the Gaussian kernel; The mean value of all pixel values in the target image; For step S20, extracting the predicted keypoint set from the normalized pixel values using the SpineNet_v2 model specifically involves: using the normalized pixel values output by the image preprocessing module... As input, the SpineNet_v2 deep neural network model is invoked to automatically extract the two-dimensional coordinates of key cervical spine structural points, which serve as the basis for subsequent structural parameter calculations, ultimately forming a set of predicted key points. These key points include the center point, lower left corner, and lower right corner of the C2 vertebral body, as well as the four corner points of the C3-C7 vertebral bodies, forming a set of 23 predictive key points P (Key Point 0: Center point of C2 vertebral body; Key Point 1: Lower left corner of C2 vertebral body; Key Point 2: Lower right corner of C2 vertebral body; Key Point 3: Upper left corner of C3 vertebral body; Key Point 4: Upper right corner of C3 vertebral body; Key Point 5: Lower left corner of C3 vertebral body; Key Point 6: Lower right corner of C3 vertebral body; Key Point 7: Upper left corner of C4 vertebral body; Key Point 8: Upper right corner of C4 vertebral body; Key Point 9: Lower left corner of C4 vertebral body; Key Point 10: Lower left corner of C4 vertebral body; Key Point 10: Lower left corner of C4 vertebral body; Key Point 11: Lower left corner of C4 vertebral body; Key Point 12: Lower right corner of C3 vertebral body; Key Point 13: Lower left corner of C4 vertebral body; Key Point 14: Lower left corner of C4 vertebral body; Key Point 15: Lower left corner of C4 vertebral body; Key Point 16: Lower left corner of C4 vertebral body; Key Point 17: Lower right corner of C4 vertebral body; Key Point 18: Lower left corner of C4 vertebral body; Key Point 19: Lower left corner of C4 vertebral body; Key Point 10: Lower left corner of C4 vertebral body; Key Point 10: Lower left corner of C4 vertebral body; Key Point 11: Lower left corner of C4 vertebral body; Key Point 12: Lower left corner of C4 vertebral body; Key Point 13: Lower left corner of C4 The key points are: the lower right corner of the C5 vertebra; key point 11: upper left corner of the C5 vertebra; key point 12: upper right corner of the C5 vertebra; key point 13: lower left corner of the C5 vertebra; key point 14: lower right corner of the C5 vertebra; key point 15: upper left corner of the C6 vertebra; key point 16: upper right corner of the C6 vertebra; key point 17: lower left corner of the C6 vertebra; key point 18: lower right corner of the C6 vertebra; key point 19: upper left corner of the C7 vertebra; key point 20: upper right corner of the C7 vertebra; key point 21: lower left corner of the C7 vertebra; key point 22: lower right corner of the C7 vertebra. These key points form the core basis for constructing the geometric structural relationships. This process can be achieved using the following expression.
[0028] (4) in, For predicting the set of key points; The pixel values are standardized; SpineNet_v2 is the keypoint detection model; P={(x1,y1),(x2,y2),...,(x_M,y_M)}. It should be noted that these keypoints are not directly from manual annotations, but are automatically predicted by the deep neural network model SpineNet_v2 on the input image. Due to the positional error between the predicted points and the actual keypoints, a regression loss function is introduced during the training phase to construct a supervision signal based on the coordinate deviation of each keypoint, thereby optimizing network parameters and improving the accuracy of point prediction. The step S30, which involves determining the average regression error of the predicted keypoints based on the two-dimensional Euclidean distance between the predicted keypoints and the actual keypoints in the predicted keypoint set, is implemented through the following expression: (5) in, This represents the average regression error; To predict the total number of key points; To predict the coordinates of key points; These are the actual coordinates of the key points.
[0029] Specifically, by minimizing this loss function, the system continuously optimizes the parameters of the key point detection network, making its predicted output closer to the actual coordinates of structural points, thereby improving the accuracy and stability of subsequent structural parameter calculations.
[0030] The structural parameters in step S50 include: left-right distance, up-down distance, intervertebral angle, angle between adjacent points, angle between non-adjacent points, relative horizontal displacement between any two points, Cobb angle, cervical curvature index, CCL angle, and vertebral alignment regularity; the optimized target key point set. Perform structural geometric analysis, calling multiple parametric functions to calculate the following 10 sagittal structural parameters (each function uses only the target keypoint set). Key points in the middle section): the distance between the left and right points, the distance between the upper and lower points, and the angle between the vertebral bodies. Angles of adjacent points Angles of non-adjacent points Relative horizontal displacement of any two points Cobb angle, cervical curvature index, CCL angle, and vertebral alignment regularity are respectively expressed by the following formulas: (6) in, The distance between the left and right points is used to assess the degree of lateral expansion of the vertebral body. Abnormal width may indicate osteophyte formation, marginal sclerosis, or structural compression. and This represents the x-coordinate of a pair of left and right edge points of a vertebra, which belong to the target key points in the target key point set. Indicates the horizontal width of the vertebral body; (7) in, The distance between the upper and lower points is used to determine whether the intervertebral space is narrowed or collapsed, and is an important basis for detecting intervertebral disc degeneration. and This represents the ordinate of the vertical axis of the adjacent vertebral edge points; these adjacent vertebral edge points belong to the target key points in the target key point set. The vertical distance between the vertebrae; (8) in, The angle between vertebrae is calculated by taking the angle between two vectors formed by the coordinates of four points, quantifying the angular relationship between adjacent vertebrae. The calculation method is based on spatial geometry, using the cross product and dot product of vectors to determine the angle. Specifically, the function `cal_angle` accepts the two-dimensional coordinates (x, y) of four points and constructs two vectors, as shown in the formula above. =points[2]-points[1], which represents the vector from left to right at the bottom edge of points[2]; =points[4]-points[3], representing the vector from left to right of the top edge of points[3]. points[2], points[2], points[3], and points[4] all belong to the target key points in the target key point set; and The included angle; (9) in, The angle between adjacent points is used to evaluate the alignment consistency between vertebral segments, reflecting the structural continuity and smoothness between superior and inferior vertebrae. The angle between the two vectors is calculated by extracting the edge points of two adjacent vertebrae as defined in the above formula. A vector representing a pair of adjacent target keypoints; This is the vector of another pair of adjacent target keypoints; The angle between the key points of the target phase; (10) in, The angle for non-adjacent points is used to assess the geometric relationship between discontinuous sections of the vertebral body, reflecting the structural changes and inclination between non-adjacent vertebrae. This calculation is based on pairs of non-adjacent top and bottom edges in the optimized keypoint set, and uses the `cal_angle_not_adj` procedure to calculate 10 angles, corresponding to the included angles of different segments between C3 and C7, serving as an important basis for judging abnormal cervical spine alignment. and This indicates the combination of vertebral segments, specifically including the following angles: Indicates non-adjacent vertebral segments and The included angle between them (in radians). and These correspond to the top edges of C3-C6 and the bottom edges of C4-C7, respectively. : Optimized key point coordinates, based on the points_dict definition (e.g., points[3] is C3top left); : A function that calculates the angle between two vectors formed by four points and returns the value in radians; : The two points in pair1[p1_idx] define the first vector (e.g., from C3 top left to C3 top right); : two points in pair2[p2_idx], define the second vector (e.g., from C4 bottom left to C4 bottom right); (11) in, The relative horizontal displacement between any two points is used to assess the sagittal balance of each segment of the cervical spine, reflecting the relative displacement of the horizontal coordinates between adjacent vertebrae. Deviation may indicate structural imbalance or deformity. This calculation is based on point pairs defined in the optimized keypoint set P′, and is performed through the cal_sva procedure. The point pairs are determined according to the pair list in the code [[1,3],[5,7],[9,11],[13,15],[17,19]] (front, from bottom left to top left, such as C2 bottom left to C3 top left) and [[2,4],[6,8],[10,12],[14,16],[18,20]] (bottom, from bottom right to top right, such as C2 bottom right to C3 top right), and outputs multiple SVA segments (such as SVA-2F, SVA-3F, etc., corresponding to C2-C3, C3-C4, etc.); SVA ij X represents the horizontal displacement of the i-th point relative to the j-th point (unit: pixels or millimeters, depending on coordinate calibration); i : The x-coordinate of the i-th point is based on the optimized key point coordinates in P′ (for example, points[1] is the x-coordinate of the bottom left of C2, and points[5] is the x-coordinate of the bottom left of C3); Xj is the x-coordinate of the j-th point, based on the optimized key point coordinates in P′ (for example, points[3] is the x-coordinate of the top left of C3, and points[7] is the x-coordinate of the top left of C4).
[0031] (12) in, The Cobb angle is used to assess the alignment consistency between vertebral body segments, reflecting the overall sagittal tilt of the C2 to C7 vertebrae, and determining whether the cervical spine exhibits lordosis or kyphosis. This calculation is based on four key points numbered 1, 2, 21, and 22 at the lower edge of the C2 and C7 vertebrae in the optimized target key point set. The lower edge segment vectors are extracted, and the included angle is calculated using the cal_c_type process, as defined in the above formula. Cobb angles between C2 and C7, expressed in degrees; : Line segment vector of the basal boundary of C2 vertebral body, based on Calculate the coordinate difference between the lower left and lower right points of C2; : Line segment vector of the basal boundary of C7 vertebral body, based on Calculate the coordinate difference between the lower left and lower right points of C7; They are respectively and The modulus (length); : and The dot product.
[0032] (13) in, The cervical curvature index is a parameter used to assess the "amplitude proportion" of the overall cervical curvature, reflecting the degree of physiological lordosis and serving as an important basis for diagnosing cervical degeneration or deformity. This calculation is based on an optimized set of target key points. The line connecting key points numbered 2 and 22 is used to measure the vertical distance from key points numbered 6, 10, 14, and 18 to this line. By quantifying the offset of the right point of the bottom edge of C3-C6 relative to the line connecting C2-C7, the overall distribution characteristics of cervical curvature are assessed to assist in the diagnosis of degeneration or deformity. The cal_c_type process is used to calculate the definition as shown in the above formula (13); CCI: Cervical curvature index, unitless, percentage form, reflecting the curvature amplitude; a1: Vertical distance from C3 bottom right (points [6]) to the line connecting C2 - C7; a2: Vertical distance from C4 bottom right (points
[10] ) to the line connecting C2 - C7; a3: Vertical distance from C5 bottom right (points
[14] ) to the line connecting C2 - C7; a4: Vertical distance from C6 bottom right (points
[18] ) to the line connecting C2 - C7; A: Euclidean distance from C2 bottom right (points [2]) to C7 bottom right (points
[22] ), based on the optimized key point coordinates.
[0033] (14) in, The CCL angle is used to identify segmental curvature changes or abrupt changes in the cervical spine, reflecting the angle between two lines connecting the lower midpoint of the second vertebral body to the center of the third vertebral body, and the center of the sixth vertebral body to the center of the seventh vertebral body. This calculation is based on points defined in the optimized target keypoint set and is performed using the `cal_c_type` procedure. Specific steps include: calculating the midpoint (mid_2) of C2 bottom left and C2 bottom right, the intersection (mid_3) of C3 top left and C3 bottom right, the intersection (mid_6) of C6 top left and C6 bottom right, and the midpoint (mid_7) of C7 bottom left and C7 bottom right; then, using the `cal_angle` function, calculating the angles formed by mid_3 to mid_2 and mid_6 to mid_7, and taking the absolute value as the CCL angle. The CCL angle, expressed in degrees, reflects segmental curvature changes; The coordinates of the midpoints of C2bottom left (points[1]) and C2 bottom right (points[2]) are based on Optimized coordinates; The coordinates of the intersection of C3 top left (points[3]) and C3 bottom right (points[6]) are approximately the center of C3, based on... Optimized coordinates; The coordinates of the intersection of C6 top left (points
[15] ) and C6 bottom right (points
[18] ) are approximately the center of C6, based on The optimized coordinates. The coordinates of the midpoints of C7 bottomleft (points
[21] ) and C7 bottom right (points
[22] ) are based on Optimized coordinates; A function to calculate the angle formed by four points, returning a value in radians.
[0034] (15) in, Vertebral alignment regularity measures the "regularity" of the alignment of all vertebrae and is used to assess whether there is structural shift or misalignment in the whole structure. For the first The center point of each vertebral body; ; : This is the baseline straight line obtained by fitting the cone; each term calculates the perpendicular distance from the point to the line.
[0035] This application uses structure vectors Using this as input, a unified neural network model is constructed for the design of auxiliary diagnostic tasks during the training phase. This vector consists of a set of key points. The system incorporates 10 structural parameters, including Cobb angle, SVA, CCI, and Toyama index, to describe cervical spine alignment and pathological morphology, supporting the model's ability to identify disease types and lesion patterns. This application does not directly supervise the training of these structural parameters because there are no definitive answers for these parameters in the real world. The system's design goal is to establish a discriminative model between input images and potential disease risks through structural feature vector learning. Supervised optimization using labeled data is performed during the training phase, and predictions can be made for unknown samples during the inference phase.
[0036] During training, the model output includes: : Represents the predicted probability for each disease category; : Represents the predicted value, used to enhance the model's ability to characterize continuous features.
[0037] To achieve disease classification and model optimization, two different output directions are controlled during model training, based on the structure vector output by the input image feature extraction module. Set of key target points The target image output by the image preprocessing module The system is designed with two sub-loss functions: In step S60, the determination of the classification loss value based on the predicted probability and the true probability of the cervical spine disease is achieved through the following expression: (16) in, The classification loss value is used to evaluate whether the model detects four cervical spine disease labels, specifically cervical degenerative diseases, cervical sagittal deformities, spinal stenosis, and cervical degenerative joint diseases, guiding the model to improve its ability to distinguish disease states. Based on the input data, a neural network model generates disease state probabilities. and with real labels The comparison serves as the training objective for the quantitative diagnosis module for multiple diseases; N represents the total number of samples in the batch. For the first Predictive probability of disease states; For the first The true label of the disease state (0 or 1); The determination of the auxiliary regression loss value based on the predicted value and the true reference value of each structural parameter is achieved through the following expression: (17) in, To assist in the regression loss value, this parameter enhances the model's sensitivity and generalization ability to continuous features, guiding the model to optimize the prediction of lesion severity. This calculation is based on the optimized target keypoint set output by the image feature extraction module. Structural parameters (such as Cobb angle and SVA) are generated through geometric analysis and combined with the target image output by the image preprocessing module. As an auxiliary training target for the quantitative diagnosis module of multiple diseases; This represents the total number of structural parameters; This is a predicted value; These are actual reference values; The weighted combination of the classification loss value and the auxiliary regression loss value to obtain the joint loss value is achieved by the following expression: (18) in, This is the joint loss value, used to uniformly optimize classification and regression tasks, balancing the contributions of the two classes during training, aiming to improve the accuracy of disease diagnosis prediction. This calculation is based on the classification loss. and auxiliary regression loss This is achieved through weighted combination, serving as the overall training objective for the multi-disease quantitative diagnosis module; These are the weighting coefficients for the classification loss; This is the classification loss value; These are the weighting coefficients for the regression loss; This is used to assist in regression loss values.
[0038] The diagnosis results and report module is the final link in the entire intelligent diagnosis process. It receives the output results from the multi-disease quantitative diagnosis module and serves as an auxiliary model for the automated cervical spine X-ray analysis diagnosis that provides visualization and interpretability. Through structured information recombination and image visualization processing, it generates quantitative labels, qualitative labels, and the final visualized image, producing a standardized diagnostic report that provides doctors with intuitive and comprehensive decision support.
[0039] There are three types of output results: 1. Predicted keypoint image; 2. Parameters formed based on 23 keypoints; 3. Qualitative diagnosis formed based on the parameters according to the guideline standards.
[0040] The core function of this module is to predict structural features. Classification probability The image key point data is integrated into three types of diagnostic results, namely: Quantitative Label (Label_quant): Based on the structural parameter values predicted in the previous module, this module generates quantitative indicators to describe the severity of the lesion, including cervical sagittal parameters such as Cobb angle, SVA, and CCI. This label provides a quantitative representation of the lesion area, facilitating doctors' assessment of disease progression and structural imbalance.
[0041] Qualitative labels (Label_cls): based on classification probability The system outputs specific disease type labels, such as cervical degenerative diseases, spinal stenosis, and sagittal deformities. These labels are presented using standard medical nomenclature and are an important basis for doctors to quickly obtain diagnostic conclusions.
[0042] Visualized Image (I_final): In the normalized image The overlay of key point heatmaps visually presents the lesion area. The red areas shown in the image represent the diagnostic key points identified by the system, and the visualization results significantly improve the ability to understand structures and locate lesions.
[0043] This module is implemented by two components: visData.py and draw_gaussian.py. visData.py is responsible for reading the normalized image. The coordinates of key points are used, and the vertebral body center points predicted by the spinal_net_2.py model are marked as dots on the image. These points are used to represent the spatial location of the lesion area, assisting doctors in structural analysis.
[0044] draw_gaussian.py generates a Gaussian heatmap centered on key points, highlighting key areas with color intensity but not drawing structural lines, angles, or boundary areas, ensuring the image is concise, focused, and easy to diagnose.
[0045] This module can automatically generate diagnostic results combining text and images without manual annotation, which not only improves output efficiency and accuracy but also enhances the clinical interpretability of the results. By integrating quantitative analysis, classification judgment, and intuitive image display, the system provides unified, reliable, and visualized intelligent auxiliary support at the diagnostic terminal.
[0046] Quantitative label generation: The system uses the target image output by the image preprocessing module. The structural feature vector output by the image feature extraction module is obtained. Optimize the set of key points A quantitative label set is constructed. This label format supports structured output and automatic system identification, and is used for automatic filling of electronic report templates.
[0047] Qualitative label generation: Qualitative labels are used to provide classification conclusions for disease types and can diagnose the following diseases: cervical degenerative diseases; cervical sagittal deformities; spinal stenosis; and cervical degenerative joint diseases. The system determines the disease category based on the values measured by the quantitative labels, combined with preset diagnostic criteria, and returns standardized qualitative labels to generate a disease diagnosis.
[0048] Image visualization display: To enhance the intuitiveness of the diagnostic results, this module overlays a Gaussian heatmap of key points onto the standardized image to form the final diagnostic image. .
[0049] The step S70, which involves determining the heatmap based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values, is achieved through the following expression: (19) in, For heatmaps; Both (x, y) are key points of the target; To control the standard deviation of Gaussian diffusion.
[0050] For step S80, the step of basing the heatmap and the standardized pixel values Determine the visualization overlay. This can be achieved using the following expression: (20) in, For visualization overlay; Standardized pixel values; For heatmaps; This is the heatmap transparency control coefficient.
[0051] This invention extracts features from X-ray images (i.e., raw images of the cervical spine) and combines image processing and machine learning algorithms to achieve automated, precise, and quantitative detection and measurement of multiple cervical spine diseases. This method can assist doctors in quickly diagnosing cervical spine diseases, significantly reducing their workload, and simultaneously diagnosing multiple cervical spine-related diseases, making it suitable for large-scale screening and daily monitoring.
[0052] Figure 3 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 3As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a quantitative cervical spine detection method based on cervical spine imaging. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement the quantitative cervical spine detection method based on cervical spine imaging. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0053] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0054] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0055] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A quantitative detection method for the cervical spine based on cervical spine imaging, characterized in that, The method includes: Acquire raw images of the cervical spine, and preprocess the raw images of the cervical spine to obtain standardized pixel values; multiple standardized pixel values constitute a target image; The SpineNet_v2 model is used to extract a set of predicted keypoints from the normalized pixel values. The average regression error of the predicted key points is determined based on the two-dimensional Euclidean distance between the predicted key points and the actual key points in the predicted key point set. The SpineNet_v2 model is trained using the average regression error to train and optimize the predicted keypoint set to obtain the target keypoint set. The structural parameters of the cervical spine are determined based on the target key points in the target key point set, and the structural parameters constitute a structural vector; the predicted probability of the disease type of the cervical spine is determined based on the target image and the target key point set. The classification loss value is determined based on the predicted probability and the true probability of the disease to which the cervical spine belongs; the auxiliary regression loss value is determined based on the predicted value of each structural parameter and the true reference value of each structural parameter; the classification loss value and the auxiliary regression loss value are weighted and combined to obtain the joint loss value to optimize the SpineNet_v2 model; A heatmap is determined based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values. A visualization overlay is determined based on the heatmap and the standardized pixel values.
2. The quantitative cervical spine detection method based on cervical spine imaging according to claim 1, characterized in that, The preprocessing of the original cervical spine image to obtain standardized pixel values includes: Multiple original image pixels of the original cervical spine image are standardized to obtain multiple corresponding target image pixels; The target image pixels are offset to obtain offset pixels; the pixel grayscale value of the target image pixels is determined based on the offset pixels. The pixel grayscale values are normalized to obtain standardized pixel values.
3. The quantitative detection method for the cervical spine based on cervical spine imaging according to claim 2, characterized in that, The multiple original image pixels of the original cervical spine image Standardization processing yields multiple corresponding target image pixels. This can be achieved using the following expression: in, For target image pixels; These are the original image pixels; The width of the original cervical spine image; The height of the original cervical spine image; The width of the target image; The height of the target image.
4. The quantitative cervical spine detection method based on cervical spine imaging according to claim 2, characterized in that, The target image pixels are offset to obtain offset pixels; the pixel grayscale value of the target image pixels is determined based on the offset pixels using the following expression: in, The pixel grayscale value; For the target image pixels Centered, horizontal offset Vertical offset The resulting pixel value; The standard deviation of the Gaussian kernel; The radius of the filter kernel; It is a natural exponential function.
5. The quantitative cervical spine detection method based on cervical spine imaging according to claim 2, characterized in that, The normalization of the pixel grayscale values to obtain standardized pixel values is achieved through the following expression: in, Standardized pixel values; The pixel grayscale value; The standard deviation of the Gaussian kernel; The mean value of all pixel values in the target image; The extraction of the predicted keypoint set from the normalized pixel values using the SpineNet_v2 model is achieved through the following expression: in, For predicting the set of key points; These are standardized pixel values.
6. The quantitative cervical spine detection method based on cervical spine imaging according to claim 1, characterized in that, The step of determining the average regression error of the predicted keypoints based on the two-dimensional Euclidean distance between the predicted keypoints and the actual keypoints in the predicted keypoint set is achieved through the following expression: in, This represents the average regression error; To predict the total number of key points; To predict the coordinates of key points; These are the actual coordinates of the key points.
7. The quantitative detection method for the cervical spine based on cervical spine imaging according to claim 1, characterized in that, The structural parameters include: distance between left and right points, distance between upper and lower points, angle between vertebrae, angle between adjacent points, angle between non-adjacent points, relative horizontal displacement between any two points, Cobb angle, cervical curvature index, CCL angle, and vertebral alignment regularity.
8. The quantitative detection method for the cervical spine based on cervical spine imaging according to claim 1, characterized in that, The determination of the classification loss value based on the predicted probability and the true probability of the cervical spine disease is achieved through the following expression: in, The classification loss value is N; N is the total number of samples in the batch. For the first Predictive probability of disease states; For the first The true label of the disease state (0 or 1); The determination of the auxiliary regression loss value based on the predicted value and the true reference value of each structural parameter is achieved through the following expression: in, To assist in regression loss values; This represents the total number of structural parameters; This is a predicted value; These are actual reference values; The weighted combination of the classification loss value and the auxiliary regression loss value to obtain the joint loss value is achieved by the following expression: in, This is the joint loss value; These are the weighting coefficients for the classification loss; This is the classification loss value; These are the weighting coefficients for the regression loss; This is used to assist in regression loss values.
9. The quantitative detection method for the cervical spine based on cervical spine imaging according to claim 1, characterized in that, The heatmap determination based on the coordinates of the target key points in the target key point set, the original pixel points, and the standardized pixel values is achieved through the following expression: in, For heatmaps; Both (x, y) are key points of the target; To control the standard deviation of Gaussian diffusion.
10. The quantitative detection method for the cervical spine based on cervical spine imaging according to claim 1, characterized in that, The method based on the heatmap and the standardized pixel values Determine the visualization overlay. This can be achieved using the following expression: in, For visualization overlay; Standardized pixel values; For heatmaps; This is the heatmap transparency control coefficient.