A method for automatic measurement of postoperative imaging indicators of hip arthroplasty

By using deep learning methods to segment and detect key points in X-ray images after hip replacement surgery, the problem of low accuracy in manual measurement of imaging indicators after hip replacement surgery was solved, and fast, accurate, and highly repeatable automatic measurement was achieved, thereby improving the evaluation efficiency after hip replacement surgery.

CN119856939BActive Publication Date: 2025-10-17INNER MONGOLIA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411926329.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-10-17
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In the existing technology, the measurement of imaging indicators after hip replacement surgery relies on manual measurement, which has low accuracy and is time-consuming and labor-intensive. There is a lack of fast, accurate and highly repeatable automatic measurement methods.

Method used

A deep learning method was used to segment and detect key points in X-ray images after hip replacement surgery using the BIU-Net and RCDA-ResU-Net networks. Combined with the Gaussian heat map regression method, parameters such as acetabular abduction angle, leg length difference, vertical distance of the rotation center, and horizontal distance of the rotation center were automatically measured.

Benefits of technology

It realizes the rapid, accurate and highly repeatable automatic measurement of imaging indicators after hip replacement surgery, saves manpower and time, improves the accuracy and reliability of measurement, and has clinical diagnostic value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119856939B_ABST
    Figure CN119856939B_ABST
Patent Text Reader

Abstract

The application discloses a kind of postoperative image index automatic measurement methods of hip arthroplasty, belong to medical image processing technical field, first obtain original data set;Marking is obtained to obtain segmentation data set and key point detection data set, and image data is carried out data enhancement and data preprocessing;Using segmentation model, segmentation data set is handled to obtain region of interest;Using key point detection model combines Gaussian heat map regression method to detect key point in region of interest image;Finally, according to the position of key point, the four parameters of patient after hip arthroplasty are calculated, to accurately evaluate the condition of patient after hip arthroplasty surgery is carried out.The application uses deep learning measurement method to automatically measure some important indexes quickly, accurately and with high repeatability, solves the pain point of manual labeling, saves manpower and time, has excellent reliability and accuracy, and has application value for clinical diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of medical image processing, and in particular to a method for automatically measuring image indexes after hip arthroplasty. BACKGROUND

[0002] The hip joint is a complex ball-and-socket joint and is one of the joints with the heaviest load in the body. Due to movement and biomechanics, the hip joint is prone to injury, and when the injury is serious, hip arthroplasty needs to be performed. Artificial hip arthroplasty has become an effective means for treating end-stage hip joint degenerative diseases after 30 years of clinical examination, but complications such as prosthesis loosening and dislocation still occur.

[0003] After hip arthroplasty, doctors evaluate the operation effect according to X-ray images, measure image parameters, thereby formulate individualized rehabilitation programs, and intervene in treatment in time to reduce the probability of secondary operation of patients, and reduce pain and economic burden.

[0004] At present, the main postoperative evaluation method is manual measurement by various tools, and the process of measuring image anatomical parameters is complex, highly professional, time-consuming and laborious. Therefore, it is urgent to develop a rapid, accurate and highly repeatable deep learning measurement method to automatically measure some important indexes. For this purpose, a method for automatically measuring image indexes after hip arthroplasty is provided. SUMMARY

[0005] The technical problem to be solved by the application is how to solve the problem of low accuracy, time-consuming and laborious manual measurement in the prior art, and a method for automatically measuring image indexes after hip arthroplasty is provided.

[0006] The application solves the above technical problems by the following technical scheme, and the application comprises the following steps:

[0007] S1: obtaining a plurality of X-ray images after hip arthroplasty and pre-processing to form an original data set;

[0008] S2: labeling the image data in the original data set to obtain a segmentation data set and a key point detection data set, and performing data enhancement and data preprocessing on the image data in the segmentation data set and the key point detection data set;

[0009] S3: processing the segmentation data set by using a segmentation model to obtain a region of interest, and obtaining an image of the region of interest;

[0010] S4: detecting the key points in the image of the region of interest by using a key point detection model combined with a Gaussian heat map regression method, outputting a Gaussian heat map, and then obtaining the positions of the key points;

