A method, program product, and apparatus for acetabular cup matching based on medical images

By employing a medical image-based acetabular cup matching method, which utilizes structural segmentation and key point detection models to automatically optimize the size and center position of the acetabular cup, the method solves the problems of low accuracy and long time consumption in the prosthesis selection and matching process in existing technologies, and achieves efficient and accurate acetabular cup prosthesis matching.

CN117036747BActive Publication Date: 2026-03-24UNITED IMAGING INTELLIGENCE (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, the selection and matching process of prostheses in total hip arthroplasty suffers from low accuracy and long time consumption. In particular, due to the large individual differences in the bone structure of the patient's hip joint, the difficulty of artificial matching is increased, which affects the success rate of the operation.

Method used

A medical image-based acetabular cup matching method is adopted. By determining the full hip anteroposterior medical image, the structural segmentation model and key point detection model are used to obtain the segmented image of the hip structure and the location of key points. A constraint function is established to optimize the size and center position of the acetabular cup and automatically match the target prosthesis.

Benefits of technology

This method enables efficient and accurate matching of acetabular cup prostheses on two-dimensional X-ray images, avoiding the time-consuming problem of manual matching and improving the accuracy and efficiency of the surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117036747B_ABST
    Figure CN117036747B_ABST
Patent Text Reader

Abstract

In a method for matching a hip cup based on a medical image provided in the specification, a full hip frontal medical image is determined by a computer. The medical image is input into a structure segmentation model to obtain a segmented image; the medical image is input into a key point detection model to determine the position of the key points. According to the segmented image, the outer edge of the hip structure is determined, and according to the position of the key points, the curve corresponding to the acetabulum on the outer edge is determined. According to the position of the key points, a first constraint function for constraining the center position of the acetabular cup is determined, and according to the curve, a second constraint function for constraining the size of the acetabular cup is determined. The first constraint function and the second constraint function are minimized as the optimization target, the target size of the acetabular cup is determined, and the target prosthesis is determined according to the target size.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of image processing technology, and in particular to a method, program product, and device for matching acetabular cups based on medical images. Background Technology

[0002] In recent years, with the development of medical technology, total hip replacement surgery has become a standard method for treating hip joint diseases. The efficacy of hip replacement surgery is related to the correct selection of the prosthesis, as well as the direction and amount of osteotomy, and the alignment of the limb with the prosthesis. It is usually necessary to determine the appropriate prosthesis parameters for the surgery preoperatively.

[0003] In existing technologies, X-ray template measurement is generally used. Users attach a prosthesis template provided by the manufacturer to a printed X-ray film for manual matching to determine the prosthesis to be used. However, to more accurately fit different patients, prosthesis manufacturers typically provide different prostheses based on subtle parameter differences, making manual matching less accurate and usually requiring the preparation of a large number of candidate prostheses. Furthermore, the significant individual differences in the bony structure of patients' hip joints further increase the difficulty of manual matching.

[0004] It is evident that existing manual matching methods result in low accuracy and lengthy processing times during prosthesis selection and matching before clinical surgery, potentially impacting surgical success rates. Therefore, this specification provides a medical image-based method for acetabular cup matching. Summary of the Invention

[0005] This application provides a method, procedure, and device for matching acetabular cups based on medical images, in order to partially solve the aforementioned problems existing in the prior art.

[0006] The technical solution adopted in this application is as follows:

[0007] Determine a medical image of the entire hip in the anteroposterior position, wherein the medical image is a two-dimensional X-ray image;

[0008] The medical image is input into the trained structural segmentation model to obtain a segmented image of the hip structure in the medical image;

[0009] The medical image is input into the trained key point detection model to determine the location of the key points on the acetabulum of the hip structure in the medical image;

[0010] Based on the segmented image, the outer edge of the hip structure is determined, and based on the position of the key points, the curve corresponding to the acetabulum is determined on the outer edge;

[0011] Based on the location of the key points, a first constraint function is determined to constrain the center position of the acetabular cup, and a second constraint function is determined based on the curve to constrain the size of the acetabular cup.

[0012] The target size of the acetabular cup is determined by minimizing the first constraint function and the second constraint function;

[0013] The target prosthesis is determined from each acetabular cup based on the target size.

[0014] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop.

[0015] The keypoint detection model is trained using the following method, wherein:

[0016] Obtain a full hip anteroposterior medical image with labeled key point locations as a key point training sample;

[0017] For each key point, with the location of the key point as the center, determine the mask corresponding to the key point according to the preset mask size, and use it as the mask label for the key point;

[0018] Based on the mask annotations corresponding to each key point in the key point training sample, determine the total annotation of the key point training sample;

[0019] The keypoint training samples are used as input to the keypoint detection model to be trained, and the output prediction mask corresponding to each keypoint is obtained.

[0020] The key point detection model is trained with the goal of minimizing the difference between the mask annotations corresponding to each key point and the predicted masks corresponding to each key point.

[0021] Optionally, the method further includes:

[0022] In the keypoint training samples, a specified number of non-keypoints are determined;

[0023] For each non-critical point, with the location of the non-critical point as the center, determine the mask corresponding to the non-critical point according to the preset mask size, and use it as the mask label for the non-critical point.

[0024] Based on the mask annotations corresponding to each non-key point included in the key point training sample, the negative sample annotations of the key point training sample are determined.

[0025] The keypoint detection model is trained with the goal of minimizing the difference between the mask annotations corresponding to each keypoint and the predicted masks corresponding to each keypoint. Specifically, this includes:

[0026] The total loss is determined based on minimizing the difference between the mask annotations corresponding to each key point and the predicted mask corresponding to each key point, and maximizing the difference between the mask annotations corresponding to each non-key point and the predicted mask corresponding to each key point. The key point detection model is then trained with the minimum total loss as the optimization objective.

[0027] Optionally, before inputting the keypoint training samples as input into the keypoint detection model to be trained, the method further includes:

[0028] Based on the segmented images of the hip structure from the training samples of the key points, circumscribed rectangles of the left and right hip structures are constructed respectively, and the center position of the circumscribed rectangles is determined.

[0029] For each bounding rectangle, the resolution of the segmented image and the keypoint training samples is adjusted based on the difference between the aspect ratio of the bounding rectangle and the preset aspect ratio.

[0030] Based on the segmented image after resolution adjustment and the key point training samples, the circumscribed rectangle is redefined with the center position.

[0031] Based on the redefined bounding box, the image of the keypoint detection model to be trained is input from the resolution-adjusted segmented image and the keypoint training samples.

[0032] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop.

[0033] Based on the location of the key points, a curve corresponding to the acetabulum is determined on the outer edge, specifically including:

[0034] Based on the location of the outer edge of the acetabulum, a first position point is determined on the outer edge;

[0035] Based on the position of the lowest point of the teardrop, a second position point is determined on the outer edge;

[0036] The curve from the first position point to the second position point on the outer edge is determined as the curve corresponding to the acetabulum.

[0037] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop.

[0038] The first constraint function for determining the center position of the acetabular cup based on the location of the key points specifically includes:

[0039] Based on the position of the outer edge of the acetabulum and the position of the lowest point of the ischial tuberosity, determine the straight line corresponding to the desired rotation center of the acetabular cup;

[0040] The first constraint function is determined by the distance from the center position of the acetabular cup to the straight line.

[0041] Optionally, a second constraint function for determining the size of the acetabular cup based on the curve specifically includes:

[0042] The sampling step size is determined based on the curve and the preset sampling number.

[0043] Based on the sampling step size, samples are taken on the curve to determine the position of each sampling point;

[0044] The second constraint function is determined by the distance from each sampling point to the center of the acetabular cup and the radius of the acetabular cup.

[0045] Optionally, the target prosthesis is determined from each acetabular cup according to the target size, specifically including:

[0046] Based on the target size and the corresponding segmented image resolution, the target physical size of the acetabular cup is obtained;

[0047] For each candidate acetabular cup, determine the difference between the physical size of the candidate acetabular cup and the target physical size;

[0048] Based on the determined differences, the target prosthesis is selected from the candidate acetabular cups.

[0049] Optionally, a computer program product, when executed by a processor, implements the medical image-based acetabular cup matching method.

[0050] Optionally, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the acetabular cup matching method based on medical images.

[0051] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0052] In the medical image-based acetabular cup matching method provided in this specification, a server determines a full-hip anteroposterior medical image. The medical image is input into a structural segmentation model to obtain a segmented image; the medical image is then input into a keypoint detection model to determine keypoint locations. Based on the segmented image, the outer edge of the hip structure is determined, and based on the keypoint locations, a curve corresponding to the acetabulum is determined on the outer edge. Based on the keypoint locations, a first constraint function constraining the center position of the acetabular cup is determined, and a second constraint function constraining the size of the acetabular cup is determined based on the curve. The target size of the acetabular cup is determined with the minimization of both the first and second constraint functions as the optimization objective, and the target prosthesis is determined based on the target size.

