An osteoarthritis intelligent identification and grading method and a computer device

By combining the EfficientNet feature extraction backbone network with the contrastive ordinal representation branch, the problems of consistency and data imbalance in osteoarthritis grading were solved, achieving high accuracy and stable grading identification and improving the credibility of clinical decision-making.

CN122391159APending Publication Date: 2026-07-14TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TAIYUAN UNIVERSITY OF TECHNOLOGY
Filing Date
2026-04-21
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing osteoarthritis grading methods suffer from poor consistency in grading, unbalanced data distribution, and insufficient utilization of ordinal relationships, resulting in high misjudgment rates and low clinical reliability.

Method used

An intelligent osteoarthritis identification model is developed by combining the EfficientNet feature extraction backbone network with a contrastive ordinal representation branch and a hybrid classification branch. The model is trained using a reverse progressive balanced sampling strategy, explicitly encoding rank distance constraints to suppress annotation noise interference and improve minority class recall.

Benefits of technology

It improves the accuracy and consistency of osteoarthritis grading, reduces the misjudgment rate of long-distance cross-grade classification, enhances the credibility of clinical decision-making, and has good generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391159A_ABST
    Figure CN122391159A_ABST
Patent Text Reader

Abstract

The application discloses an osteoarthritis intelligent identification grading method and computer equipment, relates to the field of medical image intelligent analysis, and comprises the following steps: acquiring knee joint image data and preprocessing to obtain an enhanced view, inputting the enhanced view into a trained osteoarthritis intelligent identification model to obtain a grading identification result. The model is trained based on an osteoarthritis intelligent identification data set in combination with a total loss function and comprises an EfficientNet feature extraction backbone, a contrast ordinal representation branch and a mixed classification branch. The backbone network extracts features and inputs the features into the two branches, the contrast ordinal representation branch constructs an average contrast ordinal loss, the mixed classification branch outputs a grading result, a mixed classification loss is constructed, the total loss function is obtained by weighting the two losses, and a reverse progressive balance sampling strategy is adopted in each round of training. The application improves the clinical consistency and interpretability of KOA image grading and is suitable for interactive auxiliary diagnosis of a hospital workstation or a server end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent medical image analysis technology, and in particular to an intelligent identification and grading method and computer equipment for osteoarthritis. Background Technology

[0002] Knee osteoarthritis (KOA) is a common degenerative joint disease in clinical practice. Imaging examinations (such as knee X-rays) play an important role in disease screening, graded diagnosis, and follow-up assessment.

[0003] Clinically, KOA is typically graded based on imaging features (such as joint space narrowing, osteophyte formation, and osteosclerosis). However, existing grading methods suffer from the following problems in practical applications: 1. Poor grading consistency: Due to factors such as blurred imaging boundaries, differences in imaging conditions, and variations in physician experience, different radiologists may provide grading results for the same image, leading to poor labeling consistency and consequently affecting the reliability of clinical decision-making and data modeling. 2. Extremely unbalanced data distribution: In real clinical data, the number of samples for each grade often exhibits a significant long-tail distribution, with common grades having far more samples than rare grades. Under these conditions, conventional deep learning classification models tend to favor the majority class, resulting in low recall rates for minority classes, increased probability of cross-grade misclassification, and decreased overall generalization ability. 3. Insufficient utilization of the ordinal structure of grading: KOA grading naturally possesses ordinal relationships (adjacent grades are more similar, and the greater the grade difference, the more significant the difference). However, many existing methods only treat it as discrete classification without explicitly encoding the "grade distance" constraint, which easily leads to long-distance cross-grade misclassification and reduces the clinical credibility of the results. Summary of the Invention

[0004] The purpose of this application is to provide an intelligent identification and grading method and computer device for osteoarthritis, which can improve the consistency of KOA grading, the sensitivity of minority class identification, and the credibility of clinical decision-making.