[0011] S5: Finally, the acetabular abduction angle, leg length difference, rotation center vertical distance and rotation center horizontal distance after hip replacement surgery are calculated according to the key point positions, so as to accurately evaluate the condition of the patient after hip replacement surgery.

[0012] Further, in the step S1, after obtaining the X-ray image after hip replacement surgery, all RGB images and DICOM images are converted into single-layer gray images in JPG format, realizing the preprocessing of the X-ray image.

[0013] Further, in the step S2, the specific processing process is as follows:

[0014] S21: Making a segmentation data set

[0015] The foreground region and the background region are labeled on the X-ray image using the Labelme software, and the labeled image is converted into VOC format, and then a segmentation data set is obtained, which is used to train the segmentation model;

[0016] S22: Making a key point detection data set

[0017] Eight key points are labeled on the X-ray image using the Labelme software, and then a key point detection data set is obtained, which is used to train the key point detection model, wherein the eight key points are: A point: upper edge of the operated acetabulum, O point: rotation center of the operated hip joint, B point: lower edge of the operated acetabulum, C point: lower edge of the operated tear drop, D point: tip of the operated lesser trochanter, E point: rotation center of the non-operated hip joint, F point: lower edge of the non-operated tear drop, and G point: tip of the non-operated lesser trochanter;

[0018] S23: Data augmentation and data preprocessing

[0019] The image data in the segmentation data set and the key point detection data set are subjected to data augmentation and data preprocessing, the data augmentation including randomly adjusting the size, cropping, horizontal flipping and vertical flipping of the segmentation training data set, and randomly hiding, blurring, adjusting the brightness, key point translation, rotation and cropping of the key point detection training data set; the data preprocessing including normalizing, compressing, padding and histogram equalization of all data in the two data sets; wherein the compression uses a fixed aspect ratio method, and the resolution after compression is 512*512.

[0020] Further, in the step S3, the specific processing process is as follows:

[0021] S31: Using the segmentation model to segment the compressed X-ray image to obtain a mask;

[0022] S32: fuse the output mask with the original image to obtain a fused image;

[0023] S33: filter noise of the fused image using a Gaussian filter to obtain a region of interest image.

[0024] Further, in the step S31, the segmentation model is obtained by training based on a BIU-Net network, and the BIU-Net network is improved based on a U-Net network. The improvement includes: adding a padding 0 area during convolution operation to keep the feature map height and width unchanged, so that the output of the model is consistent with the size of the input image; in the up-sampling process, using bilinear interpolation instead of transposed convolution to double the size of the feature map, in each group of two convolutions, the second convolution reduces the number of channels of the feature map to half, so that the feature layer after bilinear sampling and the feature layer connected by jumping have the same number of channels; for the bottom of the U-Net, in the up-sampling module, the feature map after up-sampling is padded to match the size of the two feature layers when splicing;

[0025] The loss function during training of the BIU-Net network is as follows:

[0026] L = L CE + L Dice

[0027] Wherein, L CE is a cross-entropy loss function, L Dice is a Dice loss function, and the calculation formulas are as follows:

[0028]

[0029]

[0030] Wherein, y i is the true label of the i-th sample, p i is the probability of the i-th sample being predicted as a positive class, N is the number of samples, and ∈ is a small positive number.

[0031] Furthermore, in the step S4, the unbiased heat map encoding method and the DARK heat map decoding method are used to improve the key point positioning accuracy; the key point detection model is obtained based on the RCDA-ResU-Net network training, and the RCDA-ResU-Net network is improved based on the U-Net network. The improvement content is as follows: an RFMs module is used to replace the two ordinary convolutions in the U-Net network to extract the local detail features and larger area features of the image under multiple receptive fields; in the Down series modules, the DM module, the DDSRM1 module and the DDSRM2 module are used, and the DDSRM1 module and the DDSR The M2 module uses depthwise separable convolution, channel shuffling, and residual structures to learn feature information. In addition, the ECA attention mechanism is added to focus on channel information in the feature map. The DenseASPP module is used at the bottom of the network, which uses dilated convolutions at different dilation rates to densely connect to obtain a larger receptive field and denser sampling points, improving the model's expressiveness. In the Up series modules, the UDSRM1 and UDSRM2 modules, similar to those in the Down series modules, are used. They also use depthwise separable convolution, channel shuffling, and residual structures to learn feature information. In addition, the CA attention mechanism is added to focus on spatial information in the feature map.