[0053] As can be seen from the above method, the curve corresponding to the acetabulum is first determined by segmenting the image and detecting key points. Then, a first constraint function constrains the center position of the acetabular cup and a second constraint function constrains the size of the acetabular cup to conform to the curve. Finally, the expected size of the acetabular cup, i.e. the target size, is determined by an optimization algorithm, so that the target prosthesis can be accurately matched using only a two-dimensional X-ray image, avoiding the problem of time-consuming manual matching. Attached Figure Description

[0054] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0055] Figure 1 This specification provides a schematic diagram of a medical image-based acetabular cup matching process.

[0056] Figure 2 This is a schematic diagram of a full hip anteroposterior medical image provided for this instruction manual;

[0057] Figure 3 A schematic diagram of a segmented image provided in this specification;

[0058] Figure 4 This manual provides a set of key point location diagrams;

[0059] Figure 5 A schematic diagram of the acetabulum curve provided in this manual;

[0060] Figure 6 This is a flowchart illustrating a keypoint detection model training method provided in this specification.

[0061] Figure 7 This is a schematic diagram of a segmented image with a mask for key point locations provided in this specification.

[0062] Figure 8 This is a schematic diagram of the training structure segmentation model method provided in this manual;

[0063] Figure 9 This is a schematic diagram of a medical image-based acetabular cup matching device provided in this specification;

[0064] Figure 10 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0066] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0067] Figure 1 This is a flowchart illustrating a method for acetabular cup matching based on medical images, as described in this specification, which specifically includes the following steps:

[0068] S101: Determine a medical image of the entire hip in the anteroposterior position, wherein the medical image is a two-dimensional X-ray image.

