Spine Cobb angle measuring method and device and electronic equipment

By using position recognition, object detection and key point recognition models in spinal image processing, the spinal vertebrae are identified and positioned section by section, the problems of low degree of measurement automation and poor accuracy in the prior art are solved, and efficient and accurate Cobb angle measurement is achieved.

CN119693362AActive Publication Date: 2025-03-25BEIJING WANDONG MEDICAL TECH CO LTD

Patent Information

Application Number
CN202510199982.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-03-25
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

In the prior art, the measurement degree of the spine Cobb angle is low and the detection accuracy is poor, which depends on the doctor's subjective judgment and high time-consuming.

Method used

By obtaining the spine image to be tested, using the position recognition model, the target detection model and the key point recognition model, each vertebra in the spine area is gradually identified and positioned, and its Cobb angle is calculated.

Benefits of technology

It realizes efficient and accurate identification of spinal vertebrae and calculation of Cobb angle without relying on the heavyweight segmentation model, which improves the degree of automation and accuracy of measurement and reduces the error of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693362A_ABST
    Figure CN119693362A_ABST
Patent Text Reader

Abstract

The invention discloses a spine Cobb angle measuring method and device and electronic equipment, and the method comprises the steps: inputting a to-be-measured spine image into a body position recognition model, and obtaining a spine shooting body position of the to-be-measured spine image outputted by the body position recognition model; inputting the to-be-detected spine image into the target detection model to obtain a spine region image of a spine in the to-be-detected spine image output by the target detection model; inputting the spine area image into a key point identification model corresponding to the spine shooting body position to obtain position information output by the key point identification model to each section of vertebral body of the spine; and calculating a spine Cobb angle in the spine area image according to the position information of each section of vertebral body. A complex vertebral body recognition task is split and refined, different lightweight models are respectively trained and used for completing tasks of all stages, the tasks comprise body position recognition, spine coarse positioning and key position recognition, precise positioning of a vertebral body from coarse to fine is gradually completed in each link, and the precise positioning of the vertebral body from coarse to fine is completed. And finally, completing Cobb angle calculation based on precise positioning of the vertebral body in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical image processing, and in particular to a method, device and electronic device for measuring the Cobb angle of the spine. Background Art

[0002] Scoliosis is a common bone deformity that not only affects the normal physiological curvature of the spine, but also may cause asymmetry of the trunk, which in turn leads to a series of related health problems. In actual clinical applications, the Cobb angle is used as a standard measurement method to assess the severity of scoliosis, so accurate measurement of the Cobb angle is particularly important for the diagnosis and treatment of scoliosis. It usually requires clinicians with rich theoretical knowledge and practical experience to measure the Cobb angle from the patient's CT (Computed Tomography) images, which is very time-consuming and inefficient for clinicians. In addition, due to the knowledge accumulation, practical experience and subjective factors of different doctors, the diagnostic results obtained by different doctors will also have large errors. Summary of the invention

[0003] The present application provides a method, device and electronic device for measuring the Cobb angle of the spine, which can solve the technical problems of low automation and poor detection accuracy when measuring the Cobb angle in the related art.

[0004] In a first aspect, an embodiment of the present application provides a method for measuring the Cobb angle of the spine, the method comprising: Acquire a spinal image to be tested, input the spinal image to be tested into a body position recognition model, and obtain a spinal shooting body position of the spinal image to be tested output by the body position recognition model; Inputting the spinal column image to be tested into the target detection model to obtain the spinal column region image of the spinal column in the spinal column image to be tested output by the target detection model; Input the spinal region image into the key point recognition model corresponding to the spinal shooting position to obtain the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates; The spinal Cobb angle in the spinal column region image is calculated based on the position information of each vertebral body.

[0005] In a second aspect, an embodiment of the present application provides a device for measuring the Cobb angle of the spine, the device comprising: A body position recognition module is used to obtain a spinal image to be tested, input the spinal image to be tested into a body position recognition model, and obtain a spinal shooting body position of the spinal image to be tested output by the body position recognition model; A spinal region detection module, used for inputting the spinal image to be tested into a target detection model to obtain a spinal region image of the spine in the spinal image to be tested output by the target detection model; A vertebral positioning module, used to input the above-mentioned spinal region image into the key point recognition model corresponding to the above-mentioned spinal shooting position, and obtain the position information output by the above-mentioned key point recognition model for each vertebra of the above-mentioned spine, wherein the above-mentioned position information at least includes positioning frame information, vertebral name and corner point coordinates; The Cobb angle calculation module is used to calculate the spinal Cobb angle in the spinal region image according to the position information of each vertebral body.

[0006] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the above method.

[0007] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the above method.

[0008] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least: The present application provides a method for measuring the Cobb angle of the spine, which includes obtaining a spine image to be measured, inputting the spine image to be measured into a posture recognition model, and obtaining the spine shooting posture of the spine image to be measured output by the posture recognition model; inputting the spine image to be measured into a target detection model, and obtaining the spine region image of the spine in the spine image to be measured output by the target detection model; inputting the spine region image into a key point recognition model corresponding to the spine shooting posture, and obtaining the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates; and calculating the spine Cobb angle in the spine region image according to the position information of each vertebra. By splitting and refining the complex vertebral recognition task, training and using different lightweight models to complete the tasks of each stage, including posture recognition, coarse spine positioning and key position recognition, the precise positioning of the vertebra from coarse to fine is gradually completed in each link, and finally the Cobb angle calculation is completed based on the precise positioning of the vertebra in the image. This enables the application to complete vertebral recognition in different body position images without relying on heavyweight segmentation models, that is, to achieve accurate vertebral positioning calculation at a lower model usage cost, and the overall algorithm is highly robust. Ultimately, it is possible to simultaneously output multiple position information such as positioning frame, name, and corner point coordinates for each vertebra, and each position information can play a role of mutual constraint and connection during output, so that the error offset of each vertebral position is smaller, and the algorithm accuracy and generalization are higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 An exemplary system architecture diagram of a spinal Cobb angle measurement method provided in an embodiment of the present application; Figure 2 A schematic diagram of a process for measuring the spinal Cobb angle provided in an embodiment of the present application; Figure 3 A flowchart of a model training method for a body position recognition model provided in an embodiment of the present application; Figure 4 A flowchart of a model training method for a target detection model provided in an embodiment of the present application; Figure 5 A flowchart of a model training method for a key point recognition model provided in an embodiment of the present application; Figure 6 A schematic diagram of a process for measuring the spinal Cobb angle provided in an embodiment of the present application; Figure 7 A schematic diagram of a spinal region image recognition process provided in an embodiment of the present application; Figure 8 A schematic diagram of a processing result of a vertebral positioning frame provided in an embodiment of the present application; Fig. 9 A schematic diagram of a flow chart of a method for calculating the spinal Cobb angle provided in an embodiment of the present application; Fig.10 A schematic diagram of the calculation results of the spinal Cobb angle provided in an embodiment of the present application; Fig.11 A structural block diagram of a spinal Cobb angle measurement device provided in an embodiment of the present application; Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0011] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. When the following description involves the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. And in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, such as A and / or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two. In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0012] Scoliosis is a relatively common bone deformity. The bone abnormalities caused by it not only affect the patient's appearance, but may also cause compression to the internal organs and even affect the nervous system. In order to accurately assess the severity of scoliosis, the Cobb angle is usually used as a standard measurement method in clinical practice. The Cobb angle, also known as the Cobb's angle, is an important indicator for measuring the scoliosis angle through X-rays. When measuring the Cobb angle, you first need to determine the starting vertebra and the ending vertebra of the scoliotic spine segment. These two vertebrae are usually the most inclined vertebrae in the scoliotic arc. Then, by drawing the extension lines of the upper end plate of the starting vertebra and the lower end plate of the ending vertebra, the angle formed by the intersection of these two lines is the Cobb angle. The size of the Cobb angle directly reflects the severity of scoliosis. Generally, the larger the angle, the more severe the scoliosis.

