Pedicle screw planning method and system
Through multi-task learning neural network, the spine and pedicle screw masks are generated, the spatial coordinates of the screw mask are extracted and the screw length is calculated, which solves the problem of pedicle screw planning in the existing technology, and the lack of autonomous corrections is achieved, intelligent planning and automated surgery are achieved, and surgical efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411786327.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art has a long time-consuming and lacks the ability to self-correct and optimize the planning in pedicle screw planning, and in the case of complex spinal structures or lesions disturbances, the calculation method cannot quickly and accurately obtain results, affecting the smooth progress of the operation.
A multi-task learning neural network is used to generate spinal masks and pedicle screw masks. The spatial coordinates of the starting point and end point of the pedicle screw mask are extracted through the training neural network, and the position and length of the pedicle screws are calculated based on these coordinates.
Intelligent planning of the position and length of pedicle screws is realized, which reduces the work intensity of the doctor, shortens the operation time, and can automatically plan the position and length of pedicle screws of the spine based on CBCT images, improving the degree of intelligence, availability and reliability.
Smart Images

Figure CN119648674A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of spinal mask generation and pedicle screw planning, and in particular to a method and system for pedicle screw planning. Background Art
[0002] With the increase of age, long-term fatigue, bad living habits, trauma and other factors, the intervertebral disc of the spine degenerates and the water content of the nucleus pulposus decreases, causing the intervertebral height to decrease, the intervertebral facet joints to loosen, the annulus fibrosus to degenerate and the firmness to decrease. Under the further promotion of minor trauma, the annulus fibrosus ruptures and the nucleus pulposus protrudes along the annulus fibrosus rupture. Therefore, this disease mostly occurs in the elderly, but the modern life pace is fast, and the incidence rate among young people is increasing year by year. If the intervertebral disc protrudes, the corresponding intervertebral height will decrease, stimulating the sinus nerve, which will cause low back pain symptoms; if the protrusion is more serious, it will compress the nerve root and cause symptoms such as sciatica; if the protrusion is further aggravated or the nerve compression lasts too long, it will cause foot drop and cauda equina syndrome, etc., and surgical treatment is required as soon as possible.
[0003] In recent years, with people's further understanding of the structure and physiology of the spine, as well as an in-depth summary of spinal internal fixation technology, minimally invasive technologies represented by perforaminal endoscopy, disc endoscopy, channel technology, fenestration technology, and semi-laminar decompression technology are developing rapidly, aiming to minimize trauma and achieve the best therapeutic effect. When a segment of the spine becomes unstable, such as severe lumbar fractures, moderate to severe lumbar spondylolisthesis, and correction of spinal deformities, internal fixation surgery is required according to the condition. For moderate to severe lumbar spinal stenosis, surgery requires the removal of more bone to fully decompress, which may cause instability in the segment, and lumbar internal fixation is only necessary.
[0004] At present, the development of medical robots has indeed provided certain guarantees for the minimally invasiveness, safety and efficiency of spinal surgery. During the operation, the doctor needs to plan the position of the pedicle screws on the patient's intraoperative CBCT image, and then rely on the guidance of the robotic arm to implant the pedicle screws. This method has obvious technical defects. From the planning perspective, relying on doctors to plan the position of pedicle screws on CBCT images is time-consuming, especially when facing complex conditions. It takes a lot of effort to make detailed plans, which increases the intensity of work. From the perspective of robotic arm guidance, there is a lack of the ability to independently correct and optimize the plan.
[0005] In addition, due to the complex structure of the spine, accurate labeling of the spinal mask and pedicle screw mask is crucial for subsequent surgical planning. Existing technologies do not involve the use of a single neural network to perform multiple tasks simultaneously. In the case of complex spinal structures or in the presence of lesions, existing computing methods may not be able to quickly and accurately obtain results, thus affecting the smooth progress of the operation.
[0006] Therefore, the prior art needs to be further developed. Summary of the invention
[0007] The purpose of the present invention is to overcome the above technical deficiencies and provide a method and system for pedicle screw planning to solve the problems existing in the prior art.
[0008] To achieve the above technical objectives, according to a first aspect of the present invention, the present invention provides a method for pedicle screw planning, comprising: S100, acquiring a CBCT image dataset of a spine, and annotating the spine and pedicle screws of the CBCT image dataset to obtain a dataset including a spine mask and a pedicle screw mask; S200, inputting the data set including the spinal column mask and the pedicle screw mask into a multi-task learning neural network for training, and using the trained multi-task learning neural network to generate a first spinal column mask and a first pedicle screw mask, and extracting the spatial coordinates of the start point and the end point of the first pedicle screw mask; S300: Calculate the spatial coordinates of the starting point and the ending point of the pedicle screw and the length of the pedicle screw according to the spatial coordinates of the starting point and the ending point of the first pedicle screw mask and the first spinal column mask.
[0009] Specifically, the S100 includes: Marking the starting point and the end point of the pedicle screw in the CBCT image to obtain an image after the pedicle screw is marked, and marking the spine in the CBCT image to obtain an image after the spine is marked; The pedicle screws marked in the CBCT image are converted into pedicle screw masks, and the spine marked in the CBCT image is converted into a spine mask, thereby obtaining a data set including the spine mask and the pedicle screw mask.
[0010] Specifically, converting the pedicle screws marked in the CBCT image into pedicle screw masks includes: The first radius of the pedicle screw is obtained, and the first distance from each voxel to the line segment formed by the starting point and the end point of the pedicle screw in the physical space coordinate system is calculated, and the voxels whose first distance is less than the first radius are assigned a first preset value, and the area formed by each voxel assigned the first preset value is used as a pedicle screw mask.
[0011] Specifically, the step of extracting the spatial coordinates of the starting point and the end point of the first pedicle screw mask includes: Acquire the connected area of each first pedicle screw mask; According to the connected areas of each first pedicle screw mask, a point cloud of each first pedicle screw mask is obtained, and the spatial coordinates of the starting point and the end point of each first pedicle screw mask are calculated according to the point cloud of each first pedicle screw; The step of obtaining the connected area of the first pedicle screw mask comprises: The same label is assigned to all pixels in the same connected area, and then the first pedicle screw masks are displayed in the output image by using different labels; The computing of the spatial coordinates of the starting point and the end point of each first pedicle screw mask according to the point cloud of each first pedicle screw comprises: The spatial coordinates of each data point in the point cloud of the first pedicle screw mask are obtained, and the spatial coordinates of each data point are normalized, the correlation of the normalized data points is calculated, and a covariance matrix is formed, and the eigenvector corresponding to the maximum eigenvalue of each data point is calculated according to the covariance matrix, and the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated according to the eigenvector corresponding to the maximum eigenvalue.
[0012] Specifically, calculating the spatial coordinates of the starting point and the end point of the first pedicle screw mask according to the eigenvector corresponding to the maximum eigenvalue includes: The eigenvector corresponding to the maximum eigenvalue is used as the first principal component. According to the eigenvector corresponding to the maximum eigenvalue and the spatial coordinates of each normalized data point, the projection range of all data points in the point cloud of the first pedicle screw mask in the direction of the first principal component is calculated. Then, according to the projection range and the center point coordinates of the point cloud of the first pedicle screw mask, the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated.
[0013] Specifically, the S300 includes: Calculate the unit direction vector of the pedicle screw according to the spatial coordinates of the start and end points of the first pedicle screw mask , the specific calculation method is as follows: ; ; in, represents the length of the first pedicle screw mask; , , Respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the first pedicle screw mask; , , They respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the first pedicle screw mask.
[0014] Specifically, the S300 further includes: Taking the center point of the first pedicle screw mask as the initial point, the vectors along the unit direction A unit length is added to the starting point direction and the end point direction of the first pedicle screw mask, and it is determined whether the coordinate point after the unit length is added is located in the first spine mask. According to the determination result, it is determined whether the current coordinate point is the starting point or the end point of the pedicle screw.
[0015] Specifically, determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the judgment result includes: If the coordinate point after the unit length is increased by the current coordinate point is not located in the first spine mask, the current coordinate point is determined to be the coordinate of the starting point or the end point of the pedicle screw, and then the current coordinate point is determined to be the starting point or the end point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the starting point of the first pedicle screw mask, then the current coordinate point is determined to be the starting point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the end point of the first pedicle screw mask, it is determined that the current coordinate point is the end point of the pedicle screw.
[0016] Specifically, the step of determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the judgment result further includes: If the coordinate point after the unit length is increased by the current coordinate point is located within the first spinal mask, it is determined that the current coordinate point is not the starting point and end point of the pedicle screw, and the unit length is continued to be increased, and the judgment is repeated until the starting point and end point of the pedicle screw are found.
[0017] Specifically, the S300 further includes: The length of the pedicle screw is calculated according to the spatial coordinates of the starting point and the end point of the pedicle screw. The specific calculation process is as follows: ; in, , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the pedicle screw, respectively. , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the pedicle screw, respectively. Indicates the length of the pedicle screw.
[0018] According to a second aspect of the present invention, there is provided a system for spinal mask generation and pedicle screw planning, comprising: An acquisition module is used to acquire a CBCT image dataset of the spine, and to perform spine annotation and pedicle screw annotation on the CBCT image dataset to obtain a dataset including a spine mask and a pedicle screw mask; Control module: used to input the data set containing the spinal mask and the pedicle screw mask into the multi-task learning neural network for training, and use the trained multi-task learning neural network to generate a first spinal mask and a first pedicle screw mask, and extract the spatial coordinates of the starting point and the end point of the first pedicle screw mask; or used to calculate the spatial coordinates of the starting point and the end point of the pedicle screw and the length of the pedicle screw according to the spatial coordinates of the starting point and the end point of the first pedicle screw mask and the first spinal mask.
[0019] Beneficial effects: The present invention utilizes a trained multi-task learning neural network to generate a spinal mask and a pedicle screw mask. The generated spinal mask can provide an accurate spinal boundary, reducing the time-consuming and labor-intensive problem of doctors planning pedicle screws due to unclear CBCT images, extracting the spatial coordinates of the starting point and the end point of the pedicle screw mask, and calculating the spatial coordinates of the starting point and the end point of the pedicle screw mask and the length of the pedicle screw according to the spatial coordinates of the starting point and the end point of the pedicle screw mask and the spinal mask, thereby realizing intelligent planning of the position and length of the pedicle screw, reducing the workload of doctors and shortening the operation time while ensuring the safety of pedicle screw implantation, and being able to automatically plan the position and length of the pedicle screw of the spine based on the CBCT image. The generation of the spinal mask and the automatic planning of the pedicle screws are simultaneously completed by a neural network, thereby saving the intraoperative time and greatly improving the intelligence, usability and reliability of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a method for pedicle screw planning provided in a specific embodiment of the present invention; Figure 2 It is a schematic diagram of the composition of a pedicle screw planning system provided in a specific embodiment of the present invention; Figure 3 It is a schematic diagram of the implementation process of the overall solution of spinal mask generation and pedicle screw planning provided in a specific embodiment of the present invention; Figure 4 is a schematic diagram of an example of spinal mask and pedicle screw annotation provided in a specific embodiment of the present invention; Figure 5 is a transformation schematic diagram of a pedicle screw mask provided in a specific embodiment of the present invention; Figure 6 It is a multi-task learning neural network architecture diagram based on Unet provided in a specific embodiment of the present invention; Figure 7 is a schematic diagram before the connected regions are marked provided in a specific embodiment of the present invention; Figure 8 is a schematic diagram of connected regions marked according to a specific embodiment of the present invention; Fig. 9 It is a schematic diagram of the results of obtaining the starting point and end point of the pedicle screw provided in a specific embodiment of the present invention. DETAILED DESCRIPTION In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings of the present invention. Based on the embodiments in this application, other similar embodiments obtained by ordinary technicians in this field without making creative work should all fall within the scope of protection of this application. In addition, the directional words mentioned in the following embodiments, such as "up", "down", "left", "right", etc., are only reference to the directions of the accompanying drawings. Therefore, the directional words used are used to illustrate rather than limit the invention.
[0021] The present invention will be further described below in conjunction with the accompanying drawings and preferred embodiments.
[0022] See also Figure 1 This embodiment provides a method for pedicle screw planning, comprising: S100, acquiring a CBCT image dataset of a spine, and annotating the spine and pedicle screws of the CBCT image dataset to obtain a dataset including a spine mask and a pedicle screw mask; Specifically, the S100 includes: Marking the starting point and the end point of the pedicle screw in the CBCT image to obtain an image after the pedicle screw is marked, and marking the spine in the CBCT image to obtain an image after the spine is marked; The pedicle screws marked in the CBCT image are converted into pedicle screw masks, and the spine marked in the CBCT image is converted into a spine mask, thereby obtaining a data set including the spine mask and the pedicle screw mask.
[0023] It can be understood that the present invention uses 3D slicer software to mark the spine and pedicle screws of the CBCT image respectively, wherein the pedicle screw marking adopts the line marking method, that is, only the starting point and the end point of the pedicle screw need to be marked. All CBCT image data can be marked by clinical engineers. Figure 4As shown, the upper right image is a mask 3D view, the upper left image represents a cross-sectional view of the current CT data, the lower left image represents a coronal view of the current CT data, and the lower right image represents a sagittal view of the current CT data. The upper left image, the lower left image, and the lower right image all reflect the background part and the spine mask part as well as the starting and ending parts of the pedicle screws marked on the spine mask, where the red mark is the name of the pedicle screw, as shown in FIG. Figure 4 The red mark 40_L4-L in the middle indicates the left screw annotation of the L4 lumbar vertebra in the image numbered 40. The starting point of the pedicle screw is defined as the point where the pedicle screw enters the surface of the spine, and the end point is defined as the point where the pedicle screw enters the inside of the spine and is the farthest point from the starting point.
[0024] Specifically, converting the pedicle screws marked in the CBCT image into pedicle screw masks includes: The first radius of the pedicle screw is obtained, and the first distance from each voxel to the line segment formed by the starting point and the end point of the pedicle screw in the physical space coordinate system is calculated, and the voxels whose first distance is less than the first radius are assigned a first preset value, and the area formed by each voxel assigned the first preset value is used as a pedicle screw mask.
[0025] It should be further explained that the specific steps of converting the pedicle screws annotated by 3Dslicer into pedicle screw masks are as follows: (1) Create an all-zero array with the same shape as the spine mask seg, denoted as seg0, to temporarily store the newly marked area; (2) Convert the physical space coordinate system to the image coordinate system: Set the starting coordinate of the pedicle screw to start_pt, and set the end coordinate of the pedicle screw to end_pt. The coordinates of the pedicle screw need to be converted from the physical space coordinate system to the image coordinate system (convert the physical coordinate point to the image index). This can be achieved through sitk_img.TransformPhysicalPointToContinuousIndex(). The image indexes of the starting point and the end point are recorded as start_pt_idx and end_pt_idx respectively. (3) Setting grid coordinates: You can use numpy.meshgrid() to create 3D grid coordinates (xx, yy, zz) corresponding to the image segmentation size, and then convert these grid coordinates into physical space coordinates based on the spatial resolution (spacing) of the image; (4) Calculate the distance from each voxel to the line segment formed by the starting point and the end point of the pedicle screw: Use the starting point p1 and the end point p2 of the line segment in the physical space to calculate the distance from each voxel to the line segment, that is, the first distance. Specifically, for each voxel, first calculate the point where it is projected onto the line segment, and then calculate the distance from the voxel to the projection point (that is, the first distance of the line segment, dist2line); (5) Marking area: The voxels whose distance to the line segment is less than the radius of the pedicle screw, that is, the first radius, are assigned label_idx in seg0, which is the first preset value. Then, the function limits the marking area according to the spatial coordinate range of the line segment, and the voxel values beyond the spatial range of the starting point and the end point are set to 0; (6) Update the segmentation map: All voxels with labels in seg0 are also updated to label_idx in the original segmentation map seg.
[0026] S200, inputting the data set including the spinal column mask and the pedicle screw mask into a multi-task learning neural network for training, and using the trained multi-task learning neural network to generate a first spinal column mask and a first pedicle screw mask, and extracting the spatial coordinates of the start point and the end point of the first pedicle screw mask.
[0027] It should be further explained that the first spinal mask and the first pedicle screw mask are respectively generated by using a trained multi-task learning neural network. The present invention adopts multi-task learning technology (MTL), that is, completing the learning of multiple tasks through one neural network. In the multi-task learning neural network, since the spinal mask and pedicle screw mask related tasks are trained in the same network, the network can automatically learn the shared features between the two. From the perspective of data utilization, processing the spinal mask and pedicle screw mask tasks at the same time can more fully mine the information in the data. Compared with constructing a neural network for each task separately, multi-task learning reduces the data sparsity problem, making the network's understanding of the data more comprehensive. Multi-task learning can prevent the network from overfitting. When the network learns multiple tasks at the same time, it needs to find a universal feature representation that can be applied to multiple tasks, not just the data pattern of a specific task. In this way, when faced with new data, the network can better predict, which greatly improves the training efficiency.
[0028] Specifically, the step of extracting the spatial coordinates of the starting point and the end point of the first pedicle screw mask includes: Acquire the connected area of each first pedicle screw mask; According to the connected areas of each first pedicle screw mask, a point cloud of each first pedicle screw mask is obtained, and the spatial coordinates of the starting point and the end point of each first pedicle screw mask are calculated according to the point cloud of each first pedicle screw; The step of obtaining the connected area of the first pedicle screw mask comprises: The same label is assigned to all pixels in the same connected area, and then the first pedicle screw masks are distinguished and displayed in the output image by different labels.
[0029] Furthermore, a connected region refers to a set of pixels in an image that have the same attribute (usually pixel value or voxel value). These pixels are spatially connected to each other. By marking each connected region, each first pedicle screw mask in the spinal mask can be further distinguished. The specific steps of connecting region marking are as follows: 1. Initialization (1) Create an output image of the same size as the input image to store the label of each pixel. The purpose of creating the output image is to store the label of each pixel, which is used to mark the connected area to which each pixel belongs. That is, give each pixel an identity to indicate which pixels each identity is connected to. (2) Create a label counter to generate unique labels and ensure that each connected region has a unique label.
[0030] 2. Scan the image (1) Starting from the first pixel of the image, scan the entire image line by line; (2) For each pixel, if it has not been marked, a new region growing process is started.
[0031] 3. Regional Growth (1) Starting from the current pixel, use a queue or stack data structure to recursively check all adjacent pixels, based on 8-connectivity or 4-connectivity. 8-connectivity means that a pixel is connected to the eight pixels around it (up, down, left, right, and four diagonal directions); 4-connectivity means that a pixel is only connected to the four pixels above, below, left, and right of it. (2) If adjacent pixels belong to the same connected component, they are added to the queue and assigned the current label; (3) Repeat the above process until all connected pixels are marked.
[0032] 4. Output results In the generated output image, the value of each pixel represents the label of the connected component it belongs to.
[0033] Specifically, computing the spatial coordinates of the start point and the end point of each first pedicle screw mask based on the point cloud of each first pedicle screw includes: The spatial coordinates of each data point in the point cloud of the first pedicle screw mask are obtained, and the spatial coordinates of each data point are normalized, the correlation of the normalized data points is calculated, and a covariance matrix is formed, and the eigenvector corresponding to the maximum eigenvalue of each data point is calculated according to the covariance matrix, and the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated according to the eigenvector corresponding to the maximum eigenvalue.
[0034] It can be understood that the point cloud is a collection of a series of data points, which contain the position information of the pedicle screw mask in three-dimensional space. The coordinates of all data points in the point cloud are normalized. The normalization calculation method is as follows: ; Where X represents the set of all data points, m represents the number of data points, and x represents a single data point. Calculate the correlation of each normalized data point and form a covariance matrix For point cloud data, the covariance matrix can reflect the changing relationship between points in different dimensional directions.
[0035] Specifically, calculating the spatial coordinates of the starting point and the end point of the first pedicle screw mask according to the eigenvector corresponding to the maximum eigenvalue includes: The eigenvector corresponding to the maximum eigenvalue is used as the first principal component. According to the eigenvector corresponding to the maximum eigenvalue and the spatial coordinates of each normalized data point, the projection range of all data points in the point cloud of the first pedicle screw mask in the direction of the first principal component is calculated. Then, according to the projection range and the center point coordinates of the point cloud of the first pedicle screw mask, the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated.
[0036] Further, the eigenvector corresponding to the maximum eigenvalue of each data point is calculated according to the covariance matrix. In this embodiment, the np.linalg.eig() function is used for calculation; it should be noted that, because the point cloud is a three-dimensional point cloud, three pairs of eigenvalues and eigenvectors can be obtained when calculating the eigenvalues and eigenvectors. Because the pedicle screw mask can be regarded as a cylinder, the eigenvalue corresponding to the direction of the desired pedicle screw should be the maximum value among all eigenvalues. Therefore, the eigenvector corresponding to the maximum eigenvalue of all data points is taken as the first principal component, and then the range of the projection of all data points in the direction of the first principal component is found, that is, the minimum value minL and the maximum value maxL. The specific calculation method is as follows: ; in, represents a 3*1 eigenvector matrix, , , is the element in the eigenvector matrix, L is the projection of each data point in the direction of the first principal component, pt represents the coordinate of the normalized data point, , , Respectively represent the coordinate values of the normalized data points in three dimensions, then calculate the L values of all data points, and find the minimum minL and maximum maxL; Furthermore, according to the minimum value minL and the maximum value maxL, the spatial coordinates of the start point and the end point of the first pedicle screw mask are calculated. The specific calculation method is as follows: minL; maxL; Among them, c represents the coordinates of the center point of the point cloud in three-dimensional space. The determination of the coordinates of the starting point and the end point here needs to rely on the coordinate values in the current physical space coordinate system. Because the direction of the pedicle screw must be from the back to the belly, the positive direction of the current image in this direction can be determined to determine the starting point and the end point. For example, if the current physical space coordinate system takes the belly to the back as the positive direction (such as LPS), then the two coordinate points with the smaller y-axis coordinate value are the end point, and the larger y-axis coordinate value are the starting point.
[0037] S300: Calculate the spatial coordinates of the starting point and the ending point of the pedicle screw and the length of the pedicle screw according to the spatial coordinates of the starting point and the ending point of the first pedicle screw mask and the first spinal column mask.
[0038] Specifically, the S300 includes: Calculate the unit direction vector of the pedicle screw according to the spatial coordinates of the start and end points of the first pedicle screw mask , the specific calculation method is as follows: ; ; in, represents the length of the first pedicle screw mask; , , Respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the first pedicle screw mask; , , They respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the first pedicle screw mask.
[0039] Furthermore, since the pedicle screw mask cannot ensure that it fits the bone surface, it is necessary to further obtain the actual entry point and screw length of the pedicle screw, so that the position of the pedicle screw can be planned more accurately under actual circumstances.
[0040] Specifically, the S300 further includes: Taking the center point of the first pedicle screw mask as the initial point, the vectors along the unit direction A unit length is added to the starting point direction and the end point direction of the first pedicle screw mask, and it is determined whether the coordinate point after the unit length is added is located in the first spine mask. According to the determination result, it is determined whether the current coordinate point is the starting point or the end point of the pedicle screw.
[0041] Specifically, determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the judgment result includes: If the coordinate point after the unit length is increased by the current coordinate point is not located in the first spine mask, the current coordinate point is determined to be the coordinate of the starting point or the end point of the pedicle screw, and then the current coordinate point is determined to be the starting point or the end point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the starting point of the first pedicle screw mask, then the current coordinate point is determined to be the starting point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the end point of the first pedicle screw mask, it is determined that the current coordinate point is the end point of the pedicle screw.
[0042] Specifically, the step of determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the judgment result further includes: If the coordinate point after the unit length is increased by the current coordinate point is located within the first spinal mask, it is determined that the current coordinate point is not the starting point and end point of the pedicle screw, and the unit length is continued to be increased, and the judgment is repeated until the starting point and end point of the pedicle screw are found.
[0043] Furthermore, based on the center point of the pedicle screw, the unit length is increased along the unit direction vector of the pedicle screw toward the starting point and the end point of the first pedicle screw mask, and the first spine mask is used to determine whether the coordinate point belongs to the spine part or the background part. The function of the spine mask is to distinguish whether the coordinate point is within the spine structure. If it is the spine part, the length is repeatedly increased until the point after the unit length is increased to the current point is the background part. This point is the true starting point of the pedicle screw and the end point of the longest pedicle screw length.
[0044] Specifically, the S300 further includes: The length of the pedicle screw is calculated according to the spatial coordinates of the starting point and the end point of the pedicle screw. The specific calculation process is as follows: ; in, , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the pedicle screw, respectively. , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the pedicle screw, respectively. Indicates the length of the pedicle screw.
[0045] It is understandable that in robot-assisted pedicle screw fixation, doctors need to plan information such as the implantation position and length of the pedicle screws. The above method can intelligently plan the position and length of the screws, while ensuring the safety of screw implantation, reducing the doctor's workload and shortening the operation time.
[0046] See also Figure 4-Figure 9 , the workflow of the present invention is described below by using specific examples: Step 1: Collect CBCT images and perform mask annotation and pedicle screw annotation; (1) Collect CBCT data. Due to the different types of shooting equipment, the image size is also different. In this example, 100 cases of Siemens orbic data (256×256×256), 100 cases of Siemens cios spin data (512×512×512), and 100 cases of one image data (394×394×394) are collected. Due to the limited shooting range of the C-arm, the entire spine cannot be presented in one CBCT image. Therefore, the training set needs to include at least the following types of images: 1) Only partial or complete CBCT data of the cervical spine; 2) CBCT data of only part of the cervical spine and part of the thoracic spine; 3) CBCT data of only part of the thoracic spine and part of the lumbar spine; 4) Only partial lumbar and sacral CBCT data; 5) CBCT data of only partial lumbar spine and complete sacral spine; 6) Only partial or complete lumbar spine CBCT data.
[0047] (2) Use 3D slicer software to annotate the masks and screws of the CBCT images. The pedicle screws are annotated using line annotation, which means that only the starting and ending points of the pedicle screws need to be annotated. All CBCT data are annotated by clinical engineers. Figure 4 As shown: (3) Convert the pedicle screws (lines) marked by the 3D slicer into spinal pedicle screw masks. The specific steps are as follows: 1) Create an all-zero array with the same shape as the spine mask seg, denoted as seg0, to temporarily store the newly marked area; 2) Convert the physical space coordinate system to the image coordinate system: Set the starting point coordinate of the pedicle screw to start_pt and the end point coordinate to end_pt. The pedicle screw coordinates need to be converted from the physical space coordinate system to the image coordinate system (convert the physical coordinate point to the image index). This can be achieved through sitk_img.TransformPhysicalPointToContinuousIndex(). The indexes of the entry point and the end point are recorded as start_pt_idx and end_pt_idx respectively. 3) Set grid coordinates: You can use numpy.meshgrid() to create 3D grid coordinates (xx, yy, zz) corresponding to the image segmentation size, and then convert these grid coordinates into physical space coordinates based on the spatial resolution (spacing) of the image; 4) Calculate the distance from each voxel to the line segment formed by the starting point and the end point of the pedicle screw: Use the starting point p1 and the end point p2 of the line segment in the physical space to calculate the distance from each voxel to the line segment, that is, the first distance. Specifically, for each voxel, first calculate the point where it is projected onto the line segment, and then calculate the distance from the voxel to the projection point (that is, the first distance of the line segment, dist2line); 5) Marking area: The voxels with a distance line segment less than the radius of the pedicle screw, that is, the first radius, are assigned label_idx in seg0, which is the first preset value. Then, the function limits the marking area according to the spatial coordinate range of the line segment, and the voxel values beyond the spatial range of the starting point and the end point are set to 0; 6) Update the segmentation map: All the voxels with labels in seg0 are also updated to label_idx in the original segmentation map seg, and the pedicle screws (lines) marked by 3Dslicer are converted into the pedicle screw mask diagram of the spine as shown in Figure 5 As shown, Figure 5 The image in the upper right corner is the updated mask 3D view, the image in the upper left corner represents the cross-sectional view of the current CT data, the image in the lower left corner represents the coronal view of the current CT data, and the image in the lower right corner represents the sagittal view of the current CT data: Step 2: training a neural network to generate the first spine mask and the first pedicle screw mask in the CBCT image; The multi-task learning technology (MTL) is used, that is, a neural network is used to complete the learning of multiple tasks. In this embodiment, multi-task learning is implemented based on UNet. The specific multi-task learning neural network structure is as follows: Figure 6 As shown; The size of the output image of the multi-task learning neural network is 1*4*128*128*128. The image of size 1*4*128*128*128 is split into two images of size 1*2*128*128*128 in the second dimension. The first two channels of the second dimension represent the pseudo probability of the first spine mask, denoted as spine_prob, and the last two channels of the second dimension represent the pseudo probability of the first pedicle screw mask, denoted as scrwe_prob. Each dimension is transformed into onehot encoding, and then label1 (spinal mask) and label2 (pedicle screw mask) are also onehot encoded. Finally, BCEloss is calculated and used to perform back propagation of the neural network to optimize the parameters. In the training process of the multi-task learning neural network, since the mask of the image is onehot encoded, the optimization direction of the neural network is actually the result of onehot encoding. The last step of the neural network during verification is an argmax operation. The actual meaning of the calculation result is that the result after the argmax operation is the mask.
[0048] Onehot transformation process: The number of channels of the onehot result is determined according to the number of label types in the image. In this embodiment, taking the spinal column mask as an example, there are only two categories in the spinal column mask, namely background and spinal column mask. Therefore, the Onehot result of the spinal column mask is two channels. The onehot process: for the 0th channel, the target is the background part of the image, so the pixel values corresponding to all background parts in the spinal column mask are set to 1. In the 1st channel, the target is the spinal column mask part of the image, so the pixel values corresponding to all mask parts in the spinal column mask are set to 1.
[0049] Step 3: Calculate the range of the projection of all data points in the first pedicle screw mask in the vector direction of the eigenvector corresponding to the maximum eigenvalue, and determine the starting point and end point of the pedicle screw according to the positive direction of the current image, because the direction of the pedicle screw is from the back to the belly. For example, if the current physical space coordinate system is from the belly to the back as the positive direction (such as LPS), the two coordinate points with the smaller y-axis coordinate value are the end point, and the larger y-axis coordinate value are the starting point. In this embodiment, the direction from one transverse process to the other transverse process is recorded as the coordinate X-axis direction, the direction from the spinal process to the vertebral body is recorded as the coordinate Y-axis direction, and the direction from the sacrum to the cervical vertebra is recorded as the coordinate Z-axis direction; The specific steps are as follows: (1) Marking connected regions 1) Initialization: a. Create an output image of the same size as the input image to store the label of each pixel; b. Create a tag counter to generate unique tags.
[0050] 2) Scan the image a. Start from the first pixel of the image and scan the entire image line by line; b. For each pixel, if it has not been labeled yet, start a new region growing process.
[0051] 3) Regional Growth a. Starting from the current pixel, recursively check all neighboring pixels (based on 8-connectivity or 4-connectivity) using a queue or stack data structure; b. If the adjacent pixels belong to the same connected component, add them to the queue and assign the current label; c. Repeat the above steps until all connected pixels are marked.
[0052] This embodiment does not perform a merging label operation, but in some practical situations, it may be necessary to process the merging of multiple connected regions, which can be efficiently managed through a Union-Find data structure.
[0053] 4) Output results like Figure 7 and Figure 8 As shown, after the connected component labeling is performed, in the generated output image, the value of each pixel represents the label of the connected component to which it belongs.
[0054] (2) Extract the starting and ending points of the first pedicle screw mask 1) Obtain the mask point cloud of the first pedicle screw; 2) Normalize the coordinates of all data points in the point cloud. The normalization calculation method is as follows: ; Among them, X represents the set of all data points, m represents the number of data points, and x represents a single data point; 3) Calculate the covariance matrix ; 4) Calculate the eigenvalues and eigenvectors of the covariance matrix. In this embodiment, np.linalg.eig() is used for calculation. It should be noted that because the point cloud is a three-dimensional point cloud, three pairs of eigensolutions can be obtained when calculating the eigenvalues and eigenvectors. Because the first pedicle screw mask can be regarded as a cylinder, the eigenvalue corresponding to the direction of the desired first pedicle screw should be the maximum value among all eigenvalues. Therefore, the eigenvector corresponding to the maximum eigenvalue is used as the first principal component.
[0055] 5) Find the range of the projection of all data points in the direction of the first principal component (minimum minL and maximum maxL): ; in, represents a 3*1 eigenvector matrix, , , is the element in the eigenvector matrix, L is the projection of each data point in the direction of the first principal component, pt represents the coordinate of the normalized data point, , , Respectively represent the coordinate values of the normalized data points in three dimensions, then calculate the L values of all data points, and find the minimum minL and maximum maxL; 6) According to the minimum value minL and the maximum value maxL, calculate the spatial coordinates of the start and end points of the first pedicle screw mask. The specific calculation method is as follows: minL; maxL; Among them, c represents the coordinate of the center point of the point cloud in three-dimensional space, and the extraction results of the starting point and end point of the first pedicle screw are obtained as follows: Fig. 9 As shown: Step 4: Calculate the actual entry point (starting point) of the first pedicle screw and the length of the screw; Since the first pedicle screw mask cannot ensure that it fits the bone surface, it is necessary to obtain the actual pedicle screw entry point and screw length. The specific steps are as follows: (1) Calculate the unit direction vector of the screw through the start and end points of the first pedicle screw mask , the calculation method is as follows: ; ; in, represents the length of the first pedicle screw mask; , , Respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the first pedicle screw mask; , , They respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the first pedicle screw mask.
[0056] (2) Based on the center point of the first pedicle screw mask, add unit length along the unit direction vector of the pedicle screw in the direction of the starting point and the end point respectively, and determine whether the coordinate of the point belongs to the spine part or the background part through the first spine mask; (3) If the point after adding a unit length to the current point is the spine part, the length is repeatedly increased until the point after adding a unit length is the background part. In this case, the current point is the true starting point of the pedicle screw and the end point of the longest screw length. (4) Calculate the true length of the pedicle screw as follows: ; in, , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the pedicle screw, respectively. , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the pedicle screw, respectively. Indicates the true length of the pedicle screw.
[0057] It is understandable that in robot-assisted pedicle screw fixation, doctors need to plan information such as the implantation position and implantation length of the pedicle screws. This method can intelligently plan the position and length of the screws, while ensuring the safety of screw implantation, reducing the doctor's workload and shortening the operation time.
[0058] See also Figure 3 The following is a specific example of how to use the multi-task learning neural network to automatically plan the spine mask and pedicle screw mask for CBCT images after training the multi-task learning neural network: (1) First load the trained multi-task learning neural network, and then load the CBCT image that needs automatic planning; (2) Then pre-process the image, which includes interpolating the image to the target size (interpolating according to spacing. There is a target_spacing parameter during training. All data will be interpolated according to this target_spacing before training. Therefore, when using a multi-task learning neural network for inference, it is also necessary to interpolate according to target_spacing). Then, all the data in the image are normalized (because when training the neural network, the image is also trained after normalization, so the image also needs to be normalized when used); (3) The pre-processed result is then input into the multi-task learning neural network for inference. The 0th dimension of the inference result is 4 (this is certain because the desired output is a total of 4 dimensions: spine mask background, spine mask, pedicle screw mask background, and pedicle screw mask. 128*128*128 is only a specific embodiment, and the specific size depends on the size of the input image after interpolation). (4) The 0th and 1st channels of the multi-task learning neural network output are superimposed in the 0th dimension to form a 2*128*128*128 matrix (assuming that the size of the image after interpolation is 128) as the pseudo-probability of the spine mask. The 2nd and 3rd channels are superimposed as the pseudo-probability of the pedicle screw mask. The two pseudo-probabilities are respectively subjected to argmax operation to obtain the spine mask and pedicle screw mask. The two masks are interpolated by the nearest neighbor to obtain a mask size that is exactly the same as the original CBCT size.
[0059] (5) The connected area of the pedicle screw mask is obtained to distinguish the pedicle screws at different positions, and then the starting point and end point of the pedicle screw are obtained; (6) The starting and ending points of the pedicle screw are released, extended or shortened according to the spinal mask to obtain the true starting and ending points of the pedicle screw.
[0060] It should be noted here that the present invention uses a trained multi-task learning neural network to generate a spinal mask and a pedicle screw mask. The generated spinal mask can provide an accurate spinal boundary, reducing the time-consuming and labor-intensive problem of doctors planning pedicle screws due to unclear CBCT images, extracting the spatial coordinates of the starting point and the end point of the pedicle screw mask, and calculating the spatial coordinates of the starting point and the end point of the pedicle screw mask and the length of the pedicle screw according to the spatial coordinates of the starting point and the end point of the pedicle screw mask and the spinal mask, thereby realizing intelligent planning of the position and length of the pedicle screw. While ensuring the safety of pedicle screw implantation, the workload of doctors is reduced, the operation time is shortened, and the position and length of the pedicle screws of the spine can be automatically planned based on the CBCT image. The generation of the spinal mask and the automatic planning of the pedicle screws are simultaneously completed by a neural network, saving the intraoperative time, and greatly improving the intelligence, usability and reliability of the present invention.
[0061] See also Figure 2 This embodiment provides a system for pedicle screw planning, the system comprising: Acquisition module 100: used to acquire a CBCT image dataset of the spine, and perform spine annotation and pedicle screw annotation on the CBCT image dataset to obtain a dataset including a spine mask and a pedicle screw mask; Control module 200: used to input the data set containing the spinal column mask and the pedicle screw mask into a multi-task learning neural network for training, and use the trained multi-task learning neural network to generate a first spinal column mask and a first pedicle screw mask, and extract the spatial coordinates of the start and end points of the first pedicle screw mask; or calculate the spatial coordinates of the start and end points of the pedicle screw and the length of the pedicle screw according to the spatial coordinates of the start and end points of the first pedicle screw mask and the first spinal column mask.
[0062] It should be noted here that the present invention uses a trained multi-task learning neural network to generate a spinal mask and a pedicle screw mask. The generated spinal mask can provide an accurate spinal boundary, reducing the time-consuming and labor-intensive problem of doctors planning pedicle screws due to unclear CBCT images, extracting the spatial coordinates of the starting point and the end point of the pedicle screw mask, and calculating the spatial coordinates of the starting point and the end point of the pedicle screw mask and the length of the pedicle screw according to the spatial coordinates of the starting point and the end point of the pedicle screw mask and the spinal mask, thereby realizing intelligent planning of the position and length of the pedicle screw. While ensuring the safety of pedicle screw implantation, the workload of doctors is reduced, the operation time is shortened, and the position and length of the pedicle screws of the spine can be automatically planned based on the CBCT image. The generation of the spinal mask and the automatic planning of the pedicle screws are simultaneously completed by a neural network, saving the intraoperative time, and greatly improving the intelligence, usability and reliability of the present invention.
[0063] In a preferred embodiment, the present application further provides an electronic device, the electronic device comprising: A memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for pedicle screw planning is implemented. The computer device can be broadly a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices via a network. When the computer program is executed by the processor, the steps of the method of the present invention are executed.
[0064] The present invention may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of an embodiment of the present invention to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be performed by one or more computer devices or processors, and one or more other method steps / operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / operation, or perform two or more method steps / operations.
[0065] It should be noted here that the present invention uses a trained multi-task learning neural network to generate a spinal mask and a pedicle screw mask. The generated spinal mask can provide an accurate spinal boundary, reducing the time-consuming and labor-intensive problem of doctors planning pedicle screws due to unclear CBCT images, extracting the spatial coordinates of the starting point and the end point of the pedicle screw mask, and calculating the spatial coordinates of the starting point and the end point of the pedicle screw mask and the length of the pedicle screw according to the spatial coordinates of the starting point and the end point of the pedicle screw mask and the spinal mask, thereby realizing intelligent planning of the position and length of the pedicle screw. While ensuring the safety of pedicle screw implantation, the workload of doctors is reduced, the operation time is shortened, and the position and length of the pedicle screws of the spine can be automatically planned based on the CBCT image. The generation of the spinal mask and the automatic planning of the pedicle screws are simultaneously completed by a neural network, saving the intraoperative time, and greatly improving the intelligence, usability and reliability of the present invention.
[0066] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0067] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.
[0068] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A method for pedicle screw planning, characterized in that: include: S100, acquiring a CBCT image dataset of a spine, and annotating the spine and pedicle screws of the CBCT image dataset to obtain a dataset including a spine mask and a pedicle screw mask; S200, inputting the data set including the spinal column mask and the pedicle screw mask into a multi-task learning neural network for training, and using the trained multi-task learning neural network to generate a first spinal column mask and a first pedicle screw mask, and extracting the spatial coordinates of the start point and the end point of the first pedicle screw mask; S300: Calculate the spatial coordinates of the starting point and the ending point of the pedicle screw and the length of the pedicle screw according to the spatial coordinates of the starting point and the ending point of the first pedicle screw mask and the first spinal column mask.
2. The method for pedicle screw planning according to claim 1, characterized in that: The S100 includes: Marking the starting point and the end point of the pedicle screw in the CBCT image to obtain an image after the pedicle screw is marked, and marking the spine in the CBCT image to obtain an image after the spine is marked; The pedicle screws marked in the CBCT image are converted into pedicle screw masks, and the spine marked in the CBCT image is converted into a spine mask, thereby obtaining a data set including the spine mask and the pedicle screw mask.
3. The method for pedicle screw planning according to claim 2, characterized in that: The step of converting the pedicle screws marked in the CBCT image into pedicle screw masks comprises: The first radius of the pedicle screw is obtained, and the first distance from each voxel to the line segment formed by the starting point and the end point of the pedicle screw in the physical space coordinate system is calculated, and the voxels whose first distance is less than the first radius are assigned a first preset value, and the area formed by each voxel assigned the first preset value is used as a pedicle screw mask.
4. The method for pedicle screw planning according to claim 1, characterized in that: The step of extracting the spatial coordinates of the starting point and the end point of the first pedicle screw mask includes: Acquire the connected area of each first pedicle screw mask; According to the connected areas of each first pedicle screw mask, a point cloud of each first pedicle screw mask is acquired, and the spatial coordinates of the starting point and the end point of each first pedicle screw mask are calculated according to the point cloud of each first pedicle screw; The step of obtaining the connected area of the first pedicle screw mask comprises: The same label is assigned to all pixels in the same connected area, and then the first pedicle screw masks are displayed in the output image by using different labels; The computing of the spatial coordinates of the starting point and the end point of each first pedicle screw mask according to the point cloud of each first pedicle screw comprises: The spatial coordinates of each data point in the point cloud of the first pedicle screw mask are obtained, and the spatial coordinates of each data point are normalized, the correlation of the normalized data points is calculated, and a covariance matrix is formed, and the eigenvector corresponding to the maximum eigenvalue of each data point is calculated according to the covariance matrix, and the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated according to the eigenvector corresponding to the maximum eigenvalue.
5. The method for pedicle screw planning according to claim 4, characterized in that: The step of calculating the spatial coordinates of the starting point and the end point of the first pedicle screw mask according to the eigenvector corresponding to the maximum eigenvalue comprises: The eigenvector corresponding to the maximum eigenvalue is used as the first principal component. According to the eigenvector corresponding to the maximum eigenvalue and the spatial coordinates of each normalized data point, the projection range of all data points in the point cloud of the first pedicle screw mask in the direction of the first principal component is calculated. Then, according to the projection range and the center point coordinates of the point cloud of the first pedicle screw mask, the spatial coordinates of the starting point and the end point of the first pedicle screw mask are calculated.
6. The method for pedicle screw planning according to claim 1, characterized in that: The S300 includes: Calculate the unit direction vector of the pedicle screw according to the spatial coordinates of the start and end points of the first pedicle screw mask , the specific calculation method is as follows: ; ; in, represents the length of the first pedicle screw mask; , , Respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the first pedicle screw mask; , , They respectively represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the first pedicle screw mask.
7. The method for pedicle screw planning according to claim 6, characterized in that: The S300 further includes: Taking the center point of the first pedicle screw mask as the initial point, the vectors along the unit direction A unit length is added to the starting point direction and the end point direction of the first pedicle screw mask, and it is determined whether the coordinate point after the unit length is added is located in the first spine mask. According to the determination result, it is determined whether the current coordinate point is the starting point or the end point of the pedicle screw.
8. The method for pedicle screw planning according to claim 7, characterized in that: The step of determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the determination result includes: If the coordinate point after the unit length is increased by the current coordinate point is not located in the first spine mask, the current coordinate point is determined to be the coordinate of the starting point or the end point of the pedicle screw, and then the current coordinate point is determined to be the starting point or the end point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the starting point of the first pedicle screw mask, it is determined that the current coordinate point is the starting point of the pedicle screw; If the current coordinate point is in the direction from the center point of the first pedicle screw mask to the end point of the first pedicle screw mask, it is determined that the current coordinate point is the end point of the pedicle screw.
9. The method for pedicle screw planning according to claim 8, characterized in that: The step of determining whether the current coordinate point is the starting point or the end point of the pedicle screw according to the judgment result further includes: If the coordinate point after the unit length is increased by the current coordinate point is located within the first spinal mask, it is determined that the current coordinate point is not the starting point and end point of the pedicle screw, and the unit length is continued to be increased, and the judgment is repeated until the starting point and end point of the pedicle screw are found.
10. The method for pedicle screw planning according to claim 9, characterized in that: The S300 further includes: The length of the pedicle screw is calculated according to the spatial coordinates of the starting point and the end point of the pedicle screw. The specific calculation process is as follows: ; in, , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the starting point of the pedicle screw, respectively. , , They represent the x-axis coordinate, y-axis coordinate, and z-axis coordinate of the end point of the pedicle screw, respectively. Indicates the length of the pedicle screw.
11. A system for pedicle screw planning, characterized in that: include: An acquisition module (100): used to acquire a CBCT image dataset of the spine, and perform spine annotation and pedicle screw annotation on the CBCT image dataset to obtain a dataset containing a spine mask and a pedicle screw mask; A control module (200): used to input the data set containing the spinal column mask and the pedicle screw mask into a multi-task learning neural network for training, and use the trained multi-task learning neural network to generate a first spinal column mask and a first pedicle screw mask, and extract the spatial coordinates of the start and end points of the first pedicle screw mask; or used to calculate the spatial coordinates of the start and end points of the pedicle screw and the length of the pedicle screw based on the spatial coordinates of the start and end points of the first pedicle screw mask and the first spinal column mask.
Citation Information
Cited By
Vertebroplasty operation path planning method and device based on two-dimensional X-ray film
CN120605098A