[0069] In the embodiments described herein, the device used to perform the acetabular cup matching process is not limited. For example, a personal computer, mobile terminal, or server may be used. However, since subsequent steps involve model calculations and image sampling, which are computationally resource-intensive operations, they are generally performed by a server. Therefore, this specification will also describe the acetabular cup matching process performed by a server as an example. The server can be a single device or a combination of multiple devices, such as a distributed server; this specification does not limit the specific device used.

[0070] Specifically, in one or more embodiments of this specification, the server can determine a full hip anteroposterior medical image of a patient requiring acetabular cup fitting. This medical image is a two-dimensional X-ray image. The full hip anteroposterior view, also known as the hip joint anteroposterior projection, generally refers to a medical image showing the left hip hemisection, both femoral necks, and both femurs in a frontal orientation. In the embodiments of this specification, since the fitting of the acetabular cup prosthesis is being performed, the medical image must at least completely encompass the patient's hip joint region. Figure 2 As shown.

[0071] Figure 2 This is a schematic diagram of a total hip anteroposterior view medical image provided in the embodiments of this specification. As can be seen, Figure 2 It includes the two femoral shanks and the hip structure in the correct position.

[0072] S103: Input the medical image into the trained structural segmentation model to obtain a segmented image of the hip structure in the medical image.

[0073] In one or more embodiments of this specification, since the acetabular cup needs to be placed in the acetabulum of the hip structure, and the acetabular cup needs to match the size of the patient's acetabulum, it is necessary to determine the curve corresponding to the acetabulum in the medical image. However, since patients requiring real-time replacement surgery have abnormalities in the acetabulum or femur, directly identifying the curve corresponding to the acetabulum through the model is extremely difficult. Therefore, in the embodiments of this specification, the server can first determine the segmented image, and then determine the key points through subsequent steps to obtain the curve.

[0074] Generally, determining the size of the acetabular cup requires using the hip structure in medical images, rather than referring to the femur in medical images. Since most patients who need hip replacement surgery have femoral disease or femoral wear, it is difficult to standardize the reference of the contact area between the femur and the hip joint for determining the acetabular cup. Therefore, it is necessary to segment and preserve the hip structure that is easy to standardize for subsequent steps.

[0075] Specifically, the server obtains a full-hip anteroposterior medical image from S101, performs cropping using a pre-trained structural segmentation model, and outputs the resulting segmentation image. The pre-trained structural segmentation model is a cropping model built based on the definition of the hip joint. If the output segmentation image shows overlap between the femur and hip joint, the complete structure of the hip joint is preserved first, and femoral structural interference is removed as much as possible. Figure 3 As shown.

[0076] Figure 3 This is a schematic diagram of a segmented image provided for an embodiment of this specification. The area marked by the right diagonal line represents the hip bone structure, and the area marked by the left diagonal line represents the femur structure.

[0077] S105: Input the medical image into the trained key point detection model to determine the position of the key point on the acetabulum of the hip structure in the medical image.

[0078] In one or more embodiments of this specification, determining the desired acetabular cup size solely based on a segmented image presents problems of excessive computational complexity and difficulty in guaranteeing matching accuracy. Therefore, by determining the curve corresponding to the acetabulum, the process of determining the desired acetabular cup size based on a segmented image can be transformed into determining the desired acetabular cup size based on the curve corresponding to the acetabulum in the segmented image. Thus, this server possesses the ability to determine key points in the hip structure used for determining the acetabulum.

[0079] Specifically, the server first determines a pre-trained keypoint detection model, then inputs the medical image into the keypoint detection model, and finally obtains the keypoints output by the keypoint detection model. The keypoints can be set as needed; for example, this specification uses the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop as keypoints.

[0080] The outer edge of the acetabulum is the highest point of the acetabulum in a medical image, the lowest point of the ischial tuberosity is the lowest point of the hip structure in a medical image, the lateral aspect of the teardrop point is formed by the lowest and anterior parts of the acetabulum in a medical image, the medial aspect of the teardrop point is formed by the quadrilateral surface of the ilium, and the lowest point of the teardrop point is the lowest point of the teardrop point in a medical image. Figure 4 As shown.

[0081] Figure 4 This is a schematic diagram of the key point locations provided in the embodiments of this specification. The dots along the edge of the hip structure represent key points, which are, from top to bottom, the outer edge of the acetabulum, the lowest point of the teardrop, and the lowest point of the ischial tuberosity.

[0082] Specifically, the segmented image output from S103 is input, and the keypoints are located and labeled according to the pre-trained keypoint detection model to obtain and output the keypoint location map. The pre-trained keypoint detection model is a localization scheme established based on the definition of each keypoint. If it is difficult to locate the corresponding keypoint according to the labeled area of ​​the corresponding scheme, the closest position in the labeled area is selected as the location of the corresponding keypoint and labeled.

[0083] S107: Based on the segmented image, determine the outer edge of the hip structure, and based on the position of the key points, determine the curve corresponding to the acetabulum on the outer edge.

[0084] In one or more embodiments of this specification, after the segmented image and key points are determined through steps S103 and S105, the server can determine the curve corresponding to the acetabulum so that subsequent steps can determine the desired size of the acetabular cup.

[0085] Specifically, the server first determines the segmented image and the location of key points, and then obtains the corresponding curve of the acetabulum based on the location of the key points in the segmented image. Since the outer edge line segments of the segmented image have been explicitly obtained, the resulting acetabulum-corresponding curve does not appear outside the outer edge line segments.