[0013] The measurement of Cobb angle is not only the basis for diagnosing scoliosis, but also an important basis for treatment decision-making. Therefore, the accuracy of Cobb angle measurement is crucial for the diagnosis and treatment of scoliosis. At present, the measurement methods of Cobb angle are mainly divided into three categories: manual measurement, semi-automatic measurement and automatic measurement. Among them, manual measurement is the traditional method of Cobb angle measurement, which mainly relies on the professional experience and skills of the physician. The physician needs to select the appropriate starting vertebra and the ending vertebra on the X-ray film, and then use a protractor to measure the angle between the upper end plate of the starting vertebra and the lower end plate of the ending vertebra, which is the Cobb angle. However, it is obvious that the accuracy of Cobb angle in this Cobb angle measurement method is highly dependent on the subjective judgment of the physician, and the manual measurement process is time-consuming, especially when dealing with a large number of cases, the efficiency is low, and it is difficult to meet the needs of modern medical efficiency. The semi-automatic measurement method combines the advantages of manual judgment and computer algorithm to a certain extent. Generally, the physician manually selects the starting and ending vertebrae, and then the computer algorithm automatically detects the inclination angles of these vertebrae and calculates the Cobb angle. Compared with manual measurement, this method improves work efficiency, but the selection of the starting and ending vertebrae still depends on the subjective judgment of the physician, so there may still be selection errors. Automatic measurement methods are mainly divided into two categories: traditional methods and deep learning methods. Traditional methods are usually based on image processing techniques, such as threshold segmentation and Hough transform. When faced with complex spinal deformities or poor image quality, the robustness of these methods will be significantly reduced. Deep learning methods face a variety of problems such as high model annotation costs, complex post-processing algorithms, and adhesion of segmentation results, which leads to high computational difficulty and high cost, and the final measurement accuracy is also unstable.

[0014] Therefore, an embodiment of the present application provides a method for measuring the spinal Cobb angle to solve the technical problems of low automation and poor detection accuracy when measuring the Cobb angle.

[0015] See also Figure 1 , Figure 1 An exemplary system architecture diagram of a method for measuring the spinal Cobb angle provided in an embodiment of the present application.

[0016] like Figure 1 As shown, the system architecture may include an electronic device 101, a network 102, and a digital photography device 103. The network 102 is used to provide a medium for a communication link between the electronic device 101 and the digital photography device 103. The network 102 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, and the like.

[0017] The electronic device 101 can interact with the digital photography device 103 through the network 102 to receive messages from the digital photography device 103 or send messages to the digital photography device 103, or the electronic device 101 can interact with the digital photography device 103 through the network 102 to receive messages or data sent by other users to the digital photography device 103. In the embodiment of the present application, the electronic device 101 can be various computer terminals, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers. The digital photography device 103 can be a device that shoots spinal images by emitting X-rays to collect spinal images and transmit the spinal images to the electronic device 101 for measuring the Cobb angle.

[0018] Specifically, in an embodiment of the present application, the electronic device 101 can obtain the image of the spine to be tested from the digital photography device 103, input the image of the spine to be tested into the position recognition model, and obtain the spine shooting position of the image of the spine to be tested output by the position recognition model; then, the electronic device 101 inputs the image of the spine to be tested into the target detection model, and obtains the spinal region image of the spine in the image of the spine to be tested output by the target detection model; further, the electronic device 101 inputs the spinal region image into the key point recognition model corresponding to the spinal shooting position, and obtains the position information output by the key point recognition model for each vertebra of the spine, and the position information at least includes the positioning frame information, the vertebral name and the corner point coordinates; finally, the electronic device 101 calculates the spinal Cobb angle in the spinal region image according to the position information of each vertebra.

[0019] It should be understood that Figure 1 The number of electronic devices, networks and digital photography devices in the figure is only illustrative, and any number of electronic devices, networks and digital photography devices may be used according to implementation requirements.

[0020] See also Figure 2 , Figure 2 A flowchart of a spinal Cobb angle measurement method provided for an embodiment of the present application. The execution subject of the embodiment of the present application can be an electronic device that performs the spinal Cobb angle measurement, or a processor in an electronic device that performs the spinal Cobb angle measurement method, or a spinal Cobb angle measurement service in an electronic device that performs the spinal Cobb angle measurement method. For ease of description, the specific execution process of the spinal Cobb angle measurement method is introduced below, taking the execution subject as a processor in an electronic device as an example.

[0021] like Figure 2 As shown, the method for measuring the spinal Cobb angle may at least include: S202, obtaining a spinal column image to be tested, inputting the spinal column image to be tested into a body position recognition model, and obtaining a spinal column shooting body position of the spinal column image to be tested output by the body position recognition model.

[0022] Optionally, in the process of diagnosing scoliosis, it is first necessary to obtain a full-spine DR image of the spine to be tested. These images are usually taken by digital photography equipment, and the subject needs to maintain a specific position during the shooting to ensure the integrity and clarity of the spine. Generally speaking, considering that scoliosis is a deformation of the spine in three-dimensional space (coronal plane, sagittal plane and horizontal plane), not a simple left and right bend, in order to more accurately understand the curvature of the spine, the spine is often photographed in two positions, the anteroposterior or lateral, and the images obtained are the front view and the side view, respectively. The anteroposterior image is mainly used to observe the scoliosis of the spine in the coronal plane, reflecting the horizontal arrangement and alignment of the vertebrae; while the lateral image is used to evaluate the curvature of the spine in the sagittal plane, such as whether the longitudinal structure of the spine is kyphotic or lordotic. The quality of the image is crucial to subsequent analysis, so when shooting, it is ensured that the image is clear, the contrast is moderate, and the spinal area is fully visible.

[0023] Furthermore, spinal images in different positions will involve different spinal Cobb angle calculation methods. Therefore, after obtaining the spinal image to be tested, it is first necessary to determine the shooting position of the image. In order to achieve automatic and accurate recognition of the shooting position, it can be done through a pre-trained position recognition model. The model is built based on a deep learning algorithm, which can automatically parse the image content, identify the shooting position of the image, and accurately determine whether the shooting position of the spinal image is anteroposterior or lateral. The training of the position recognition model is usually based on a large number of annotated spinal image data sets. By learning the features in these data, the model can accurately distinguish between anteroposterior and lateral images. Then, by inputting the spinal image to be tested into the pre-trained position recognition model, the spinal shooting position of the spinal image to be tested output by the position recognition model can be obtained.

[0024] S204, inputting the spinal column image to be tested into the target detection model, and obtaining the spinal column region image of the spinal column in the spinal column image to be tested output by the target detection model.

[0025] Optionally, after determining the shooting position, the spinal vertebrae in the image can be specifically identified to facilitate the subsequent calculation of the Cobb angle between each vertebra. In the initially captured spinal image, for the integrity of the spinal region, body bones outside the spinal region will be captured in the image. Therefore, the spinal region needs to be identified from the spinal image to be tested first, so as to reduce the interference of irrelevant information when the vertebrae are subsequently identified.

[0026] Specifically, when performing automatic recognition of the spinal region, it can also be completed by a pre-trained target detection model. The task of the target detection model is to identify and select the spinal region in the image, and output the selected spinal region in the form of a spinal region image. If the spinal image is an anteroposterior image, the target includes the thoracic and lumbar regions, the upper limit starts at the level of the clavicle, the lower limit ends at the level of the lower edge of the sacroiliac joint, and the left and right limits are the rib boundaries on both sides corresponding to the level of the lung base. If the spinal image is a lateral image, the target includes the thoracic, lumbar and part of the sacral regions, the upper limit starts at the level of the clavicle, the lower limit ends at the level of the lower edge of the ilium, and the left and right limits are the body boundaries on both sides corresponding to the level of the lung base. This model is based on deep learning algorithms such as convolutional neural networks (CNNs), which can automatically detect the boundaries of the spine and generate a rectangular frame (i.e., a positioning frame) containing the spinal region. This positioning frame will serve as the basis for subsequent vertebral recognition, ensuring that subsequent analysis is only performed on the spinal region, thereby reducing interference from other tissues or organs. This step effectively eliminates interference from non-spinal parts of the image, allowing subsequent analysis to focus more on key information.

