Femoral head center determination method, device, terminal device and readable storage medium
By using pre-trained image segmentation models and feature processing technology, the three-dimensional coordinates of the femoral head center are automatically determined, solving the error problem caused by manual drawing, improving accuracy and efficiency, and ensuring the reliability of the medical process.
Patent Information
- Application Number
- CN202111202471.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-15
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-10-15
AI Technical Summary
In the process of diagnosis and treatment of lower limb alignment, there are large errors in the manual drawing of the center of the femoral head, and the experience of the drawing personnel is greatly affected, resulting in low accuracy. Especially when the drawing personnel are away from work, the center of the femoral head may not be determined. causing medical malpractice.
Use the pre-trained image segmentation model to segment multiple images including the femoral head, randomly select the three-dimensional coordinates of the pixel points, calculate the three-dimensional coordinates of the femoral head center, and use the image segmentation model and feature processing unit to perform fusion and upsampling. Determine the coordinates of the center of the femoral head.
It realizes the automatic determination of the center of the femoral head, improves the determination efficiency and accuracy, reduces human errors, and ensures that the coordinates of the center of the femoral head can be accurately obtained at any time.
Smart Images

Figure CN113870247B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, an apparatus, a terminal device and a readable storage medium for determining the center of a femoral head. Background Art
[0002] In medical treatment, lower limb alignment plays an extremely important guiding role in the diagnosis, treatment, prognosis and rehabilitation of knee osteoarthritis, and the use time of the prosthesis after total knee replacement is closely related to the lower limb alignment. Therefore, lower limb alignment plays an increasingly important role in the diagnosis and treatment of knee osteoarthritis.
[0003] The force line of the lower limb is the line connecting the center of the femoral head, the center of the knee joint and the center of the ankle joint. The center of the knee joint can be obtained by the midpoint of the line connecting the medial and lateral condyles, and the center of the ankle joint can be obtained by the midpoint of the line connecting the medial and lateral malleolus. The center of the femoral head is generally drawn manually by medical personnel. The accuracy of the femoral head center is positively correlated with the experience of the drawer. It may be affected by the subjective influence of the drawer, resulting in a large error in the manually drawn femoral head center. Or, when the drawer is off duty, the femoral head center cannot be determined, resulting in a medical accident. Summary of the invention
[0004] In view of the above problems, the present application proposes a method, apparatus, terminal device and readable storage medium for determining the center of the femoral head, so as to realize automatic determination of the center of the femoral head and improve determination efficiency and accuracy.
[0005] The present application embodiment provides a method for determining the center of a femoral head, the method comprising:
[0006] Segmenting a plurality of images including the femoral head using a pre-trained image segmentation model to obtain a plurality of standard images;
[0007] Randomly selecting three-dimensional coordinates of a plurality of pixel points from each standard image, wherein the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head;
[0008] The three-dimensional coordinates corresponding to the center of the femoral head are calculated based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points.
[0009] The method for determining the center of the femoral head described in the embodiment of the present application, wherein the three-dimensional coordinates corresponding to the center of the femoral head are calculated based on the total number of three-dimensional coordinates of all pixels corresponding to all standard images and the three-dimensional coordinates of all pixels, comprises:
[0010] If the total number is less than a preset number threshold, the three-dimensional coordinates of all the pixel points are divided into multiple groups, and there are no identical three-dimensional coordinates in each group;
[0011] Determine the predicted coordinates of the i-th center using the three-dimensional coordinates in the i-th group, 1≤i≤I, where I is the total number of groups;
[0012] The average values in the directions of each coordinate axis are calculated using I center prediction coordinates, so as to determine the three-dimensional coordinates corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
[0013] The method for determining the center of the femoral head described in the embodiment of the present application, wherein the three-dimensional coordinates corresponding to the center of the femoral head are calculated based on the total number of three-dimensional coordinates of all pixels corresponding to all standard images and the three-dimensional coordinates of all pixels, comprises:
[0014] If the total number is greater than or equal to a preset number threshold, randomly selecting a predetermined number of three-dimensional coordinates from the three-dimensional coordinates of all the pixel points, and using the predetermined number of three-dimensional coordinates to determine the central prediction coordinates;
[0015] Repeating M times to randomly select a predetermined number of three-dimensional coordinates from the three-dimensional coordinates of all the pixel points, and using the predetermined number of three-dimensional coordinates to determine the central prediction coordinates;
[0016] The M center prediction coordinates are used to calculate the average values in the directions of each coordinate axis, so as to determine the center coordinate corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
[0017] The method for determining the center of the femoral head described in the embodiment of the present application, the image segmentation model includes an input module, a first upsampling module, a second upsampling module, a third upsampling module, a fourth upsampling module, a first add fusion module, a second add fusion module, a third add fusion module, a fourth add fusion module, a first concat fusion module, a second concat fusion module, a third concat fusion module, a fourth concat fusion module, a fifth concat fusion module, a sixth concat fusion module and an output module;
[0018] The first add fusion module is used to fuse the information output by the input module and the first information output by the first up-sampling module;
[0019] The second add fusion module is used to fuse the information output by the first add fusion module and the information output by the first concat fusion module;
[0020] The third add fusion module is used to fuse the information output by the second add fusion module and the information output by the second concat fusion module;
[0021] The fourth add fusion module is used to fuse the information output by the third add fusion module and the information output by the third concat fusion module;
[0022] The first concat fusion module is used to fuse the second information output by the first upsampling module and the first information output by the second upsampling module;
[0023] The second concat fusion module is used to fuse the information output by the first concat fusion module and the information output by the fourth concat fusion module;
[0024] The third concat fusion module is used to fuse the information output by the second concat fusion module and the information output by the fifth concat fusion module;
[0025] The fourth concat fusion module is used to fuse the second information output by the second up-sampling module and the first information output by the third up-sampling module;
[0026] The fifth concat fusion module is used to fuse the information output by the fourth concat fusion module and the information output by the sixth concat fusion module;
[0027] The sixth concat fusion module is used to fuse the second information output by the third up-sampling module and the first information output by the fourth up-sampling module;
[0028] The output module receives the information output by the fourth add fusion module and outputs the segmentation result.
[0029] The femoral head center determination method described in the embodiment of the present application, the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module all include a maximum pooling unit, a first feature processing unit and a second feature processing unit, and the input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module passes through the maximum pooling unit, the first feature processing unit and the second feature processing unit, and then outputs the first information;
[0030] The input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module is passed through a maximum pooling unit and a first feature processing unit, and then outputs second information.
[0031] The method for determining the center of the femoral head described in the embodiment of the present application, the first add fusion module, the second add fusion module, the third add fusion module, the fourth add fusion module, the first concat fusion module, the second concat fusion module, the third concat fusion module, the fourth concat fusion module, the fifth concat fusion module and the sixth concat fusion module all include a third feature processing unit, and the third feature processing unit is used to perform two downsampling operations.
[0032] The method for determining the center of the femoral head described in the embodiment of the present application further includes labeling the training sample sequence used to train the image segmentation model using the following method:
[0033] Determining a starting sample image and an ending sample image of the training sample sequence;
[0034] A predetermined number of random sample images are randomly selected from between the starting sample image and the ending sample image to be used for manually marking the femoral head region in the predetermined number of random sample images, wherein each randomly marked sample is not adjacent to each other;
[0035] Acquire the predetermined number of random sample images after manual annotation;
[0036] Using a target tracking method, the samples between the starting sample image and the first random sample image, the samples between the i-th random sample image and the i+1-th random sample image, and the samples between the i-th random sample image and the ending sample image are automatically labeled in sequence, 2≤i≤I-1;
[0037] The automatically labeled samples are displayed in sequence to correct the samples that are not labeled properly.
[0038] The present application also provides a device for determining the center of a femoral head, the device comprising:
[0039] A segmentation module, used for performing segmentation processing on a plurality of images including the femoral head by using a pre-trained image segmentation model to obtain a plurality of standard images;
[0040] A selection module, used for randomly selecting three-dimensional coordinates of a plurality of pixel points from each standard image, wherein the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head;
[0041] A calculation module is used to calculate the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points.
[0042] An embodiment of the present application further proposes a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the method for determining the center of the femoral head described in the embodiment of the present application is executed.
[0043] An embodiment of the present application further proposes a readable storage medium storing a computer program, which, when running on a processor, executes the method for determining the center of the femoral head described in the embodiment of the present application.
[0044] The present application uses a pre-trained image segmentation model to segment multiple images including the femoral head to obtain multiple standard images; randomly selects the three-dimensional coordinates of multiple pixel points from each standard image, and the three-dimensional coordinates of the multiple pixel points are all located on the femoral head; and calculates the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points. The center of the femoral head can be automatically determined, and the result of the automatic determination is more accurate and the automatic determination speed is faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0046] Figure 1 A schematic diagram of a process for determining the center of a femoral head proposed in an embodiment of the present application is shown;
[0047] Figure 2 A schematic diagram of the structure of an image segmentation model proposed in an embodiment of the present application is shown;
[0048] Figure 3 A schematic flow chart of a femoral head center calculation process in a femoral head center determination method proposed in an embodiment of the present application is shown;
[0049] Figure 4 A schematic flow chart of another femoral head center calculation process in a femoral head center determination method proposed in an embodiment of the present application is shown;
[0050] Figure 5 A schematic diagram of a process of labeling training samples proposed in an embodiment of the present application is shown;
[0051] Figure 6 A schematic structural diagram of a femoral head center determination device proposed in an embodiment of the present application is shown.
[0052] Description of main component symbols:
[0053] 100-input module; 110-first upsampling module; 120-second upsampling module; 130-third upsampling module; 140-fourth upsampling module; 210-first add fusion module; 220-second add fusion module; 230-third add fusion module; 240-fourth add fusion module; 310-first concat fusion module; 320-second concat fusion module; 330-third concat fusion module; 340-fourth concat fusion module; 350-fifth concat fusion module; 360-sixth concat fusion module; 400-output module;
[0054] 10-femoral head center determination device; 11-segmentation module; 12-selection module; 13-calculation module. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0056] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0057] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0058] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0059] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0060] Example 1
[0061] See also Figure 1 In one embodiment of the present application, a method for determining the center of a femoral head is provided, the method comprising the following steps S100 to S300:
[0062] Step S100, segmenting a plurality of images including the femoral head using a pre-trained image segmentation model to obtain a plurality of standard images.
[0063] Among them, the image segmentation model can be a neural network such as Unet network, Unet++ network, etc. By pre-training the image segmentation model, the image segmentation model can segment the image including the femoral head, that is, the femoral head area and the background area other than the femoral head are segmented from the image to obtain a standard image.
[0064] For example, see Figure 2 In this embodiment, the image segmentation model includes an input module 100, a first upsampling module 110, a second upsampling module 120, a third upsampling module 130, a fourth upsampling module 140, a first add fusion module 210, a second add fusion module 220, a third add fusion module 230, a fourth add fusion module 240, a first concat fusion module 310, a second concat fusion module 320, a third concat fusion module 330, a fourth concat fusion module 340, a fifth concat fusion module 350, a sixth concat fusion module 360 and an output module 400.
[0065] The first add fusion module 210 is used to fuse the information output by the input module 100 and the first information output by the first up-sampling module 110; the second add fusion module 220 is used to fuse the information output by the first add fusion module 210 and the information output by the first concat fusion module 310; the third add fusion module 230 is used to fuse the information output by the second add fusion module 220 and the information output by the second concat fusion module 320; the fourth add fusion module 240 is used to fuse the information output by the third add fusion module 230 and the information output by the third concat fusion module 330; the first concat fusion module 310 is used to fuse the second information output by the first up-sampling module 110 and the first information output by the second up-sampling module 120; the second concat fusion module 320 is used to fuse the first concat fusion The information output by the up-sampling module 310 and the information output by the fourth concat fusion module 340; the third concat fusion module 330 is used to fuse the information output by the second concat fusion module 320 and the information output by the fifth concat fusion module 350; the fourth concat fusion module 340 is used to fuse the second information output by the second up-sampling module 120 and the first information output by the third up-sampling module 130; the fifth concat fusion module 350 is used to fuse the information output by the fourth concat fusion module 340 and the information output by the sixth concat fusion module 360; the sixth concat fusion module 360 is used to fuse the second information output by the third up-sampling module 130 and the first information output by the fourth up-sampling module 140; the output module 400 receives the information output by the fourth add fusion module 240, and outputs the segmentation result.
[0066] exist Figure 2 In the figure, "1" represents the first feature processing unit, which is used to perform convolution operation, batch normalization operation and activation operation in sequence, "2" represents the first feature fusion unit, which is used to fuse features through add operation, "3" represents the third feature processing unit, which is used to perform two downsampling operations, each downsampling operation includes a convolution operation, a batch normalization operation and a dropout operation, "4" represents the output unit, which is used to perform convolution operation and sigmoid operation in sequence, "5" represents the maximum pooling unit, which is used to perform maximum pooling operation, "6" represents the second feature processing unit, which is used to perform upsampling operation, batch normalization operation and activation operation in sequence, and "7" represents the second feature fusion unit, which fuses features through concat operation.
[0067] It can be understood that the image segmentation model can perform two convolutions, batch normalization operations, and activation on the input image including the femoral head, and then output c1 with a channel number of 32. Then, a maximum pooling with a step size of 2 is performed, and the output result is p1. Four downsamplings are performed continuously, and the last time no maximum pooling is performed. The output results are c2, p2, c3, p3, c4, p4, c5, and the channel numbers are 64, 128, 256, and 512, respectively. Then upsampling is performed. First, c2 is upsampled to 32 channels, and the output result is up1_2, and then add operation is performed with c1, and then two sets of convolution activation and dropout are performed to output conv1_2, and then c3 is upsampled to 64 channels, and the output result is u p2_2, then concat with c2, then perform two sets of convolution activation and dropout to output conv2_2, then upsample conv2_2 to 32 channels, and output up1_3, then perform add with c1 and conv1_2, then perform two sets of convolution activation and dropout to output conv1_3, then upsample c4 to 128 channels, and output up3_2, then concat with c3, then perform two sets of convolution activation and dropout to output conv3_2, then upsample conv3_2 to 64 channels, and output up2_3, then perform c2 and conv2_2 oncat, then perform two sets of convolution activation and dropout to output conv2_3, then upsample conv2_3 to 32 channels, and the output is up1_4, then perform add operation with c1, conv1_2, and conv1_3, then perform two sets of convolution activation and dropout to output conv1_4, then upsample c5 to 256 channels, and the output is up4_2, then concat with c4, then perform two sets of convolution activation and dropout to output conv4_2, then upsample conv4_2 to 128 channels, and the output is up3_3, then concat with c3 and conv3_2, Then perform two sets of convolution activation and dropout to output conv3_3, then upsample conv3_3 to 64 channels, output up2_4, then concat with c2, conv2_2, and conv2_3, then perform two sets of convolution activation and dropout to output conv2_4, then upsample conv2_4 to 32 channels, output up1_5, then add with c1, conv1_2, conv1_3, and conv1_4, then perform two sets of convolution activation and dropout to output conv1_5, finally perform 1*1 convolution on conv1_5, and output after sigmoid activation.
[0068] In this embodiment, the image segmentation model uses the add fusion module to replace a part of the concat fusion module, so that the feature information of the image is increased, but the dimension of the image itself does not increase, but the amount of information in each dimension is increased, which makes the segmentation speed faster and the accuracy higher.
[0069] It can be understood that after the femoral head area and the non-femoral head background area are separated, the femoral head area and the non-femoral head background area in the standard image are easier to be distinguished by the terminal device, which can avoid the femoral head area being affected by the non-femoral head background area and improve the efficiency of obtaining femoral head related coordinate points.
[0070] Step S200: randomly selecting three-dimensional coordinates of a plurality of pixel points from each standard image, wherein the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head.
[0071] Exemplarily, the three-dimensional coordinates (x, y, z) of a certain number of pixel points can be randomly selected from each standard image. The certain number can be 2, 3 or 4, etc. The randomly selected pixel points should be located in the femoral head area.
[0072] It can be understood that by randomly selecting the three-dimensional coordinates of multiple pixel points from multiple standard images, when there are errors in the segmentation of one or a small number of standard images, the three-dimensional coordinates of the pixel points used to calculate the center of the femoral head can avoid the influence of the calculation results on the obtained calculation results, thereby ensuring the accuracy of the three-dimensional coordinates of the center of the femoral head.
[0073] Step S300, calculating the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points.
[0074] Based on the three-dimensional coordinates of multiple pixel points obtained from all standard images, the traditional algorithm can be used to calculate the center of the sphere (a, b, c) through world coordinates. The algorithm can use the traditional standard sphere formula (xa)^2+(yb)^2+(zc)^2=r^2, and substitute the pixel points into the standard sphere formula to calculate and solve the corresponding three-dimensional coordinates of the center of the femoral head. Specifically, the Newton method, Runge-Kutta method or bisection method can be used to calculate the center of the sphere. It should be noted that the Newton method has a fast convergence speed, but each step requires solving the inverse matrix of the Hessian matrix of the objective function, and the calculation is relatively complicated. The Runge-Kutta method is a high-precision algorithm, and the bisection method is simple to calculate but converges slowly.
[0075] For example, see Figure 3 In this embodiment, step S300 can be implemented in the following manner:
[0076] Step S310: if the total number of the three-dimensional coordinates of all the pixel points is less than a preset number threshold, the three-dimensional coordinates of all the pixel points are divided into multiple groups, and there are no identical three-dimensional coordinates in each group.
[0077] Step S320: Determine the i-th center prediction coordinate using the three-dimensional coordinates in the i-th group, 1≤i≤I, where I is the total number of groups.
[0078] Step S330: Calculate the average values in the directions of each coordinate axis using I center prediction coordinates, so as to determine the three-dimensional coordinates corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
[0079] It can be understood that the number of three-dimensional coordinates of the pixel points in each group is 4. Substituting the three-dimensional coordinates of the four pixel points into the standard spherical equation, a central prediction coordinate can be determined through calculation.
[0080] For example, see Figure 4 In this embodiment, step S300 can also be implemented in the following manner:
[0081] Step S340: If the total number of the three-dimensional coordinates of all the pixel points is greater than or equal to a preset number threshold, a predetermined number of three-dimensional coordinates are randomly selected from the three-dimensional coordinates of all the pixel points, and the central prediction coordinates are determined using the predetermined number of three-dimensional coordinates.
[0082] Among them, the predetermined number is at least 4, and can be 10, 20, etc. The central prediction coordinate is determined by using the predetermined number of three-dimensional coordinates, and 4 three-dimensional coordinates are randomly selected from the predetermined number of three-dimensional coordinates, and a central prediction coordinate is determined by the 4 three-dimensional coordinates.
[0083] Step S350: Repeat M times to randomly select a predetermined number of three-dimensional coordinates from the three-dimensional coordinates of all the pixel points, and use the predetermined number of three-dimensional coordinates to determine the central prediction coordinates.
[0084] Step S360: Calculate the average values in the directions of each coordinate axis using the M center prediction coordinates, so as to determine the center coordinate corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
[0085] Preferably, the preset number threshold can be 30. When the number threshold is less than 30, the calculation result of this embodiment is more accurate. When the number threshold is greater than 30, the calculation result of this embodiment is more accurate. Moreover, when the number threshold is greater than 30, if the first method is used to determine the femoral head center, the calculation amount will be too large, resulting in low calculation efficiency.
[0086] In this embodiment, a plurality of images including the femoral head are segmented by a pre-trained image segmentation model to obtain a plurality of standard images; the three-dimensional coordinates of a plurality of pixel points are randomly selected from each standard image, and the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head; the three-dimensional coordinates corresponding to the center of the femoral head are calculated based on the total number of the three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points. The center of the femoral head can be automatically determined, and the result of the automatic determination is more accurate and the automatic determination speed is faster.
[0087] Example 2
[0088] It should be noted that after constructing the image segmentation model, the image segmentation model needs to be trained so that the image segmentation model can achieve an ideal segmentation effect. Before training, the training sample sequence used to train the image segmentation model needs to be annotated. The annotated sample can use a special annotation software to annotate the femur appearing in the CT image sequence. If pure manual annotation is used, the annotator needs to annotate each image in which the femoral head appears, which takes a lot of time and manpower costs. In order to solve this problem, the present embodiment adopts a combination of manual annotation and automatic filling by a tracking algorithm to realize semi-automatic annotation.
[0089] For example, see Figure 5 In this embodiment, the following steps S10 to S60 can be used to label the training sample sequence:
[0090] Step S10, determining the starting sample image and the ending sample image of the training sample sequence.
[0091] Step S20, randomly selecting a predetermined number of random sample images from between the starting sample image and the ending sample image for manually marking the femoral head region in the predetermined number of random sample images, wherein each randomly marked sample is not adjacent to each other.
[0092] Step S30, obtaining the predetermined number of random sample images after manual annotation.
[0093] Step S40, using a target tracking method, automatically annotating the samples between the starting sample image and the first random sample image, the samples between the i-th random sample image and the i+1-th random sample image, and the samples between the I-th random sample image and the ending sample image, 2≤i≤I-1.
[0094] Step S50, displaying the automatically labeled samples in sequence to correct the samples that are not labeled properly.
[0095] In this embodiment, manual labeling and automatic filling by tracking algorithm are combined to realize semi-automatic labeling, which shortens the labeling time and effectively reduces the workload of labelers.
[0096] Example 3
[0097] See also Figure 6 In an embodiment of the present application, a device 10 for determining the center of a femoral head is further provided. The device comprises: a segmentation module 11, a selection module 12 and a calculation module 13.
[0098] The segmentation module 11 is used to perform segmentation processing on multiple images including the femoral head through a pre-trained image segmentation model to obtain multiple standard images; the selection module 12 is used to randomly select the three-dimensional coordinates of multiple pixel points from each standard image, and the three-dimensional coordinates of the multiple pixel points are all located on the femoral head; the calculation module 13 is used to calculate the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points.
[0099] In this embodiment, the femoral head center determination device 10 is used to execute the femoral head center determination method described in the above embodiment through the coordinated use of the segmentation module 11, the selection module 12 and the calculation module 13. The implementation scheme and beneficial effects involved in the above embodiment are also applicable in this embodiment and will not be repeated here.
[0100] Example 4
[0101] An embodiment of the present application further proposes a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the method for determining the center of the femoral head described in the above embodiment is executed.
[0102] Example 5
[0103] An embodiment of the present application further proposes a readable storage medium storing a computer program, which executes the femoral head center determination method described in the above embodiment when running on a processor.
[0104] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0105] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0106] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0107] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for determining the center of a femoral head, characterized in that: The method comprises: Segmenting a plurality of images including the femoral head using a pre-trained image segmentation model to obtain a plurality of standard images; Randomly selecting three-dimensional coordinates of a plurality of pixel points from each standard image, wherein the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head; Calculate the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points; The image segmentation model includes an input module, a first upsampling module, a second upsampling module, a third upsampling module, a fourth upsampling module, a first add fusion module, a second add fusion module, a third add fusion module, a fourth add fusion module, a first concat fusion module, a second concat fusion module, a third concat fusion module, a fourth concat fusion module, a fifth concat fusion module, a sixth concat fusion module and an output module; The first add fusion module is used to fuse the information output by the input module and the first information output by the first up-sampling module; The second add fusion module is used to fuse the information output by the first add fusion module and the information output by the first concat fusion module; The third add fusion module is used to fuse the information output by the second add fusion module and the information output by the second concat fusion module; The fourth add fusion module is used to fuse the information output by the third add fusion module and the information output by the third concat fusion module; The first concat fusion module is used to fuse the second information output by the first upsampling module and the first information output by the second upsampling module; The second concat fusion module is used to fuse the information output by the first concat fusion module and the information output by the fourth concat fusion module; The third concat fusion module is used to fuse the information output by the second concat fusion module and the information output by the fifth concat fusion module; The fourth concat fusion module is used to fuse the second information output by the second up-sampling module and the first information output by the third up-sampling module; The fifth concat fusion module is used to fuse the information output by the fourth concat fusion module and the information output by the sixth concat fusion module; The sixth concat fusion module is used to fuse the second information output by the third up-sampling module and the first information output by the fourth up-sampling module; The output module receives the information output by the fourth add fusion module and outputs the segmentation result; Among them, the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module all include a maximum pooling unit, a first feature processing unit and a second feature processing unit, and the input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module outputs first information after passing through the maximum pooling unit, the first feature processing unit and the second feature processing unit; the input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module outputs second information after passing through the maximum pooling unit and the first feature processing unit.
2. The method for determining the center of the femoral head according to claim 1, characterized in that: The method of calculating the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixels corresponding to all standard images and the three-dimensional coordinates of all pixels includes: If the total number is less than a preset number threshold, the three-dimensional coordinates of all the pixel points are divided into multiple groups, and there are no identical three-dimensional coordinates in each group; Determine the predicted coordinates of the i-th center using the three-dimensional coordinates in the i-th group, 1≤i≤I, where I is the total number of groups; The average values in the directions of each coordinate axis are calculated using I center prediction coordinates, so as to determine the three-dimensional coordinates corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
3. The method for determining the center of the femoral head according to claim 1, characterized in that: The method of calculating the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixels corresponding to all standard images and the three-dimensional coordinates of all pixels includes: If the total number is greater than or equal to a preset number threshold, randomly selecting a predetermined number of three-dimensional coordinates from the three-dimensional coordinates of all the pixel points, and using the predetermined number of three-dimensional coordinates to determine the central prediction coordinates; Repeating M times to randomly select a predetermined number of three-dimensional coordinates from the three-dimensional coordinates of all the pixel points, and using the predetermined number of three-dimensional coordinates to determine the central prediction coordinates; The M center prediction coordinates are used to calculate the average values in the directions of each coordinate axis, so as to determine the center coordinate corresponding to the center of the femoral head based on the average values in the directions of each coordinate axis.
4. The method for determining the center of the femoral head according to claim 1, characterized in that: The first add fusion module, the second add fusion module, the third add fusion module, the fourth add fusion module, the first concat fusion module, the second concat fusion module, the third concat fusion module, the fourth concat fusion module, the fifth concat fusion module and the sixth concat fusion module all include a third feature processing unit, and the third feature processing unit is used to perform two downsampling operations.
5. The method for determining the center of the femoral head according to any one of claims 1 to 4, characterized in that: The method also includes labeling a training sample sequence used to train the image segmentation model using the following method: Determining a starting sample image and an ending sample image of the training sample sequence; A predetermined number of random sample images are randomly selected from between the starting sample image and the ending sample image to be used for manually marking the femoral head region in the predetermined number of random sample images, wherein each randomly marked sample is not adjacent to each other; Acquire the predetermined number of random sample images after manual annotation; Using a target tracking method, the samples between the starting sample image and the first random sample image, the samples between the i-th random sample image and the i+1-th random sample image, and the samples between the i-th random sample image and the ending sample image are automatically labeled in sequence, 2≤i≤I-1; The automatically labeled samples are displayed in sequence to correct the samples that are not labeled properly.
6. A device for determining the center of a femoral head, characterized in that: The device comprises: A segmentation module, used for performing segmentation processing on a plurality of images including the femoral head by using a pre-trained image segmentation model to obtain a plurality of standard images; A selection module, used for randomly selecting three-dimensional coordinates of a plurality of pixel points from each standard image, wherein the three-dimensional coordinates of the plurality of pixel points are all located on the femoral head; A calculation module, used for calculating the three-dimensional coordinates corresponding to the center of the femoral head based on the total number of three-dimensional coordinates of all pixel points corresponding to all standard images and the three-dimensional coordinates of all pixel points; The image segmentation model includes an input module, a first upsampling module, a second upsampling module, a third upsampling module, a fourth upsampling module, a first add fusion module, a second add fusion module, a third add fusion module, a fourth add fusion module, a first concat fusion module, a second concat fusion module, a third concat fusion module, a fourth concat fusion module, a fifth concat fusion module, a sixth concat fusion module and an output module; The first add fusion module is used to fuse the information output by the input module and the first information output by the first up-sampling module; The second add fusion module is used to fuse the information output by the first add fusion module and the information output by the first concat fusion module; The third add fusion module is used to fuse the information output by the second add fusion module and the information output by the second concat fusion module; The fourth add fusion module is used to fuse the information output by the third add fusion module and the information output by the third concat fusion module; The first concat fusion module is used to fuse the second information output by the first upsampling module and the first information output by the second upsampling module; The second concat fusion module is used to fuse the information output by the first concat fusion module and the information output by the fourth concat fusion module; The third concat fusion module is used to fuse the information output by the second concat fusion module and the information output by the fifth concat fusion module; The fourth concat fusion module is used to fuse the second information output by the second up-sampling module and the first information output by the third up-sampling module; The fifth concat fusion module is used to fuse the information output by the fourth concat fusion module and the information output by the sixth concat fusion module; The sixth concat fusion module is used to fuse the second information output by the third up-sampling module and the first information output by the fourth up-sampling module; The output module receives the information output by the fourth add fusion module and outputs the segmentation result; Among them, the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module all include a maximum pooling unit, a first feature processing unit and a second feature processing unit, and the input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module outputs first information after passing through the maximum pooling unit, the first feature processing unit and the second feature processing unit; the input information of the first upsampling module, the second upsampling module, the third upsampling module and the fourth upsampling module outputs second information after passing through the maximum pooling unit and the first feature processing unit.
7. A terminal device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the method for determining the center of the femoral head according to any one of claims 1 to 5 is executed.
8. A readable storage medium, characterized in that: It stores a computer program, which, when running on a processor, executes the femoral head center determination method according to any one of claims 1 to 5.
