Knee joint image classification method and device and storage medium

Through the combination of cascade model and Focal Loss loss function, ResBlock and CBAM attention mechanism, it solves the problem of knee joint image classification relying on subjective judgment, achieves high-accuracy knee joint image classification, and improves the evaluation of osteoarthritis. accuracy.

CN118628815APending Publication Date: 2024-09-10HEFENG COUNTY CENT HOSPITAL (COUNTY EMERGENCY CENT) +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410754364.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, knee joint image classification relies on subjective judgment, which is time-consuming and inaccurate.

Method used

The method of cascading two models is used, combined with Focal Loss loss function and ResBlock and CBAM attention mechanism, for knee joint image classification to improve the identification accuracy of difficult samples.

Benefits of technology

The accuracy of knee joint image classification reached 72.28%, which improved the accuracy of osteoarthritis severity assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628815A
    Figure CN118628815A
Patent Text Reader

Abstract

The invention relates to the field of medical image processing, and discloses a knee joint image classification method and device and a storage medium, and the method comprises the steps: obtaining a knee joint digital image; preprocessing the knee joint digital image to obtain a processed image; constructing a primary classification model and a secondary classification model; training the primary classification model and the secondary classification model by using a pre-acquired data set; inputting the processed image into a primary classification model, and obtaining an output result of the primary classification model; and judging whether the output result of the primary classification model is in a preset condition, if so, completing knee joint classification, otherwise, inputting the output result of the primary classification model into a secondary classification model to obtain an output result of the secondary classification model, and taking the output result of the secondary classification model as a final classification result. The beneficial effect of the invention is that the accuracy of bone joint image classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image processing, and in particular to a knee joint image classification method, device and storage medium. Background Art

[0002] With the continuous improvement of hardware devices and algorithms, virtual reality (VR), augmented reality (AR) and mixed reality (MR) technologies have been introduced into the medical field. VR technology allows users to be fully immersed in a computer-generated environment. AR technology provides computer-generated overlays on the surface of the real world, providing users with three-dimensional (3D) visual image models.

[0003] In the field of orthopedics, VR technology is more widely used in orthopedic computer-assisted surgery systems and training simulators, mainly in the form of preoperative design to improve surgical accuracy, improve patient prognosis, reduce surgical complications, and train surgeons in surgical techniques. MR technology presents virtual scene information in real time, creates an information loop of interactive feedback between the real world, the virtual world, and the user, and enhances the realism of the user experience.

[0004] MRI is of great significance for the diagnosis of early knee osteoarthritis. The use of deep learning methods for MRI image recognition and intelligent segmentation of knee osteoarthritis is currently a hot research topic in artificial intelligence in imaging diagnosis.

[0005] However, the current clinical recognition of bone and joint images mainly relies on the subjective judgment of radiologists, which is not only time-consuming, but also has large subjective differences in the judgment results of different people. Summary of the invention

[0006] The purpose of the present invention is to propose a knee joint image classification method, device and storage medium to solve the technical problems in the prior art that knee joint image classification mostly relies on subjective judgment, is time-consuming, and is not accurate.

[0007] A knee joint image classification method comprises the following steps:

[0008] S1: Acquire digital images of the knee joint;

[0009] S2: preprocessing the digital image of the knee joint to obtain a processed image;

[0010] S3: Construct the first-level classification model and the second-level classification model;

[0011] S4: training the primary classification model and the secondary classification model using the pre-acquired data set;

[0012] S5: input the processed image into the primary classification model to obtain the output result of the primary classification model;

[0013] S6: Determine whether the output result of the primary classification model is within the preset situation. If so, complete the knee joint classification. Otherwise, input the output result of the primary classification model into the secondary classification model to obtain the output result of the secondary classification model, and use the output result of the secondary classification model as the final classification result.

[0014] A storage medium stores instructions and data for implementing a knee joint image classification method.

[0015] A knee joint image classification device comprises: a processor and the storage medium; the processor loads and executes instructions and data in the storage medium to implement a knee joint image classification method.

[0016] The beneficial effect provided by the present invention is: using the target detection model pre-trained on the test set and the training set to detect unknown knee joint images. In order to overcome the problem of inaccurate classification of bone joint images, the study adopted a method of cascading two models, and added a Focal Loss loss function to reduce the weight of easy-to-classify samples, introduced ResBlock combined with the CBAM attention mechanism, and focused on the identification of difficult samples. The detection accuracy of the invention reached 72.28% in the above data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic flow chart of the method of the present invention;