[0027] S206, inputting the spinal region image into the key point recognition model corresponding to the spinal shooting position, and obtaining the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates.

[0028] Optionally, after obtaining the spinal regional image, the position, type and key corner points of each vertebra in the spine can be identified based on the spinal regional image. In the embodiment of the present application, considering that the key point features of the spine corresponding to different shooting positions (anteroposterior or lateral) are different, different key point recognition models are needed for positioning images of different positions. That is, based on the deep learning algorithm, a key point recognition model for identifying anteroposterior images and a key point recognition model for identifying lateral images are pre-trained, and the two models can respectively learn the spinal vertebrae features of their respective positions for images of corresponding positions. Therefore, in actual application scenarios, the two models can be used to receive images of corresponding positions respectively, and more accurately identify each spinal vertebra in various position images.

[0029] Specifically, after the spinal region image is input into the key point recognition model corresponding to the spinal shooting position, the position information output by the key point recognition model for each vertebra of the spine can be obtained. The position information output by the model will at least include the positioning frame information, vertebral name and corner point coordinates.

[0030] The positioning frame information is the bounding box of each vertebra, which is used to identify the position and range of each vertebra. In the frontal image, there are at least 17 positioning frames, including 12 thoracic vertebrae and 5 lumbar vertebrae; in the lateral image, there are at least 18 positioning frames, including 12 thoracic vertebrae, 5 lumbar vertebrae and 1 sacral vertebrae.

[0031] In addition, the model can also output the vertebral name corresponding to each vertebra according to the position and arrangement order of the spinal vertebrae, that is, the name or number of each vertebrae, which is used to identify the specific position of the vertebrae. For example, for the frontal image, there are 17 vertebral categories, including 12 thoracic vertebrae: T1-T12, 5 lumbar vertebrae: L1-L5; and for the lateral image, there are 18 vertebral categories, including 12 thoracic vertebrae: T1-T12, 5 lumbar vertebrae: L1-L5, and 1 sacral vertebra: S1. The output of the vertebral category name also provides great convenience for clinicians to read and diagnose.

[0032] Furthermore, the key point recognition model will also output the corner point coordinates of each vertebra. Corner point coordinates refer to the specific location information that defines the key points of the vertebral boundary. The key corner point coordinates of each vertebra usually include the corner points of the upper and lower end plates of the vertebra. These corner point coordinates are the basis for calculating the Cobb angle. They are usually expressed in the form of coordinates in two-dimensional or three-dimensional space, often accurate to the pixel level. If the spinal image is an anteroposterior image, a total of 68 corner points will be output; if the spinal image is a lateral image, a total of 70 corner points will be output. The two extra points in the lateral view are the corner points of the upper end plate of the sacral vertebra S1. These position information provides key data support for the detection of the Cobb angle of the spine. Through this series of refined and automated processing processes, the system can automatically identify the shooting position of the spine, extract the spinal region, and further identify the key point information of each vertebra from the spinal image to be tested, which can significantly improve the efficiency and accuracy of scoliosis diagnosis, reduce the errors of manual operation, and provide more reliable diagnostic support for clinicians.

[0033] S208, calculating the spinal Cobb angle in the spinal column region image according to the position information of each vertebral body.

[0034] Optionally, after accurately detecting the position information of each vertebra in the spine, the spinal Cobb angle in the spinal region image can be calculated based on the positioning frame and corner point coordinates in the position information of each vertebra. Accurate Cobb angle measurement helps doctors make accurate judgments on the condition and formulate reasonable treatment plans, thereby achieving excellent treatment results.

[0035] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided, wherein the image of the spine to be measured is obtained, the image of the spine to be measured is input into a position recognition model, and the spine shooting position of the image of the spine to be measured output by the position recognition model is obtained; the image of the spine to be measured is input into a target detection model, and the spinal region image of the spine in the image of the spine to be measured output by the target detection model is obtained; the spinal region image is input into a key point recognition model corresponding to the spinal shooting position, and the position information output by the key point recognition model for each vertebra of the spine is obtained, and the position information at least includes positioning frame information, vertebral name and corner point coordinates; the spinal Cobb angle in the spinal region image is calculated according to the position information of each vertebra. By splitting and refining the complex vertebral recognition task, different lightweight models are trained and used to complete the tasks of each stage, including position recognition, coarse spinal positioning and key position recognition, and the precise positioning of the vertebra from coarse to fine is gradually completed in each link, and finally the Cobb angle calculation is completed based on the precise positioning of the vertebra in the image. This enables the application to complete vertebral recognition in different body position images without relying on heavyweight segmentation models, that is, to achieve accurate vertebral positioning calculation at a lower model usage cost, and the overall algorithm is highly robust. Ultimately, it is possible to simultaneously output multiple position information such as positioning frame, name, and corner point coordinates for each vertebra, and each position information can play a role of mutual constraint and connection during output, so that the error offset of each vertebral position is smaller, and the algorithm accuracy and generalization are higher.

[0036] In the method for measuring the spinal Cobb angle, this application also provides a feasible method for training a target detection model. For details, please refer to Figure 3 , Figure 3 A flow chart of a model training method for a posture recognition model provided in an embodiment of the present application. Figure 3 As shown, the model training method of the body position recognition model in step S202 may at least include: S302: Acquire multiple sample spinal images, where the multiple sample spinal images are all sample data with standard body position labels.

[0037] Optionally, first obtain multiple sample spinal images for training the model, and the multiple sample spinal images are sample data with standard body position labels. For the construction of sample data, a sample set containing multiple frontal or lateral images can be obtained first, and then the collected data samples are correctly classified and labeled in frontal and lateral positions, so that these sample data have correct frontal and lateral categories as standard labels.

[0038] Furthermore, in order to enrich the sample set, existing samples can be translated, symmetrical, blurred, contrast enhanced, etc. to obtain new samples, thereby expanding the sample data and making the sample set more diverse. In the sample preparation stage, this application only requires less annotation cost to obtain a large number of rich sample spinal images, thus significantly saving the labor cost in the model training process.

[0039] S304: construct an initial body position recognition model based on the first basic model.

[0040] Optionally, the body position recognition model needs to identify the shooting body position based on the feature information in the spinal image, so a suitable first basic model can be selected according to the characteristics of the detection task to construct an initial body position recognition model. In a feasible implementation, the first basic model can be a YOLO series model, such as a YOLOv8-Classify model, a YOLOv11-Classify model, etc., or other classification models such as CNN deep learning or SVM machine learning, so that the initial body position recognition model constructed based on the first basic model can output prediction results for the predicted object based on the pixel features in the image. For the constructed initial body position recognition model, targeted training is also required to adjust the parameters in the model so that the model can meet the performance requirements in actual scenarios.

[0041] S306: Input a plurality of sample spinal column images into an initial body position recognition model to train the initial body position recognition model.

[0042] S308. During the training process of the initial body position recognition model, the initial body position recognition model is controlled to output predicted body position labels for multiple sample spinal images, and the parameters of the initial body position recognition model are adjusted according to the predicted body position labels and the standard body position labels of the multiple sample spinal images until convergence, to obtain a trained body position recognition model.

[0043] Optionally, during the training process of the initial body position recognition model, the initial body position recognition model is controlled to output predicted body position labels for multiple sample spinal images. During the output process, the body position recognition model performs forward propagation calculations on the sample spinal images, that is, the output of the previous layer is used as the input of the next layer until the final body position classification label is output. These predicted body position labels are the predicted classification results of the initial body position recognition model for multiple sample spinal images. Then the gap between the predicted body position labels and the standard body position labels is the gap between the current state of the initial body position recognition model and the expected performance. Furthermore, the gradient descent method is used to calculate the training loss value of the model based on the predicted body position labels and the standard body position labels of multiple sample spinal images, and the parameters in the initial body position recognition model are adjusted based on the training loss value until the initial body position recognition model converges to the expected performance to obtain the trained body position recognition model.

[0044] Optionally, the model training end condition of the model may include, for example, the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on actual conditions and is not specifically limited here.