[0086] Based on the location of the lowest point of the teardrop, a first location point is determined on the outer edge; based on the location of the outer edge of the acetabulum, a second location point is determined on the outer edge. The curve from the first location point to the second location point on the outer edge is then calculated and output as the curve corresponding to the acetabulum. Typically, hip replacement surgery also requires the location of key points, and the lowest point of the teardrop and the outer edge of the acetabulum are the most effective key points used in conventional procedures. Since this application is not a hip replacement procedure, the reasons for selecting these key points in the method of this application will not be explained in detail here.

[0087] Specifically, the server inputs the keypoint location map output in S105. Based on the position of the lowest point of the teardrop, a first location point is determined on the outer edge; based on the position of the outer edge of the acetabulum, a second location point is determined on the outer edge. The segmentation image output in S103 is then input, and a curve from the first to the second location point on the outer edge is determined on the segmentation image. This curve is used as the curve corresponding to the acetabulum and output, thus obtaining the keypoint location map and outputting it. Note that the outer edge refers to the outer edge of the hip structure in the segmentation image, not the outer edge of the acetabulum among the keypoints. Figure 5 As shown.

[0088] Figure 5 This is a schematic diagram of the curve corresponding to the acetabulum provided in the embodiments of this specification. The thickened curve on the edge of the hip structure is the curve corresponding to the acetabulum, with its upper end being the outer edge of the acetabulum and its lower end being the lowest point of the teardrop.

[0089] It should be noted that there is no specific order in which the server executes S103 and S105 in this manual. S103 and S105 can be completed in any order before the following steps are executed.

[0090] S109: Based on the location of the key point, determine a first constraint function for constraining the center position of the acetabular cup, and based on the curve, determine a second constraint function for constraining the size of the acetabular cup.

[0091] Based on the curves determined by the first and second positions in S105, the server determines the straight line corresponding to the desired rotation center of the acetabular cup; using the distance from the center position of the acetabular cup to the straight line as the objective function, it determines the first constraint function. The purpose of establishing the first constraint function is to prevent the rotation center of the acetabular cup from being too far from the acetabular fossa, and to help relevant surgical personnel locate the position of the acetabular cup to assist in the surgical procedure.

[0092] The server determines the sampling step size based on the curve and the preset number of samples. Based on the sampling step size, it samples on the curve to determine the position of each sampling point. The second constraint function is determined by the distance from each sampling point to the center of the acetabular cup and the radius of the acetabular cup. The purpose of establishing the second constraint function is to prevent the acetabular cup from becoming too large. If it becomes too large, an additional grinding process will be required during or before the operation. This grinding process is not something that the surgical personnel should be proficient in and cannot accurately control, thus significantly increasing the difficulty of the operation.

[0093] Specifically, in one or more embodiments of this specification, the server may establish basic functions:

[0094] The function for establishing the rotation center on the server can be expressed by the following formula:

[0095] (xa) 2 +(xb) 2 =r 2

[0096] Where (a,b) represents the position of the rotation center, and r represents the radius of the circle corresponding to the curve.

[0097] The server-side linear function can be represented by the following formula:

[0098] Ax + By + C = 0

[0099] The server uses the distance from the center of the acetabular cup to the straight line as the objective function, and the first constraint function can be expressed by the following formula:

[0100]

[0101] The server determines the second constraint function using the distance from each sampling point to the center of the acetabular cup and the radius of the acetabular cup. This function can be expressed by the following formula:

[0102]

[0103] Optionally, to improve the accuracy of the target size in subsequent steps, the server can establish first constraint functions for the patient's left and right hip joints respectively, and then combine the two first constraint functions as the first constraint function for subsequent steps.

[0104] S111: Determine the target size of the acetabular cup by minimizing the first constraint function and the second constraint function.

[0105] The optimization objective is to minimize both the first and second constraint functions. Based on the fitted function established using the first and second constraint functions and the optimization objective, the target size of the acetabular cup is determined and output. The optimization objective is established to obtain the optimal target size. Minimizing the first constraint function is chosen because a smaller first constraint function results in a more accurate position of the acetabular cup, while a smaller second constraint function helps avoid the problem of an excessively large acetabular cup.

[0106] Specifically, the server can establish a fitting function based on the combination of the first constraint function and the second constraint function in step S109:

[0107] The first constraint function established by the server in S109 can be expressed by the following formula:

[0108]

[0109] The second constraint function established by the server in S109 can be expressed by the following formula:

[0110]

[0111] The server combines the first and second constraint functions to obtain the fitting function, which can be expressed by the following formula:

[0112]

[0113] The curve position is determined by inputting S107. The server obtains the corresponding data required in the formula, solves for the unknowns in the fitting function, obtains the target size, and outputs it.

[0114] In one or more embodiments of this specification, the server may also solve for the fitting function:

[0115] The server uses an optimization method to solve the fitting function in step S109. To speed up the solution process, parameter initialization values ​​need to be provided. The center and radius parameters of the left and right acetabular cups can be initialized to the center and radius of the left and right femoral heads, respectively. The center of the femoral head can be obtained through a point detection algorithm, and the radius of the femoral head can be solved through a segmentation mask. The entire solution process is to find the optimal parameters a, b, and r to minimize the above equation. Commonly used optimization methods include gradient descent, steepest descent, Newton's method, quasi-Newton's method, and sequential least squares method, etc., without specific restrictions.