[0018] Figure 2 is a digital image of a knee joint collected by the present invention;

[0019] Figure 3 is a schematic diagram of a knee joint image after histogram equalization of the present invention;

[0020] Figure 4 The Focal Loss curves for different values ​​of γ∈[0,5] are shown;

[0021] Figure 5 It is a working schematic diagram of the hardware device of the present invention. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0023] Before formally describing the present invention, the scheme of the present invention is first generally described for easy understanding.

[0024] Please refer to Figure 1 , Figure 1 It is a schematic flow diagram of the method of the present invention;

[0025] The present invention provides a knee joint image classification method, comprising the following steps:

[0026] S1: Acquire digital images of the knee joint;

[0027] Please refer to Figure 2 , Figure 2 It is a digital image of the knee joint collected by the present invention; it should be noted that the digital image of the knee joint is collected and acquired by means of CT scanning or MRI (Magnetic Resonance Imaging). The acquisition methods such as CT scanning and MRI are not the focus of this application and will not be elaborated here.

[0028] S2: preprocessing the digital image of the knee joint to obtain a processed image;

[0029] It should be noted that the preprocessing in step S2 includes: denoising, equalization, resampling and contrast stretching.

[0030] As an example, please refer to Figure 3 , Figure 3 : is a schematic diagram of a knee joint image after histogram equalization of the present invention. The present invention highlights the key features in the image through histogram equalization, and highlights the areas with osteophytes in the knee. As other embodiments, denoising methods such as spatial domain filtering, median filtering, or different resampling and contrast stretching methods can also be used to pre-process the image, which will not be shown one by one in the present invention.

[0031] S3: Construct the first-level classification model and the second-level classification model;

[0032] It should be noted that the primary classification model adopts the target detection model, and adds the CBAM attention mechanism in front of the head of the target detection model.

[0033] The secondary classification model adopts the same target detection model as the primary classification model.

[0034] As an embodiment, the target detection model used in the present invention is the Yolov8 model.

[0035] Specifically, Yolov8 is a target detection model that consists of multiple network components:

[0036] Backbone, as the central component of the network, is responsible for converting the input image into a feature map that contains both object location and feature information.

[0037] Neck network: Yolov8 designs a PAN-FPN structure in the neck, using P4-P5 and N4-N5 to represent the features of two different scales in the PAN structure and FPN structure of the Yolov8 model. Conventional FPN uses a top-down approach to convey deep semantic information. FPN enhances the semantic information of features by fusing B4-P4 and B3-P3, but loses some object positioning information. PAN enhances the learning of position information by fusing P4-N4 and P5-N5, and realizes path enhancement in a top-down manner. PAN-FPN constructs a top-down and bottom-up network structure, and realizes the complementarity of shallow position information and deep semantic information through feature fusion, thereby achieving feature diversity and completeness.

[0038] Head network: The head network of Yolov8 is responsible for generating detection results. Finally, Yolov8 outputs the bounding box of the detected object and the corresponding category.

[0039] Loss function: Yolov8 uses a loss function that combines label modulation, IoU prediction and Grid Sensitive loss to improve the model's positioning ability.

[0040] Image loading: Yolov8 uses Mosaic enhancement technology to combine the information of multiple images into one image, enriching the background of the detected object. Mosaic enhancement was turned off in the last 10 training rounds to improve accuracy.

[0041] Category loss: Yolov8 finally uses cross entropy loss to measure the difference between the probability distribution of the model output and the true label to predict the target category.

[0042] S4: training the primary classification model and the secondary classification model using the pre-acquired data set;

[0043] It should be noted that, in the present invention, the Focal Loss loss function is introduced to solve the problem of sample imbalance. Focal Loss focuses on samples with a small number but a large degree of damage by increasing the adjustment factor.

[0044] Among them, the attention mechanism of CBAM is added to the neural network, so that the model can focus on the training of difficult-to-classify samples during the training process. The attention mechanism and loss function are added for the training of the first-level classification model, while for the training of the second-level classification model, only the Focal Loss loss function needs to be added.