[0045] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided, which includes a method for training a body position recognition model. The body position recognition model is constructed through a first basic model, and based on a set of sample spine images with standard body position labels, the body position recognition model is trained in a targeted manner in a body position classification and recognition scenario, so that the body position recognition model can perform in-depth analysis of the spine image, and through precise area division, feature extraction and other calculation processes, the body position of the spine image to be measured is accurately recognized, so as to ensure the accuracy and reliability of subsequent identification of spinal vertebrae and measurement of the Cobb angle.

[0046] In the method for measuring the spinal Cobb angle, this application also provides a feasible method for training a target detection model. For details, please refer to Figure 4 , Figure 4 A flow chart of a model training method for a target detection model provided in an embodiment of the present application. Figure 4 As shown, the model training method of the target detection model in step S204 may at least include: S402: Acquire multiple sample spinal column images, where the multiple sample spinal column images are all sample data with standard spinal column region labels.

[0047] S404: construct an initial target detection model based on the second basic model.

[0048] S406: Input multiple sample spine images into the initial target detection model to train the initial target detection model.

[0049] S408. During the training process of the initial target detection model, the initial target detection model is controlled to output predicted spinal region labels for multiple sample spinal images, and the parameters of the initial target detection model are adjusted according to the predicted spinal region labels and the standard spinal region labels of the multiple sample spinal images until convergence, to obtain a trained target detection model.

[0050] Optionally, for the training of the target detection model, considering that there are significant differences between the spinal region and other regions in the frontal image and the lateral image, a single target detection model can be used to perform spinal region detection on all spinal images to save unnecessary training costs. Similar to the body position recognition model, when training the target detection model, it is also necessary to prepare multiple sample spinal images, and the multiple sample spinal images are all sample data with standard spinal region labels. Among them, the standard spinal region label can be a positioning box mark made by manually applying a positioning box to the collected data sample.

[0051] Furthermore, the samples can be translated, symmetrical, blurred, superimposed with noise, contrast enhanced, etc. to expand the data, making the sample set richer and more diverse. The second basic model can be used to construct the initial target detection model. The second basic model can be a model of the RCNN series, such as Fast RCNN, Faster RCNN model, etc., or a YOLO series model, such as YOLOv5-Detect model, YOLOv8-Detect model, YOLOv11-Detect model, etc., or other target detection algorithms.

[0052] Furthermore, during the model training process, the initial target detection model is controlled to output predicted spinal region labels for multiple sample spinal images. During the output process, the target detection model performs forward propagation calculations on the sample spinal images, that is, the output of the previous layer is used as the input of the next layer until the final spinal region is output. These predicted spinal region labels are the prediction results of the initial target detection model for multiple sample spinal images. Then the gap between the predicted spinal region labels and the standard spinal region labels is the gap between the current state of the initial target detection model and the expected performance. On this basis, the gradient descent method is used to calculate the training loss value of the model according to the predicted spinal region labels and the standard spinal region labels of multiple sample spinal images. The parameters in the initial target detection model are adjusted based on the training loss value until the initial target detection model converges to the expected performance to obtain the trained target detection model.

[0053] Similarly, the model training termination conditions of the model may include conditions such as the loss function value being less than or equal to a preset loss function threshold, the number of iterations reaching a preset number threshold, etc. The specific model training termination conditions can be determined based on actual conditions and are not specifically limited here. It should also be noted that two target detection models can also be trained to identify the spinal region in the frontal image and the lateral image respectively. This application does not make a unique limitation on the number and function of the target detection models.

[0054] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided, which includes a method for training a target detection model. The target detection model is constructed through the second basic model, and based on a set of sample spine images with standard spine region labels, the target detection model is trained in a spine region recognition scenario, so that the target detection model can perform in-depth analysis of the spine image, and finally output an accurate spine region image for the spine image to be measured, so as to ensure the accuracy and reliability of subsequent identification of spinal vertebrae and measurement of the Cobb angle.

[0055] In the method for measuring the spinal Cobb angle, this application also provides a feasible training method for the key point recognition model. For details, please refer to Figure 5 , Figure 5 A flowchart of a model training method for a key point recognition model provided in an embodiment of the present application. Figure 5 As shown, the model training method of the key point recognition model in step S206 may at least include: S502: Acquire multiple sample spinal region images, where the multiple sample spinal region images are all sample data with standard position information labels.

[0056] S504: construct an initial key point recognition model based on the third basic model.

[0057] S506: Input a plurality of sample spinal region images into an initial key point recognition model to train the initial key point recognition model.

[0058] S508. During the training process of the initial key point recognition model, the initial key point recognition model is controlled to output predicted position information labels for multiple sample spinal region images, and the parameters of the initial key point recognition model are adjusted according to the predicted position information labels and the standard position information labels of the multiple sample spinal region images until convergence, to obtain the trained key point recognition model.

[0059] The training of the key point recognition model relies on a large amount of annotated spinal image data, which is usually manually annotated by professional physicians to ensure the accuracy of the position and corner coordinates of each vertebra. By learning these annotated data, the model can automatically identify the key points of each vertebra in the spine and output the corresponding position information.

[0060] Optionally, for the training of the key point recognition model, it is necessary to train two key point recognition models for the frontal image and the lateral image respectively. When training the key point recognition model, it is also necessary to prepare multiple sample spinal region images, and the multiple sample spinal region images are sample data with standard position information labels. Among them, the position information label contains the positioning frame, name, and coordinate information of the corner points of each vertebra. The generation of labels can first be done by manually marking the key points in the order of the vertebrae. Then, the coordinate circumscribed rectangle of each vertebral key point is expanded by n pixels as the positioning frame. n is generally 5-30, which can be adjusted according to the actual situation.

[0061] Furthermore, the samples can be translated, symmetrical, blurred, superimposed with noise, contrast enhanced, etc. to expand the data, making the sample set richer and more diverse. The third basic model can be used to construct the initial key point recognition model. The second basic model can be a YOLO series model, such as the YOLOv8-Pose model, the YOLOv11-Pose model, etc., or other related model algorithms.

[0062] Furthermore, during the model training process, the initial key point recognition model is controlled to output predicted position information labels for multiple sample spinal region images. During the output process, the key point recognition model performs forward propagation calculations on the sample spinal region images, that is, the output of the previous layer is used as the input of the next layer until the final position information is output. These predicted position information labels are the prediction results of the initial key point recognition model for multiple sample spinal region images. Then, the gradient descent method is used to calculate the training loss value of the model based on the predicted position information labels and the standard position information labels of multiple sample spinal region images. The parameters in the initial key point recognition model are adjusted based on the training loss value until the initial key point recognition model converges to the expected performance to obtain a trained key point recognition model. Similarly, the model training end conditions of the model can also be determined based on actual conditions, which are not specifically limited here.

[0063] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided, which includes a method for training a key point recognition model. The key point recognition model is constructed through a third basic model, and based on a set of sample spinal region images with standard position information labels, the key point recognition model is trained in a key point recognition scenario, so that the key point recognition model can output accurate position information for the spinal region image, so as to ensure the accuracy and reliability of the subsequent measurement of the Cobb angle.

[0064] See also Figure 6 , Figure 6 A schematic flow chart of a method for measuring the spinal Cobb angle provided in an embodiment of the present application.

[0065] like Figure 6 As shown, the method for measuring the spinal Cobb angle may at least include: S602, obtaining an initial digital photographic image of the spine, adjusting the pixel value of each pixel in the initial digital photographic image according to digital photographic parameters, and mapping each adjusted pixel value to a grayscale pixel interval to obtain an image of the spine to be measured; wherein the digital photographic parameters include at least one of a window width and a window position.

[0066] Optionally, the initial digital photographic image of the spine is usually a DR image of the whole spine acquired by a digital X-ray device (such as DR, Digital Radiography) or a CT scanner. The DR image of the whole spine is an anteroposterior or lateral image of the whole spine taken by full-frame DR or conventional DR stitching. These devices can record the patient's spinal structure in the form of a digital image to generate high-resolution two-dimensional or three-dimensional images. The initial digital photographic image contains rich spinal anatomical information, but due to differences in shooting conditions, equipment parameters and patient position, the image may have problems such as insufficient contrast, uneven brightness or noise interference. Therefore, in a feasible implementation, the initial image can also be preprocessed to obtain the spinal image to be tested to optimize the image quality, so that the pixel features in the spinal image to be tested are more suitable for model analysis and recognition, thereby improving subsequent recognition accuracy.