[0116] S113: Determine the target prosthesis from each acetabular cup according to the target size.

[0117] In one or more embodiments of this specification, the determined target size is the optimal size for placing the prosthesis. Therefore, the server can select a target prosthesis from among the acetabular cups based on this target size. That is, it determines the acetabular cup that is closest to the target size.

[0118] Specifically, firstly, the server obtains the target physical size of the acetabular cup based on the target size and the corresponding segmented image resolution. The fitting function output in S109 is input to solve for the target function. Since the solution yields pixel dimensions, it is often necessary to multiply the pixel dimensions by the spatial resolution to obtain the target physical size. The spatial resolution is determined based on the resolution of the total hip anteroposterior medical image as determined in S101; the specific method is not limited in this application.

[0119] Secondly, based on the target physical dimensions, the difference between the physical dimensions of each candidate acetabular cup and the target physical dimensions is calculated.

[0120] Then, for each candidate acetabular cup, the difference between the physical size of the candidate acetabular cup and the target physical size is determined. Based on the determined differences, the target prosthesis is selected from each candidate acetabular cup.

[0121] Specifically, determine the smallest one;

[0122] There are multiple smallest ones; one is selected randomly.

[0123] In addition, there may be errors, and even the smallest selection may not be suitable. Select all of the options within the range, or select one or more randomly.

[0124] based on Figure 1 The acetabular cup matching method shown in the medical image obtains segmented images of the hip and femoral structures in the medical image through a structural segmentation model. The location of key points on the hip structure in the medical image is determined through a key point detection model. Then, the hip structure is sampled based on the segmented image and key points to obtain the coordinates of the key points, which are used as parameters for the fitting equation. Finally, the fitting equation is solved to determine the target size, and finally, the acetabular cup prosthesis is determined.

[0125] As can be seen from the above method, by determining the segmented image and key points, sampling on the hip structure of the medical image enables automatic matching of the acetabular cup prosthesis with the patient without manual pairing. Moreover, the sampling position is more accurate, avoiding the need to prepare a large number of candidate prostheses before surgery, reducing the burden, and achieving high efficiency and high accuracy in matching the acetabular cup prosthesis.

[0126] In the method described in this specification, a pre-trained keypoint detection model is used to accurately acquire keypoints, and there are corresponding optional keypoint detection model training methods. This training method can be executed by the server performing the acetabular cup matching method, or by other servers; this specification does not impose any restrictions. The training process simply needs to be performed before executing the acetabular cup matching method.

[0127] This manual provides a flowchart illustrating a method for training a keypoint detection model, as follows: Figure 6 As shown.

[0128] in:

[0129] S201: Obtain a full hip anteroposterior medical image with labeled key point locations as a key point training sample.

[0130] In one or more embodiments provided in this specification, the server may first acquire a full hip anteroposterior medical image with the key point locations marked as an example, as a key point training sample.

[0131] In one or more examples in this specification, the determined medical images cannot be directly used as a reference for selecting the acetabular cup, unlike manual pairing methods. Therefore, the server selects key points as references, and the detection model needs to be trained using medical images with determined key points. That is, key point samples are obtained first.

[0132] Each medical image is labeled to determine the labeled images.

[0133] Specifically, for each keypoint, a mask corresponding to that keypoint is determined based on its location and a preset mask size, serving as the mask annotation for that keypoint. The total annotation of the keypoint training samples is then determined based on the mask annotations corresponding to each keypoint included in the keypoint training samples. Figure 7 As shown. Figure 7 This specification provides an example of an annotation method for determining an image. Hollow circles represent key points in the annotation, squares are masks corresponding to the key points, and the center of the square is the key point.

[0134] Secondly, construct a key point detection model. This key point detection model can be a convolutional neural network model, a perceptron model, a Bayesian network model, etc. This manual does not restrict the type of model; it is sufficient to achieve key point detection and annotation.

[0135] The server inputs the adjusted medical images into the constructed keypoint detection model, and inputs the keypoint detection model to be trained, and obtains the prediction mask corresponding to each keypoint.

[0136] S203: Train the key point detection model with the goal of minimizing the difference between the mask annotations corresponding to each key point and the predicted masks corresponding to each key point.

[0137] The server determines the distance error between the coordinates of one or more key points in the labeled image and the coordinates of one or more key points in the output image, and trains the model with the goal of minimizing the distance error.

[0138] Furthermore, since determining the distance error based on the coordinates of the labeled points and the coordinates of the output points is not easy to converge, the model training is difficult. Based on this, in one or more embodiments provided in this specification, a training method for a key point detection model is also provided.

[0139] When annotating keypoints at specific locations in medical images, the server no longer labels the coordinates of the keypoints. Instead, it uses the coordinates of the keypoints as the center, expands the mask by a specified side length, and outputs a small square mask. The center of this small square mask represents the coordinates of the keypoints. The keypoint detection results output by the keypoint detection model also use this small square mask instead of the coordinates of the output keypoints.

[0140] Then, the server calculates the difference between the small square masks in the labeled image and the small square mask in the output image. Using minimizing this difference as the optimization objective, the server adjusts the model parameters to train the model. Specifically, the difference between the masks can be the overlap rate or cross-union ratio between two masks; this specification does not limit the specific method for determining the difference.

[0141] In addition, determining key points at specific locations on an image solely based on medical images is not very accurate and is difficult to train. Therefore, segmented images and medical images can be used together as input to assist the model in determining the possible locations of key points and avoid outputting key points on the background.