[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides an intelligent identification and grading method for osteoarthritis, including: Obtain the knee joint imaging data to be identified.

[0006] The knee joint image data is preprocessed to obtain an enhanced view of the knee joint image data.

[0007] The enhanced view of the knee joint image data is input into a trained osteoarthritis intelligent recognition model to obtain a graded recognition result. The trained osteoarthritis intelligent recognition model is a model obtained by training the osteoarthritis intelligent recognition model based on the osteoarthritis intelligent recognition dataset and combining it with a total loss function. The osteoarthritis intelligent recognition model includes an EfficientNet feature extraction backbone network, a contrast ordinal representation branch, and a hybrid classification branch. The EfficientNet feature extraction backbone is used to extract the backbone features of the image and input the backbone features into the contrast ordinal representation branch and the hybrid classification branch respectively. The contrast ordinal representation branch is used to project and normalize the backbone features, and construct an average contrast ordinal loss through batch prototype comparison and ordinal penalty term. The hybrid classification branch is used to output graded recognition results based on the backbone features through the classification head, construct cross-entropy loss and intra-batch level constraint loss respectively, and fuse the cross-entropy loss and intra-batch level constraint loss to obtain a hybrid classification loss. The total loss function is obtained by weighting the average contrast ordinal loss and the hybrid classification loss. In each round of training the osteoarthritis intelligent recognition model, a reverse progressive balanced sampling strategy is used to dynamically adjust the level sampling distribution.

[0008] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the intelligent identification and grading method for osteoarthritis described above.

[0009] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides an intelligent identification and grading method for osteoarthritis. By acquiring and preprocessing knee joint image data to obtain an enhanced view of the knee joint image data, it solves the problem of insufficient model generalization caused by differences in imaging conditions and changes in patient position in clinical imaging data. This method increases data diversity and reduces the risk of overfitting without introducing false lesion features. Through the EfficientNet feature extraction backbone network, it extracts the backbone features of the enhanced view, solving the problem that traditional convolutional networks struggle to balance high accuracy and low computational cost in medical imaging tasks. This significantly reduces the number of model parameters and inference time while maintaining the accuracy of osteoarthritis grading identification. Furthermore, by comparing ordinal representation branches and explicitly encoding grade distance constraints through ordinal penalty terms, it achieves... The greater the class difference in the feature space, the larger the class spacing. By constraining the prediction probability of samples of the same class in the same batch through hybrid classification branching, the interference of single sample annotation noise is effectively suppressed and the hierarchical recognition result is output. This solves the problems of existing methods that isolate the relationship between annotation noise and ordinal number, are prone to long-distance cross-class misjudgment, and have poor robustness to noise. It can still maintain stable recognition performance in real clinical data with poor annotation consistency, thus improving the credibility of clinical decision-making. By adopting a reverse progressive balanced sampling strategy, a near-uniform sampling method is used in the early stage of training to allow the model to fully learn minority class features. In the later stage of training, the model gradually regresses to the original data distribution. This solves the problem that the extreme class imbalance in clinical data causes the model to be biased towards the majority class and the minority class to have low recall. This gives the model good generalization ability for long-tailed distributed data. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is an application environment diagram of an intelligent identification and grading method for osteoarthritis according to an embodiment of this application; Figure 2 A flowchart illustrating an intelligent identification and grading method for osteoarthritis provided in an embodiment of this application; Figure 3 A heatmap of interest for an intelligent identification and grading method for osteoarthritis provided in another embodiment of this application; Figure 4 A page application diagram illustrating an intelligent identification and grading method for osteoarthritis provided in another embodiment of this application; Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0014] The intelligent identification and grading method for osteoarthritis provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the knee joint image data to be identified to server 104. After receiving the knee joint image data, server 104 preprocesses the identified knee joint image data to obtain an enhanced view of the knee joint image data; the enhanced view of the knee joint image data is then input into a trained intelligent osteoarthritis recognition model to obtain a grading recognition result. Server 104 can feed back the obtained grading recognition result to terminal 102. Furthermore, in some embodiments, the intelligent osteoarthritis recognition grading method can also be implemented independently by server 104 or terminal 102. For example, terminal 102 can directly perform grading recognition processing on the knee joint image data to be identified, or server 104 can obtain the knee joint image data to be identified from the data storage system and perform grading recognition processing on the knee joint image data to be identified.

[0015] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0016] In one exemplary embodiment, such as Figure 2As shown, an intelligent identification and grading method for osteoarthritis is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps A1 to A3.

[0017] Step A1: Obtain the knee joint image data to be identified.

[0018] Step A2: Preprocess the knee joint image data to obtain an enhanced view of the knee joint image data.