[0067] Specifically, after acquiring the initial digital photography image, the image is optimized according to the digital photography parameters. The digital photography parameters involved in the embodiments of the present application mainly include window width (Window Width) and window level (WindowLevel), which are commonly used adjustment parameters in medical image processing and are used to control the contrast and brightness of the image. The window width determines the range of grayscale values ​​in the image. A wider window width will display more grayscale levels, but may reduce the contrast of the image; a narrower window width will enhance the contrast, but may lose some detail information. The window level determines the center point of the grayscale value in the image. Adjusting the window level can change the brightness of the image and make the structure within a specific grayscale range clearer. Adjusting the pixel values ​​in the image based on the window width and window level can optimize the visual effect of the image, highlight the key structures of the spine (such as vertebral bodies, intervertebral spaces, etc.), and suppress irrelevant background information or noise. The specific pixel adjustment formula is as follows: ; in, WW Indicates the window width, WL Indicates the window level, p Represents the pixel value of the original image, Represents the pixel value adjusted based on the window width and window level. The window width and window level can be set according to the characteristics of the spine image and the diagnostic requirements. For example, for the anteroposterior spine image, a higher contrast may be required to clearly display the vertebral edge; while for the lateral image, a wider grayscale range may be required to display the overall curvature of the spine. According to the set window width and window level, the grayscale value of each pixel in the image is remapped to convert the original pixel value into a new grayscale range, thereby enhancing the contrast and clarity of the region of interest.

[0068] After adjusting the pixel values, the processed pixel values ​​can be further mapped to a standard grayscale pixel range (usually 0-255, representing the grayscale range from pure black to pure white). This step can standardize the image and make it suitable for subsequent analysis and processing. The specific calculation formula is as follows: ; in, Represents the maximum pixel value of the original image, Represents the minimum pixel value of the original image, Represents the current original pixel value, The pixel mapping process scales the adjusted pixel value to the range of 0-255 to ensure that the grayscale distribution of the image is uniform and meets the display and storage standards, further improving the image quality and detail performance. After the above processing, a high-quality spinal image with moderate image contrast, uniform brightness and noise suppression is finally obtained. This preprocessing process significantly improves the accuracy and reliability of subsequent image segmentation, key point recognition and Cobb angle calculation.

[0069] S604: Input the spinal column image to be tested into the body position recognition model, and obtain the spinal column shooting body position of the spinal column image to be tested output by the body position recognition model.

[0070] Regarding step S604, please refer to the detailed description in step S202, which will not be repeated here.

[0071] S606: Input the spinal column image to be tested into the target detection model to obtain the spinal column region image of the spinal column in the spinal column image to be tested output by the target detection model.

[0072] Regarding step S606, please refer to the detailed description in step S204, which will not be repeated here.

[0073] S608: Calculate an expansion ratio according to the initial size of the spine region image, and expand the boundary of the spine region image according to the expansion ratio.

[0074] Optionally, in order to prevent the lack of marginal vertebrae in the spinal region image output by the model from affecting the subsequent Cobb angle measurement results, the boundary can be expanded based on the spinal region results output by the target detection model. The expanded pixels can be calculated according to the image ratio, and the formula is as follows: ; in, H is the height of the original spine region image, r To expand the ratio.

[0075] Furthermore, the expansion ratio can be adaptively calculated according to the initial size of the spinal region image, or the expansion ratio can be a preset fixed value, such as 0.03, 0.04, etc. The calculation method of the expansion ratio can be adjusted according to actual conditions, and the embodiments of the present application do not limit this.

[0076] In addition, the boundary to be expanded may be any one or more of the four boundaries. Figure 7 , Figure 7 A schematic diagram of a recognition process of a spinal region image provided in an embodiment of the present application. Figure 7 (A) shows the spine region segmentation process of the frontal image, and (B) shows the spine region segmentation process of the lateral image. Considering that cervical vertebrae are often missing in actual situations, the upper limit boundary can be expanded to ensure the integrity of the vertebral body and the accuracy of the spinal features.

[0077] S610, input the expanded spinal region image into the key point recognition model corresponding to the spinal shooting position, and obtain the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates.

[0078] Regarding step S610, please refer to the detailed description in step S206, which will not be repeated here.

[0079] S612: The positioning frame information includes at least one candidate positioning frame and a confidence score of each candidate positioning frame. The candidate positioning frames are screened based on the confidence scores of the candidate positioning frames, and candidate positioning frames that meet a preset suppression condition are removed to obtain a vertebral positioning frame corresponding to each vertebra.

[0080] Optionally, based on the characteristics of the key point recognition model, it may output multiple possible candidate positioning frames for each vertebra, and these candidate positioning frames have different confidence scores to characterize the possibility of being the correct positioning frame. Therefore, based on the positioning frame information output by the key point recognition model for each vertebra, it is also necessary to screen the candidate positioning frames and remove redundant candidate positioning frames.

[0081] Specifically, the non-maximum suppression (NMS) algorithm can be used to process candidate positioning boxes. The NMS algorithm is an algorithm for suppressing elements that are not maxima and realizing local maximum search. Its core idea is to find the local maximum in a neighborhood and suppress other non-maximum elements. The NMS algorithm improves the accuracy of the detection results by eliminating redundant bounding boxes by retaining the box with the highest score and suppressing other boxes that highly overlap with the box. In the implementation steps of the NMS algorithm, the candidate positioning boxes are first sorted according to the confidence scores of all candidate positioning boxes; then the candidate positioning box with the highest confidence is selected to be added to the final output list and deleted from the candidate positioning box list; then the area of ​​all remaining candidate positioning boxes is calculated, and the intersection over union (IoU) of the candidate positioning box with the highest confidence and other candidate positioning boxes is calculated; and the candidate positioning boxes with IoU greater than the preset threshold are deleted. After each deletion, the above process is repeated until the candidate positioning box list is empty. The NMS algorithm can effectively eliminate redundant candidate positioning boxes and improve the accuracy and efficiency of vertebral detection.

[0082] S614, reordering the vertebral positioning frames according to the order of the vertebral positioning frames on the longitudinal axis, and calculating the spinal Cobb angle in the spinal column region image according to the position information of each vertebra after the reordering.

[0083] Optionally, after executing the NMS algorithm, the vertebral positioning frames are reordered according to their order on the vertical axis (Y axis), so as to obtain the arrangement results of the positioning frames that conform to the order of the vertebrae in the image. Specifically, the coordinates of the rectangular center points of all positioning frames can be calculated and reordered according to the order of the center point coordinates from top to bottom on the y axis. Figure 8 , Figure 8 A schematic diagram of the processing result of a vertebral positioning frame provided in an embodiment of the present application, as shown in the final Figure 8 As shown in (A) in FIG, for the frontal image, 17 positioning frames are output, including 12 thoracic vertebrae: T1-T12, and 5 lumbar vertebrae: L1-L5; Figure 8 As shown in (B), for the lateral image, 18 positioning frames are output, including 12 thoracic vertebrae: T1-T12, 5 lumbar vertebrae: L1-L5 and 1 sacral vertebra: S1. Further, according to the position information of each vertebra after reordering, the spinal Cobb angle in the spinal region image can be accurately calculated.

[0084] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided. For the initially acquired spine image, the grayscale value of each pixel in the image is remapped according to the set window width and window position to convert the original pixel value into a new grayscale range, thereby enhancing the contrast and clarity of the region of interest, and improving the accuracy and reliability of subsequent image segmentation, key point recognition and Cobb angle calculation. On the basis of the spine region result output by the target detection model, the boundary is expanded to prevent the lack of edge vertebrae from affecting the subsequent Cobb angle measurement results. For a large number of candidate positioning frames output by the key point recognition model, a non-maximum suppression algorithm is performed based on the confidence score to effectively eliminate redundant candidate positioning frames, improve the accuracy and efficiency of vertebral detection, and finally reorder each vertebral positioning frame according to the order of each vertebral positioning frame on the longitudinal axis (Y axis), so as to obtain the arrangement results of each positioning frame that conforms to the order of vertebrae in the image.