[0142] Furthermore, when calculating the difference, the cross-union ratio or overlap rate of two masks may be 0, making it impossible to train the model. Based on this, in one or more embodiments provided in this application, a certain number of negative samples can be added to the background part of the medical image. That is, points in the background are marked in the form of small square masks as negative samples, and then the difference between the masks is calculated. The greater the difference between the negative samples, the more the model parameters are adjusted with the minimum difference as the optimization objective.

[0143] Specifically, in the keypoint training samples, a specified number of non-keypoints are determined. For each non-keypoint, a mask corresponding to that non-keypoint is determined based on its position and a preset mask size, serving as the mask annotation for that non-keypoint. Based on the mask annotations corresponding to each non-keypoint included in the keypoint training samples, negative sample annotations for the keypoint training samples are determined. The total loss is determined by minimizing the difference between the mask annotations corresponding to each keypoint and the predicted masks corresponding to those keypoints, and maximizing the difference between the mask annotations corresponding to each non-keypoint and the predicted masks corresponding to those keypoints. The keypoint detection model is then trained with the minimum total loss as the optimization objective.

[0144] In the method described in this specification, because the preset structural segmentation model often has instability, it is prone to causing large errors in key point location clipping and key structure clipping, which makes it difficult for the trained key point detection network to accurately acquire key points. Therefore, a pre-trained structural segmentation model is used. Optionally, a method flow based on the trained structural segmentation model is provided, such as... Figure 8 As shown.

[0145] Figure 8 This is a flowchart illustrating the structural segmentation model training method provided in the embodiments of this specification, wherein:

[0146] S301: Obtain training samples.

[0147] A certain number of total hip medical images are acquired, including images of normal hip joints and images of various hip joint conditions (such as hip dysplasia, femoral osteoarthritis, femoral neck fracture, intertrochanteric fracture, etc.), as training samples. Structural segmentation masks are then applied to these images, and the annotated images serve as the labeled samples for the model. The segmentation results must include at least the anteroposterior view of the hip structure and both femoral stems.

[0148] S303: Construct a structural segmentation model.

[0149] Construct a structural segmentation model, which can be a convolutional neural network model, a perceptron model, a Bayesian network model, etc. This specification does not restrict the type of model. The segmentation method used in the model can be a segmentation method based on an attention mechanism (Unet), a segmentation method with residual modules (Res-Unet), or a segmentation method with densely connected layers (Dense-Unet), etc. As long as structural segmentation can be achieved, this specification does not restrict the segmentation method used to construct the model.

[0150] S305: Input the training samples into the constructed structural segmentation model and train the model.

[0151] Before inputting the training samples into the model for training, the training samples are preprocessed, including mean and normalization of the pixel value histograms of the images in the training samples, and resizing all images to a uniform size. The training samples are then randomly divided into training and test sets, and data augmentation is performed on the training set.

[0152] Then, the training set is input into the structure segmentation model to be trained to obtain the output set. The difference between the output set and the labeled samples is evaluated by the loss function, and the structure segmentation model is trained with minimizing the difference as the optimization objective.

[0153] Then, the performance of the structure segmentation model can be tested using a test set and general data. This yields the trained structure segmentation model.

[0154] It should be noted that the trained structural segmentation model can perform segmentation based on the input unilateral hip structure or femur structure. In other words, when applying the structural segmentation model in practice, only a medical image of the patient's unilateral diseased hip structure or femur structure can be input to perform structural segmentation on the medical image.

[0155] However, when medical images are acquired through medical equipment, factors such as the distance between the lens and the patient, and differences in equipment parameters can lead to inconsistencies in resolution and the size of key areas in different medical images. Therefore, to ensure the accuracy of the keypoint detection model's output and reduce the difficulty of model training, the size and resolution of the medical images can be adjusted according to preset dimensions and resolutions before being input into the keypoint detection model, resulting in medical images of uniform size and resolution as input images for the keypoint detection model.

[0156] However, directly adjusting the image size and resolution based on preset dimensions and resolutions may result in blurred structures such as the femur and hip bones in medical images (e.g., due to direct stretching or resolution changes) or missing structures (e.g., due to direct cropping), leading to significant errors in keypoint recognition based on the adjusted image. Therefore, in this embodiment, the server can also adjust the size and resolution of the medical image based on a more clearly defined and concise segmented image. Furthermore, since keypoint sampling requires mapping keypoints to the structural segmentation model of the medical image, the segmented image and the image output by the keypoint detection model should also have the same size and resolution.

[0157] Specifically, firstly, based on the hip structure of the segmented image, circumscribed rectangles of the left and right hip structures are constructed on the segmented image, and the center position of the circumscribed rectangles is determined.

[0158] For each circumscribed rectangle, determine its length (x) and width (y), and calculate its aspect ratio. Furthermore, to facilitate the matching of the acetabular cup prosthesis, the image must include part of the background. Therefore, when calculating the ratio, a preset value can be added to the length and width, and then the ratio of the rectangle can be calculated.

[0159] A uniform resolution is preset. For ease of description, this manual uses a resolution of 800×1024 as an example. In actual applications, the resolution can be set according to actual needs.

[0160] Based on the calculated ratio of the peripheral rectangle, the image pixel spacing can be redefined using the following formula:

