A femoral head necrosis staging method, system, device and storage medium
By using target detection and segmentation models to identify and segment X-ray images of femoral head necrosis, the problem of insufficient accuracy in staging of femoral head necrosis by junior doctors has been solved, achieving higher staging consistency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINESE PEOPLES LIBERATION ARMY ARMY SPECIAL MEDICAL CENTER
- Filing Date
- 2024-11-25
- Publication Date
- 2026-05-15
AI Technical Summary
In current technology, the accuracy of staging femoral head necrosis depends on the doctor's diagnostic experience, which leads to insufficient staging accuracy by junior doctors and makes it difficult to guarantee the rights and interests of patients.
We used object detection and object segmentation models to identify and segment X-ray images of femoral head necrosis. We combined the identification confidence and segmentation confidence to calculate the stage of femoral head necrosis. We improved the stage accuracy by training the YOLOv8 algorithm and the U-Net segmentation algorithm.
It improves the accuracy of staging femoral head necrosis, provides doctors with easily understandable and interpretable characteristic descriptions, reduces the difficulty of judgment for junior doctors, and improves staging consistency.
Smart Images

Figure CN119477888B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a method, system, device, and storage medium for determining the stage of femoral head necrosis. Background Technology
[0002] Avascular necrosis of the femoral head (AVNFH) is a disease caused by reduced or interrupted blood supply to the femoral head, leading to bone cell death. In China, as of 2015, the number of AVNFH patients had reached approximately 8 million, with about 100,000 new cases each year. It is noteworthy that the early asymptomatic and painless nature of AVNFH makes it difficult to detect; however, over 70% of asymptomatic cases can progress to symptomatic femoral head collapse, ultimately requiring hip replacement surgery. The average interval between the first symptom and femoral head collapse is only 12 months. The success rate of treatment depends on the stage at which care begins; therefore, once AVNFH is diagnosed, a timely and scientific staging diagnosis should be made to guide the development of a reasonable treatment plan and accurately predict the prognosis.
[0003] Staging of femoral head necrosis primarily relies on imaging examinations such as X-rays, CT scans, and MRI. Among these, X-ray examination is the most widely used due to its low cost and minimal radiation, and is usually the preferred diagnostic imaging method for femoral head necrosis. Currently, physicians manually stage X-ray data according to the Ficat staging criteria (as shown in Table 1), and determine the patient's condition and treatment plan based on the staging results. Therefore, accurate staging of femoral head necrosis based on X-ray images is of significant guiding importance for the diagnosis and treatment of femoral head necrosis. However, the accuracy of staging currently depends on the physician's diagnostic experience, making staging challenging for physicians, especially junior physicians. Improving the accuracy of staging and ensuring consistency in X-ray staging of femoral head necrosis among physicians of varying experience levels is a problem that needs to be addressed to protect patients' rights. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for staging femoral head necrosis, which solves the problem of low staging accuracy caused by manual staging of femoral head necrosis in existing technologies.
[0005] According to an embodiment of the present invention, a method for staging femoral head necrosis includes:
[0006] X-ray images of avascular necrosis of the femoral head were acquired, and a target detection model was used to identify all X-ray images of avascular necrosis of the femoral head to obtain the identification confidence score.
[0007] The X-ray images of femoral head necrosis were segmented using a target segmentation model to obtain multiple segmentation regions, and each segmentation region was assigned a region label.
[0008] The X-ray images of femoral head necrosis were divided into multiple regions of interest, and each region of interest was assigned a corresponding region label based on its location.
[0009] Based on the region label, the segmentation confidence of each region of interest is calculated, and the probability of femoral head necrosis X-ray image at each stage is calculated based on the segmentation confidence and recognition confidence. The stage with the highest probability is selected as the femoral head necrosis stage.
[0010] Preferably, before using the object detection model and the object segmentation model, the object detection model and the object segmentation model need to be trained using a historical image dataset;
[0011] The training process of the target detection model is as follows:
[0012] The X-ray images of femoral head necrosis were bound and labeled to indicate the stages of artificial femoral head necrosis.
[0013] The YOLOv8 algorithm was used to identify X-ray images of femoral head necrosis, and the algorithmic staging of femoral head necrosis was obtained.
[0014] The staging of artificial femoral head necrosis was compared with that of the algorithmic femoral head necrosis staging. Based on the comparison results, the YOLOv8 algorithm was optimized until the staging of artificial femoral head necrosis and the staging of algorithmic femoral head necrosis were the same, thus obtaining the target detection model.
[0015] Preferably, the training process of the target segmentation model is as follows:
[0016] The X-ray images of femoral head necrosis were bounded and marked to indicate all segmented regions of the femoral head;
[0017] The U-Net segmentation algorithm was used to identify X-ray images of femoral head necrosis, and the image segmentation results were obtained.
[0018] The image segmentation result is compared with the segmented region, and the U-Net segmentation algorithm is optimized based on the comparison result until the image segmentation result is the same as the segmented region, thus obtaining the target segmentation model.
[0019] Preferably, the segmented region includes the femoral head morphological region. Joint space region and femoral head lesion area ;
[0020] The area labels of the femoral head shape region include the normal femoral head shape region s1, the interrupted femoral head shape region s2, the flattened femoral head region s3, and the collapsed femoral head region s4.
[0021] The region labels of the joint space area include the normal joint space area s5, the narrowed joint space area s6, and the disappearance of the joint space s7.
[0022] The regional labels for the femoral head lesion areas include femoral head sclerosis area s8, femoral head cystic degeneration area s9, femoral head crescent sign area s10, mild osteoporosis area s11, and patchy osteoporosis area s12.
[0023] Preferably, the formula for calculating the segmentation confidence level is as follows:
[0024]
[0025] Where siPX is the set of pixels in the region of interest labeled si, and ti is the weight of the region labeled si.
[0026] Preferably, each region of interest has one or more region labels.
[0027] When k=1 or 2, the segment confidence corresponding to the largest region label is taken as the segment confidence of the region of interest;
[0028] When k=3, the segment confidence score corresponding to the region label that is greater than the preset value is taken as the segment confidence score of the region of interest.
[0029] Preferably, the formula for calculating the probability of femoral head necrosis X-ray images in each stage based on segmentation confidence and identification confidence is as follows:
[0030]
[0031] Among them, P0, PI, PIIA, PIIB, PIII, and PIV are the recognition confidence scores of different stages obtained by the target detection model.
[0032] On the other hand, according to embodiments of the present invention, a staging system for femoral head necrosis is also provided, wherein the system uses the above-described staging method for femoral head necrosis, including:
[0033] A training module, which is used to train the object detection module and the object segmentation module;
[0034] The data acquisition module is used to acquire X-ray images of femoral head necrosis and preprocess the X-ray images of femoral head necrosis.
[0035] The target detection module is equipped with a target recognition model, which is used to identify the processed X-ray images of femoral head necrosis and obtain the recognition confidence level.
[0036] The target segmentation module contains a target segmentation model, which is used to segment the processed X-ray image of femoral head necrosis to obtain segmented regions and divide the segmented regions into multiple regions of interest.
[0037] The decision module is used to calculate the segmentation confidence of each region of interest and the probability of each stage of the femoral head necrosis X-ray image, and to make a decision on the femoral head stage in the femoral head necrosis X-ray image.
[0038] On the other hand, according to an embodiment of the present invention, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the above-described method for determining the staging of femoral head necrosis.
[0039] On the other hand, according to an embodiment of the present invention, a computer storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, the processor performs the above-described method for determining the staging of femoral head necrosis.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] This invention uses a target detection model to initially detect osteonecrosis X-ray images and obtain preliminary staging confidence. Then, a target segmentation model is used to segment various lesion regions in the osteonecrosis X-ray images and calculate the confidence of each region. The confidence scores obtained from both the target detection and segmentation models are combined to determine the stage of osteonecrosis in the X-ray images. This transforms various lesion characteristics into quantifiable and computable features, providing doctors with an easily understandable and interpretable feature description to understand and judge the staging logic of the model, thus improving the accuracy of doctors' staging judgments of osteonecrosis. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating the phase determination process according to an embodiment of the present invention.
[0043] Figure 2 This is a diagram of the phased determination system architecture according to an embodiment of the present invention. Detailed Implementation
[0044] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0045] like Figure 1 As shown in the figure, this invention proposes a method for staging femoral head necrosis, including:
[0046] X-ray images of avascular necrosis of the femoral head were acquired, and a target detection model was used to identify all X-ray images of avascular necrosis of the femoral head to obtain the identification confidence score.
[0047] Before using the target detection model, it is necessary to train the target detection model using previous X-ray images (historical image dataset) that have been used to accurately determine the stage of femoral head necrosis.
[0048] The training process of the target detection model is as follows:
[0049] The X-ray images of femoral head necrosis were bound and labeled to indicate the stages of artificial femoral head necrosis.
[0050] The YOLOv8 algorithm (including but not limited to YOLOv3, YOLOv5, YOLOx, YOLOv8, Faster RCNN and other object detection networks) is used to identify X-ray images of femoral head necrosis and obtain the algorithmic staging of femoral head necrosis.
[0051] The staging of femoral head necrosis by artificial means is compared with that by algorithm. Based on the comparison results, the YOLOv8 algorithm is optimized until the staging of femoral head necrosis by artificial means and that by algorithm is the same, thus obtaining the target detection model. Theoretically, the termination point of parameter optimization is when the staging of femoral head necrosis by artificial means and that by algorithm is the same. However, due to the errors brought about by various components in the actual operation process, in the process of multiple parameter optimizations, it is only necessary for the staging results of femoral head necrosis to be the same as those of algorithm with a probability of more than 90%.
[0052] After training, new X-ray images of femoral head necrosis were acquired, and the object detection model was used to identify all the X-ray images of femoral head necrosis, yielding the following identification results:
[0053] The tag set, nVNFH, I, IIA, IIB, III, and IV, respectively represent the stage of femoral head necrosis on X-ray images: stage 0 (preclinical stage), stage I (pre-radiation stage), stage IIA (necrosis formation), stage IIB (transitional stage), stage III (collapse stage), and stage IV (arthritis stage).
[0054] Identification confidence levels: P0, PI, PIIA, PIIB, PIII, PIV, corresponding to the femoral head stages nVNFH, I, IIA, IIB, III, IV in the label set, respectively.
[0055] The X-ray images of femoral head necrosis were segmented using a target segmentation model to obtain multiple segmentation regions, and each segmentation region was assigned a region label.
[0056] Before using the target segmentation model, it is necessary to train the target segmentation model using previous X-ray images (historical image dataset) that have been used to accurately determine the stage of femoral head necrosis.
[0057] The training process of the target segmentation model is as follows:
[0058] The X-ray images of femoral head necrosis were bounded and marked to indicate all segmented regions of the femoral head;
[0059] The U-Net segmentation algorithm (including but not limited to U-Net, U-Net++, SegNet, DeepLab, RefineNet and other target segmentation algorithms) is used to identify X-ray images of femoral head necrosis and obtain image segmentation results.
[0060] The image segmentation result is compared with the segmented region, and the U-Net segmentation algorithm is optimized based on the comparison result until the image segmentation result is the same as the segmented region, thus obtaining the target segmentation model. Theoretically, the termination point of parameter optimization is when the image segmentation result is the same as the segmented region. However, due to the errors brought by various components in the actual operation process, in the process of multiple parameter optimizations, it is only necessary for the image segmentation result to be the same as the segmented region in more than 90% of the area.
[0061] After training, new X-ray images of femoral head necrosis are acquired, and the target segmentation model is used to identify all X-ray images of femoral head necrosis to obtain segmented regions. Each segmented region is then assigned a region label.
[0062] The segmented region includes the femoral head morphological region. Joint space region and femoral head lesion area ;
[0063] The area labels of the femoral head shape region include the normal femoral head shape region s1, the interrupted femoral head shape region s2, the flattened femoral head region s3, and the collapsed femoral head region s4.
[0064] The region labels of the joint space area include the normal joint space area s5, the narrowed joint space area s6, and the disappearance of the joint space s7.
[0065] The regional labels for the femoral head lesion areas include femoral head sclerosis area s8, femoral head cystic degeneration area s9, femoral head crescent sign area s10, mild osteoporosis area s11, and patchy osteoporosis area s12.
[0066] Among them, P1-P3 and S1-S12 are region labels.
[0067] The X-ray images of femoral head necrosis were divided into multiple regions of interest, and each region of interest was assigned a corresponding region label based on its location.
[0068] Based on the segmentation results of all X-ray images of femoral head necrosis using the target segmentation model, the segmented region is divided into multiple regions of interest (ROIs). Let the center point coordinates of the segmented region be (xd, yd). The region width of each ROI RIOm is wROI = wd + f1, and the region height is hROI = hd + f2, where m = 1, 2, 3, ..., where wd is the pixel width of the m-th target region, hd is the pixel height of the m-th target region, and f1 and f2 are the coordinate change thresholds of the ROI.
[0069] Since each region of interest is a rectangle, some regions of interest may fall within multiple segmented regions simultaneously and have multiple region labels.
[0070] Based on the region label, the segmentation confidence of each region of interest is calculated, and the probability of femoral head necrosis X-ray image at each stage is calculated based on the segmentation confidence and recognition confidence. The stage with the highest probability is selected as the femoral head necrosis stage.
[0071] Based on the region labels, the segmentation confidence of each region of interest is calculated using the following formula:
[0072]
[0073] Where siPX is the set of pixels in the region of interest labeled si, and ti is the weight of the region labeled si.
[0074] When k=1, t1+t2+t3+t4=1, and the segmentation confidence corresponding to the largest region label is taken as the segmentation confidence of the region of interest. At the same time, the femoral head feature description corresponding to the region label is taken as the femoral head disease description, while the segmentation confidence corresponding to other region labels is set to zero.
[0075] When k=2, t5+t6+t7=1. At the same time, the segmentation confidence corresponding to the largest region label is taken as the segmentation confidence of the region of interest, and the femoral head feature description corresponding to the region label is taken as the femoral head disease description, while the segmentation confidence corresponding to other region labels is set to zero.
[0076] When k=3, t8+t9+t10+t11+t12=1. The segment confidence corresponding to the region label is greater than the preset value as the segment confidence of the region of interest. At the same time, the femoral head feature description corresponding to the region label is used as the femoral head disease description, while the segment confidence corresponding to other region labels is set to zero.
[0077] Then, based on the segmentation confidence score calculated above, combined with the identification confidence score, the probability of each stage of the femoral head in the X-ray image of this osteonecrosis stage is calculated:
[0078]
[0079] Among them, P0, PI, PIIA, PIIB, PIII, and PIV are the recognition confidence scores of different stages obtained by the target detection model.
[0080] The X-ray images with the highest probability from PFicat0, PFicatI, PFicatIIA, PFicatIIB, PFicatIII, and PFicatIV were selected as the stages for osteonecrosis, and the femoral head in the X-ray images was described as follows: Table 1.
[0081] Table 1: Correspondence between the staging characteristics of femoral head necrosis and Ficat staging
[0082]
[0083] Initial detection of osteonecrosis on X-ray images using a target detection model yields preliminary staging confidence. Subsequently, a target segmentation model is employed to segment various lesion regions within the X-ray images, calculating the confidence level for each region. The combined confidence levels from both the target detection and segmentation models are then used to determine the stage of osteonecrosis on the X-ray image. This process transforms various lesion characteristics into quantifiable, computationally achievable features, providing doctors with an easily understandable and interpretable feature description to comprehend and interpret the model's staging logic, thereby improving the accuracy of doctors' staging judgments for osteonecrosis.
[0084] On the other hand, such as Figure 2 As shown, this embodiment of the invention also provides a staging system for femoral head necrosis, which uses the above-mentioned staging method for femoral head necrosis, including:
[0085] A training module, which is used to train the object detection module and the object segmentation module;
[0086] The data acquisition module is used to acquire X-ray images of femoral head necrosis and preprocess the X-ray images of femoral head necrosis.
[0087] The processing module is used to identify and segment the processed X-ray image of femoral head necrosis using the target detection module and the target segmentation module, respectively, to obtain the identification confidence and segmentation region, and to divide the segmentation region into multiple regions of interest;
[0088] The decision module is used to calculate the segmentation confidence of each region of interest and the probability of each stage of the femoral head necrosis X-ray image, and to make a decision on the femoral head stage in the femoral head necrosis X-ray image.
[0089] On the other hand, embodiments of the present invention also provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the above-described method for determining the staging of femoral head necrosis.
[0090] On the other hand, embodiments of the present invention also provide a computer storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the above-described method for determining the staging of femoral head necrosis.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for staging femoral head necrosis, characterized in that: include: X-ray images of avascular necrosis of the femoral head were acquired, and a target detection model was used to identify all X-ray images of avascular necrosis of the femoral head to obtain the identification confidence score. The X-ray images of femoral head necrosis were segmented using a target segmentation model to obtain multiple segmentation regions, and each segmentation region was assigned a region label. The X-ray images of femoral head necrosis were divided into multiple regions of interest, and each region of interest was assigned a corresponding region label based on its location. The segmented region includes the femoral head morphological region. Joint space region and femoral head lesion area ; The area labels of the femoral head shape region include the normal femoral head shape region s1, the interrupted femoral head shape region s2, the flattened femoral head region s3, and the collapsed femoral head region s4. The region labels of the joint space area include the normal joint space area s5, the narrowed joint space area s6, and the disappearance of the joint space s7. The regional labels for the femoral head lesion areas include femoral head sclerosis area s8, femoral head cystic degeneration area s9, femoral head crescent sign area s10, mild osteoporosis area s11, and patchy osteoporosis area s12. Based on the region labels, the segmentation confidence score for each region of interest is calculated, and the formula for calculating the segmentation confidence score is as follows: Where siPX is the set of pixels in the region of interest labeled si, and ti is the weight of the region labeled si; Then, based on the segmentation confidence and recognition confidence, the probability of X-ray images of femoral head necrosis in each stage is calculated, and the stage with the highest probability is selected as the stage of femoral head necrosis.
2. The method for determining the stage of femoral head necrosis as described in claim 1, characterized in that: Before using the object detection model and the object segmentation model, it is necessary to train the object detection model and the object segmentation model using a historical image dataset; The training process of the target detection model is as follows: The X-ray images of femoral head necrosis were bound and labeled to indicate the stages of artificial femoral head necrosis. The YOLOv8 algorithm was used to identify X-ray images of femoral head necrosis, and the algorithmic staging of femoral head necrosis was obtained. The staging of artificial femoral head necrosis was compared with that of the algorithmic femoral head necrosis staging. Based on the comparison results, the YOLOv8 algorithm was optimized until the staging of artificial femoral head necrosis and the staging of algorithmic femoral head necrosis were the same, thus obtaining the target detection model.
3. The method for determining the stage of femoral head necrosis as described in claim 2, characterized in that: The training process of the target segmentation model is as follows: The X-ray images of femoral head necrosis were bounded and marked to indicate all segmented regions of the femoral head; The U-Net segmentation algorithm was used to identify X-ray images of femoral head necrosis, and the image segmentation results were obtained. The image segmentation result is compared with the segmented region, and the U-Net segmentation algorithm is optimized based on the comparison result until the image segmentation result is the same as the segmented region, thus obtaining the target segmentation model.
4. The method for determining the stage of femoral head necrosis as described in claim 1, characterized in that: Each region of interest has one or more region tags. When k=1 or 2, the segment confidence corresponding to the largest region label is taken as the segment confidence of the region of interest; When k=3, the segment confidence score corresponding to the region label that is greater than the preset value is taken as the segment confidence score of the region of interest.
5. The method for determining the stage of femoral head necrosis as described in claim 1, characterized in that: The formula for calculating the probability of femoral head necrosis X-ray images in each stage based on segmentation confidence and identification confidence is as follows: Among them, P0, PI, PIIA, PIIB, PIII, and PIV are the recognition confidence scores of different stages obtained by the target detection model.
6. A staging system for femoral head necrosis, characterized in that, The system uses a staging method for femoral head necrosis as described in any one of claims 1-5, comprising: A training module, which is used to train the object detection module and the object segmentation module; The data acquisition module is used to acquire X-ray images of femoral head necrosis and preprocess the X-ray images of femoral head necrosis. The target detection module is equipped with a target recognition model, which is used to identify the processed X-ray images of femoral head necrosis and obtain the recognition confidence level. The target segmentation module contains a target segmentation model, which is used to segment the processed X-ray image of femoral head necrosis to obtain segmented regions and divide the segmented regions into multiple regions of interest. The decision module is used to calculate the segmentation confidence of each region of interest and the probability of each stage of the femoral head necrosis X-ray image, and to make a decision on the femoral head stage in the femoral head necrosis X-ray image.
7. A computer device, characterized in that: The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform a method for determining the staging of femoral head necrosis as described in any one of claims 1 to 5.
8. A computer storage medium, characterized in that: The device contains a computer program that, when executed by a processor, causes the processor to perform a method for determining the staging of femoral head necrosis as described in any one of claims 1 to 5.