[0019] Step A3: Input the enhanced view of the knee joint image data into the trained osteoarthritis intelligent recognition model to obtain the hierarchical recognition result; the trained osteoarthritis intelligent recognition model is a model obtained by training the osteoarthritis intelligent recognition model based on the osteoarthritis intelligent recognition dataset and combining it with the total loss function; the osteoarthritis intelligent recognition model includes an EfficientNet feature extraction backbone network, a contrastive ordinal representation branch, and a hybrid classification branch; the EfficientNet feature extraction backbone is used to extract the backbone features of the image, and the backbone features are respectively input into the contrastive ordinal representation branch and the hybrid classification branch. The hybrid classification branch; the contrast ordinal representation branch is used to project and normalize the backbone features, and construct the average contrast ordinal loss through batch prototype comparison and ordinal penalty term; the hybrid classification branch is used to output hierarchical recognition results based on the backbone features through the classification head, construct cross-entropy loss and intra-batch level constraint loss respectively, and fuse cross-entropy loss and intra-batch level constraint loss to obtain hybrid classification loss; the total loss function is obtained by weighting the average contrast ordinal loss and the hybrid classification loss; in each round of training of the osteoarthritis intelligent recognition model, the level sampling distribution is dynamically adjusted by a reverse progressive balanced sampling strategy.

[0020] In this embodiment, the intelligent identification and grading method for osteoarthritis proposed in this application is implemented based on PyTorch, and uses an EfficientNet-B0 backbone network pre-trained on ImageNet. During pre-training, all images are resized to 384×384 pixels and normalized using ImageNet statistics.

[0021] Implementing steps A1 to A3 above can improve the clinical consistency and interpretability of imaging grading for knee osteoarthritis. Furthermore, this application can utilize the ordinal characteristics of osteoarthritis grading to avoid misjudgments across long distances by explicitly coding grade distance constraints, further enhancing the reliability of the grading results.

[0022] In another exemplary embodiment of this application, in order to enable the model to have good generalization ability for long-tailed distributed data, a reverse progressive balanced sampling strategy can be adopted during model training. In the early stage of training, a near-uniform sampling method is used to allow the model to fully learn the minority class features, and in the later stage of training, the model gradually regresses to the original data distribution. Therefore, before step A3 above, the method may also include the following steps B1 to B5: Step B1: Obtain the osteoarthritis intelligent recognition dataset; the osteoarthritis intelligent recognition dataset includes several intelligent recognition samples; the intelligent recognition samples include knee joint images and corresponding grading labels.

[0023] Step B2: For any smart recognition sample, preprocess the knee joint image of the smart recognition sample to obtain an enhanced view of the knee joint image of the smart recognition sample.

[0024] Step B3: In each round of training the osteoarthritis intelligent recognition model, a reverse progressive balancing sampling strategy is used to dynamically adjust the level sampling distribution and extract samples from the osteoarthritis intelligent recognition dataset to form a dynamic balancing sample dataset; the dynamic balancing sample dataset includes several dynamic balancing samples.

[0025] Step B4: For any dynamic equilibrium sample, input the knee joint image enhancement view corresponding to the dynamic equilibrium sample into the EfficientNet feature extraction backbone network to obtain backbone feature data.

[0026] Step B5: Based on the core feature data and corresponding hierarchical labels, and combining the total loss function with a dynamic weight scheduling mechanism, train the osteoarthritis intelligent recognition model until the model converges or reaches the preset training rounds, thus obtaining the trained osteoarthritis intelligent recognition model; with the goal of minimizing the total loss function, perform dynamic joint optimization on the osteoarthritis intelligent recognition model. Preferably, the preset training rounds are 100.

[0027] In this embodiment, feature extraction of the input image after single-view enhancement is represented as follows: ; in, Main feature data, This is a single-view enhancement function. Enhanced view of knee joint image.

[0028] Training was performed using the AdamW optimizer with an initial learning rate of The weight decay rate is The batch size is 64. The model is trained for 100 epochs using a cosine learning rate and an early stopping strategy is implemented based on the validation set Kappa coefficients. The validation set is created through stratified sampling with a split ratio of 0.2 to maintain class distribution.

[0029] In another exemplary embodiment of this application, to ensure the consistency of the input images, preliminary processing can be performed on the input images. The preprocessing of the knee joint image data in step A2 above includes: standardization and enhancement processing; the enhancement processing is single-view enhancement that generates only one enhanced view; the enhancement processing includes one or more of brightness or contrast perturbation, slight rotation and translation, random cropping, and scaling. In this embodiment, an enhancement method that does not change the semantics of the core lesions is adopted. Only one enhanced view is generated for each knee joint image (single-view enhancement), represented as: ; in, To enhance the function, Enhanced view of knee joint imaging. x For knee joint images, the enhancement function may employ operations that do not alter the semantics of the core lesions, such as brightness or contrast perturbation, slight rotation and translation, random cropping and scaling.