[0045] As an embodiment, the present invention adopts the Focal Loss loss function. In the training with extremely unbalanced categories, easy-to-classify negative samples account for most of the loss function, dominate the gradient, and overwhelm the cross entropy loss function.

[0046] Balanced cross entropy uses α to balance the importance of positive and negative samples, but does not distinguish between difficult and easy samples.

[0047] FocalLoss adds an adjustment factor to reduce the weight of easy-to-classify samples on the basis of the balanced cross entropy loss function, focusing on the training of difficult samples. The formula is: FL(p t )=-α t (1-p t ) γ log(p t ).

[0048] γ is a parameter ranging from [0,5]. When γ is 0, it becomes the original CE loss function. t ) γ is the adjustment factor, γ≥0 is the adjustable focusing parameter, please refer to Figure 4 , Figure 4 The Focal Loss curves are shown for different values ​​of γ∈[0,5].

[0049] The details of adding the CBAM attention mechanism are as follows:

[0050] The deep residual network combined with the CBAM attention mechanism is added to the head. CBAM includes channel attention (C-Attention) and spatial attention (S-Attention). An intermediate feature map is defined, which is expressed as One-dimensional channel attention map of CBAM and 2D spatial attention map The formula is as follows:

[0051]

[0052] For CBAM, F output The expression is as follows::

[0053] F output =F FR ,

[0054] The output formula of ResBlock plus CBAM is as follows:

[0055] F output =F input +F FR ,

[0056] Channel attention uses global average pooling and global maximum pooling to integrate information. The formula is as follows:

[0057] M C (F)=σ[MLP(GAP(F))+MLP(GMP(F))].

[0058] Spatial attention performs GAP and GMP along the channel axis and then connects them together to highlight the information area. A 7×7 convolutional layer is used to convolve these features. The calculation formula for spatial attention is as follows:

[0059]

[0060] S5: input the processed image into the primary classification model to obtain the output result of the primary classification model;

[0061] S6: Determine whether the output result of the primary classification model is within the preset situation. If so, complete the knee joint classification. Otherwise, input the output result of the primary classification model into the secondary classification model to obtain the output result of the secondary classification model, and use the output result of the secondary classification model as the final classification result.

[0062] It should be noted that after training, the primary classification model and the secondary classification model are also evaluated according to different performance indicators, and the model that passes the evaluation is used as the final model.

[0063] Specifically, before deploying an object detection model, it must be thoroughly evaluated. This includes quantifying the performance of the model on the test set using different performance metrics such as precision, recall, F1 score, and mAP.

[0064] By comparing these indicators, we can understand the performance of the model on different categories of knee osteophytes and whether it shows sufficient robustness in practical application scenarios.

[0065] If the model's performance does not meet expectations, further optimization is required. This may include adjusting the model's hyperparameters (such as learning rate, batch size, and number of iterations), changing the network structure, or introducing more complex optimization techniques (such as data augmentation, regularization, and ensemble methods). The model weights pre-trained on a large dataset are used as a starting point and then fine-tuned for the specific knee osteophyte detection task.

[0066] As an example, the classification process of the model is as follows:

[0067] First of all, the specific characteristics of bone joints are as follows:

[0068] Joint space narrowing: As osteoarthritis progresses, the space between the bones in the affected joint gradually narrows. This change can be measured by X-rays, which assess the distance between the bones in the joint.

[0069] Osteophyte: Osteophyte or bone spur is a bone growth that forms at the edge of a joint in response to cartilage damage. The growth can be seen on an X-ray.

[0070] Subchondral sclerosis: Subchondral sclerosis is the hardening and thickening of the bone below the surface of the cartilage. On X-rays, this can be seen as white or bright areas in the bone.

[0071] Subchondral cyst: A subchondral cyst is a fluid-filled cavity that forms beneath the surface of the cartilage. On an X-ray, it can be seen as a dark area in the bone.

[0072] Bone morphological deformities: As osteoarthritis progresses, the bones in the joints can change and become deformed in shape and structure. These changes can be seen on X-rays.

[0073] The present invention mainly provides classification results for the above-mentioned types of features, and the present invention is also limited to classifying input images.

[0074] Regarding the above-mentioned feature classification, the following levels can be defined:

[0075] Grade 0: No radiographic signs of osteoarthritis.