[0085] Different Cobb angle calculation methods are also required for images taken in the frontal and lateral positions. Fig. 9 , Fig. 9 A schematic flow chart of a method for calculating the spinal Cobb angle provided in an embodiment of the present application.

[0086] like Fig. 9 As shown, the above step S208, calculating the spinal Cobb angle in the spinal region image according to the position information of each vertebral body, may further include at least: S902: When the spine is photographed in the anteroposterior position, the Cobb angle between every two vertebrae is calculated according to the position information of each vertebra, and the Cobb angle matrix of the spine is obtained.

[0087] Optionally, when calculating the Cobb angle of the spine in the anteroposterior image, it is necessary to first calculate the Cobb angle between each two vertebrae based on the position information of each vertebral body to obtain the Cobb angle matrix of the spine. Specifically, the average coordinates of the two left points and the average coordinates of the two right points of the four corner points of each vertebra are connected as the middle line segment. The left average point is the starting point, the right average point is the end point, and the middle line segment vector is recorded as , the dimension is 17*2; then calculate the vector Length of mold , the dimension is 17*1, and the calculation formula of the modulus is as follows: ; Based on the modulus, the Cobb angle matrix of each vertebra with other vertebrae can be calculated according to the cosine formula. The dimension is 17*17. The calculation formula is as follows: ; in, T Represents a matrix transpose operation.

[0088] S904: Determine the curvature type of the spine according to the target Cobb angle that meets the preset degree condition in the Cobb angle matrix.

[0089] Furthermore, the anteroposterior image includes two types of curvature, namely, straight or S-shaped. The curvature type determines how the Cobb angle in the anteroposterior image should be selected. Therefore, it is necessary to find the largest Cobb angle according to the Cobb angle matrix to determine it as the target Cobb angle, and then determine the curvature type of the spine according to the curvature of the target Cobb angle.

[0090] S906, dividing the spine into multiple spinal segments according to the curvature type, the Cobb angle matrix, and the upper vertebrae and the lower vertebrae corresponding to the target Cobb angle; and using the Cobb angle between the upper vertebrae and the lower vertebrae of each spinal segment as the spinal Cobb angle in the spinal region image.

[0091] Optionally, generally speaking, the frontal image is generally divided into several spinal segments, namely: MT represents the main thoracic segment, PT represents the upper thoracic segment, L represents the lumbar segment, and TL represents the thoracolumbar segment. The three Cobb angles that need to be calculated and outputted in the end are the main thoracic segment (MT area) Cobb angle, the upper thoracic segment (PT area) Cobb angle, and the thoracolumbar segment / lumbar segment (TL / L) Cobb angle.

[0092] Then, for a straight spine, the maximum target Cobb angle determined above is located in the middle of the spine. Fig.10 , Fig.10 A schematic diagram of the calculation results of the spinal Cobb angle provided in the embodiment of the present application. Fig.10 As shown in (A), in the anteroposterior image, it is determined that the Cobb angle between vertebrae T5 and T12 is the largest, which is 90.0 degrees. Vertebrae T5-T12 is the MT region, so the 90.0-degree target Cobb angle is also the Cobb angle of the MT region. Based on the target Cobb angle, the vertebrae T5 at the upper end of the target Cobb angle is continued to find the vertebrae T1 in the upper region that forms the largest Cobb angle with T5, then vertebrae T1-T5 are the PT region, and the 45.3-degree Cobb angle between the two vertebrae is the Cobb angle of the PT region. Continuing, the vertebrae T12 at the lower end of the target Cobb angle is found to form the largest Cobb angle with T12 in the lower region. Then vertebrae T12-L5 are the TL / L region, and the 50.8-degree Cobb angle between the two vertebrae is the Cobb angle of the TL / L region.

[0093] For an S-shaped spine, it is necessary to determine which region the target Cobb angle is located in based on whether the target Cobb angle is located in the upper or lower part of the spine. If the target Cobb angle is located in the upper part of the spine, the target Cobb angle is determined to be the PT region Cobb angle, and then the maximum Cobb angle formed by the lower end vertebra of the target Cobb angle and other vertebrae below it is determined to be the MT region Cobb angle, and then the maximum Cobb angle formed by the lower end vertebra of the MT region Cobb angle and other vertebrae below it is determined to be the TL / L region Cobb angle.

[0094] Similarly, if the target Cobb angle is in the lower part of the spine, the target Cobb angle is determined to be the TL / L area Cobb angle, and then the maximum Cobb angle formed by the upper vertebra of the target Cobb angle and other vertebrae above it is determined to be the MT area Cobb angle, and then the maximum Cobb angle formed by the upper vertebra of the MT area Cobb angle and other vertebrae above it is determined to be the PT area Cobb angle.

[0095] or, S908: When the spine photographing position is lateral, the spine is divided into multiple spinal segments according to a preset vertebral body division rule.

[0096] Alternatively, if Fig.10 As shown in (B), when the spine is photographed in the lateral position, the spine can be divided according to the preset vertebral division rules. It is generally divided into five spinal segments: upper thoracic segment (T2-T5), main thoracic segment (T2-T10), lower thoracic segment (T5-T10), thoracolumbar segment (T10-L2) and lumbar segment (T12-S1).

[0097] S910, calculating the Cobb angle between the upper vertebra and the lower vertebra of each spinal column segment according to the position information of each vertebra, and obtaining the spinal column Cobb angle in the spinal column region image.

[0098] Optionally, the Cobb angle between the upper vertebra and the lower vertebra of each spinal segment is calculated according to the coordinates of the corner points of each vertebra, so as to obtain the degrees of the five Cobb angles in the lateral image.

[0099] In an embodiment of the present application, a method for measuring the Cobb angle of the spine is provided. Different Cobb angle calculation methods are used for different spinal features represented in the anteroposterior and lateral images, thereby flexibly and accurately realizing the automatic measurement and calculation of the Cobb angle in the anteroposterior and lateral images.

[0100] See also Fig.11 , Fig.11 This is a structural block diagram of a spinal Cobb angle measurement device provided in an embodiment of the present application. Fig.11As shown, the spinal Cobb angle measuring device 1100 includes: The body position recognition module 1110 is used to obtain the spinal image to be tested, input the spinal image to be tested into the body position recognition model, and obtain the spinal shooting body position of the spinal image to be tested output by the body position recognition model; The spinal column region detection module 1120 is used to input the spinal column image to be detected into the target detection model, and obtain the spinal column region image of the spinal column in the spinal column image to be detected output by the target detection model; The vertebral positioning module 1130 is used to input the spinal region image into the key point recognition model corresponding to the spinal shooting position, and obtain the position information output by the key point recognition model for each vertebra of the spine, where the position information at least includes the positioning frame information, the vertebral name and the corner point coordinates; The Cobb angle calculation module 1140 is used to calculate the spinal Cobb angle in the spinal column region image according to the position information of each vertebral body.

[0101] Optionally, the body position recognition module 1110 is also used to obtain an initial digital photographic image of the spine, adjust the pixel value of each pixel in the initial digital photographic image according to digital photographic parameters, and map the adjusted pixel values ​​to grayscale pixel intervals to obtain the spinal image to be tested; wherein the digital photographic parameters include at least one of window width and window position.

[0102] Optionally, the vertebral positioning module 1130 is further used to calculate an expansion ratio according to the initial size of the spinal region image, expand the boundary of the spinal region image according to the expansion ratio; and input the expanded spinal region image into a key point recognition model corresponding to the spinal shooting position.

[0103] Optionally, the positioning frame information includes at least one candidate positioning frame and a confidence score of each candidate positioning frame. The Cobb angle calculation module 1140 is further used to screen each candidate positioning frame based on the confidence score of each candidate positioning frame, remove the candidate positioning frames that meet the preset suppression conditions, and obtain the vertebral positioning frame corresponding to each vertebra; reorder each vertebral positioning frame according to the order of each vertebral positioning frame on the vertical axis, and calculate the spinal Cobb angle in the spinal region image according to the position information of each vertebra after reordering.