[0032] The loss function during RCDA-ResU-Net network training is as follows:

[0033]

[0034] Among them, W is a hyperparameter representing the weight coefficient, a and c are hyperparameters that control the speed and position of the function curve descent, MSE Loss is the mean square error loss, L1 Loss is the absolute value loss, and M is the weight mask. The calculation formulas are as follows:

[0035]

[0036] Among them, target is the predicted value and threshold is the threshold;

[0037]

[0038] Where N is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample.

[0039] Furthermore, in step S5, when calculating the acetabulum abduction angle, the key points involved include points A, B, C, and F, and the calculation formula is as follows:

[0040]

[0041] Wherein, k1 is the slope of straight line AB, k2 is the slope of straight line CF, the angle between straight line AB and straight line CF is θ, that is, the hip abduction angle, and the angle θ in the normal state after the operation ranges from 30 degrees to 50 degrees.

[0042] Further, in the step S5, when calculating the leg length difference, the key points involved include points C, F, D and G, a straight line CF is formed by points C and F, and the difference between the distances from points D and G to the straight line CF is the leg length difference, and the leg length difference in the normal state after the operation is within 10 mm.

[0043] Further, in the step S5, when calculating the rotation center vertical distance, the key points involved include points C, F, O and E, a straight line CF is formed by points C and F, and the distances from points O and E to the straight line CF are the rotation center vertical distances, and the two rotation center vertical distances in the normal state after the operation are the same.

[0044] Further, in the step S5, when calculating the rotation center horizontal distance, the key points involved include points C, F, O and E, two vertical lines of the straight line CF are drawn through points C and F respectively, the distances from point O to the vertical line through point C and from point E to the vertical line through point F are the rotation center horizontal distances, and the rotation center horizontal distances on the two sides in the normal state after the operation are the same.

[0045] Compared with the prior art, the hip arthroplasty postoperative image index automatic measurement method has the following advantages: the method uses a deep learning measurement method to automatically measure some important indexes quickly, accurately and with high repeatability, solves the pain points of manual labeling, saves manpower and time, has excellent reliability and accuracy, and has application value for clinical diagnosis. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 is the annotation segmentation data set schematic diagram in the embodiment of the application;

[0047] Figure 2 is the annotation key point detection data set schematic diagram in the embodiment of the application;

[0048] Figure 3a is the original X-ray image in the embodiment of the application;

[0049] Figure 3b is the image with a compression resolution of 512*512 in the embodiment of the application;

[0050] Figure 4 is the segmentation and post-processing flowchart of the X-ray image in the embodiment of the application;

[0051] Figure 5 is the BIU-Net network structure schematic diagram in the embodiment of the application;

[0052] Figure 6 is a schematic diagram of the RCDA-ResU-Net network structure in an embodiment of the present application;

[0053] Figure 7 is a schematic diagram of the RFMs structure in an embodiment of the present application;

[0054] Figure 8 is a schematic diagram of the Down module structure in an embodiment of the present application;

[0055] Figure 9 is a schematic diagram of the Downsampling Module (DM) structure in an embodiment of the present application;

[0056] Figure 10a is a schematic diagram of the Down Depth-Separable Residual Module1 (DDSRM1) module in the Down module in an embodiment of the present application;

[0057] Figure 10b is a schematic diagram of the Down Depth-Separable Residual Module2 (DDSRM2) module in the Down module in an embodiment of the present application;

[0058] Figure 11 is a schematic diagram of the ECA attention mechanism in an embodiment of the present application;

[0059] Figure 12 is a schematic diagram of the DenseASPP structure in an embodiment of the present application;

[0060] Figure 13 is a schematic diagram of the Up module in an embodiment of the present application;

[0061] Figure 14a is a schematic diagram of the Up Depth-Separable Residual Module1 (UDSRM1) module in the Up module in an embodiment of the present application;

[0062] Figure 14b is a schematic diagram of the Up Depth-Separable Residual Module2 (UDSRM2) module in the Up module in an embodiment of the present application;