[0161] If ratio > 800 / 1024, then spacing new =spacing old ×(x / 800);

[0162] If ratio ≤ 800 / 1024, then spacing new =spacing old ×(y / 1024).

[0163] Among them, spacing new For the new pixel distance, spacing old The original pixel distance is used. Each medical image is adjusted according to the new pixel distance, and then segmented around the center of the original bounding rectangle. The resulting segmentation is the adjusted image, which serves as the sample image. It should be noted that not only before training the keypoint detection model, but also before determining keypoint detection based on the trained model, the input medical image needs to be adjusted in size and resolution.

[0164] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 A method for matching acetabular cups based on medical images is provided.

[0165] This manual also provides corresponding acetabular cup prosthesis matching devices, such as... Figure 9 As shown.

[0166] Image acquisition module 401 determines a medical image of the entire hip in an anteroposterior view, wherein the medical image is a two-dimensional X-ray image;

[0167] The segmentation module 403 inputs the medical image into the trained structural segmentation model to obtain a segmented image of the hip structure in the medical image;

[0168] The key point detection module 405 inputs the medical image into the trained key point detection model to determine the position of the key points on the acetabulum of the hip structure in the medical image;

[0169] The acetabular determination module 407 determines the outer edge of the hip structure based on the segmented image, and determines the curve corresponding to the acetabulum on the outer edge based on the position of the key points.

[0170] The constraint module 409 determines a first constraint function for constraining the center position of the acetabular cup based on the position of the key point, and a second constraint function for constraining the size of the acetabular cup based on the curve.

[0171] The size determination module 411 determines the target size of the acetabular cup with the minimum of the first constraint function and the second constraint function as the optimization objective;

[0172] Matching module 413 determines the target prosthesis from each acetabular cup according to the target size.

[0173] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop. The key point detection module 405 is further used to train the key point detection model using the following method: acquiring a full hip anteroposterior medical image with the key point positions marked as the key point as the key point training sample; for each key point, determining the mask corresponding to the key point based on the position of the key point and a preset mask size, which is used as the mask label corresponding to the key point; determining the total label of the key point training sample based on the mask labels corresponding to each key point included in the key point training sample; using the key point training sample as input to the key point detection model to be trained, obtaining the output predicted mask corresponding to each key point; and training the key point detection model with the minimum difference between the mask labels corresponding to each key point and the predicted mask corresponding to each key point as the optimization objective.

[0174] Optionally, the keypoint detection module 405 is further configured to: determine a specified number of non-keypoints in the keypoint training samples; for each non-keypoint, determine a mask corresponding to the non-keypoint based on the position of the non-keypoint and a preset mask size, using the non-keypoint as the center, as the mask label corresponding to the non-keypoint; determine the negative sample label of the keypoint training samples based on the mask labels corresponding to each non-keypoint included in the keypoint training samples; determine the total loss based on minimizing the difference between the mask labels corresponding to each keypoint and the predicted masks corresponding to each keypoint, and maximizing the difference between the mask labels corresponding to each non-keypoint and the predicted masks corresponding to each keypoint; and train the keypoint detection model with minimizing the total loss as the optimization objective.

[0175] Optionally, the keypoint detection module 405 is further configured to take the keypoint training samples as input and, before inputting them into the keypoint detection model to be trained, establish bounding rectangles for the left hip structure and the right hip structure respectively based on the segmented image of the hip structure of the keypoint training samples, and determine the center position of the bounding rectangles. For each bounding rectangle, adjust the resolution of the segmented image and the keypoint training samples according to the difference between the aspect ratio of the bounding rectangle and the preset aspect ratio. Based on the segmented image and keypoint training samples after resolution adjustment, redetermine the bounding rectangles with the center position. Based on the redetermined bounding rectangles, determine the image of the keypoint detection model to be trained in the segmented image and keypoint training samples after resolution adjustment.

[0176] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop; the acetabulum determination module 407 is used to determine a first position point on the outer edge based on the position of the outer edge of the acetabulum, to determine a second position point on the outer edge based on the position of the lowest point of the teardrop, and to determine the curve from the first position point to the second position point on the outer edge as the curve corresponding to the acetabulum.

[0177] Optionally, the key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop; the constraint module 409 is used to determine the straight line corresponding to the desired rotation center of the acetabular cup based on the position of the outer edge of the acetabulum and the position of the lowest point of the ischial tuberosity, and to determine the first constraint function based on the distance from the center position of the acetabular cup to the straight line.

[0178] Optionally, the constraint module 409 is used to determine the sampling step size based on the curve and a preset number of samples, sample on the curve according to the sampling step size, determine the position of each sampling point, and determine the second constraint function by the distance from the position of each sampling point to the center position of the acetabular cup and the radius of the acetabular cup.

[0179] Optionally, the matching module 413 is used to obtain the target physical size of the acetabular cup based on the target size and the corresponding segmented image resolution, determine the difference between the physical size of the candidate acetabular cup and the target physical size for each candidate acetabular cup, and determine the target prosthesis from each candidate acetabular cup based on the determined differences.

[0180] This specification also provides a computer program product that is executed by a processor to implement the above. Figure 1 A method for acetabular cup matching based on medical images is provided. The computer program product can be an executable program stored in the cloud. The user downloads the computer program product to their local terminal via the network, and the terminal's local processor executes the computer program product to achieve the above-mentioned results. Figure 1 The flowchart of the acetabular cup matching method based on medical images is shown.