[0104] Optionally, the spine is photographed in an anteroposterior or lateral position.

[0105] Optionally, when the spine is photographed in the anteroposterior position, the Cobb angle calculation module 1140 is further used to calculate the Cobb angle between every two vertebrae based on the position information of each vertebral segment to obtain the Cobb angle matrix of the spine; determine the curvature type of the spine based on the target Cobb angle in the Cobb angle matrix that meets the preset degree conditions; divide the spine into multiple spinal segments according to the curvature type, the Cobb angle matrix, and the upper vertebrae and lower vertebrae corresponding to the target Cobb angle; and use the Cobb angle between the upper vertebrae and the lower vertebrae of each spinal segment as the spinal Cobb angle in the spinal region image.

[0106] Optionally, when the spine is photographed in a lateral position, the Cobb angle calculation module 1140 is also used to divide the spine into multiple spinal segments according to a preset vertebral division rule; calculate the Cobb angle between the upper vertebra and the lower vertebra of each spinal segment according to the position information of each vertebra, and obtain the spinal Cobb angle in the spinal region image.

[0107] Optionally, the spinal Cobb angle measurement device 1100 also includes: a model training module, which is used to obtain multiple sample spinal images, each of which is sample data with standard spinal position labels; construct an initial posture recognition model based on a first basic model; input multiple sample spinal images into the initial posture recognition model to train the initial posture recognition model; during the training process of the initial posture recognition model, control the initial posture recognition model to output predicted posture labels for multiple sample spinal images, and adjust the parameters of the initial posture recognition model according to the predicted posture labels and the standard posture labels of multiple sample spinal images until convergence, so as to obtain a trained posture recognition model; and / or, obtain multiple sample spinal images, each of which is sample data with standard spinal region labels; construct an initial target detection model based on a second basic model; input multiple sample spinal images into the initial target detection model to train the initial target detection model; in the initial target detection model During the training process of the target detection model, the initial target detection model is controlled to output predicted spinal region labels for multiple sample spinal region images, and the parameters of the initial target detection model are adjusted according to the predicted spinal region labels and the standard spinal region labels of the multiple sample spinal region images until convergence, so as to obtain the trained target detection model; and / or, multiple sample spinal region images are obtained, and the multiple sample spinal region images are all sample data with standard position information labels; an initial key point recognition model is constructed based on the third basic model; multiple sample spinal region images are input into the initial key point recognition model, and the initial key point recognition model is trained; during the training process of the initial key point recognition model, the initial key point recognition model is controlled to output predicted position information labels for multiple sample spinal region images, and the parameters of the initial key point recognition model are adjusted according to the predicted position information labels and the standard position information labels of the multiple sample spinal region images until convergence, so as to obtain the trained key point recognition model.

[0108] The present application also provides a computer storage medium, which can store multiple instructions, which are suitable for being loaded by a processor and executing the steps of any method in the above embodiments. Fig.12 , Fig.12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.12 As shown, the electronic device 1200 may include: at least one processor 1201 , at least one network interface 1204 , a user interface 1203 , a memory 1205 , and at least one communication bus 1202 .

[0109] Among them, the communication bus 1202 is used to realize the connection and communication between these components. Among them, the user interface 1203 may include a display screen (Display), a camera (Camera), and the optional user interface 1203 may also include a standard wired interface and a wireless interface. Among them, the network interface 1204 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). Among them, the processor 1201 may include one or more processing cores. The processor 1201 uses various interfaces and lines to connect the various parts of the entire electronic device 1200, and executes various functions and processes data of the electronic device 1200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1205, and calling data stored in the memory 1205. Optionally, the processor 1201 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1201 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1201, but may be implemented by a single chip. Among them, the memory 1205 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1205 includes a non-transitory computer-readable storage medium. The memory 1205 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1205 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1205 may also be at least one storage device located away from the aforementioned processor 1201. Fig.12As shown, the memory 1205 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a spinal Cobb angle measurement program.

[0110] exist Fig.12 In the electronic device 1200 shown, the user interface 1203 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1201 can be used to call the spinal Cobb angle measurement program stored in the memory 1205, and specifically perform the following operations: Acquire a spinal image to be tested, input the spinal image to be tested into a body position recognition model, and obtain a spinal shooting body position of the spinal image to be tested output by the body position recognition model; Inputting the spinal column image to be tested into the target detection model, and obtaining the spinal column region image of the spinal column in the spinal column image to be tested output by the target detection model; Inputting the spinal region image into the key point recognition model corresponding to the spinal shooting position to obtain the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates; The spinal Cobb angle in the spinal region image is calculated based on the position information of each vertebra.

[0111] In some embodiments, when the processor 1201 is executing the acquisition of the spinal image to be tested, it specifically performs the following steps: acquiring an initial digital photographic image of the spine, adjusting the pixel value of each pixel point in the initial digital photographic image according to the digital photographic parameters, and mapping each adjusted pixel value to a grayscale pixel interval to obtain the spinal image to be tested; wherein the digital photographic parameters include at least one of the window width and window position.

[0112] In some embodiments, when the processor 1201 inputs the spinal region image into the key point recognition model corresponding to the spinal shooting position, it specifically performs the following steps: calculates the expansion ratio according to the initial size of the spinal region image, and expands the boundary of the spinal region image according to the expansion ratio; and inputs the expanded spinal region image into the key point recognition model corresponding to the spinal shooting position.

[0113] In some embodiments, the positioning frame information includes at least one candidate positioning frame and a confidence score of each candidate positioning frame. When the processor 1201 calculates the spinal Cobb angle in the spinal region image based on the position information of each vertebral section, the processor 1201 specifically performs the following steps: screening each candidate positioning frame based on the confidence score of each candidate positioning frame, removing the candidate positioning frames that meet the preset suppression conditions, and obtaining the vertebral positioning frame corresponding to each vertebral section; reordering each vertebral positioning frame according to the order of each vertebral positioning frame on the vertical axis, and calculating the spinal Cobb angle in the spinal region image according to the position information of each vertebral section after reordering.

[0114] In some embodiments, the spine imaging position is anteroposterior or lateral.

[0115] In some embodiments, when the spine is photographed in the anteroposterior position, the processor 1201 specifically performs the following steps when calculating the spinal Cobb angle in the spinal regional image based on the position information of each vertebra: calculate the Cobb angle between every two vertebrae based on the position information of each vertebrae to obtain the Cobb angle matrix of the spine; determine the curvature type of the spine based on the target Cobb angle in the Cobb angle matrix that meets the preset degree conditions; divide the spine into multiple spinal segments according to the curvature type, the Cobb angle matrix, and the upper vertebrae and lower vertebrae corresponding to the target Cobb angle; and use the Cobb angle between the upper vertebrae and the lower vertebrae of each spinal segment as the spinal Cobb angle in the spinal regional image.

[0116] In some embodiments, when the spine is photographed in a lateral position, the processor 1201 specifically performs the following steps when calculating the spinal Cobb angle in the spinal regional image based on the position information of each vertebra: dividing the spine into multiple spinal segments according to a preset vertebral division rule; calculating the Cobb angle between the upper vertebra and the lower vertebra of each spinal segment based on the position information of each vertebra, and obtaining the spinal Cobb angle in the spinal regional image.