[0063] Figure 15 is a schematic diagram of the CA attention mechanism in an embodiment of the present application;

[0064] Figure 16 is a schematic diagram of the calculation of the acetabular abduction angle in an embodiment of the present application;

[0065] Figure 17 is a calculation diagram of leg length difference in the embodiment of the application;

[0066] Figure 18 is a calculation diagram of vertical distance of rotation center in the embodiment of the application;

[0067] Figure 19 is a calculation diagram of vertical distance of rotation center in the embodiment of the application;

[0068] Figure 20 is a flow chart of the automatic measurement method of postoperative image indicators of hip arthroplasty. DETAILED DESCRIPTION

[0069] The embodiments of the application will be described in detail below, and the embodiments are implemented on the premise of the technical scheme of the application, and detailed implementation modes and specific operation processes are given, but the protection scope of the application is not limited to the following embodiments.

[0070] The embodiment provides a technical scheme: an automatic measurement method of postoperative image indicators of hip arthroplasty, which comprises the following main steps:

[0071] Step 1: obtaining a plurality of postoperative X-ray images of hip arthroplasty and pre-processing to form an original data set;

[0072] Step 2: labeling the image data in the original data set to obtain a segmentation data set and a key point detection data set, and performing data enhancement and data preprocessing on the image data in the segmentation data set and the key point detection data set;

[0073] Step 3: processing the segmentation data set by using a segmentation model to obtain a region of interest, and obtaining an image of the region of interest;

[0074] Step 4: detecting the key points in the image of the region of interest by using a key point detection model combined with a Gaussian heat map regression method, outputting a Gaussian heat map, and then obtaining the positions of the key points;

[0075] Step 5: finally, calculating the abduction angle, leg length difference, vertical distance of rotation center and horizontal distance of rotation center of the patient after hip arthroplasty according to the key position points, so as to accurately evaluate the condition of the patient after hip arthroplasty.

[0076] The detailed processes of the above steps will be further described as follows:

[0077] Step 1: obtaining an original data set

[0078] After obtaining the postoperative X-ray images of hip arthroplasty, all RGB images and DICOM images are converted into single-layer gray images in JPG format, so as to reduce the calculation cost, reduce the risk of overfitting and redundant information.

[0079] Step 2: Making a data set

[0080] a. Making a segmentation data set

[0081] An X-ray image after hip arthroplasty contains a lot of information. The goal of the present application is to find the key points on the skeleton. The image information of the human tissue part needs to be retained, and the rest of the useless information can be cropped to become a background with a brightness of 0, thus reducing the adverse effects of useless information on the detection accuracy of key points. As shown in Figure 1 , Labelme software is used for labeling. The area outside the red polygon is the background, and the area inside is the foreground. The green polygon is inside the background, and the labeled image is converted to VOC format. This data set is used for subsequent BIU-Net network training to detect the region of interest.

[0082] b. Making a key point detection data set

[0083] As shown in Figure 2 , Labelme software is also used. Eight key points are labeled using the point labeling method, which are A: upper edge of the operated side acetabulum, O: rotation center of the operated side hip joint, B: lower edge of the operated side acetabulum, C: lower edge of the operated side tear drop, D: tip of the operated side lesser trochanter, E: rotation center of the non-operated side hip joint, F: lower edge of the non-operated side tear drop, and G: tip of the non-operated side lesser trochanter. This data set is used for subsequent RCDA-ResU-Net network training to detect the required key points.

[0084] c. Data augmentation and data preprocessing

[0085] Data augmentation includes randomly resizing, cropping, horizontal flipping, and vertical flipping of the segmentation training data set, and randomly hiding, blurring, adjusting brightness, translating, rotating, and cropping of the key point detection training data set. Data preprocessing includes normalization, compression, padding, and histogram equalization of all data in the two data sets. Suitable data augmentation can improve the generalization ability of the model, prevent overfitting of the model, reduce the demand for large-scale data sets, handle unbalanced data problems, and improve robustness. Suitable data preprocessing can accelerate convergence, improve model performance, reduce model complexity, unify data scale, and improve data quality. Compression uses a fixed aspect ratio method. This method compresses the resolution of the X-ray image to 512*512, as shown in Figure 3a , Figure 3b The left side ( Figure 3a ) is the original image, and the right side ( Figure 3b) for the compressed resolution of 512*512 image, while the key point coordinates are also compressed synchronously. This method retains more image features, improves the training accuracy, reduces the training time, and reduces the computer performance requirements.