[0181] This instruction manual also provides Figure 10 The one shown corresponds to Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 10 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1The method for matching acetabular cups based on medical images is described above. Of course, besides software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0182] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0183] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0184] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0185] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0186] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0187] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0188] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0189] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0190] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0191] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0192] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0193] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0194] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0195] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0196] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0197] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.

Claims

1. A method for matching acetabular cups based on medical images, characterized in that, include: Determine a medical image of the entire hip in the anteroposterior position, wherein the medical image is a two-dimensional X-ray image; The medical image is input into the trained structural segmentation model to obtain a segmented image of the hip structure in the medical image; The medical image is input into the trained key point detection model to determine the location of the key points on the acetabulum of the hip structure in the medical image; Based on the segmented image, the outer edge of the hip structure is determined, and based on the position of the key points, the curve corresponding to the acetabulum is determined on the outer edge; Based on the location of the key points, a first constraint function is determined to constrain the center position of the acetabular cup, and a second constraint function is determined based on the curve to constrain the size of the acetabular cup. The target size of the acetabular cup is determined by minimizing the first constraint function and the second constraint function; The target prosthesis is determined from each acetabular cup based on the target size; The key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop. The keypoint detection model is trained using the following method, wherein: Obtain a full hip anteroposterior medical image with labeled key point locations as a key point training sample; For each key point, with the location of the key point as the center, determine the mask corresponding to the key point according to the preset mask size, and use it as the mask label for the key point; Based on the mask annotations corresponding to each key point in the key point training sample, determine the total annotation of the key point training sample; The keypoint training samples are used as input to the keypoint detection model to be trained, and the output prediction mask corresponding to each keypoint is obtained. The key point detection model is trained with the goal of minimizing the difference between the mask annotations corresponding to each key point and the predicted masks corresponding to each key point.

2. The method as described in claim 1, characterized in that, The method further includes: In the keypoint training samples, a specified number of non-keypoints are determined; For each non-critical point, the mask corresponding to the non-critical point is determined based on the preset mask size, with the position of the non-critical point as the center, and is used as the mask label for the non-critical point. Based on the mask annotations corresponding to each non-key point included in the key point training sample, the negative sample annotations of the key point training sample are determined. The keypoint detection model is trained with the goal of minimizing the difference between the mask annotations corresponding to each keypoint and the predicted masks corresponding to each keypoint. Specifically, this includes: The total loss is determined based on minimizing the difference between the mask annotations corresponding to each key point and the predicted mask corresponding to each key point, and maximizing the difference between the mask annotations corresponding to each non-key point and the predicted mask corresponding to each key point. The key point detection model is then trained with the minimum total loss as the optimization objective.

3. The method as described in claim 1, characterized in that, Before inputting the keypoint training samples into the keypoint detection model to be trained, the method further includes: Based on the segmented images of the hip structure from the training samples of the key points, circumscribed rectangles of the left and right hip structures are constructed respectively, and the center position of the circumscribed rectangles is determined. For each bounding rectangle, the resolution of the segmented image and the keypoint training samples is adjusted based on the difference between the aspect ratio of the bounding rectangle and the preset aspect ratio. Based on the segmented image after resolution adjustment and the key point training samples, the circumscribed rectangle is redefined with the center position. Based on the redefined bounding box, the image of the keypoint detection model to be trained is input from the resolution-adjusted segmented image and the keypoint training samples.

4. The method as described in claim 1, characterized in that, The key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop. Based on the location of the key points, a curve corresponding to the acetabulum is determined on the outer edge, specifically including: Based on the location of the outer edge of the acetabulum, a first position point is determined on the outer edge; Based on the position of the lowest point of the teardrop, a second position point is determined on the outer edge; The curve from the first position point to the second position point on the outer edge is determined as the curve corresponding to the acetabulum.

5. The method as described in claim 1, characterized in that, The key points include at least: the outer edge of the acetabulum, the lowest point of the ischial tuberosity, and the lowest point of the teardrop. The first constraint function for determining the center position of the acetabular cup based on the location of the key points specifically includes: Based on the position of the outer edge of the acetabulum and the position of the lowest point of the ischial tuberosity, determine the straight line corresponding to the desired rotation center of the acetabular cup; The first constraint function is determined by the distance from the center position of the acetabular cup to the straight line.

6. The method as described in claim 1, characterized in that, The second constraint function for determining the size of the acetabular cup based on the curve specifically includes: The sampling step size is determined based on the curve and the preset sampling number. Based on the sampling step size, samples are taken on the curve to determine the position of each sampling point; The second constraint function is determined by the distance from each sampling point to the center of the acetabular cup and the radius of the acetabular cup.

7. The method as described in claim 1, characterized in that, Determining the target prosthesis from each acetabular cup based on the target size specifically includes: Based on the target size and the corresponding segmented image resolution, the target physical size of the acetabular cup is obtained; For each candidate acetabular cup, determine the difference between the physical size of the candidate acetabular cup and the target physical size; Based on the determined differences, the target prosthesis is selected from the candidate acetabular cups.

8. A computer program product, characterized in that, When the computer program product is executed by a processor, it implements the method described in any one of claims 1 to 7.

9. An electronic device, characterized in that, The invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image editing by a generative adversarial network using keypoints or segmentation masks constraints

    US20210264207A1

  • Total hip joint image processing method and apparatus

    WO2022007972A1