[0030] In another exemplary embodiment of this application, in order to use a near-uniform sampling method in the early stages of training to enable the model to fully learn minority class features and gradually regress to the original data distribution in the later stages of training, step B3 above is replaced by steps C1 to C2: Step C1: In each round of training the osteoarthritis intelligent recognition model, obtain the sampling probability of each level sample in the current round, and calculate the sampling weight of each sample in the current round based on the sampling probability of each level sample in the current round.

[0031] Step C2: Based on the sampling weight of each sample in the current round, samples are extracted from the osteoarthritis intelligent recognition dataset to form a dynamically balanced sample dataset.

[0032] In another exemplary embodiment of this application, the sampling probability of each level sample in the current round in step C1 is calculated by the following formula: ; in, t For the current round, T For the total number of training rounds, , For the current round number j Sampling probability of level samples, C The total number of levels in the training set. For the first jThe original distribution of level samples in the training set; the training set is an osteoarthritis intelligent recognition dataset. Total number of levels. C Corresponding to the KOA rating system.

[0033] Calculated using the following formula: ; in, For the first j The original distribution of level samples in the training set. For the first j Number of samples at each level C The total number of levels in the training set. N The total number of samples in the training set; the training set is an intelligent recognition dataset for osteoarthritis.

[0034] The sampling weight for each sample is calculated using the following formula: ; in, For the sample i Sampling weights, For the sample i The tag, , C The total number of levels in the training set. For the sample i The sampling probability, For the training set samples are The number of samples; the training set is an intelligent recognition dataset for osteoarthritis.

[0035] In another exemplary embodiment of this application, the contrastive ordinal representation branch in step A3 is used to project and normalize the backbone features, and the average contrastive ordinal loss is constructed through batch prototype comparison and ordinal penalty term. This can also be replaced by the following steps D1 to D4: Step D1: The main features of the enhanced view of the knee joint images in the batch are mapped to the contrast space through the projection head to obtain the contrast space representation vector. Then, the contrast space representation vector is normalized to obtain the normalized representation.

[0036] Step D2: For each level in the current batch, calculate the batch prototype of that level and normalize it to obtain the normalized batch prototype of each level.

[0037] Step D3: The normalized representation is used as the anchor sample, the normalized batch prototype of the anchor sample level is used as the positive sample, and the batch prototypes of each level other than the anchor sample level are used as the negative samples. The contrast ordinal loss is calculated according to the contrast ordinal loss function.

[0038] Step D4: Calculate the average ordinal loss of the current batch by averaging the ordinal losses of all samples within the batch.

[0039] In another exemplary embodiment of this application, the normalized representation in step D1 is calculated according to the following formula: ; ; in, For the sample i The contrast space representation vector after projection head mapping. The backbone features of the i-th sample in the batch are: For projection head; This is the normalized representation of the i-th sample in the batch.

[0040] Calculate and normalize the batch prototype for each level in the current batch according to the following formula to obtain the normalized batch prototype for each level in step D2: ; in, For level j batch prototypes, For level j Samples in i Normalized contrastive representation, For the sample i Authentic rating labels For level j The normalized batch prototype.

[0041] The contrastive ordinal loss function in step D3 is calculated using the following formula: ; in, To compare the ordinal loss function, The first in the batch i The normalized representation of each sample is used as the anchor sample. τ For temperature coefficient, The set of levels that appear in the current batch. For level and grade distance, For the sample i The true label, k For any level, To anchor the normalized batch prototype to the level to which the sample belongs, This refers to the normalized batch prototypes for all levels except the anchor sample level. r The ordinal penalty coefficient is... For vectors transpose and The dot product operation. Preferably, τ = 0.2. r =0.1.

[0042] The average ordinal loss of the current batch in step D4 is obtained by averaging the ordinal losses of all samples within the batch using the following formula: ; in, This represents the average correlation ordinal loss for the current batch. B This represents the total number of samples included in the current batch. For the contrast ordinal loss of a single anchored sample, For the sample i The contrastive spatial representation.

[0043] In another exemplary embodiment of this application, the hybrid classification branch in step A3 is used to output hierarchical recognition results based on the backbone features through the classification head, construct cross-entropy loss and intra-batch level constraint loss respectively, and fuse the cross-entropy loss and intra-batch level constraint loss to obtain the hybrid classification loss. This can also be replaced by the following steps E1 to E4: Step E1: Input the backbone features into the classification head and map them to the probabilities of each level.

[0044] Step E2: Construct cross-entropy loss based on the probabilities of each level and the true classification labels.

[0045] Step E3: For each level in the current batch, calculate the average predicted probability of the samples at that level and construct the intra-batch level constraint loss.