[0086] Step 3: Obtain the region of interest by image segmentation

[0087] As shown in Figure 4 , based on the segmentation dataset prepared in the previous step, the improved U-Net network, BIU-Net network, is used to segment the postoperative X-ray image to obtain the mask. The loss function (CELoss+DiceLoss) is redesigned to train the BIU-Net network, achieving high-precision segmentation. The output mask is then fused with the original image, which sets the pixels of the interference information to 0 and retains the high-quality foreground image. Finally, a Gaussian filter is used to filter the noise of the fused image, and the final output X-ray image is used as the dataset (region of interest dataset) for the subsequent key point detection model.

[0088] As shown in Figure 5 , the BIU-Net network is introduced as follows:

[0089] First, the model increases the padding 0 area during convolution operation to keep the feature map height and width unchanged, so that the output of the model is consistent with the size of the input image, both of which are (512, 512). At the same time, a BN layer (Batch Normalization) is added between the convolution and the activation function to speed up the convergence speed of the training model and prevent gradient disappearance and gradient explosion. Second, in the up-sampling process, bilinear interpolation is used instead of transposed convolution to double the size of the feature map. In each group of two convolutions, the second convolution reduces the number of channels of the feature map to half. The purpose of this is to make the feature layer after bilinear sampling have the same number of channels as the feature layer connected by the skip connection. Third, for the U-Net bottom, in the up-sampling module, the feature map after up-sampling needs to be padded to ensure that the size of the two feature layers is matched when splicing. This is because if the input image size is not an integer multiple of 16, the maxpooling layer will round down after 4 times of down-sampling. When using bilinear interpolation for up-sampling, the size will be inconsistent when splicing. At this time, the difference between the two is calculated and the up-sampled image is padded to the appropriate size.

[0090] The model optimizer is Adam, the initial learning rate is 0.01, and a custom learning rate update strategy is used, with a total of 300 epochs. There are 489 X-ray images after hip replacement surgery, of which 394 are training sets, 50 are validation sets, and 45 are test sets, with a ratio of about 8:1:1.

[0091] The loss function during BIU-Net network training is as follows:

[0092] L=L CE +L Dice

[0093] Among them, L CE is the cross entropy loss function, L Dice is the Dice loss function, and the calculation formulas are as follows:

[0094]

[0095] Among them, y i is the true label of the i-th sample, p i is the probability that the i-th sample is predicted to be positive, N is the number of samples, and ∈ is a small positive number.

[0096] Step 4: Use Gaussian heat map regression method to detect key points

[0097] Based on the region of interest dataset obtained in the previous step, the unbiased heatmap encoding method and the DARK heatmap decoding method are used to improve the accuracy of key point positioning, and an improved U-Net network - RCDA-ResU-Net model is designed to detect key points in X-ray images after hip replacement surgery (such as Figure 6 As shown), we also designed the WeightedShrinkageLoss (WS Loss) loss function, and the network structure is shown in the figure below. Figure 6 As shown in the figure, more attention is paid to small area targets, and multi-scale dilated convolution, depth-separable convolution, channel shuffling, residual structure, DenseASPP and improved attention mechanism are used.

[0098] The traditional Gaussian heat map encoding and decoding process introduces quantization errors, which leads to a decrease in key point detection accuracy. The heat map predicted by the model does not meet the standard Gaussian distribution, resulting in inaccurate Argmax function prediction. Since the accuracy of key point positioning in X-ray images directly affects the accuracy of measurement parameters, the unbiased heat map encoding method and the DARK heat map decoding method are used to improve the key point positioning accuracy.

[0099] The RCDA-ResU-Net model consists of three parts: encoder, decoder and skip connection.

