A scoliosis angle measurement model training method and a scoliosis angle measurement method
By using a cascaded spinal morphology segmentation network and angle regression network, combined with multimorphic information and a joint loss function, the problem of large measurement error in spinal scoliosis angle in existing technologies is solved, and higher precision spinal scoliosis angle measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2026-03-17
AI Technical Summary
Existing methods for measuring scoliosis angle have significant errors. Manual measurements are greatly affected by human factors, while deep learning techniques also produce errors due to the lack of vertex coordinates caused by the low contrast of X-ray images.
A cascaded spinal morphology segmentation network and a scoliosis angle regression network are used to predict spinal regions, center lines, and boundary lines by training the image segmentation network, and the angle regression network is optimized by combining the angle loss function to accurately calculate the scoliosis angle.
It reduces the calculation error of scoliosis angle and improves the accuracy of measurement, especially outperforming existing methods on the AASCE challenge dataset.
Smart Images

Figure CN118229616B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scoliosis angle measurement technology, specifically to a scoliosis angle measurement model training method and a scoliosis angle measurement method. Background Technology
[0002] Scoliosis includes lateral curvature and rotational deformity of the spine. In a normal anterior-posterior spinal appearance, the spine should be straight and centered in the pelvis. Scoliosis, however, presents as a "C" or "S" shaped curve. The degree of scoliosis can be assessed by measuring the scoliosis angle. Existing measurement methods include manual measurement methods and deep learning-based measurement methods. Manual measurement methods involve a doctor marking the top of one vertebra on a spinal X-ray image (the spine consists of several vertebrae, which are also called vertebral bodies). Figure 2 The two straight lines on the mid-spine represent the extensions of the two upper apexes of two vertebrae and the extension of the apex of another vertebra. The angle between the two extensions is the Cobb angle of scoliosis. Figure 2 As shown, the Cobb angle is measured directly using a measuring tool. Deep learning technology calculates the coordinates of the four vertices formed by the two cones, and then calculates the Cobb angle based on these coordinates. Manual measurement is prone to significant errors due to human factors, while deep learning technology also introduces measurement errors because the low contrast of the X-ray image can cause some vertices to be occluded, resulting in missing vertex coordinates.
[0003] In summary, the scoliosis angle obtained by existing technologies has a large error.
[0004] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method for training a scoliosis angle measurement model and a method for measuring scoliosis angle, which solves the problem of large errors in the scoliosis angle obtained by existing technologies.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a training method for a scoliosis angle measurement model, wherein the scoliosis angle measurement model includes a cascaded spinal morphology segmentation network and a scoliosis angle regression network, and the training methods for the spinal morphology segmentation network and the scoliosis angle regression network include:
[0008] The spinal morphology segmentation network is obtained by training an image segmentation network with three output layers using sample spinal images.
[0009] The sample spine image is input into the spine morphology segmentation network with fixed parameters to obtain the prediction region, prediction center line and prediction boundary line output by the three output layers of the spine morphology segmentation network for the spine respectively. The prediction region, prediction center line and prediction boundary line and the sample spine image are then input into the angle regression network to obtain the scoliosis prediction angle.
[0010] The angle loss function corresponding to the predicted scoliosis angle is determined, and the parameters of the angle regression network are updated according to the angle loss function to obtain the scoliosis angle regression network. The scoliosis sample angle is the scoliosis angle on the sample spinal image.
[0011] In one implementation, the step of training an image segmentation network with three output layers using sample spine images to obtain the spine morphology segmentation network includes:
[0012] The sample spine image is input into the image segmentation network with three output layers to obtain the training prediction region, training prediction center line and training prediction boundary line output by the three output layers of the image segmentation network for the spine, respectively.
[0013] Determine the region dice loss function and region edge loss function corresponding to the training prediction region, and determine the region joint segmentation loss function corresponding to the training prediction region based on the region dice loss function and the region edge loss function;
[0014] Determine the centerline dice loss function and centerline edge loss function corresponding to the training prediction centerline, and based on the centerline dice loss function and the centerline edge loss function, determine the centerline joint segmentation loss function corresponding to the training prediction centerline;
[0015] Determine the boundary line dice loss function and boundary line edge loss function corresponding to the training prediction boundary line, and determine the boundary line joint segmentation loss function corresponding to the training prediction boundary line based on the boundary line dice loss function and the boundary line edge loss function;
[0016] The parameters of the image segmentation network are updated based on the joint segmentation loss function of the region, the joint segmentation loss function of the centerline, and the joint segmentation loss function of the boundary line to obtain the spine morphology segmentation network.
[0017] In one implementation, the step of inputting the prediction region, the prediction center line, the prediction boundary line, and the sample spine image into an angle regression network to obtain the scoliosis prediction angle includes:
[0018] The predicted region, the predicted center line, the predicted boundary line, and the sample spine image are stitched together to obtain a stitched image.
[0019] The channel stitched image is input into the angle regression network to obtain the near-thoracic vertebral predicted angle, the main thoracic vertebral predicted angle, and the thoracolumbar predicted angle in the scoliosis predicted angle.
[0020] In one implementation, determining the angle loss function corresponding to the predicted scoliosis angle and updating the parameters of the angle regression network based on the angle loss function to obtain the scoliosis angle regression network includes:
[0021] Determine the symmetrical mean absolute error, mean absolute error, and rounded corner mean absolute error formed by the predicted angles of the near thoracic vertebrae, the main thoracic vertebrae, and the thoracic and lumbar vertebrae;
[0022] Based on the symmetry mean absolute error, the mean absolute error, and the rounded corner mean absolute error, the angle loss function is determined, and the parameters of the angle regression network are updated based on the angle loss function to obtain the scoliosis angle regression network.
[0023] In one implementation, determining the angle loss function based on the symmetry mean absolute error, the mean absolute error, and the corner mean absolute error, and updating the parameters of the angle regression network based on the angle loss function to obtain the scoliosis angle regression network, includes:
[0024] The symmetry mean absolute error, the mean absolute error, and the fillet mean absolute error are weighted and calculated to obtain the angle loss function;
[0025] The parameters of the angle regression network are updated according to the angle loss function until the number of updates reaches the set number of iterations, so as to obtain the scoliosis angle regression network.
[0026] Secondly, embodiments of the present invention also provide a method for measuring scoliosis angle, which applies the aforementioned scoliosis angle measurement model, including:
[0027] The image of the spine to be measured is preprocessed to obtain the preprocessed image of the spine to be measured.
[0028] The preprocessed image of the spine to be measured is input into the spinal morphology segmentation network of the spinal scoliosis angle measurement model to obtain the target region, target center line and target boundary line output by the three output layers of the spinal morphology segmentation network for the spine respectively.
[0029] The target region, the target center line, and the target boundary line are stitched together with the preprocessed image of the spine to be measured to obtain an intermediate image.
[0030] The intermediate image is input into the scoliosis angle regression network of the scoliosis angle measurement model to obtain the scoliosis angle output by the scoliosis angle regression network.
[0031] In one implementation, all three output layers comprise cascaded 1x1 linear layers and activation functions.
[0032] Thirdly, embodiments of the present invention also provide a training device for a scoliosis angle measurement model, wherein the scoliosis angle measurement model includes a cascaded spinal morphology segmentation network and a scoliosis angle regression network, and the training device includes the following components:
[0033] A segmentation network training module is used to train an image segmentation network with three output layers using sample spine images to obtain the spine morphology segmentation network.
[0034] The prediction angle calculation module is used to input the sample spine image into the spine morphology segmentation network with fixed parameters to obtain the prediction region, prediction center line and prediction boundary line output by the three output layers of the spine morphology segmentation network for the spine, and input the prediction region, the prediction center line and the prediction boundary line and the sample spine image into the angle regression network to obtain the scoliosis prediction angle.
[0035] The regression network training module is used to determine the angle loss function corresponding to the predicted scoliosis angle, and update the parameters of the angle regression network according to the angle loss function to obtain the scoliosis angle regression network, wherein the scoliosis sample angle is the scoliosis angle on the sample spine image.
[0036] Fourthly, embodiments of the present invention also provide a terminal device, wherein the terminal device includes a memory, a processor, and a scoliosis angle measurement model training program stored in the memory and executable on the processor, wherein when the processor executes the scoliosis angle measurement model training program, it implements the steps of the scoliosis angle measurement model training method described above.
[0037] Alternatively, the terminal device includes a memory, a processor, and a scoliosis angle measurement program stored in the memory and executable on the processor. When the processor executes the scoliosis angle measurement program, it implements the steps of the scoliosis angle measurement method described above.
[0038] Fifthly, embodiments of the present invention also provide a computer-readable storage medium storing a scoliosis angle measurement model training program, wherein when the scoliosis angle measurement model training program is executed by a processor, the steps of the scoliosis angle measurement model training method described above are implemented.
[0039] Alternatively, the computer-readable storage medium stores a scoliosis angle measurement program, which, when executed by a processor, implements the steps of the scoliosis angle measurement method described above.
[0040] Beneficial Effects: This invention first trains an image segmentation network to obtain a spinal morphology segmentation network. This network can predict the spinal region, spinal centerline, and spinal boundary line. Then, these three morphological features are input into an angle regression network to obtain a scoliosis angle regression network. In summary, this invention utilizes the above three types of spinal morphological information to help the scoliosis angle regression network better learn the position of the spine in the image, thereby accurately outputting the scoliosis angle. In other words, this invention can reduce the calculation error of the scoliosis angle. Attached Figure Description
[0041] Figure 1 This is an overall flowchart of the present invention;
[0042] Figure 2 This is a schematic diagram of the spine in an embodiment of the present invention;
[0043] Figure 3 This is a schematic diagram of an image segmentation network in an embodiment of the present invention;
[0044] Figure 4 This is a schematic diagram of the angular regression network in an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of the model in an embodiment of the present invention;
[0046] Figure 6 A structural diagram of the training device for measuring the scoliosis angle provided by the present invention;
[0047] Figure 7 This is a block diagram illustrating the internal structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0049] Research has found that scoliosis includes lateral curvature and rotational deformity of the spine. In a normal anterior-posterior spinal appearance, the spine should be straight and located in the center of the pelvis, while scoliosis presents as a "C" or "S" shaped curve. The degree of scoliosis can be assessed by measuring the scoliosis angle. Existing measurement methods include manual measurement methods and measurement methods based on deep learning technology. The manual measurement method involves the doctor marking the top of one of the vertebrae on the spinal X-ray image (the spine consists of several vertebrae, which are also called vertebral bodies). Figure 2 The two straight lines on the mid-spine represent the extensions of the two upper apexes of two vertebrae and the extension of the apex of another vertebra. The angle between the two extensions is the Cobb angle of scoliosis. Figure 2 As shown, the Cobb angle is measured directly using a measuring tool. Deep learning technology calculates the coordinates of the four vertices formed by the two cones, and then calculates the Cobb angle based on these coordinates. Manual measurement is prone to significant errors due to human factors, while deep learning technology also introduces measurement errors because the low contrast of the X-ray image can cause some vertices to be occluded, resulting in missing vertex coordinates.
[0050] To address the aforementioned technical problems, this invention provides a method for training a scoliosis angle measurement model and a method for measuring scoliosis angle, which solves the problem of large errors in the scoliosis angle obtained by existing technologies.
[0051] The scoliosis angle measurement model training method of this embodiment can be applied to a terminal device, which can be a terminal product with image processing capabilities, such as a scoliosis assessment instrument. In this embodiment, such as Figure 1 As shown, the training method for the scoliosis angle measurement model specifically includes the following steps:
[0052] S100, the image segmentation network with three output layers is trained using sample spine images to obtain the spine morphology segmentation network.
[0053] S200, the sample spine image is input into the spine morphology segmentation network with fixed parameters to obtain the prediction region, prediction center line and prediction boundary line output by the three output layers of the spine morphology segmentation network for the spine respectively, and the prediction region, the prediction center line and the prediction boundary line and the sample spine image are input into the angle regression network to obtain the scoliosis prediction angle.
[0054] S300, determine the angle loss function corresponding to the predicted scoliosis angle, and update the parameters of the angle regression network according to the angle loss function to obtain the scoliosis angle regression network, wherein the scoliosis sample angle is the scoliosis angle on the sample spinal image.
[0055] In one embodiment, the image segmentation network in step S100 is a ResNet-UNet++ network based on ResNet and UNet++, and the structure of this network is as follows: Figure 3 As shown, it includes an encoder and a decoder. The encoder includes... Figure 3 The encoder employs four types of Res block groups from left to right. Each Res block group comprises 3, 4, 6, and 3 Res blocks respectively, forming a 34-layer structure. This 34-layer structure addresses gradient vanishing and network degradation caused by network depth. Each Res block consists of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation layer. The feature vector output from the encoder is flattened and then input to the decoder. The decoder includes several upsampling modules, such as... Figure 3 As shown, each upsampling module includes a cascaded 3×3 deconvolution layer, a 3×3 convolution layer, a batch normalization layer, and a ReLU activation layer, wherein the stride of the 3×3 deconvolution layer is 2.
[0056] Figure 3 The ResNet-UNet++ network used as an image segmentation network has 3 output layers. Each output layer includes a cascaded 1×1 convolution and a Sigmoid function. The Sigmoid function is used to determine whether each segmented pixel is a target that needs to be segmented on the spine image.
[0057] Step S100 includes the following specific steps S101 to S105:
[0058] S101, the sample spine image is input into the image segmentation network with three output layers to obtain the training prediction region, training prediction center line and training prediction boundary line output by the three output layers of the image segmentation network for the spine.
[0059] The training prediction region is the spinal region output by the network during the training process; the training prediction centerline is the spinal centerline output by the network during the training process; and the training prediction boundary line is the spinal boundary line output by the network during the training process.
[0060] The spinal region, spinal centerline, and spinal boundary line constitute the multimorphic information of the spine. This embodiment trains an image segmentation network based on multimorphic information, enabling the trained spinal morphology segmentation network to output the three shapes of the spine, thus assisting the subsequent scoliosis angle regression network in outputting the scoliosis angle Cobb. The spinal region is the area occupied by several vertebrae or vertebral bodies on an X-ray image, representing the overall shape of the spine; the spinal centerline is a line segment obtained from the coordinates of the center point and the four vertebrae of the spinal region, covering the center of each vertebral body; the spinal boundary line is a curve composed of two continuous markers, representing the shape information of the spine and vertebral body edges.
[0061] S102, determine the region dice loss function L1 corresponding to the training prediction region. DSC and region edge loss function L1 BF1 Based on the region dice loss function and the region edge loss function (the edge loss function enables the network to enhance the edge details of the segmented image), the joint region segmentation loss function L1 corresponding to the training prediction region is determined. joint_seg .
[0062] L1 joint_seg =L1 DSC +L1 BF1
[0063] L1 DSC =1-DSC1
[0064]
[0065] In the formula, G1 i and P1 i Let N be the mean pixel value of the true spine region and the mean pixel value of the training prediction region in the i-th sample spine image, and N be the total number of sample spine images.
[0066] L1 BF1 =1-BF11
[0067]
[0068]
[0069]
[0070] In the formula, and θi represents the mean pixel value of the true edge region of the spine in the i-th sample spine image and the mean pixel value of the predicted edge region in the training prediction region, respectively. Maxpool represents the max pooling operation using a sliding window of size θ0 or θ1, where θ0 is 3 and θ1 is 5.
[0071] S103, determine the centerline dice loss function L2 corresponding to the training prediction centerline. DSC and centerline edge loss function L2 BF1 Based on the centerline dice loss function and the centerline edge loss function, the joint centerline segmentation loss function L2 corresponding to the training predicted centerline is determined. joint_seg .
[0072] L2 joint_seg =L2 DSC +L2 BF1
[0073] L2 DSC =1-DSC2
[0074]
[0075] In the formula, G2 i and P2 i Let be the pixel mean of the true center line of the spine in the i-th sample spine image and the pixel mean of the predicted center line during training.
[0076] L2 BF1 =1-BF21
[0077]
[0078]
[0079]
[0080] In the formula, and Let $\mathbf{i}$ and $\mathbf{i}$ represent the mean pixel value of the true centerline edge of the spine in the i-th sample spine image and the mean pixel value of the predicted centerline edge in the training, respectively.
[0081] S104, Determine the boundary line dice loss function L3 corresponding to the training prediction boundary line. DSC and boundary line edge loss function L3 BF1 Based on the boundary line dice loss function and the boundary line edge loss function, the joint boundary line segmentation loss function L3 corresponding to the trained predicted boundary line is determined. joint_seg .
[0082] L3 joint_seg =L3 DSC+L3 BF1
[0083] L3 DSC =1-DSC3
[0084]
[0085] In the formula, G3 i and P3 i Let be the pixel mean of the true boundary line of the spine in the i-th sample spine image and the pixel mean of the trained predicted boundary line.
[0086] L3 BF1 =1-BF31
[0087]
[0088]
[0089]
[0090] In the formula, and Let $\mathbf$ and $\mathbf$ represent the mean pixel value of the true boundary line edge of the spine in the i-th sample spine image and the mean pixel value of the predicted boundary line edge, respectively.
[0091] S105, based on the aforementioned joint region segmentation loss function L1 joint_seg The joint segmentation loss function L2 of the centerline joint_seg The boundary line joint segmentation loss function L3 joint_seg The parameters of the image segmentation network are updated to obtain the spine morphology segmentation network.
[0092] L1 joint_seg L2 joint_seg L3 joint_seg The three factors are added together to obtain a total loss function. The network parameters are adjusted according to the magnitude of the total loss function. Then, the sample spine images are repeatedly input into the network until the set number of iterations is reached, at which point the update stops, thus obtaining the spine morphology segmentation network.
[0093] After completing the training of the image segmentation network and obtaining the spinal morphology segmentation network in step S100, the spinal region, spinal centerline, and spinal boundary line output by the spinal morphology segmentation network are used to train the angle regression network, and the parameters of the spinal morphology segmentation network remain unchanged during the training of the angle regression network.
[0094] In one embodiment, the angle regression network in step S200 can optimize the focus on spine-related regions and extract valuable features, thereby improving the accuracy of Cobb angle measurements. The network structure is as follows: Figure 4 As shown, the network consists of MBConv-blocks (Mobile inverted Bottleneck Convolution), convolutional layers, global average pooling layers, and fully connected layers. Each MBConv-block contains extended convolutions, depthwise convolutions, an SE attention mechanism, and a convolutional layer. During the extended convolution stage, the number of channels in the layer increases, making the features wider. After the extended convolution, depthwise convolutions are performed using convolutional kernels of size 3×3 or 5×5. The SE attention mechanism uses global average pooling to extract global features and compresses them along the channel dimension. The output layer of this network has three channels, which can output the proximal thoracic angle (PT), the main thoracic angle (MT), and the thoracolumbar angle (TL), respectively. These three angles can all represent the size of the scoliosis angle. In this embodiment, step S200 includes the following specific steps S201 and S202:
[0095] S201, the predicted region, the predicted center line, the predicted boundary line, and the sample spine image are stitched together to obtain a stitched image.
[0096] The so-called channel stitching is to overlay the predicted region, predicted center line, predicted boundary line, and sample spine image into four layers, that is, to establish a correspondence between the predicted region, predicted center line, predicted boundary line, and sample spine image at the same location on the image.
[0097] S202, the channel stitched image is input into the angle regression network to obtain the near-thoracic vertebral predicted angle, the main thoracic vertebral predicted angle, and the thoracolumbar predicted angle in the scoliosis predicted angle.
[0098] In one embodiment, after training the image segmentation network in step S200, step S300 includes the following specific steps S301, S302, and S303:
[0099] S301, determine the symmetrical average absolute error L formed by the predicted angles of the near thoracic vertebrae, the main thoracic vertebrae, and the thoracolumbar vertebrae. SMAPE Mean absolute error L MAE and the average absolute error of the fillet L CMAE .
[0100]
[0101]
[0102]
[0103] In the formula, G ijand P ij Let $j$ represent the true value and predicted value of the $j$ angle in the spinal image of the $i$-th sample, respectively. The angles include the proximal thoracic vertebra angle, the principal thoracic vertebra angle, and the thoracolumbar vertebra angle. The true value of the $j$-th angle is either the true value of the thoracic vertebra angle, the principal thoracic vertebra angle, or the thoracolumbar vertebra angle. The predicted value of the $j$-th angle is either the predicted proximal thoracic vertebra angle, the predicted principal thoracic vertebra angle, or the predicted thoracolumbar vertebra angle.
[0104] S302, the symmetrical average absolute error, the average absolute error, and the corner average absolute error are weighted and calculated to obtain the angle loss function L. joint_reg .
[0105] L joint_reg =L SMAPE +L MAE +L CMAE
[0106] S303, update the parameters of the angle regression network according to the angle loss function until the number of updates reaches the set number of iterations, so as to obtain the scoliosis angle regression network.
[0107] In one embodiment, by training the image segmentation network and the angle regression network through steps S100 to S300, a spinal morphology segmentation network and a scoliosis angle regression network are obtained, respectively. Cascading the spinal morphology segmentation network with the scoliosis angle regression network constitutes a scoliosis angle measurement model. Using this model, scoliosis angle measurement based on spinal images can be achieved. In this embodiment, the following specific steps S401 to S404 are included:
[0108] S401, preprocess the image of the spine to be measured to obtain the preprocessed image of the spine to be measured.
[0109] like Figure 5 As shown, the image of the spine to be measured is an X-ray image. Preprocessing is performed on it, including conventional processing methods in the field of image processing.
[0110] S402, the preprocessed image of the spine to be measured is input into the spinal morphology segmentation network of the spinal scoliosis angle measurement model to obtain the target region, target center line and target boundary line output by the three output layers of the spinal morphology segmentation network for the spine respectively.
[0111] S403, the target region, the target center line, and the target boundary line are stitched together with the preprocessed image of the spine to be measured to obtain an intermediate image.
[0112] like Figure 5As shown, the three images of the target region, the target center line, and the target boundary line are stitched together with the preprocessed image of the spine to be measured to obtain the stitched image, which is the intermediate image.
[0113] S404, The intermediate image is input into the scoliosis angle regression network of the scoliosis angle measurement model to obtain the scoliosis angle output by the scoliosis angle regression network.
[0114] The size of the scoliosis angle includes the near-thoracic angle (PT), the main thoracic angle (MT), and the thoracolumbar angle (TL).
[0115] In summary, this invention utilizes three types of spinal morphological information to achieve efficient and high-precision automatic Cobb angle measurement. The introduction of multi-morphological information helps the network focus more on effective spinal regions. The introduction of a joint segmentation loss function effectively improves the segmentation accuracy of spinal regions and edges. The introduction of a joint regression loss function effectively optimizes the regression accuracy of Cobb angles. This invention achieves superior automatic Cobb angle measurement performance compared to existing methods on the AASCE challenge dataset. The symmetric mean absolute percentage error (SMAPE) of this invention is 7.28%, and the mean absolute error (MAE) is 3.18°.
[0116] This embodiment also provides a training device for a scoliosis angle measurement model, such as... Figure 6 As shown, the training device includes the following components:
[0117] The segmentation network training module 01 is used to train an image segmentation network with three output layers using sample spine images to obtain the spine morphology segmentation network.
[0118] The prediction angle calculation module 02 is used to input the sample spine image into the spine morphology segmentation network with fixed parameters to obtain the prediction region, prediction center line and prediction boundary line output by the three output layers of the spine morphology segmentation network for the spine, and input the prediction region, the prediction center line and the prediction boundary line and the sample spine image into the angle regression network to obtain the scoliosis prediction angle.
[0119] The regression network training module 03 is used to determine the angle loss function corresponding to the predicted scoliosis angle and update the parameters of the angle regression network according to the angle loss function to obtain the scoliosis angle regression network. The scoliosis sample angle is the scoliosis angle on the sample spine image.
[0120] Based on the above embodiments, the present invention also provides a terminal device, the principle block diagram of which can be as follows: Figure 7As shown, the terminal device includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for training a scoliosis angle measurement model. The display screen can be an LCD screen or an e-ink screen.
[0121] Those skilled in the art will understand that Figure 7 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal device to which the present invention is applied. A specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0122] In one embodiment, a terminal device is provided, comprising a memory, a processor, and a scoliosis angle measurement model training program stored in the memory and executable on the processor. When the processor executes the scoliosis angle measurement model training program, it implements the following operation instructions:
[0123] The spinal morphology segmentation network is obtained by training an image segmentation network with three output layers using sample spinal images.
[0124] The sample spine image is input into the spine morphology segmentation network with fixed parameters to obtain the prediction region, prediction center line and prediction boundary line output by the three output layers of the spine morphology segmentation network for the spine respectively. The prediction region, prediction center line and prediction boundary line and the sample spine image are then input into the angle regression network to obtain the scoliosis prediction angle.
[0125] The angle loss function corresponding to the predicted scoliosis angle is determined, and the parameters of the angle regression network are updated according to the angle loss function to obtain the scoliosis angle regression network. The scoliosis sample angle is the scoliosis angle on the sample spinal image.
[0126] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A scoliosis angle measurement model training method, characterized by, The scoliosis angle measurement model comprises a cascaded spine morphology segmentation network and a scoliosis angle regression network, and the training manner of the spine morphology segmentation network and the scoliosis angle regression network comprises: training an image segmentation network with three output layers using sample spine images to obtain the spine morphology segmentation network, comprising: inputting the sample spine images into the image segmentation network with three output layers to obtain the training prediction region, the training prediction center line and the training prediction boundary line respectively output by the three output layers of the image segmentation network; determining the region dice loss function and the region edge loss function corresponding to the training prediction region, and determining the region joint segmentation loss function corresponding to the training prediction region according to the region dice loss function and the region edge loss function; determining the center line dice loss function and the center line edge loss function corresponding to the training prediction center line, and determining the center line joint segmentation loss function corresponding to the training prediction center line according to the center line dice loss function and the center line edge loss function; determining the boundary line dice loss function and the boundary line edge loss function corresponding to the training prediction boundary line, and determining the boundary line joint segmentation loss function corresponding to the training prediction boundary line according to the boundary line dice loss function and the boundary line edge loss function; updating the parameters of the image segmentation network according to the region joint segmentation loss function, the center line joint segmentation loss function and the boundary line joint segmentation loss function to obtain the spine morphology segmentation network; inputting the sample spine images into the spine morphology segmentation network with fixed parameters to obtain the prediction region, the prediction center line and the prediction boundary line respectively output by the three output layers of the spine morphology segmentation network for the spine, and inputting the prediction region, the prediction center line, the prediction boundary line and the sample spine images into an angle regression network to obtain a scoliosis prediction angle, comprising: channel splicing the prediction region, the prediction center line, the prediction boundary line and the sample spine images to obtain a channel splicing image; inputting the channel splicing image into the angle regression network to obtain a near thoracic vertebra prediction angle, a main thoracic vertebra prediction angle and a thoracolumbar vertebra prediction angle in the scoliosis prediction angle; determining an angle loss function corresponding to the scoliosis prediction angle, and updating the parameters of the angle regression network according to the angle loss function to obtain the scoliosis angle regression network, wherein the scoliosis sample angle is the scoliosis angle on the sample spine image.
2. The scoliosis angle measurement model training method of claim 1, wherein, The determination of the angle loss function corresponding to the scoliosis prediction angle and the updating of the parameters of the angle regression network according to the angle loss function to obtain the scoliosis angle regression network comprises: determining the symmetric mean absolute error, the mean absolute error and the circular angle mean absolute error composed of the near thoracic vertebra prediction angle, the main thoracic vertebra prediction angle and the thoracolumbar vertebra prediction angle. The angle loss function is determined according to the symmetric mean absolute error, the mean absolute error and the rounded mean absolute error, and parameters of the angle regression network are updated according to the angle loss function to obtain the scoliosis angle regression network.
3. The scoliosis angle measurement model training method of claim 2, wherein, The angle loss function is determined according to the symmetric mean absolute error, the mean absolute error and the rounded mean absolute error, and parameters of the angle regression network are updated according to the angle loss function to obtain the scoliosis angle regression network. The symmetric mean absolute error, the mean absolute error and the rounded mean absolute error are weighted to obtain the angle loss function. The parameters of the angle regression network are updated according to the angle loss function until the number of updates reaches a set number of iterations to obtain the scoliosis angle regression network.
4. A scoliosis angle measurement method using the scoliosis angle measurement model according to any one of claims 1 to 3, characterized by, It comprises: The to-be-measured spine image is preprocessed to obtain the to-be-measured spine image after preprocessing; The to-be-measured spine image after preprocessing is input into the spine morphology segmentation network of the scoliosis angle measurement model to obtain the target region, target center line and target boundary line output by the three output layers of the spine morphology segmentation network respectively; The target region, target center line and target boundary line are spliced with the to-be-measured spine image after preprocessing to obtain an intermediate image; The intermediate image is input into the scoliosis angle regression network of the scoliosis angle measurement model to obtain the scoliosis angle output by the scoliosis angle regression network.
5. The scoliosis angle measurement method of claim 4, wherein, The three output layers each comprise a cascaded 1x1 linear layer and an activation function.
6. A scoliosis angle measurement model training apparatus characterized by comprising: The scoliosis angle measurement model comprises a cascaded spine morphology segmentation network and a scoliosis angle regression network, and the training device comprises the following components: The segmentation network training module is configured to train an image segmentation network with three output layers using sample spine images to obtain the spine morphology segmentation network, comprising: The sample spine images are input into the image segmentation network with three output layers to obtain training prediction regions, training prediction center lines and training prediction boundary lines output by the three output layers of the image segmentation network respectively for a spine; The region dice loss function and the region edge loss function corresponding to the training prediction region are determined, and the region joint segmentation loss function corresponding to the training prediction region is determined according to the region dice loss function and the region edge loss function; The center line dice loss function and the center line edge loss function corresponding to the training prediction center line are determined, and the center line joint segmentation loss function corresponding to the training prediction center line is determined according to the center line dice loss function and the center line edge loss function; The boundary line dice loss function and the boundary line edge loss function corresponding to the training prediction boundary line are determined, and the boundary line joint segmentation loss function corresponding to the training prediction boundary line is determined according to the boundary line dice loss function and the boundary line edge loss function; According to the region joint segmentation loss function, the center line joint segmentation loss function, and the boundary line joint segmentation loss function, parameters of the image segmentation network are updated to obtain the spine morphology segmentation network; The prediction angle calculation module is configured to input the sample spine image into the spine morphology segmentation network with fixed parameters to obtain a prediction region, a prediction center line, and a prediction boundary line output by three output layers of the spine morphology segmentation network for a spine, and input the prediction region, the prediction center line, the prediction boundary line, and the sample spine image into an angle regression network to obtain a spine scoliosis prediction angle, including: performing channel splicing on the prediction region, the prediction center line, the prediction boundary line, and the sample spine image to obtain a channel spliced image; The channel spliced image is input into the angle regression network to obtain a proximal thoracic vertebra prediction angle, a main thoracic vertebra prediction angle, and a thoracolumbar vertebra prediction angle in the spine scoliosis prediction angle; The regression network training module is configured to determine an angle loss function corresponding to the spine scoliosis prediction angle, and update parameters of the angle regression network according to the angle loss function to obtain the spine scoliosis angle regression network, wherein the sample spine scoliosis angle is a spine scoliosis angle on the sample spine image.
7. A terminal device, characterized by comprising: The terminal device includes a memory, a processor, and a spine scoliosis angle measurement model training program stored in the memory and executable on the processor, and when the processor executes the spine scoliosis angle measurement model training program, the steps of the spine scoliosis angle measurement model training method according to any one of claims 1-3 are implemented. Alternatively, the terminal device includes a memory, a processor, and a spine scoliosis angle measurement program stored in the memory and executable on the processor, and when the processor executes the spine scoliosis angle measurement program, the steps of the spine scoliosis angle measurement method according to any one of claims 4-5 are implemented.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a spine scoliosis angle measurement model training program, and when the spine scoliosis angle measurement model training program is executed by a processor, the steps of the spine scoliosis angle measurement model training method according to any one of claims 1-3 are implemented. Alternatively, the computer readable storage medium stores a spine scoliosis angle measurement program, and when the spine scoliosis angle measurement program is executed by a processor, the steps of the spine scoliosis angle measurement method according to any one of claims 4-5 are implemented.
Citation Information
Patent Citations
Scoliosis detection model generation method and computer equipment
CN111383221A
Scoliosis image detection model training method and device, scoliosis image detection model determining method and device and equipment
CN113052842A