[0046] Step E4: The cross-entropy loss and the intra-batch level constraint loss are weighted and fused to obtain the hybrid classification loss.

[0047] The backbone features are input into the classification head according to the following formula to obtain the probabilities mapped to each level: ; in, This is the original score vector output by the classification head. For classification header, The first in the batch i The main characteristics of each sample For the sample i The probability of belonging to each level.

[0048] The cross-entropy loss is constructed according to the following formula: ; in, For cross-entropy loss, BThis represents the total number of samples included in the current batch. For the sample i Authentic rating labels For the sample i Predicted probabilities at the true label level.

[0049] Construct the intra-batch level constraint loss according to the following formula: ; in, Loss due to batch-level constraints. K The set of levels that appear in the current batch. For the size of the set, For level j The average predicted probability in the current batch. This is a preset numerical stability constant.

[0050] The level is calculated according to the following formula. j Average predicted probability in the current batch: ; in, For level j The average predicted probability in the current batch. The current batch is of medium level j The number of samples, For the sample i Authentic rating labels For the sample i At level j The predicted probability.

[0051] The cross-entropy loss and the intra-batch level constraint loss are weighted and fused according to the following formula to obtain the hybrid classification loss: ; in, For mixed classification loss, For cross-entropy loss, The weights for the batch-level constraint loss. This is a batch-level constraint loss. Preferably, λ =0.05.

[0052] In another exemplary embodiment of this application, the mixed classification loss in step E4 is calculated according to the following formula: ; in, L For the total loss, Weights for average contrast ordinal loss , This represents the average correlation ordinal loss for the current batch. This is a mixed classification loss.

[0053] The weights of the average contrastive ordinal loss are calculated using the following formula: ; ; ; in, The weights for the average contrast ordinal loss, For maximum weight, t For the current training round, T For the total number of training rounds, w This is the initial training ratio. r The ratio of the linearly increasing stage is preferred. .

[0054] In another exemplary embodiment of this application, the main evaluation metrics include overall accuracy (Acc), macro-F1 score, Cohen's Kappa coefficient, and class F1 score. Given the ordinal and severely imbalanced nature of KOA grading, macro-F1 and Kappa coefficients are particularly emphasized because they provide balanced evaluation across classes and consideration of accidental consistency, respectively. Table 1 shows the performance comparison results of different methods on the validation set, aiming to verify the superior performance of the proposed osteoarthritis intelligent identification and grading method (ROCS) (ROCS consists of imbalanced adaptive sampling RevPB, contrastive ordinal learning mechanism PCOL, and hybrid classification constraint CE+CWS Hybrid) in multi-class tasks and various sub-severity classification tasks. The table uses EfficientNet as the base network and compares its performance with the proposed osteoarthritis intelligent identification and grading method (ROCS) using cross-entropy (CE), oversampling, ordinal loss, Focal loss, weighted cross-entropy (Weighted CE), and comparison methods such as BCL, CLOC, and SupCon. The evaluation metrics cover overall classification accuracy (Acc), macro F1 score (F1), and Kappa coefficient. It also refines the F1 scores for each severity subset, including normal samples (F1-Normal), suspected samples (F1-Doubtful), mild samples (F1-Mild), moderate samples (F1-Moderate), and severe samples (F1-Severe), to comprehensively measure the performance of each method in the overall task and in each sub-category.

[0055] Table 1. Performance Comparison of Different Methods on the Validation Set

[0056] Figure 3 Several heatmaps of classification recognition results are shown. In each heatmap image name, if the numbers for "pred" (predicted label) and "true" (true label) match, the classification prediction is correct; otherwise, it is incorrect. The "cam" number in the image represents the classification level. Figure 3 Taking the leftmost heatmap as an example, 00002 is the sample number, and idx00002 is the index number, representing the index position of the sample in the dataset. According to... Figure 3 As can be seen, the high-concern area (red / orange) of the intelligent identification and grading method for osteoarthritis provided in this application is concentrated in the joint surface / space region of the knee joint, which is precisely the typical lesion site of osteoarthritis (KOA) (cartilage wear, bone hyperplasia, joint space narrowing), indicating that this application does indeed focus on key lesion areas of clinical significance. Table 2 shows... Figure 3 Table explaining the meaning of each color area.

[0057] Table 2 Figure 3 Table of meanings and explanations for each color area