[0100] The encoder includes Receptive field Modules (RFMs), Down1, Down2, Down3 and DenseASPP (Dense Atrous Spatial Pyramid Pooling), adopts a similar layer-by-layer down-sampling and convolutional layer method to extract image features as the original U-Net model, so that the number of channels is doubled, the resolution is halved, and the calculation amount of the model is reduced. An RFMs module (as shown in Figure 7 ) is used instead of two ordinary convolutions in the U-Net network to extract local detail features and larger area features of images under multiple receptive fields. In order to reduce the calculation amount and parameter amount of the model, a DM module (as shown in Figure 8 ) is used in the Down (down-sampling) series module (as shown in Figure 9 ), and a DDSRM1 module and a DDSRM2 module (as shown in Figure 10a , Figure 10b ), which use deep separable convolution, channel shuffle and residual structure to learn feature information, and additionally add an ECA attention mechanism (as shown in Figure 11 ). The DM structure can accurately grasp the fine features of the image and keep the number of channels unchanged while halving the resolution. Compared with traditional convolution, deep separable convolution makes the model more concise and less likely to overfit the data, and channel shuffle can enhance cross-channel communication of features to extract more rich and effective feature information, so that the model performs better under the condition of a small amount of hip X-ray image dataset, realizes faster inference speed, and reduces the requirement of the model for the running hardware environment. The ECA attention mechanism focuses on the relationship between different channels, gives each channel a weight, enhances important channels, and suppresses unimportant channels.

[0101] As shown in Figure 12 , the DenseASPP module uses dilated convolution with different dilation rates to obtain a larger receptive field and a more dense number of sampling points. In order to better fuse deep feature maps with shallow feature maps, the model can learn the feature maps output by the previous several encoder sub-modules at the "bottom" of the RCDA-ResU-Net model, integrate features at different scales, and improve the expression ability of the model. Moreover, the feature map size of the "bottom layer" is small, and using DenseASPP will not bring too much calculation amount to the model.