[0076] Grade I: Osteophytic cleft lip may be present, and suspicious signs of joint space narrowing may be present.

[0077] Grade II: Osteophytes are clearly present, and there may be signs of joint space narrowing.

[0078] Grade III: Moderately multiple osteophytes appear in the joints, the joint space is clearly narrowed, some bones are sclerotic, and there may be bone end deformities.

[0079] Grade IV: Large osteophytes appear in the joints, the joint space is significantly narrowed, the bones are severely sclerotic, and the deformities of the bone ends are clearly visible.

[0080] After the above analysis, the characteristics of the five levels are mainly the size of the osteophytes in the inter-articular space and the sclerosis under the cartilage. Among them, the size of the osteophytes and the inter-articular space are important bases for judging level 0, level I and level II, and cartilage sclerosis is an important basis for judging level III and level IV.

[0081] The above-mentioned primary classification model and secondary classification model are applied to the classification of bone and joint images. For example, when an image is input, it is first tested by the primary classification model. If the result is that the damage is small, the result is put into the secondary classification for classification. Otherwise, the result is directly output to determine its location.

[0082] Specifically, for example, using a 1-level classification model, level 0 and other levels can be specifically classified. By using channel attention and focusing on the osteophytes around the knee joint, levels I, II, III, and IV in other levels can be more accurately distinguished.

[0083] It should be noted that the above distinctions are all completed by computers. For details, please refer to Figure 5 , Figure 5 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a knee joint image classification device 401, a processor 402 and a storage medium 403.

[0084] A knee joint image classification device 401: The knee joint image classification device 401 implements the knee joint image classification method.

[0085] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the knee joint image classification method.

[0086] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the knee joint image classification method.

[0087] It should be noted that the present invention finally presents the processed images and detection results to the doctor or user in a visual manner, using colors, labels or other marks to highlight the detected objects and displaying the images on the screen.

[0088] The beneficial effect of the present invention is: using the Yolov8 model pre-trained on the test set and the training set to detect unknown knee joint images. In order to overcome the problem that mild arthritis is difficult to identify, the study adopted a method of cascading two models, and added a Focal Loss loss function to reduce the weight of easy-to-classify samples, and introduced ResBlock combined with the CBAM attention mechanism to focus on the identification of difficult samples. The detection accuracy of the invention reached 72.28% in the above data. In short, the Yolov8-based detection method proposed in the present invention has achieved satisfactory results in knee joint problems. The present invention effectively improves the accuracy of knee arthritis severity assessment by means of a cascade model.

[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A knee joint image classification method, characterized by: The method comprises the following steps: S1: Acquire digital images of the knee joint; S2: preprocessing the digital image of the knee joint to obtain a processed image; S3: Construct the first-level classification model and the second-level classification model; S4: training the primary classification model and the secondary classification model using the pre-acquired data set; S5: input the processed image into the primary classification model to obtain the output result of the primary classification model; S6: Determine whether the output result of the primary classification model is within the preset situation. If so, complete the knee joint classification. Otherwise, input the output result of the primary classification model into the secondary classification model to obtain the output result of the secondary classification model, and use the output result of the secondary classification model as the final classification result.

2. A knee joint image classification method as claimed in claim 1, characterized in that: The preprocessing in step S2 includes: denoising, equalization, resampling and contrast stretching.

3. A knee joint image classification method as claimed in claim 1, characterized in that: The first-level classification model adopts the target detection model, and adds the CBAM attention mechanism in front of the head of the target detection model.

4. A knee joint image classification method as claimed in claim 1, characterized in that: The secondary classification model adopts the same target detection model as the primary classification model.

5. A knee joint image classification method as claimed in claim 1, characterized in that: The training of the primary classification model and the secondary classification model both adopts the FocalLoss loss function.

6. A knee joint image classification method as claimed in claim 5, characterized in that: After training, the primary classification model and the secondary classification model are also evaluated according to different performance indicators, and the model that passes the evaluation is used as the final model.

7. A storage medium, characterized in that: The storage medium stores instructions and data for implementing a knee joint image classification method as described in any one of claims 1 to 6.

8. A knee joint image classification device, characterized in that: include: Processor and storage medium; the processor loads and executes instructions and data in the storage medium to implement a knee joint image classification method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Knee meniscus injury detection method and system fusing multiple sequences and contrast learning

    CN121767758A