[0117] In some embodiments, the processor 1201 also specifically performs the following steps: obtaining multiple sample spinal images, each of which is sample data with standard body position labels; constructing an initial body position recognition model based on a first basic model; inputting multiple sample spinal images into the initial body position recognition model, and training the initial body position recognition model; during the training process of the body position recognition model, controlling the body position recognition model to output predicted body position labels for multiple sample spinal images, and adjusting the parameters of the initial body position recognition model according to the predicted body position labels and the standard body position labels of multiple sample spinal images until convergence, to obtain a trained body position recognition model; and / or obtaining multiple sample spinal images, each of which is sample data with standard spinal region labels; constructing an initial target detection model based on a second basic model; inputting multiple sample spinal images into the initial target detection model, and training the initial target detection model; in the initial target detection model During the training process, the initial target detection model is controlled to output predicted spinal region labels for multiple sample spinal region images, and the parameters of the initial target detection model are adjusted according to the predicted spinal region labels and the standard spinal region labels of the multiple sample spinal region images until convergence, so as to obtain a trained target detection model; and / or, multiple sample spinal region images are obtained, and the multiple sample spinal region images are all sample data with standard position information labels; an initial key point recognition model is constructed based on the third basic model; multiple sample spinal region images are input into the initial key point recognition model, and the initial key point recognition model is trained; during the training process of the initial key point recognition model, the initial key point recognition model is controlled to output predicted position information labels for multiple sample spinal region images, and the parameters of the initial key point recognition model are adjusted according to the predicted position information labels and the standard position information labels of the multiple sample spinal region images until convergence, so as to obtain a trained key point recognition model.

[0118] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0119] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above process or function according to the embodiment of this specification is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above computer instructions can be stored in a computer-readable storage medium or transmitted through the above computer-readable storage medium. The above computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The above computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVD)), or semiconductor media (for example, solid state drives (SSD)), etc.

[0120] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited to the described action sequence, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application. In addition, it should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the sample spinal images, spinal images to be tested, etc. involved in the present application are all obtained with full authorization. The above describes specific embodiments of the present application. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and the desired results can still be achieved. In addition, the process depicted in the drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous. In the above embodiments, the description of each embodiment has its own emphasis, and for parts not described in detail in one embodiment, reference may be made to the relevant descriptions of other embodiments.

[0121] The above is a description of a spinal Cobb angle measurement method, device and electronic device provided in the present application. For technicians in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for measuring the Cobb angle of the spine, characterized in that: The method comprises: Acquire a spinal image to be tested, input the spinal image to be tested into a body position recognition model, and obtain a spinal shooting body position of the spinal image to be tested output by the body position recognition model; Inputting the spinal column image to be tested into a target detection model to obtain a spinal column region image of the spinal column in the spinal column image to be tested output by the target detection model; Input the spinal region image into the key point recognition model corresponding to the spinal shooting position to obtain the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates; The spinal column Cobb angle in the spinal column region image is calculated according to the position information of each vertebral body.

2. The method according to claim 1, characterized in that The step of obtaining the spinal column image to be tested comprises: Acquire the initial digital photography image of the spine, adjust the pixel value of each pixel point in the initial digital photography image according to the digital photography parameters, and map the adjusted pixel value to the grayscale pixel interval to obtain the spine image to be tested; Wherein, the digital photography parameters include at least one of window width and window position.

3. The method according to claim 1, characterized in that The step of inputting the spinal region image into a key point recognition model corresponding to the spinal shooting position includes: Calculating an expansion ratio according to an initial size of the spinal region image, and expanding the boundary of the spinal region image according to the expansion ratio; The expanded spinal region image is input into the key point recognition model corresponding to the spinal shooting position.

4. The method according to claim 1, characterized in that The positioning frame information includes at least one candidate positioning frame and a confidence score of each candidate positioning frame, and the step of calculating the spinal Cobb angle in the spinal region image according to the position information of each vertebral body includes: The candidate positioning frames are screened based on their confidence scores, and the candidate positioning frames that meet the preset suppression conditions are removed to obtain the vertebral positioning frame corresponding to each vertebra; The vertebral positioning frames are reordered according to the order of the vertebral positioning frames on the longitudinal axis, and the spinal Cobb angle in the spinal column region image is calculated according to the position information of each vertebra after the reordering.

5. The method according to claim 1, characterized in that The spine photographing position is anteroposterior or lateral.

6. The method according to claim 5, characterized in that When the spine photographing position is the positive position, the spinal Cobb angle in the spinal region image is calculated according to the position information of each vertebral body, including: Calculate the Cobb angle between every two vertebrae according to the position information of each vertebrae to obtain the Cobb angle matrix of the spine; Determining the curvature type of the spine according to a target Cobb angle in the Cobb angle matrix that satisfies a preset degree condition; Dividing the spine into a plurality of spinal segments according to the curvature type, the Cobb angle matrix, and the upper vertebral body and the lower vertebral body corresponding to the target Cobb angle; The Cobb angle between the upper vertebral body and the lower vertebral body of each spinal column segment is used as the spinal column Cobb angle in the spinal column region image.

7. The method according to claim 5, characterized in that When the spine photographing position is lateral, the calculating of the spine Cobb angle in the spine region image according to the position information of each vertebral body includes: Dividing the spine into a plurality of spinal segments according to a preset vertebral body division rule; The Cobb angle between the upper vertebra and the lower vertebra of each spinal column segment is calculated according to the position information of each vertebra, so as to obtain the spinal column Cobb angle in the spinal column region image.

8. The method according to claim 1, characterized in that The method further comprises: Acquire a plurality of sample spinal images, wherein the plurality of sample spinal images are all sample data with standard body position labels; Constructing an initial body position recognition model based on the first basic model; Inputting the plurality of sample spinal column images into the initial body position recognition model to train the initial body position recognition model; During the training process of the initial body position recognition model, the initial body position recognition model is controlled to output predicted body position labels for the multiple sample spinal images, and the parameters of the initial body position recognition model are adjusted according to the predicted body position labels and the standard body position labels of the multiple sample spinal images until convergence, so as to obtain a trained body position recognition model; and / or, Acquire a plurality of sample spinal column images, wherein the plurality of sample spinal column images are all sample data with standard spinal column region labels; Building an initial target detection model based on the second basic model; Inputting the plurality of sample spine images into the initial target detection model to train the initial target detection model; During the training process of the initial target detection model, the initial target detection model is controlled to output predicted spinal region labels for the multiple sample spinal images, and the parameters of the initial target detection model are adjusted according to the predicted spinal region labels and the standard spinal region labels of the multiple sample spinal images until convergence, so as to obtain a trained target detection model; and / or, Acquire a plurality of sample spinal region images, wherein the plurality of sample spinal region images are all sample data with standard position information labels; Constructing an initial key point recognition model based on the third basic model; Inputting the plurality of sample spinal region images into the initial key point recognition model to train the initial key point recognition model; During the training process of the initial key point recognition model, the initial key point recognition model is controlled to output predicted position information labels for the multiple sample spinal region images, and the parameters of the initial key point recognition model are adjusted according to the predicted position information labels and the standard position information labels of the multiple sample spinal region images until convergence, so as to obtain the trained key point recognition model.

9. A device for measuring the Cobb angle of the spine, characterized in that: The device comprises: A body position recognition module, used for acquiring a spinal image to be tested, inputting the spinal image to be tested into a body position recognition model, and obtaining a spinal shooting body position of the spinal image to be tested output by the body position recognition model; A spinal column region detection module, used for inputting the spinal column image to be detected into a target detection model, and obtaining a spinal column region image of the spinal column in the spinal column image to be detected output by the target detection model; A vertebral positioning module, used to input the spinal region image into a key point recognition model corresponding to the spinal shooting position, and obtain the position information output by the key point recognition model for each vertebra of the spine, wherein the position information at least includes positioning frame information, vertebral name and corner point coordinates; The Cobb angle calculation module is used to calculate the spinal Cobb angle in the spinal region image according to the position information of each vertebral body.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Image processing method and related equipment

    CN110415291A

  • Lenke typing method based on spine AIS image

    CN112802019A

  • Scoliosis angle measuring method, device and apparatus and storage medium

    CN113674257A

  • Method, device and equipment for measuring scoliosis based on human body three-dimensional image

    CN114092447A

  • Spine full-length slice Cobb angle detection device, method and equipment and storage medium

    CN114581399A

Cited By

  • Spine image recognition method and related equipment

    CN120782706A

  • Spine automatic measurement method and system based on three-dimensional CT

    CN121904057A

  • Spine X-ray film Cobb angle automatic measurement system based on deep learning

    CN121962230A

  • Spinal curvature measuring method, device and equipment based on large visual model

    CN122156060A