Single vertebra segmention method and apparatus, and device and storage medium
The single-segment segmentation of the spine of CT images is solved through the neural network model, which solves the problem of difficulty in spine segmentation in the existing technology, and achieves high-precision and efficient single-segment segmentation.
Patent Information
- Application Number
- PCT/CN2023/137405
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-15
- Filing Date
- 2023-12-08
- Publication Date
- 2024-12-19
AI Technical Summary
The prior art is difficult to achieve high-precision single-segment segmentation of the spine, especially due to the similarity of the adjacent structural strength of the spine and the difference in vertebral morphology, which increases the difficulty of segmentation.
The CT image is segmented with a neural network model. By obtaining spine boundary information and position information, the initial image is generated, and image conversion and labeling is performed through multiple network models to finally determine the position of a single-section spine in the original CT image. .
It realizes fast and efficient segmentation of the spine, improves the segmentation accuracy of single-section spine, shortens the segmentation time, and makes spine segmentation more efficient and fast.
Smart Images

Figure CN2023137405_19122024_PF_FP_ABST
Abstract
Description
A method, device, equipment and storage medium for segmenting a single spine Technical Field
[0001] The present application relates to the technical field of medical image processing, and in particular to a method, apparatus, device and storage medium for segmenting a single vertebra. Background Art
[0002] Currently, spinal surgeons generally need to develop surgical plans based on the patient's CT images before surgery. Doctors require clearer and more intuitive spinal CT images to make accurate diagnoses. Therefore, high-precision single-segment segmentation of spinal CT images is of great significance in spinal surgery.
[0003] The inventors of this application discovered that segmenting the spine at a single level is easier to use than existing methods that separate the entire spine from background information. However, the similarity in strength of adjacent structures and the differences in morphology and size of vertebrae in different parts of the spine increase the difficulty of segmenting the spine at a single level.
[0004] Summary of the Invention
[0005] According to one aspect of the present application, a method for segmenting a single vertebra is provided, comprising: obtaining first vertebral boundary information, the first vertebral boundary information being the boundary information of the vertebra in a segmentation result obtained after image segmentation of an original CT image; obtaining first vertebral position information, the first vertebral position information being the position information of the single vertebra in the vertebra in the original CT image; obtaining an initial image of the single vertebra based on the first vertebral boundary information and the first vertebral position information; marking the position of the single vertebra in the initial image of the single vertebra to generate an updated image of the single vertebra; and determining the single vertebra in a restored image corresponding to the original CT image based on the updated image of the single vertebra.
[0006] According to some embodiments, obtaining first spinal boundary information includes: constructing a first network model; obtaining segmentation results of the spine, sacrum, and ribs in the original CT image through the first network model to obtain a segmented image of the original CT image; performing morphological expansion on the spine in the segmented image to obtain the morphologically expanded spinal image; converting the morphologically expanded spinal image into a first spinal image in an image coordinate system; and obtaining the first spinal boundary information corresponding to the first spinal image.
[0007] According to some embodiments, obtaining first vertebra position information includes: constructing a second network model; and obtaining the first vertebra position information from the original CT image through the second network model.
[0008] According to some embodiments, obtaining an initial image of a single vertebra based on the first vertebral boundary information and the first vertebral position information includes: determining the boundary information of the single vertebra based on the first vertebral boundary information and the first vertebral position information; and obtaining the initial image of the single vertebra from the first vertebral image based on the boundary information of the single vertebra.
[0009] According to some embodiments, the position of a single vertebra in the initial image of the single vertebra is marked to generate an updated image of the single vertebra, including: determining second vertebral column boundary information, the second vertebral column boundary information being the vertebral column boundary information in the initial image of the single vertebra; updating the position information of the single vertebra in the initial image of the single vertebra based on the second vertebral column boundary information; obtaining the position mark of the single vertebra in the initial image of the single vertebra based on the updated position information of the single vertebra; converting the initial image of the single vertebra containing the position mark of the single vertebra into a position mark image of the single vertebra in a body coordinate system; and generating an updated image of the single vertebra based on the initial image of the single vertebra and the position mark image of the single vertebra.
[0010] According to some embodiments, an updated image of the single vertebra is generated based on the initial image of the single vertebra and the position-marked image of the single vertebra, including: constructing a third network model; converting the initial image of the single vertebra into the initial image of the single vertebra in a body coordinate system; inputting the initial image of the single vertebra in the body coordinate system and the position-marked image of the single vertebra into the third network model in a preset order; obtaining an updated image of the single vertebra through the third network model in the preset order; and converting the updated image of the single vertebra into the updated image of the single vertebra in an image coordinate system.
[0011] According to some embodiments, determining a single vertebra in a restored image corresponding to the original CT image based on the updated image of the single vertebra includes: converting the original CT image into an original image in an image coordinate system; obtaining a zero-pixel map corresponding to the original image; marking the single vertebra in the zero-pixel map according to the preset order based on the updated image of the single vertebra in the image coordinate system; obtaining a position mark of the single vertebra in the original image based on the zero-pixel map corresponding to the original image of the marked single vertebra; updating the single vertebra boundary information in the original image of the marked single vertebra based on the updated image of the single vertebra in the image coordinate system to determine the single vertebra in the original image; and determining the original image of the determined single vertebra as the restored image.
[0012] According to one aspect of the present application, a device for segmenting a single vertebra is provided, comprising: a data acquisition module for acquiring an original CT image; a data processing module for setting a first network model, a second network model, and a third network model; acquiring segmentation results of the spine, sacrum, and ribs from the original CT image through the first network model; acquiring first vertebral boundary information based on the segmentation results; acquiring first vertebral position information from the original CT image through the second network model; acquiring an initial image of a single vertebra based on the first vertebral boundary information and the first vertebral position information; marking the position of the single vertebra in the initial image of the single vertebra; generating an updated image of the single vertebra through the third network model based on the initial image of the single vertebra and the position-marked image of the single vertebra; determining the single vertebra in the restored image in the image coordinate system corresponding to the original CT image based on the updated image of the single vertebra; and a data output module for outputting the restored image after determining the single vertebra.
[0013] According to one aspect of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0014] According to one aspect of the present application, a computer-readable storage medium is provided, on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the method as described above is implemented.
[0015] According to the embodiments of the present application, the spine in the CT image can be segmented into single segments through a neural network model, and the CT image can be divided into small images corresponding to each single segment of the spine arranged in sequence, thereby solving the problem of single segment segmentation of the spine that is difficult to achieve in the existing technology, shortening the time of spine segmentation, improving the accuracy of spine segmentation, and making spine segmentation more efficient and quick.
[0016] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application.
[0018] FIG1 shows a flow chart of a method for segmenting a single vertebra according to an exemplary embodiment of the present application.
[0019] FIG2 shows a display effect diagram of a single vertebra according to an exemplary embodiment of the present application.
[0020] FIG3 shows a flowchart of acquiring an initial image of a single vertebra according to an exemplary embodiment of the present application.
[0021] FIG4 shows a flowchart of acquiring an updated image of a single vertebra according to an exemplary embodiment of the present application.
[0022] FIG5 shows a training flowchart of a first network model according to an exemplary embodiment of the present application.
[0023] FIG6 shows a segmentation effect diagram of the spine, sacrum, and ribs according to an exemplary embodiment of the present application.
[0024] FIG7 shows a training flowchart of a second network model according to an exemplary embodiment of the present application.
[0025] FIG8 shows a rendering effect diagram of the position information of a single vertebra in the spine according to an exemplary embodiment of the present application.
[0026] FIG9 shows a training flowchart of a third network model according to an exemplary embodiment of the present application.
[0027] FIG10 shows a schematic diagram of a single vertebra according to an exemplary embodiment of the present application.
[0028] FIG11 shows a block diagram of a single vertebral segment segmentation apparatus according to an exemplary embodiment of the present application.
[0029] FIG12 shows a block diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.
[0031] Described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of these specific details, or other modes, components, materials, devices or operations etc. can be adopted. In these cases, known structures, methods, devices, realizations, materials or operations will not be shown or described in detail.
[0032] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0033] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0034] The present application provides a method, apparatus, device and storage medium for segmenting a single vertebra, which realizes fast and effective segmentation of a single spinal segment through a neural network model, thereby improving the segmentation accuracy of a single vertebra.
[0035] A single vertebra segment segmentation method, apparatus, device, and storage medium according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0036] This application refers to the following terms:
[0037] Zero pixel image: An image obtained by replacing all elements in the three-dimensional matrix corresponding to the coordinates of each point in the image coordinate system with 0. The pixel label value of each point in the zero pixel image is 0.
[0038] FIG1 shows a flow chart of a method for segmenting a single vertebra according to an exemplary embodiment of the present application.
[0039] As shown in FIG1 , in step S110 , first spine boundary information is acquired.
[0040] For example, in step S110, first spine boundary information is obtained through the first network model, wherein the first spine boundary information is the boundary information of the spine image after morphological expansion in the original CT image.
[0041] In a specific embodiment of the present application, the specific steps of obtaining the first spine boundary information are as follows:
[0042] A first network model is constructed, and the original CT image is input into the first network model to obtain segmentation results of the spine, sacrum and ribs in the original CT image through the first network model, thereby obtaining a segmented image of the original CT image.
[0043] After obtaining the segmentation result, in order to avoid incomplete or inaccurate spine boundaries, the spine in the segmented image is morphologically expanded to obtain a morphologically expanded spine image.
[0044] The morphologically expanded spine image in the body coordinate system is transformed into the first spine image in the image coordinate system.
[0045] The corresponding morphologically expanded spine boundary information, ie, first spine boundary information, is obtained according to the first spine image.
[0046] According to some embodiments, the first spinal boundary information includes the left boundary and the right boundary of the spinal image after morphological expansion in the direction from the transverse process of one side of the vertebra to the other side of the transverse process (x-axis), the front boundary and the back boundary in the direction from the spinous process of the spine to the vertebral body (y-axis), and the upper boundary and the lower boundary in the direction from the sacrum to the cervical vertebra (z-axis).
[0047] In step S120, first vertebra position information is acquired.
[0048] For example, in step S120, first vertebra position information is obtained through the second network model, wherein the first vertebra position information is position information of a single vertebra in the spine in the original CT image.
[0049] In a specific embodiment of the present application, the specific steps of obtaining the first vertebra position information are as follows:
[0050] A second network model is constructed, and the original CT image is input into the second network model to obtain the position information of a single vertebra in the original CT image in the spine through the second network model, that is, the first vertebra position information.
[0051] In step S130, an initial image of a single vertebra is acquired based on the first vertebral column boundary information and the first vertebral column position information.
[0052] For example, in step S130, the boundary information of a single vertebra is determined based on the first vertebral boundary information and the first vertebral position information, and based on the boundary information of the single vertebra, an initial image of the single vertebra is obtained from the first vertebral image corresponding to the morphologically expanded vertebral image.
[0053] In a specific embodiment of the present application, the specific steps of acquiring an initial image of a single vertebra based on the first vertebral boundary information and the first vertebral position information are as follows:
[0054] The boundary information of each single vertebra is determined based on the first vertebra boundary information and the first vertebra position information.
[0055] An initial image of the single vertebra is obtained from the first spinal column image according to boundary information of the single vertebra.
[0056] In step S140 , the position of the single vertebral segment in the initial image of the single vertebral segment is marked to generate an updated image of the single vertebral segment.
[0057] For example, in step S140, the second spinal column boundary information is first obtained, and then the position information of the single vertebral segment is updated based on the second spinal column boundary information. The position of the single vertebral segment in the initial image of the single vertebral segment is marked based on the updated position information of the single vertebral segment to generate an updated image of the single vertebral segment.
[0058] In a specific embodiment of the present application, the specific steps of marking the position of a single vertebra in an initial image of the single vertebra to generate an updated image of the single vertebra are as follows:
[0059] The spine boundary information in the initial image of the single spine, ie, the second spine boundary information, is determined.
[0060] The position information of each single vertebra in the initial image of the single vertebra is updated using the second vertebra boundary information.
[0061] Based on the updated position information of the individual vertebral segments, the positions of the individual vertebral segments in the initial image of the individual vertebral segments are marked, and a corresponding image of the marked positions of the individual vertebral segments in the body coordinate system is obtained. According to some embodiments, a corresponding pixel label value is set for each position mark of the individual vertebral segments in the initial image of the individual vertebral segments.
[0062] An updated image of the single spine is generated according to the initial image of the single spine and the position-marked image of the single spine.
[0063] In a specific embodiment of the present application, the specific steps of generating an updated image of a single vertebral segment based on the initial image of the single vertebral segment and the position-marked image of the single vertebral segment are as follows:
[0064] The initial image of the single spine is converted into the initial image of the single spine in the body coordinate system.
[0065] A third network model is constructed, and the initial image of the single vertebra in the body coordinate system and the position mark image of the single vertebra are superimposed and input into the third network model in a preset order to obtain an updated image of the single vertebra in a preset order through the third network model.
[0066] The updated image of the single vertebra in the body coordinate system obtained by the third network model is converted into an updated image of the single vertebra in the image coordinate system.
[0067] According to some embodiments, the updated image of a single vertebra includes a position mark of each single vertebra, and the position mark of each single vertebra includes a corresponding pixel label value.
[0068] In step S150, the single vertebral segment of the restored image corresponding to the original CT image is determined based on the updated image of the single vertebral segment.
[0069] For example, in step S150, the single vertebrae in the original image are marked in a preset order according to the single vertebrae corresponding to the updated image of the single vertebrae under the image coordinates, and the boundary information of the single vertebrae in the original image is updated to determine the single vertebrae in the restored image corresponding to the original image.
[0070] In a specific embodiment of the present application, the steps of determining the single vertebra of the restored image corresponding to the original CT image based on the updated image of the single vertebra are as follows:
[0071] First, the coordinate system of the acquired original CT image is transformed to convert it into the original image in the image coordinate system.
[0072] According to the updated image of the single vertebra in the image coordinate system, the single vertebra in the original image is marked in a preset order. According to some embodiments, based on the original image in the image coordinate system, a zero-pixel image of the same size is generated. According to the preset order of the updated image of the single vertebra output by the third network model, the pixel value of the position mark of each single vertebra in the updated image of the single vertebra in the image coordinate system is replaced with the pixel label value of the corresponding position in the zero-pixel image corresponding to the original image, so that the position mark of each single vertebra in the updated image of the single vertebra is used as the position mark of each single vertebra in the zero-pixel image corresponding to the original image. In addition, the pixel label value corresponding to the position mark of each single vertebra in the zero-pixel image corresponding to the original image is modified to a value with the same preset order as the updated image of the single vertebra output by the third network model. For example, the pixel label value 1 of the position mark of each single vertebra in the zero-pixel image corresponding to the original image is modified to 1, 2, 3... in the preset order.
[0073] After marking the position of each single vertebra in the zero-pixel image corresponding to the original image, the position mark of each single vertebra in the original image is obtained accordingly.
[0074] Based on the updated image of the single vertebra in the image coordinate system, the boundary information of the single vertebra in the original image of the marked single vertebra is updated, and the boundary information of the single vertebra in the original image of the marked single vertebra is replaced with the boundary information of the single vertebra in the updated image of the single vertebra in the image coordinate system to determine the single vertebra in the original image. According to some embodiments, after obtaining the position mark of each single vertebra in the zero-pixel image corresponding to the original image, the position mark of each single vertebra in the original image can be obtained accordingly because the original image in the image coordinate system and its corresponding zero-pixel image have the same size. The boundary information of each corresponding single vertebra is obtained from the updated image of the single vertebra in the image coordinate system, and the boundary information of each single vertebra in the original image is replaced with the boundary information of each single vertebra in the updated image of the single vertebra in the image coordinate system. Furthermore, based on the position mark of each single vertebra in the original image and the boundary information of each single vertebra in the replaced original image, the single vertebra in the original image can be determined.
[0075] After each individual vertebra in the original image is identified, the original image of the identified individual vertebra is used as the restored image corresponding to the original CT image. According to some embodiments, each individual vertebra in the restored image is identified and displayed in the restored image in the same order as the pixel label values in the updated image of the individual vertebra output by the third network model. The display of each individual vertebra in the restored image can be seen in the single vertebra display effect diagram shown in Figure 2.
[0076] According to the embodiments of the present application, the technical solution of the present application can perform single-segment segmentation of the spine in the CT image through a neural network model, which can realize the quick acquisition of each single vertebra in the spine and improve the segmentation accuracy.
[0077] FIG3 shows a flowchart of acquiring an initial image of a single vertebra according to an exemplary embodiment of the present application.
[0078] As shown in FIG3 , in step S131 , a first spinal column image in an image coordinate system is acquired.
[0079] For example, in step S131 , a morphologically expanded spinal column image is obtained, and the morphologically expanded spinal column image in the body coordinate system is converted into a first spinal column image in the image coordinate system.
[0080] In step S132, the boundary information of a single vertebra is determined based on the first vertebral column boundary information and the first vertebral column position information.
[0081] For example, in step S132, the boundary information of the morphologically expanded spinal column image (ie, the first spinal column boundary information) and the position information of the single vertebra in the spinal column (ie, the first spinal column position information) are obtained, and the boundary information of each single vertebra is determined accordingly.
[0082] In a specific embodiment of the present application, after obtaining the morphologically expanded spinal image through the first network model, the first spinal boundary information corresponding to the morphologically expanded spinal image is obtained, including the upper boundary top and the lower boundary bottom of the spine in the z-axis direction.
[0083] After obtaining the first vertebra position information through the second network model, the boundary information of the single vertebra in the x-axis, y-axis and z-axis directions is determined based on the first vertebra position information and the obtained first vertebra boundary information, wherein the boundaries of the single vertebra in the x-axis and y-axis directions are consistent with the boundaries of the morphologically expanded spinal image in the x-axis and y-axis directions.
[0084] According to some embodiments, the first vertebra position information is obtained by the second network model, and each single vertebra in the spine is sorted along the z-axis direction, and the sorting result is recorded as order.
[0085] According to some embodiments, the upper boundary top and the lower boundary bottom in the z-axis direction of the first spinal column boundary information are obtained. If the single vertebra is the first in the sorting result, the corresponding z-axis coordinate range is [bottom, order[i+1].z]; if the single vertebra is the last in the sorting result, the corresponding z-axis coordinate range is [order[i-1].z, top]; if the single vertebra is any one except the first and last in the sorting result, the corresponding z-axis coordinate range is [order[i-1], order[i+1].z]. Among them, order[i].z represents the z-axis coordinate of the i-th single vertebra corresponding to the sorting result.
[0086] Determine the z-axis coordinate range of a single vertebra according to the sorting results [curmin z , curmax z ], that is, the boundary information of a single spine in the z-axis direction.
[0087] In step S133, an initial image of the single vertebral segment is obtained from the first spinal column image according to the boundary information of the single vertebral segment.
[0088] For example, in step S133, based on the boundary information of the single vertebra, the initial image of each single vertebra is captured from the first spinal image, wherein the boundaries of the initial image of the single vertebra in the x-axis direction and the y-axis direction are consistent with the boundaries of the first spinal image in the x-axis direction and the y-axis direction.
[0089] FIG4 shows a flowchart of acquiring an updated image of a single vertebra according to an exemplary embodiment of the present application.
[0090] As shown in FIG4 , in step S141 , the position information of the single vertebra in the initial image of the single vertebra is updated according to the second vertebral column boundary information.
[0091] For example, in step S141, the spine boundary information in the initial image of the single spine, ie, the second spine boundary information, is obtained, and the position information of each single spine in the initial image of the single spine is updated according to the second spine boundary information.
[0092] In a specific embodiment of the present application, the second spinal column boundary information is determined based on an initial image of a single vertebral segment.
[0093] According to some embodiments, the spine boundary information in the initial image of a single spine section may be obtained through the numpy.where() method of the numpy scientific computing library.
[0094] The position information of each single vertebra in the initial image of the single vertebra is updated using the second vertebral column boundary information.
[0095] In step S142, the position of the single vertebral segment in the initial image of the single vertebral segment is marked according to the updated position information of the single vertebral segment, so as to obtain a position-marked image of the single vertebral segment in the body coordinate system.
[0096] For example, in step S142, the position of the individual vertebral segments in the initial image of the individual vertebral segments is marked based on the updated position information of the individual vertebral segments, and the position marks of the individual vertebral segments are obtained. The initial image of the individual vertebral segments including the position marks of the individual vertebral segments is subjected to coordinate system transformation to convert it into an image of the individual vertebral segments with position marks in the body coordinate system.
[0097] In a specific embodiment of the present application, a position mark of the single vertebral segment in the initial image of the single vertebral segment is obtained based on the updated position information of the single vertebral segment.
[0098] According to some embodiments, a zero-pixel map is first generated that has the same size as the initial image of the individual vertebrae in the image coordinate system. Based on the updated position information of the individual vertebrae, each individual vertebrae is marked in the zero-pixel map to obtain a position-marked image of the individual vertebrae in the image coordinate system.
[0099] According to some embodiments, the point corresponding to the updated position coordinates of a single vertebra can be used as the center of a sphere. A small sphere with a radius within a preset numerical range (which can be adjusted according to actual needs, for example, the preset numerical range is [1, 7]) is set to replace the point corresponding to the position coordinates of the single vertebra in the zero-pixel image. This serves as the position marker of each single vertebra in the zero-pixel image, and the pixel label value of the small sphere is set to 1. The initial image of the single vertebra is superimposed with the zero-pixel image that has marked the position of the single vertebra to obtain the position marker of the single vertebra in the initial image of the single vertebra.
[0100] The initial image of the single vertebra containing the position mark of the single vertebra is converted into an image of the position mark of the single vertebra in body coordinates.
[0101] In step S143, an updated image of the single vertebral segment is generated based on the initial image of the single vertebral segment and the position-marked image of the single vertebral segment in the body coordinate system.
[0102] For example, in step S143, the initial image of the single vertebral segment is converted into an initial image of the single vertebral segment in body coordinates. The initial image of the single vertebral segment in body coordinates and the position-marked image of the single vertebral segment in body coordinates are superimposed and input into the set third network model, and an updated image of the single vertebral segment is obtained using the third network model.
[0103] In a specific embodiment of the present application, a third network model is constructed, and the obtained initial image of the single vertebral segment is converted into an initial image of the single vertebral segment in a body coordinate system.
[0104] The initial image of a single vertebra in the body coordinate system and the position mark image of the single vertebra in the body coordinate system are superimposed and input into the third network model in a preset order, and the updated image of the single vertebra is obtained through the third network model in the preset order when the data is input.
[0105] According to some embodiments, the updated image of a single vertebra includes a position mark of each single vertebra, and the position mark of each single vertebra includes a corresponding pixel label value.
[0106] FIG5 shows a training flowchart of a first network model according to an exemplary embodiment of the present application.
[0107] As shown in FIG5 , in step S210 , a first data set is acquired.
[0108] For example, in step S210, a first data set is obtained from a public data set according to preset specifications for training a first network model.
[0109] In a specific embodiment of the present application, a first data set is obtained from a public data set, and the first data set includes multiple categories of spinal CT images and standard position information of each single vertebra in the spinal CT images, wherein the standard position information of each single vertebra is the position information in the image coordinate system.
[0110] According to some embodiments, the preset size for acquiring a spinal CT image may be 512*512*N, where N represents the number of layers of CT image data, and 512*512 represents the size of each layer of CT image data.
[0111] According to some embodiments, the multiple categories of spinal CT images included in the first data set correspond to spinal CT images from the cervical vertebrae to the sacral vertebrae that include complete ribs; spinal CT images that include complete ribs, partial thoracic vertebrae and partial lumbar vertebrae, but do not include the sacral vertebrae; and spinal CT images that include complete sacral vertebrae, partial thoracic vertebrae and partial lumbar vertebrae, but do not include ribs.
[0112] According to some embodiments, to avoid classification errors of the spine and sacrum caused by lumbarization of the sacrum, the first dataset further includes spinal CT images from the cervical vertebrae to the sacrum containing complete ribs and including sacral vertebrae that have been transformed into lumbar morphology.
[0113] In step S220, a first network model is trained using a first data set.
[0114] For example, in step S220, a first network model is set, and the first network model is trained using the obtained first data set.
[0115] In a specific embodiment of the present application, after constructing the first network model, the spinal CT images in the first dataset are input into the first network model, and the first network model is used to obtain segmentation results for the spine, sacrum, and ribs in the spinal CT images. The segmentation results for the spine, sacrum, and ribs in the spinal CT images can be seen in the spine, sacrum, and rib segmentation renderings shown in FIG6 .
[0116] According to some embodiments, the first network model may adopt a nnUNet neural network model.
[0117] FIG7 shows a training flowchart of a second network model according to an exemplary embodiment of the present application.
[0118] As shown in FIG7 , in step S310 , a second data set is acquired.
[0119] For example, in step S310, a second data set is obtained from a public data set according to preset specifications for training a second network model.
[0120] In a specific embodiment of the present application, a second data set is obtained from a public data set, and the second data set includes multiple categories of spinal CT images and standard position information of each single vertebra in the spinal CT images, wherein the standard position information of each single vertebra is the position information in the image coordinate system.
[0121] According to some embodiments, the preset size for acquiring a spinal CT image may be 512*512*N, where N represents the number of layers of CT image data, and 512*512 represents the size of each layer of CT image data.
[0122] According to some embodiments, the multiple categories of spinal CT images included in the second data set correspond to a complete spinal CT image from the cervical vertebra to the sacral vertebra; a spinal CT image containing part of the cervical vertebra and part of the thoracic vertebra; a spinal CT image containing part of the thoracic vertebra and part of the lumbar vertebra; and a spinal CT image containing part of the thoracic vertebra and the complete lumbar vertebra.
[0123] In step S320, a label of the second network model is obtained according to the second data set.
[0124] For example, in step S320, the spinal CT images in the second dataset are converted into spinal images in an image coordinate system. Each vertebral segment in the spinal images in the image coordinate system is labeled based on the standard position information of each vertebral segment. Labels for the second network model are generated based on the spinal images with each vertebral segment labeled.
[0125] In a specific embodiment of the present application, the spinal CT image in the second data set in the body coordinate system is converted into a spinal image in the image coordinate system.
[0126] According to some embodiments, mutual conversion between the body coordinate system and the image coordinate system can be achieved by calling an application program interface of corresponding software, such as the Python runtime library SimpleITK.
[0127] Furthermore, a zero-pixel image is generated with the same size as the spine image in the image coordinate system.
[0128] The position of each single vertebra in the spine is marked in the zero-pixel map according to the standard position information of each single vertebra.
[0129] According to some embodiments, the point corresponding to the standard position coordinates of each single vertebra can be used as the center of the sphere, and a small ball with a radius within a preset numerical range (which can be adjusted according to actual needs, for example, the preset numerical range is [1,7]) can be rendered to replace the point corresponding to the position coordinates of the single vertebra in the zero-pixel image as the position mark of each single vertebra in the zero-pixel image, and the pixel label value of the small ball is set to 1.
[0130] The spinal column image in the image coordinate system is superimposed with the zero-pixel map that has marked the position of each single vertebra in the spine, so as to obtain a position marking map of each single vertebra in the spine in the image coordinate system.
[0131] The position label map of each single vertebra of the spine in the image coordinate system is converted into the position label map of each single vertebra of the spine in the body coordinate system, and the map is used as the label of the second network model.
[0132] In step S330 , the second network model is trained according to the second data set and the label of the second network model.
[0133] For example, in step S330, a second network model is set, and the second network model is trained using the second data set and the label of the second network model.
[0134] In a specific embodiment of the present application, after setting up the second network model, the spinal CT images in the second data set are input into the second network model, and the labeled image of each individual vertebra in the body coordinate system is used as a label. The second network model then outputs the position information of each individual vertebra in the spinal CT images. The position of each individual vertebra in the spinal CT images can be seen in the rendering of the position information of the individual vertebra in the spine, as shown in FIG8 .
[0135] FIG9 shows a training flowchart of a third network model according to an exemplary embodiment of the present application.
[0136] As shown in FIG9 , in step S410 , a third data set is acquired.
[0137] For example, in step S410, a third data set is obtained from a public data set according to preset specifications for training a third network model.
[0138] In a specific embodiment of the present application, a third data set is obtained from a public data set, and the third data set includes multi-category spinal CT images, standard position information of each single vertebra in the spinal CT image, and segmentation label information of each spinal segment in the spinal CT image, wherein the standard position information of each single vertebra and the segmentation label information of each spinal segment in the spinal CT image are position information in the image coordinate system.
[0139] According to some embodiments, the multiple categories of spinal CT images included in the third dataset correspond to spinal CT images of each segment of the complete cervical spine; spinal CT images of each segment of the complete thoracic spine; and spinal CT images of each segment of the complete cervical spine.
[0140] In step S420, a label of the third network model is obtained according to the third data set.
[0141] For example, in step S420, the spinal CT images in the third dataset are converted into spinal images in an image coordinate system. Based on the segmentation label information for each spinal segment, the spinal images in the image coordinate system are segmented to obtain images of each individual vertebral segment. Each individual vertebral segment image is pixel-processed, and the pixel-processed individual vertebral segment image is used as a label for the third network model.
[0142] In a specific embodiment of the present application, after the spinal CT image in the third data set is converted into a spinal image in an image coordinate system, the position information of each single vertebra in the spinal image in the image coordinate system is obtained based on the segmentation label information of each spinal segment.
[0143] According to some embodiments, the position information of each single vertebra in the spinal image in the image coordinate system can be obtained by the numpy.where() method of the numpy scientific computing library. The position coordinates of the single vertebra can be obtained as follows: position = [[min_z, max_z], [min_y, max_y], [min_x, max_x]]
[0144] Among them, min represents the minimum position coordinate of a single vertebra, and max represents the maximum position coordinate of a single vertebra.
[0145] According to the position information of each single vertebra, an image of each single vertebra is obtained in an image coordinate system.
[0146] The pixel values of the areas other than the spine area in the image of each single vertebra in the image coordinate system are set to zero, and the image processed with zero pixel values is superimposed with the image of each single vertebra in the image coordinate system to generate a label map of the single vertebra in the image coordinate system.
[0147] The label map of a single vertebra in the image coordinate system is converted into a label map of a single vertebra in the body coordinate system, and used as the label of the third network model.
[0148] In step S430 , the third network model is trained according to the third data set and the label of the third network model.
[0149] For example, in step S430, a third network model is set, and the third network model is trained using a third data set and a label of the third network model.
[0150] In a specific embodiment of the present application, the image of each single vertebra in the image coordinate system obtained in step S420 is converted into the image of each single vertebra in the body coordinate system, which is used as input data of the third network model.
[0151] According to some embodiments, the voxel spacing and direction of the image of the single vertebra in the body coordinate system are consistent with the voxel spacing and direction of the spinal column CT image in the third dataset.
[0152] First, calculate the image size of a single vertebra in the body coordinate system. Multiply the size of the image of a single vertebra in each dimension in the image coordinate system by the voxel spacing of the spinal CT image in the third dataset to obtain the image size of a single vertebra in the body coordinate system. The calculated result is recorded as new size .
[0153] According to the image size of a single vertebra in the body coordinate system, the position of the image center point of the single vertebra in the body coordinate system is calculated by the following formula. The image center point of the single vertebra in the body coordinate system is marked as origin, origin[i]=direction[i][0]*new size[0] +direction[i][1]*new size[1] +direction[i][2]*new size[2]
[0154] Wherein, i=1, 2, 3, and direction is the direction of the spinal CT image in the third data set.
[0155] Based on the obtained voxel spacing and orientation, as well as the calculated image center point position, the image of each individual vertebra in the image coordinate system is converted into an image of each individual vertebra in the body coordinate system. The image of each individual vertebra in the body coordinate system can be seen in the schematic diagram of a single vertebra in the body coordinate system, as shown in Figure 10.
[0156] Based on the standard position information of each single vertebra, the position information of each single vertebra in the image of each single vertebra in the image coordinate system is updated.
[0157] According to some embodiments, the standard position information of a single vertebra in the third data set is recorded as spine_pos(x, y, z), and the position information of the single vertebra in the updated image of the single vertebra is recorded as spine_pos(x1, y1, z1). The position information of the single vertebra in the updated image of the single vertebra is calculated by the following formula:
[0158] Among them, min represents the minimum position coordinate of a single vertebra, and max represents the maximum position coordinate of a single vertebra.
[0159] Generate a zero-pixel map of the same size as the image of each single vertebra in the image coordinate system.
[0160] According to the updated position information of the single vertebra, the position of each single vertebra is marked in the zero pixel image to obtain a position marked image of the single vertebra in the image coordinate system.
[0161] According to some embodiments, the point corresponding to the updated position coordinates of a single vertebra can be used as the center of a sphere, and a small sphere with a radius within a preset numerical range (which can be adjusted according to actual needs, for example, the preset numerical range is [1, 7]) can be rendered to replace the point corresponding to the position coordinates of the single vertebra in the zero-pixel image. This serves as the position marker of each single vertebra in the zero-pixel image, and the pixel label value of the small sphere is set to 1. The image of each single vertebra in the image coordinate system is superimposed with the zero-pixel image that has marked the position of the single vertebra to obtain an image of the position marker of the single vertebra in the image coordinate system.
[0162] The position-marked image of a single vertebra in the image coordinate system is converted into the position-marked image of a single vertebra in the body coordinate system, and this is used as another input data of the third network model.
[0163] The image of each single vertebra in the body coordinate system and the position mark image of the single vertebra in the body coordinate system are superimposed and input into the third network model, and the third network model is trained according to the label of the third network model.
[0164] FIG11 shows a block diagram of a single vertebral segment segmentation apparatus according to an exemplary embodiment of the present application.
[0165] As shown in FIG. 11 , the segmentation device 500 includes a data acquisition module 510 , a data processing module 520 and a data output module 530 .
[0166] The data acquisition module 510 is used to acquire original CT images.
[0167] According to some embodiments, the data acquisition module 510 is further used to acquire a first data set for training a first network model, a second data set for training a second network model, and a third data set for training a third network model from a public data set.
[0168] The data processing module 520 constructs a first network model and trains the first network model.
[0169] The data processing module 520 obtains the segmentation results of the spine, sacrum and ribs in the original CT image through the first network model, and performs morphological expansion on the spine in the segmented image of the original CT image according to the segmentation results to obtain a morphologically expanded spine image and first spine boundary information corresponding to the morphologically expanded spine image.
[0170] The data processing module 520 constructs a second network model and trains the second network model.
[0171] The data processing module 520 obtains the position information of a single vertebra in the spine in the original CT image through the second network model, that is, the first vertebra position information.
[0172] Based on the first spine boundary information and the first spine position information, the data processing module 520 determines the boundary information of a single vertebral segment, and based on the boundary information of the single vertebral segment, obtains the initial image of the single vertebral segment from the first spine image in the image coordinate system obtained by transforming the morphologically expanded spine image.
[0173] After determining the second vertebral column boundary information corresponding to the initial image of the single vertebra, the data processing module 520 updates the position information of the single vertebra in the initial image of the single vertebra, and thereby obtains the position mark of the single vertebra in the initial image of the single vertebra.
[0174] The data processing module 520 converts the initial image of the single vertebra including the position mark of the single vertebra into the position mark image of the single vertebra in the body coordinate system, and converts the initial image of the single vertebra into the initial image of the single vertebra in the body coordinate system.
[0175] The data processing module 520 constructs a third network model and trains the third network model.
[0176] The data processing module 520 superimposes the initial image of the single vertebral segment in the body coordinate system and the position-marked image of the single vertebral segment in the body coordinate system in a predetermined order and inputs the superimposed image into the third network model. The updated image of the single vertebral segment is obtained through the third network model. Furthermore, the data processing module 520 converts the updated image of the single vertebral segment in the body coordinate system obtained through the third network model into an updated image of the single vertebral segment in the image coordinate system.
[0177] The data processing module 520 converts the original CT image into an original image in an image coordinate system, and determines each single vertebra in the original image and marks it in a preset order according to the updated image of the single vertebra in the image coordinate system.
[0178] The data output module 530 outputs the original image of each determined single vertebra as a restored image corresponding to the original CT image.
[0179] FIG12 shows a block diagram of an electronic device according to an exemplary embodiment of the present application.
[0180] As shown in FIG12 , the electronic device 600 is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0181] As shown in Figure 12, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc. Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 performs the method described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 610 can perform the method shown in Figure 1.
[0182] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0183] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0184] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0185] The electronic device 600 can also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 650. Furthermore, the electronic device 600 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0186] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. The technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal or a network device, etc.) to execute the method according to the embodiment of the present application.
[0187] The software product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0188] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0189] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0190] The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the computer-readable medium implements the aforementioned functions.
[0191] Those skilled in the art will appreciate that the modules described above can be distributed in the device according to the description of the embodiment, or can be modified accordingly to be used in one or more devices that are different from the embodiment. The modules of the above embodiment can be combined into one module or further divided into multiple submodules.
[0192] According to some embodiments of the present application, the technical solution of the present application can perform single-segment segmentation of the spine through a convolutional network model while ensuring speed and accuracy, so as to obtain an image of a single vertebra corresponding to the spine, thereby improving the accuracy of spinal segmentation.
[0193] The above embodiments of the present application are described in detail. The description of the above embodiments is only intended to help understand the method and core concept of the present application. At the same time, changes or modifications made by those skilled in the art based on the concept of the present application, the specific implementation methods and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be understood as limiting the present application.
Claims
1. A method for segmenting a single spine, characterized in that: include: Acquire first spine boundary information, where the first spine boundary information is spine boundary information in a segmentation result obtained after the original CT image is segmented; Acquire first vertebra position information, where the first vertebra position information is position information of a single vertebra in the spine in the original CT image; Acquire an initial image of a single spine according to the first spine boundary information and the first spine position information; Marking the position of the single vertebra in the initial image of the single vertebra to generate an updated image of the single vertebra; The single vertebral segment in the restored image corresponding to the original CT image is determined according to the updated image of the single vertebral segment.
2. The method according to claim 1, characterized in that: Get the first spine boundary information, including: Constructing a first network model; Acquire the segmentation results of the spine, sacrum and ribs in the original CT image through the first network model to obtain a segmented image of the original CT image; Performing morphological expansion on the spine in the segmented image to obtain the morphologically expanded spine image; converting the morphologically expanded spine image into a first spine image in an image coordinate system; The first spine boundary information corresponding to the first spine image is obtained.
3. The method according to claim 1, characterized in that Get the first vertebra position information, including: constructing a second network model; The first spine position information is acquired from the original CT image through the second network model.
4. The method according to claim 2, characterized in that: Acquiring an initial image of a single spine according to the first spine boundary information and the first spine position information, including: Determining boundary information of a single vertebra according to the first vertebra boundary information and the first vertebra position information; According to the boundary information of the single vertebra, an initial image of the single vertebra is acquired from the first spinal column image.
5. The method according to claim 4, characterized in that Marking the position of the single vertebra in the initial image of the single vertebra to generate an updated image of the single vertebra, including: Determine second spine boundary information, where the second spine boundary information is spine boundary information in the initial image of the single vertebra; updating the position information of the single vertebra in the initial image of the single vertebra according to the second vertebra boundary information; Acquire a position mark of the single vertebra in the initial image of the single vertebra according to the updated position information of the single vertebra; Converting the initial image of the single vertebral segment including the position mark of the single vertebral segment into a position mark image of the single vertebral segment in a body coordinate system; An updated image of the single vertebral section is generated according to the initial image of the single vertebral section and the position-marked image of the single vertebral section.
6. The method according to claim 5, characterized in that Generating an updated image of the single vertebra according to the initial image of the single vertebra and the position mark image of the single vertebra, comprising: Constructing the third network model; Converting the initial image of the single vertebra into an initial image of the single vertebra in a body coordinate system; Inputting the initial image of the single vertebral segment in the body coordinate system and the position mark image of the single vertebral segment into the third network model in a preset order; The update graph of the single vertebra is obtained by the third network model in the preset order. picture; The updated image of the single vertebral section is converted into an updated image of the single vertebral section in an image coordinate system.
7. The method according to claim 6, characterized in that Determining the single vertebra in the restored image corresponding to the original CT image according to the updated image of the single vertebra includes: Converting the original CT image into an original image in an image coordinate system; Obtaining a zero-pixel image corresponding to the original image; According to the updated image of the single vertebra in the image coordinate system, marking the single vertebra in the zero pixel image in the preset order; Acquire the position mark of the single vertebra in the original image according to the zero pixel map corresponding to the original image of the marked single vertebra; According to the updated image of the single vertebra in the image coordinate system, updating the boundary information of the single vertebra in the original image in which the single vertebra has been marked, so as to determine the single vertebra in the original image; The original image of the determined single vertebra is determined as the restored image.
8. A single-segment vertebral segmentation device, characterized in that: include: A data acquisition module, which acquires the original CT image; The data processing module sets a first network model, a second network model and a third network model; obtains the segmentation results of the spine, sacrum and ribs from the original CT image through the first network model; obtains the first spine boundary information according to the segmentation results; obtains the first spine position information from the original CT image through the second network model; obtains the initial image of a single spine according to the first spine boundary information and the first spine position information; Marking the position of a single vertebra in the initial image of the single vertebra; generating an updated image of the single vertebra through the third network model according to the initial image of the single vertebra and the image of the position mark of the single vertebra; determining the single vertebra in the restored image in the image coordinate system corresponding to the original CT image according to the updated image of the single vertebra; The data output module outputs the restored image after determining a single vertebra.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Active contour model-based automatic positioning and segmentation method of spinal CT image
CN108230301A
Spine image processing method based on artificial intelligence and related device
CN110599508A
Spine segmentation method in medical image
CN113643314A
Vertebra numbering method and device, electronic device and storage medium
CN114998297A
Vertebral body positioning method and device, electronic equipment and storage medium
CN115439453A