[0058] This application also provides an application scenario in which the above-described intelligent identification and grading method for osteoarthritis is applied. Specifically, the intelligent identification and grading method for osteoarthritis provided in this embodiment can be applied in an auxiliary diagnostic scenario. The auxiliary diagnostic scenario includes the following four steps: I. System Overall Architecture The system pages adopt a B / S architecture and run on mainstream browser environments (such as Chrome and Edge). The overall page design is responsive. Figure 4 As shown, the core functional area is divided into two main modules: the image upload module and the historical diagnostic record module, providing users with an intuitive and efficient AI diagnostic interaction interface.

[0059] II. Page Layout and Visual Design The top navigation bar has a gradient blue background (transitioning from dark blue to light blue from left to right), and displays "AI-Assisted Diagnosis System for Osteoarthritis" in the center. The font is a sans-serif, bold white font with a prominent size, serving as the system's unique identifier. It is fixed at the top of the page, providing the system name display, and has no additional interactive buttons to keep the interface clean.

[0060] The main content area features a light gray background (#f5f7fa) to provide a soft visual base. The layout employs a vertical flow design, with the two core function cards (image upload and history) arranged from top to bottom, with ample spacing between them to ensure clear visual hierarchy. The cards are designed with a white background, rounded rectangles (approximately 8px in radius), and subtle shadows to enhance the page's visual appeal and clickability.

[0061] III. Detailed Description of Core Functional Modules 1. Image Upload Module As the core entry point for AI diagnostics, this module receives user-uploaded osteoarthritis image data and triggers backend AI model inference. The module title is "Upload Image," highlighted with a blue vertical line on the left for visual emphasis. The font is bold blue and larger than the body text. The upload area is visually a rectangle with a blue dotted border, centered with two lines of prompt text. The first line reads "Click to upload osteoarthritis photo," guiding the user; the second line states "Supports JPG / PNG, ≤20MB," clearly specifying supported file formats and size limits. Interaction methods include click and drag-and-drop. Click interaction means the user clicks anywhere within the dotted border, triggering a system file selection dialog box. Drag-and-drop interaction allows users to directly drag and drop images from their local file manager into the dotted border to complete the upload.

[0062] The frontend uses JavaScript to listen for click and drop events and calls the FileReader API to read files. It performs real-time validation of file type (only allowing image / jpeg and image / png) and size (≤20MB). If the conditions are not met, a Toast message appears stating "File format not supported" or "File size exceeds limit." After successful upload, the image is automatically converted to Base64 encoding or FormData format and transmitted to the backend Flask service via HTTPS encryption.

[0063] 2. Historical Diagnostic Records Module This module displays users' past AI diagnostic results, supporting result traceability and management. The module title is "Historical Diagnostic Records," with the same style as the "Upload Image" module title, and a blue vertical line on the left. The initial state of the record display area is "No History Available," in regular black font, indicating to the user that there are currently no diagnostic records. When the system has records, they are displayed in a list format. Each record includes: diagnosis time, patient ID (or name), diagnostic result (e.g., KL classification), and operation buttons (view details, download report). Clicking on a single record expands to view a detailed diagnostic report, including AI-generated image annotations, confidence scores, and doctor's review comments.

[0064] It supports sorting and filtering historical records by time, diagnostic results, and other dimensions. A "Clear History" function is provided, requiring secondary confirmation to prevent accidental operation.

[0065] IV. Interaction Process and Technical Implementation Details The user operation process is as follows: Users enter the system homepage and see two modules: "Upload Image" and "Historical Diagnostic Records." Users click or drag and drop to upload image files that meet the requirements. After the front-end verification is successful, an upload progress bar is displayed. Once the upload is complete, the user is automatically redirected to the "Diagnosis in Progress" page, displaying a dynamic message: "AI is analyzing the image..." After the diagnosis is complete, the user returns to the "Results Display" page, which shows the grading results, image annotations, and confidence levels. Users can choose to save the results to their history or return directly to the homepage.

[0066] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores the grading and identification results. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an intelligent grading and identification method for osteoarthritis.

[0067] Those skilled in the art will understand that Figure 5 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0068] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0069] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0071] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0072] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0074] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for intelligent identification and grading of osteoarthritis, characterized in that, include: Acquire the knee joint imaging data to be identified; The knee joint image data is preprocessed to obtain an enhanced view of the knee joint image data; The enhanced view of the knee joint image data is input into a trained osteoarthritis intelligent recognition model to obtain a graded recognition result. The trained osteoarthritis intelligent recognition model is a model obtained by training the osteoarthritis intelligent recognition model based on the osteoarthritis intelligent recognition dataset and combining it with a total loss function. The osteoarthritis intelligent recognition model includes an EfficientNet feature extraction backbone network, a contrast ordinal representation branch, and a hybrid classification branch. The EfficientNet feature extraction backbone is used to extract the backbone features of the image and input the backbone features into the contrast ordinal representation branch and the hybrid classification branch respectively. The contrast ordinal representation branch is used to project and normalize the backbone features, and construct an average contrast ordinal loss through batch prototype comparison and ordinal penalty term. The hybrid classification branch is used to output graded recognition results based on the backbone features through the classification head, construct cross-entropy loss and intra-batch level constraint loss respectively, and fuse the cross-entropy loss and intra-batch level constraint loss to obtain a hybrid classification loss. The total loss function is obtained by weighting the average contrast ordinal loss and the hybrid classification loss. In each round of training the osteoarthritis intelligent recognition model, a reverse progressive balanced sampling strategy is used to dynamically adjust the level sampling distribution.

2. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 1, characterized in that, Before inputting the enhanced view of the knee joint image data into the trained osteoarthritis intelligent recognition model to obtain the graded recognition result, the process further includes: training the osteoarthritis intelligent recognition model based on the osteoarthritis intelligent recognition dataset and in conjunction with the total loss function to obtain a trained osteoarthritis intelligent recognition model, specifically including: Obtain an intelligent recognition dataset for osteoarthritis; the intelligent recognition dataset for osteoarthritis includes several intelligent recognition samples; the intelligent recognition samples include knee joint images and corresponding grading labels; For any smart recognition sample, the knee joint image of the smart recognition sample is preprocessed to obtain an enhanced view of the knee joint image of the smart recognition sample. In each round of training the osteoarthritis intelligent recognition model, a reverse progressive balancing sampling strategy is used to dynamically adjust the level sampling distribution, and samples are extracted from the osteoarthritis intelligent recognition dataset to form a dynamic balancing sample dataset; the dynamic balancing sample dataset includes several dynamic balancing samples. For any dynamic equilibrium sample, the enhanced view of the knee joint image corresponding to the dynamic equilibrium sample is input into the EfficientNet feature extraction backbone network to obtain backbone feature data. Based on the core feature data and corresponding hierarchical labels, the osteoarthritis intelligent recognition model is trained by combining the total loss function and dynamic weight scheduling mechanism until the model converges or reaches the preset training rounds, thus obtaining the trained osteoarthritis intelligent recognition model; with the goal of minimizing the total loss function, the osteoarthritis intelligent recognition model is dynamically and jointly optimized.

3. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 2, characterized in that, The preprocessing of the knee joint image data includes: standardization and enhancement processing; the enhancement processing is a single-view enhancement that generates only one enhanced view; the enhancement processing includes one or more of brightness or contrast perturbation, slight rotation and translation, random cropping, and scaling.

4. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 2, characterized in that, In each round of training the osteoarthritis intelligent recognition model, a reverse progressive balancing sampling strategy is used to dynamically adjust the level sampling distribution. Samples are extracted from the osteoarthritis intelligent recognition dataset to form a dynamically balanced sample dataset, which specifically includes: In each round of training the intelligent recognition model for osteoarthritis, the sampling probability of each level of sample in the current round is obtained, and the sampling weight of each sample in the current round is calculated based on the sampling probability of each level of sample in the current round. Based on the sampling weight of each sample in the current round, samples are extracted from the osteoarthritis intelligent recognition dataset to form a dynamically balanced sample dataset.

5. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 4, characterized in that, The sampling probability of each level sample in the current round is calculated using the following formula: ; in, t For the current round, T For the total number of training rounds, , For the current round number j Sampling probability of level samples, C The total number of levels in the training set. For the first j The original distribution of the samples in the training set; the training set is an intelligent recognition dataset for osteoarthritis; Calculated using the following formula: ; in, For the first j The original distribution of level samples in the training set. For the first j Number of samples at each level C The total number of levels in the training set. N The total number of samples in the training set; the training set is an intelligent recognition dataset for osteoarthritis; The sampling weight for each sample is calculated using the following formula: ; in, For the sample i Sampling weights, For the sample i The tag, , C The total number of levels in the training set. For the sample i The sampling probability, For the training set samples are The number of samples; the training set is an intelligent recognition dataset for osteoarthritis.

6. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 1, characterized in that, The contrastive ordinal representation branch is used to project and normalize the backbone features. The average contrastive ordinal loss is constructed through batch prototype comparison and an ordinal penalty term, specifically including: The main features of the enhanced view of the knee joint images in the batch are mapped to the contrast space through the projection head to obtain the contrast space representation vector. Then, the contrast space representation vector is normalized to obtain the normalized representation. For each level in the current batch, calculate the batch prototype of that level and normalize it to obtain the normalized batch prototype of each level. Normalized representations are used as anchor samples, normalized batch prototypes of the anchor sample level are used as positive samples, and batch prototypes of all levels other than the anchor sample level are used as negative samples. The contrast ordinal loss is calculated based on the contrast ordinal loss function. The average ordinal loss of the current batch is obtained by averaging the ordinal losses of all samples within the batch.

7. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 6, characterized in that, The main features of the enhanced view of the knee joint images in the batch are mapped to the contrast space by the projector head to obtain the contrast space representation vector according to the following formula. Then, the contrast space representation vector is normalized to obtain the normalized representation: ; ; in, For the sample i The contrast space representation vector after projection head mapping. The backbone features of the i-th sample in the batch are: For projection head; This is the normalized representation of the i-th sample in the batch; The batch prototype for each level in the current batch is calculated and normalized according to the following formula to obtain the normalized batch prototype for each level: ; in, For level j batch prototypes, For level j Samples in i Normalized contrastive representation, For the sample i Authentic rating labels For level j Normalized batch prototype; The contrastive ordinal loss function is: ; in, To compare the ordinal loss function, The first in the batch i The normalized representation of each sample is used as the anchor sample. τ For temperature coefficient, The set of levels that appear in the current batch. For level and grade distance, For the sample i The true label, k For any level, To anchor the normalized batch prototype to the level to which the sample belongs, This refers to the normalized batch prototypes for all levels except the anchor sample level. r The ordinal penalty coefficient is... For vectors transpose and Dot product operation; The average ordinal loss of the current batch can be obtained by averaging the ordinal losses of all samples within the batch using the following formula: ; in, This represents the average correlation ordinal loss for the current batch. B This represents the total number of samples included in the current batch. For the contrast ordinal loss of a single anchored sample, For the sample i The contrastive spatial representation.

8. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 1, characterized in that, The hybrid classification branch is used to output hierarchical recognition results based on the backbone features through the classification head. It constructs cross-entropy loss and intra-batch level constraint loss separately, and then fuses the cross-entropy loss and intra-batch level constraint loss to obtain the hybrid classification loss, specifically including: The core features are input into the classification head and mapped to probabilities for each level. Based on the probabilities of each level and the true classification labels, a cross-entropy loss is constructed; For each level in the current batch, calculate the average predicted probability of samples at that level and construct the intra-batch level constraint loss; The cross-entropy loss and the intra-batch level constraint loss are weighted and fused together to obtain a hybrid classification loss. The backbone features are input into the classification head according to the following formula to obtain the probabilities mapped to each level: ; in, This is the original score vector output by the classification head. For classification header, The first in the batch i The main characteristics of each sample For the sample i The probability of belonging to each level; The cross-entropy loss is constructed according to the following formula: ; in, For cross-entropy loss, B This represents the total number of samples included in the current batch. For the sample i Authentic rating labels For the sample i Predicted probabilities at the true label level; Construct the intra-batch level constraint loss according to the following formula: ; in, Loss due to batch-level constraints. K The set of levels that appear in the current batch. For the size of the set, For level j The average predicted probability in the current batch. This is a preset numerical stability constant; The level is calculated according to the following formula. j Average predicted probability in the current batch: ; in, For level j The average predicted probability in the current batch. The current batch is of medium level j The number of samples, For the sample i Authentic rating labels For the sample i At level j The predicted probability; The cross-entropy loss and the intra-batch level constraint loss are weighted and fused according to the following formula to obtain the hybrid classification loss: ; in, For mixed classification loss, For cross-entropy loss, The weights for the batch-level constraint loss. Loss is due to batch-level constraints.

9. The intelligent identification and assisted diagnosis method for osteoarthritis according to claim 8, characterized in that, The dual-branch joint learning model is jointly optimized using the total loss function, specifically including: ; in, L For the total loss, Weights for average contrast ordinal loss , This represents the average correlation ordinal loss for the current batch. For mixed classification loss; The weights of the average contrastive ordinal loss are calculated using the following formula: ; ; ; in, The weights for the average contrast ordinal loss, For maximum weight, t For the current training round, T For the total number of training rounds, w This is the initial training ratio. r The ratio of the linearly increasing stage.

10. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the intelligent identification and grading method for osteoarthritis according to any one of claims 1-9.