[0102] As shown in Figure 13 , in the Up (up-sampling) series module, the feature map is up-sampled and stacked with the shallow feature map transmitted by the jump connection, and the UD SRM1 module and the UD SRM2 module similar to the Down series are used, which also use deep separable convolution, channel shuffle and residual structure to learn feature information (as shown in Figure 14a , 14bAs shown), a CA attention mechanism is also added (as shown Figure 15 As shown in the figure, we focus on the spatial information in the feature map and repeat the above operation many times until the last decoder submodule uses 3×3 convolution to adjust the number of channels and outputs a Gaussian heat map of (8, 512, 512).

[0103] The loss function of the RCDA-ResU-Net model is as follows:

[0104]

[0105] WeightedShrinkageLoss gives greater weight to foreground pixels in the Gaussian heat map, so that the model pays more attention to foreground pixels during training, improving training efficiency and key point detection accuracy. Among them, W is a hyperparameter representing the weight coefficient, a and c are hyperparameters that control the speed and position of the function curve respectively, MSE Loss is the mean square error loss, L1Loss is the absolute value loss, and M is the weight mask. The calculation formulas are as follows:

[0106]

[0107] Among them, target is the predicted value and threshold is the threshold;

[0108]

[0109] Where N is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample.

[0110] The initial learning rate of the model is set to 0.001, the optimizer is Adam, the loss function is WeightedShrinkageLoss, and the epoch is 50. The hip replacement X-ray image dataset has a total of 489 images, of which 394 are training sets, 50 are validation sets, and 45 are test sets, with a ratio of approximately 8:1:1.

[0111] Step 5: Postoperative imaging parameter measurement for hip replacement

[0112] like Figure 16 As shown, the acetabulum abduction angle: the relevant key points include A, B, C, and F. AB forms a straight line, and CF forms another horizontal reference line. The angle between the two straight lines is the abduction angle, as shown in Figure 16 As shown, the tangent formula can be used, that is, when the slopes of AB and CF exist, set as k1 and k2, and the angle between the two straight lines is θ, then Normally, the angle ranges from 30 degrees to 50 degrees.

[0113] As shown in Figure 17 , leg length difference: relevant key points include C, F, D, G, a straight line is formed by CF, and the difference between the distances of D and G to the straight line is the leg length difference. Assuming that the coordinates of a key point are (x0, y0), the coordinates of C are (x1, y1), and the coordinates of F are (x2, y2), the straight line equation of the horizontal reference line CF is ax + by + c = 0, then the distance of the key point to the straight line CF is: wherein a = (y2-y1), b = (x1-x2), and c = (x2y1-x1y2). It is common for the leg length difference after surgery to be greater than 0, and the tolerable range is within 10 mm.

[0114] As shown in Figure 18 , vertical distance of rotation center: relevant key points include C, F, O, and E, a straight line is formed by CF, and the distances of O and E to the straight line are the vertical distances of the rotation center, and the distance calculation method is as above. Ideally, the vertical distances on both sides should be the same.

[0115] As shown in Figure 19 , horizontal distance of rotation center: relevant key points include C, F, O, and E, two vertical lines of CF are drawn through C and F respectively, and the distances of O to the vertical line through C and E to the vertical line through F are the horizontal distances of the rotation center, so the vertical line equation of a point on the horizontal reference line needs to be calculated first. Assuming that the slope of the horizontal reference line is k, the slope of the vertical line is The vertical line equation through a point (x v ,y v ) on the horizontal line: k v x-y+y v -k v x v =0. According to the coordinates of O, E, C, and F in Figure 19 , the horizontal distance predicted by the model can be calculated using the vertical line equation and the point-to-line distance formula. Ideally, the horizontal distances on both sides should be the same.

[0116] Although embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those of ordinary skill in the art can make changes, modifications, replacements, and variations to the above embodiments within the scope of the present application.

Claims

1. A method for automatically measuring imaging indicators after hip replacement surgery, characterized in that: The following steps are involved: S1: Obtain multiple X-ray images after hip replacement surgery and perform preprocessing to form an original dataset; S2: Label the image data in the original dataset to obtain a segmentation dataset and a key point detection dataset, and perform data enhancement and data preprocessing on the image data in the segmentation dataset and the key point detection dataset; S3: Using the segmentation model to process the segmentation data set to obtain the region of interest and obtain an image of the region of interest; S4: Use the key point detection model combined with the Gaussian heat map regression method to detect the key points in the image of the region of interest, output the Gaussian heat map, and then obtain the position of each key point; S5: Finally, the four parameters of acetabular abduction angle, leg length difference, vertical distance of the rotation center, and horizontal distance of the rotation center after hip replacement surgery are calculated based on the positions of key points to accurately evaluate the patient's condition after hip replacement surgery; In the step S4, the unbiased heat map encoding method and the DARK heat map decoding method are used to improve the key point positioning accuracy; the key point detection model is obtained based on the RCDA-ResU-Net network training, and the RCDA-ResU-Net network is improved based on the U-Net network. The improvement content is as follows: an RFMs module is used to replace the two ordinary convolutions in the U-Net network to extract the local detail features and larger area features of the image under multiple receptive fields; in the Down series modules, the DM module, the DDSRM1 module and the DDSRM2 module are used. The block uses depthwise separable convolution, channel shuffling, and residual structure to learn feature information. In addition, the ECA attention mechanism is added to focus on the channel information in the feature map. The DenseASPP module is used at the bottom of the network, which uses dilated convolutions at different dilation rates to obtain a larger receptive field and denser sampling points, improving the model's expressiveness. In the Up series modules, the UDSRM1 and UDSRM2 modules, similar to those in the Down series modules, are used. They also use depthwise separable convolution, channel shuffling, and residual structure to learn feature information. In addition, the CA attention mechanism is added to focus on the spatial information in the feature map. The loss function during RCDA-ResU-Net network training is as follows: Among them, W is a hyperparameter representing the weight coefficient, a and c are hyperparameters that control the speed and position of the function curve descent, MSE Loss is the mean square error loss, L1 Loss is the absolute value loss, and M is the weight mask. The calculation formulas are as follows: Among them, target is the predicted value and threshold is the threshold; Where N is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample.

2. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 1, characterized in that: In step S1, after obtaining the X-ray image after hip replacement surgery, all RGB images and DICOM images are converted into single-layer grayscale images in JPG format to achieve preprocessing of the X-ray image.

3. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 2, characterized in that: In step S2, the specific processing process is as follows: S21: Create a segmentation dataset Use Labelme software to mark the foreground and background areas on the X-ray image, and convert the marked image into VOC format to obtain a segmentation dataset for training the segmentation model; S22: Create a key point detection dataset Eight key points were annotated on the X-ray image using Labelme software to obtain a key point detection dataset for training the key point detection model. The eight key points are: point A: superior rim of the acetabulum on the surgical side, point O: rotation center of the hip joint on the surgical side, point B: inferior rim of the acetabulum on the surgical side, point C: inferior rim of the teardrop on the surgical side, point D: tip of the lesser trochanter on the surgical side, point E: rotation center of the hip joint on the non-surgical side, point F: inferior rim of the teardrop on the non-surgical side, and point G: tip of the lesser trochanter on the non-surgical side. S23: Data enhancement and data preprocessing Perform data augmentation and data preprocessing on the image data in the segmentation dataset and key point detection dataset. Data augmentation includes random resizing, cropping, horizontal flipping, and vertical flipping of the segmentation training dataset, and random key point hiding, blurring, brightness adjustment, key point translation, rotation, and cropping of the key point detection training dataset. Data preprocessing includes normalization, compression, padding, and histogram equalization of all data in the two datasets. Compression uses a fixed aspect ratio method, and the compressed resolution is 512*512.

4. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 3, characterized in that: In step S3, the specific processing process is as follows: S31: Use the segmentation model to segment the compressed X-ray image to obtain a mask; S32: Fusing the output mask with the original image to obtain a fused image; S33: Use a Gaussian filter to filter out noise from the fused image to obtain an image of the region of interest.

5. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 4, characterized in that: In the step S31, the segmentation model is trained based on the BIU-Net network, which is improved based on the U-Net network. The improvement content is as follows: adding a padding 0 area during the convolution operation to keep the height and width of the feature map output by the convolution unchanged, so that the output of the model is consistent with the size of the input image; in the upsampling process, bilinear interpolation is used instead of transposed convolution to double the size of the feature map. In each group of two convolutions, the second convolution reduces the number of channels of the feature map to half, so that the feature layer after bilinear sampling has the same number of channels as the feature layer of the jump connection; for the bottom of the U-Net, in the upsampling module, the feature map of the feature layer after upsampling is padded so that the sizes of the two feature layers are matched when spliced; The loss function during BIU-Net network training is as follows: L=L CE +L Dice Among them, L CE is the cross entropy loss function, L Dice is the Dice loss function, and the calculation formulas are as follows: Among them, y i is the true label of the i-th sample, p i is the probability that the i-th sample is predicted to be positive, N is the number of samples, and ∈ is a small positive number.

6. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 5, characterized in that: In step S5, when calculating the acetabulum abduction angle, the key points involved include points A, B, C, and F, and the calculation formula is as follows: Among them, k1 is the slope of line AB, k2 is the slope of line CF, and the angle between line AB and line CF is θ, that is, the acetabular abduction angle. Under normal conditions after surgery, the angle θ ranges from 30 degrees to 50 degrees.

7. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 6, characterized in that: In step S5, when calculating the leg length difference, the key points involved include points C, F, D, and G. Points C and F form a straight line CF, and the difference in distance from points D and G to the straight line CF is calculated as the leg length difference. Under normal conditions after surgery, the range of the leg length difference is within 10 mm.

8. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 7, characterized in that: In step S5, when calculating the vertical distance of the rotation center, the key points involved include points C, F, O, and E. Points C and F form a straight line CF. The distances from points O and E to the straight line CF are calculated as the vertical distances of the rotation center. Under normal conditions after surgery, the vertical distances of the two rotation centers are the same.

9. The method for automatically measuring imaging indicators after hip replacement surgery according to claim 8, characterized in that: In step S5, when calculating the horizontal distance of the rotation center, the key points involved include points C, F, O, and E. Two perpendicular lines CF are drawn through points C and F respectively. The distance from point O to the perpendicular line through point C and the distance from point E to the perpendicular line through point F are the horizontal distances of the rotation center. Under normal conditions after surgery, the horizontal distances of the rotation centers on both sides are the same.

Citation Information

Patent Citations

  • Medical image key point detection method and system based on improved neural network

    CN113450328A

  • Ceramic grain image segmentation method based on RFB U-Net

    CN115496901A