A knee joint MRI segmentation method based on classification diffusion and morphological prior.

By employing a method based on classification diffusion and morphological priors, the segmentation problem of small-scale slender structures in knee MRI images was solved, achieving high-precision and robust knee MRI segmentation, improving the segmentation accuracy of the tibia and unifying the segmentation boundaries.

CN123118670APending Publication Date: 2026-11-17HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611354316.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing medical image segmentation methods have low segmentation accuracy for small, slender anatomical structures in knee MRI images, with rough segmentation boundaries, lack of structured constraints, and failure to fully utilize disease grading information and prior knowledge of anatomical morphology.

Method used

A segmentation method based on classification diffusion and morphological priors is adopted. The segmentation labels are gradually blurred through the classification diffusion model, and clear and continuous segmentation results are generated by utilizing knee MRI images, anatomical morphological prior features and disease grading information. This includes the combination of preprocessing, morphological feature extraction, disease grading and classification diffusion segmentation network.

Benefits of technology

It significantly improved the segmentation accuracy of small-scale, fine structures, reduced the number of parameters, and enhanced the continuity and structural integrity of the segmentation boundaries, especially improving the segmentation accuracy of the tibia by 7.4 percentage points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a knee joint MRI segmentation method based on classification diffusion and morphological priors, relating to the fields of medical image processing and deep learning. The method includes: normalizing preprocessing of knee joint MRI images; extracting anatomical morphological prior features such as edges, distances, and skeletons; using a classification network to grade the condition and generate conditional vectors; constructing a classification diffusion segmentation network with MRI images, morphological prior features, and conditional vectors as conditions; during training, the segmentation labels are forward-noised to a uniform distribution, and then the reverse process is learned through a denoising network; during inference, iterative sampling is performed starting from the noisy labels to obtain segmentation results for the femur, tibia, and cartilage. On the publicly available dataset SKI10, this invention achieves an average Dice comparable to direct segmentation networks with approximately 9.3M parameters, and improves the tibial Dice by 7.4 percentage points, effectively improving the segmentation accuracy of small-scale, fine structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image processing and deep learning, specifically to a method for automatic segmentation of multiple anatomical structures such as femur, tibia and cartilage in knee joint magnetic resonance (MRI) images, belonging to the field of computer-aided diagnostic technology. Background Technology

[0002] Osteoarthritis of the knee (OA) is one of the most common degenerative joint diseases worldwide, severely impacting the mobility and quality of life of middle-aged and elderly individuals. Magnetic resonance imaging (MRI), with its high-resolution soft tissue contrast of cartilage, meniscus, ligaments, and bone, has become an important tool for assessing degenerative changes in the knee joint, developing surgical plans, and monitoring treatment efficacy. Precise segmentation of anatomical structures such as the femur, tibia, and cartilage in knee MRI is fundamental for cartilage morphology measurement, bone volume assessment, and osteoarthritis grading.

[0003] Traditional medical image segmentation methods rely on manually designed features, such as gray-scale thresholding, edge detection, and region growing techniques. These methods are sensitive to image noise and are easily affected by surrounding soft tissues and artifacts when processing knee joint MRI images with complex anatomical structures and blurred boundaries. Consequently, the segmentation accuracy and stability are insufficient to meet clinical needs.

[0004] In recent years, deep learning-based encoder-decoder segmentation networks (such as U-Net and its variants) have been widely used in medical image segmentation, achieving significant accuracy improvements over traditional methods. However, these one-step segmentation networks, which directly map the input image to segmentation labels, have the following drawbacks:

[0005] (1) The segmentation accuracy of small-proportion, slender anatomical structures (such as the tibia) is low because such structures occupy a very small proportion of pixels in the image and are prone to undersegmentation.

[0006] (2) The output often lacks structured constraints, and the segmentation boundaries are rough and have poor continuity;

[0007] (3) The existing disease grading information (such as the KL grading of osteoarthritis) and prior knowledge of anatomical morphology were not fully utilized to guide the segmentation process.

[0008] (4) In recent years, the segmentation methods based on diffusion models have mostly adopted the Gaussian noise prediction paradigm, which does not match the discrete segmentation label probability distribution and has limited ability to preserve morphological details.

[0009] Therefore, how to achieve high-precision and robust segmentation of multiple anatomical structures on knee MRI, especially improving the segmentation quality of small-scale fine structures (tibia and cartilage boundaries), and making full use of the guiding role of morphological priors and disease grading information, has become an urgent technical problem to be solved. Summary of the Invention

[0010] To address the aforementioned problems, this invention proposes a knee joint MRI segmentation method based on classification diffusion and morphological priors, the overall process of which is as follows: Figure 2 As shown, this invention uses a classification diffusion model as the segmentation engine, gradually blurring discrete segmentation labels into a uniform distribution during the forward noise addition process. It then uses knee MRI images, anatomical morphological prior features, and disease grading condition vectors as denoising conditions to gradually restore clear and continuous segmentation results during the reverse denoising process.

[0011] The technical solution of the present invention is as follows: A knee joint MRI segmentation method based on classification diffusion and morphological prior, comprising the following steps:

[0012] S1. Obtain the knee joint MRI image to be segmented, and preprocess the knee joint MRI image to obtain a standardized image;

[0013] S2. Extract anatomical morphological prior features from the standardized image, wherein the morphological prior features include at least one of edge features, distance features, and skeleton features;

[0014] S3. Input the standardized image into the disease grading network to obtain the disease grading result, and generate a condition vector based on the disease grading result;

[0015] S4. Construct a classification-diffusion segmentation network, wherein the classification-diffusion segmentation network is conditioned on the standardized image, the morphological prior features, and the conditional vector; during training, the segmentation labels are gradually blurred into a uniform distribution through a forward noise addition process, and the reverse noise reduction process is learned through a denoising network;

[0016] S5. Starting from the noise label, the trained classification diffusion segmentation network is used to perform iterative sampling on the knee joint MRI image to obtain the segmentation results containing multiple anatomical structures including the femur, tibia and cartilage.

[0017] Furthermore, the preprocessing in S1 includes: performing min-max normalization on the original pixel values ​​of the knee joint MRI image, mapping the pixel values ​​to a preset grayscale range to obtain a grayscale image; and uniformly scaling the grayscale image to a preset size to obtain a standardized image.

[0018] Furthermore, in S2, the edge feature is obtained by performing Sobel convolution on the normalized image to obtain an edge map; the distance feature is obtained by performing distance transformation on the foreground region of the normalized image to obtain a distance map; and the skeleton feature is obtained by performing morphological thinning and iterative erosion on the foreground region of the normalized image to obtain a skeleton map.

[0019] Furthermore, in the absence of an labeled mask, the foreground region is obtained by adaptive threshold segmentation of the standardized image. That is, the morphological prior features are extracted only from the standardized image itself. The same extraction path is used in the training and inference phases, without the need for external labeled masks.

[0020] Furthermore, the edge map, distance map, and skeleton map are spliced ​​along the channel direction, then weighted channel by channel by learnable weights, and finally fused by 1×1 convolution to obtain the fused morphological prior features.

[0021] Furthermore, the disease grading network in S3 is a Transformer-based classification network that outputs the KL grading logits of the knee joint; the condition vector is obtained by encoding the grading logits through a fully connected layer and a non-linear activation layer.

[0022] Furthermore, the denoising network is a U-Net with an encoder-decoder structure, including a time-step embedding module and a conditional modulation module; each skip connection of the U-Net is provided with a dual attention module consisting of channel attention and position attention; the conditional vector is injected into the features of each layer of the denoising network through the conditional modulation module in a feature-level linear modulation manner.

[0023] Furthermore, the forward noise addition process employs cosine noise scheduling with a preset total number of diffusion steps T; the one-hot representation of the segmented label is weighted and mixed with the uniform distribution according to the cumulative attenuation coefficient of the current step, and then sampled by Gumbel-softmax to obtain the noisy label; the reverse denoising process is jointly supervised by cross-entropy loss and Dice loss.

[0024] Furthermore, in S5, during iterative sampling, the denoising network predicts the clean label distribution corresponding to the current noisy label at each step, and the current noisy label and the predicted distribution are mixed according to the ratio of the cumulative attenuation coefficients of the two adjacent steps. The noisy label for the next step is obtained by Gumbel-softmax sampling. During the sampling process, a classifier-free guidance is adopted, that is, extrapolation is performed between the two predictions of conditional and empty conditional conditions to enhance the guiding role of the conditional vector.

[0025] Furthermore, S5 also includes a condition-adaptive attention step: determining the attention weight of each anatomical structure category based on the condition grading result, and multiplying the attention weight with the segmentation result output by the denoising network to strengthen the focus on key anatomical structures.

[0026] The beneficial effects of this invention are as follows:

[0027] (1) The classification diffusion paradigm is used to generate segmentation results, which are matched with the distribution of discrete segmentation labels. Through gradual refinement, a segmentation output with continuous boundaries and complete structure is obtained.

[0028] (2) Extract the three types of anatomical morphological prior features of edge, distance and skeleton in MRI-only mode and inject them into the denoising process. The path is unified in the training and inference stages, which significantly improves the segmentation accuracy of small proportion slender structures (such as the tibia).

[0029] (3) Introduce a conditional vector for disease grading and guide the segmentation process through feature modulation and disease adaptive attention, so that the network focuses on different anatomical regions for different grades of osteoarthritis.

[0030] (4) Experiments on the publicly available knee MRI dataset SKI10 show that the present invention, with approximately 9.3M parameters, is comparable to the direct segmentation network in terms of average Dice (75.8% vs. 75.7%), with a parameter reduction of approximately 9 times, and the tibial Dice is increased from 55.9% to 63.3%, an improvement of 7.4 percentage points. Attached Figure Description

[0031] Figure 1 The data preparation flowchart includes data scanning, MHD header parsing, intermediate layer filtering, dual-branch processing of labels and images, MFE pre-computation and cache judgment, and training-ready nodes.

[0032] Figure 2 The overall flowchart for invention includes the training phase and the reasoning phase;

[0033] Figure 3 A schematic diagram of the overall structure of the classification diffusion segmentation network;

[0034] Figure 4 This is a schematic diagram of the Morphological Feature Extractor (MFE) structure, which includes the extraction and fusion of edge maps, distance maps, and skeleton maps;

[0035] Figure 5 This is a schematic diagram of the denoising U-Net structure, including the encoder, bottleneck, decoder, and dual attention skip connections;

[0036] Figure 6 A schematic diagram of the conditional injection module for disease grading, including a conditional encoder and feature-level linear modulation;

[0037] Figure 7 A schematic diagram of the forward noise addition and reverse noise reduction process for classification diffusion;

[0038] Figure 8 This is a schematic diagram of the inference iterative sampling and diffusion refining mode process;

[0039] Figure 9 A comparison of segmentation results (comparison of the segmentation effects of this invention and direct segmentation networks on various anatomical structures).

[0040] Figure 10 This is a visualization of the intermediate results during the diffusion process, showing the process of gradually refining noise labels to clear segmentation.

[0041] The embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0042] The data preparation process of this invention is as follows: Figure 1 As shown, the overall process is as follows: Figure 2 As shown.

[0043] Example 1: Data Acquisition and Preprocessing

[0044] This embodiment uses the publicly available SKI10 knee MRI dataset. This dataset contains 120 knee MRI images, and the slice images include four types of pixel labels: background, femur, tibia, and cartilage. According to the percentage of each type of pixel in the image, the femur accounts for approximately 16.0%, the tibia accounts for approximately 1.4%, and the cartilage accounts for approximately 11.8%, with the tibia being a small-percentage, fine structure.

[0045] Preprocessing (see details) Figure 1 The data preparation process (as shown) is as follows:

[0046] (1) Read the slice image of the MRI body data, perform minimum-maximum normalization on the slice pixel values, and map them to the gray range of 0~255 to obtain a gray image;

[0047] (2) Scale the grayscale image to a preset size (128×128 pixels in this embodiment) to obtain a standardized image;

[0048] (3) For the labeled labels, the four types of labels are uniformly mapped to the category indexes of background, femur, tibia and cartilage (in this embodiment, the femur label pixel is recorded as 1, the tibia as 2, the cartilage as 3, and the background as 0), and scaled according to the same size as the image to obtain the segmentation labels.

[0049] Example 2: Morphological prior feature extraction (corresponding to S2)

[0050] The structure of the morphological feature extractor (MFE) is as follows: Figure 4 As shown, three types of anatomical morphological prior features are extracted from standardized images:

[0051] (1) Edge map: The Sobel operator is used to convolve the standardized image in the horizontal and vertical directions, calculate the gradient magnitude and normalize it to obtain the edge map, which is used to enhance the bone contour of the femur and tibia.

[0052] (2) Distance map: The distance transformation is performed on the foreground region (highlighted bone region) to obtain a normalized distance map pointing from the inside of the foreground to the boundary, which is used to provide structural information "from the outside to the inside and from coarse to fine".

[0053] (3) Skeleton diagram: The foreground region is subjected to iterative erosion morphological refinement to obtain the skeleton diagram, which is used to protect the connectivity of slender structures such as cartilage.

[0054] Without labeled masks, the foreground region is obtained by adaptive thresholding of the standardized image. Specifically, the threshold is the median of the image's mean and maximum grayscale values; pixels above this threshold are considered foreground. Therefore, morphological prior features are extracted solely from the standardized image itself, and the training and inference phases use the same extraction path, eliminating the need for external labeled masks.

[0055] The three types of features are concatenated along the channel direction, multiplied by learnable weights, and then fused across channels by a 1×1 convolution to obtain the fused morphological prior features, which serve as additional conditional inputs to the denoising network.

[0056] Example 3: Disease grading and condition vector generation (corresponding to S3)

[0057] This embodiment uses a Transformer-based disease grading network (ViT in this embodiment) to classify standardized images and output the logits of the KL grade (0 / 1 / 2 / 3) of osteoarthritis.

[0058] The condition vector is obtained by encoding hierarchical logits using a conditional encoder: it is first mapped to a preset dimension (64-dimensional in this embodiment) through a fully connected layer, then activated by SiLU and normalized by layers, and finally passed through a fully connected layer to obtain a 64-dimensional condition perception vector. Simultaneously, the condition level index is obtained from the argmax of the hierarchical logits, which is used for condition-adaptive attention.

[0059] Example 4: Classification-Diffusion Segmentation Network (corresponding to S4)

[0060] The overall structure of the classification-diffusion segmentation network is as follows: Figure 3As shown, it includes a denoising U-Net, a morphological feature extractor, and a conditional encoder.

[0061] The structure of the denoising U-Net is as follows Figure 5 As shown, the input is a concatenation of noisy segmentation labels, a normalized image, and fused morphological prior features; the output is the denoised segmentation label logits. The denoising U-Net includes:

[0062] (1) Time step embedding module: The diffusion time step is sinusoidally position encoded and mapped by a multilayer perceptron to obtain the time step embedding;

[0063] (2) Encoder: It consists of several residual blocks and downsampling convolution (in this embodiment, the number of base channels is 64, the number of channels is 64→128→256→256, and the spatial size is 128→64→32→16).

[0064] (3) Bottleneck: Consists of residual blocks, which are modeled globally;

[0065] (4) Decoder: It consists of transposed convolution and residual blocks, which restore the resolution step by step;

[0066] (5) Dual attention skip connection: A dual attention module consisting of channel attention and position attention is set between the output of each level of the encoder and the corresponding input of the decoder to enhance the skip connection features and protect cartilage and other detailed information.

[0067] Conditional Injection of Disease Conditions: The conditional vector is processed by the Conditional Modulation Module (FiLM) to perform feature-level linear modulation on the intermediate features of each residual block of the denoising U-Net. This involves calculating scaling and offset coefficients per channel and performing an affine transformation on the features, thereby guiding the denoising process with disease information. The structure of the conditional injection module is as follows: Figure 6 As shown.

[0068] Classification and diffusion process such as Figure 7 As shown. Forward noise addition: Let the total number of diffusion steps be T (T=250 in this embodiment), and use cosine noise scheduling to calculate the cumulative attenuation coefficient α for each step; for a clean segmentation label one-hot representation z0, at step t... A weighted mixture (K is the number of classes) is performed, and the noisy label z is obtained by Gumbel-softmax sampling. t This gradually blurs the one-hot labels into a uniform distribution.

[0069] Denoising Training: The denoising network uses noisy labeled z t The input consists of time step t, a standardized image, morphological prior features, and a conditional vector related to the disease condition. The program predicts the clean label distribution. The training loss is a combination of cross-entropy loss and Dice loss.

[0070] Where λ is the Dice loss weight (λ=5.0 in this embodiment). To alleviate the problem of insufficient contribution from small percentage categories (tibia, cartilage), both cross-entropy loss and Dice loss assign weights to each anatomical structure category according to pixel proportion. In this embodiment, the cross-entropy weights for the four categories of background, femur, tibia, and cartilage are set to 0.05, 1.0, 10.0, and 10.0, respectively.

[0071] Training parameters: AdamW optimizer was used, with an initial learning rate of 1×10⁻⁶. -4 Weight decay 0.01, batch size 2, maximum training epochs 200, early stopping patience 40 epochs, first 3 epochs linear learning rate warm-up, followed by cosine annealing scheduling with hot restart (10 epochs, multiplication factor 2, minimum learning rate 1×10). -6 ), gradient clipping norm 1.0.

[0072] Example 5: Inference Sampling (corresponding to S5)

[0073] During inference, starting from uniformly distributed noise labels, the segmentation result is gradually refined through iterative sampling with a preset number of steps, as follows: Figure 8 As shown, the intermediate segmentation results of each step are as follows: Figure 10 As shown. Each iteration is as follows:

[0074] (1) The denoising network takes the current noisy label, time step, standardized image, morphological prior features and disease condition vector as input to predict the clean label distribution p0;

[0075] (2) Mix the current noisy label with the predicted distribution according to the ratio of the cumulative attenuation coefficients of two adjacent steps to obtain the label distribution of the next time step;

[0076] (3) The noisy label for the next time step is obtained by sampling with Gumbel-softmax (the annealing temperature is a smaller value).

[0077] To enhance the guidance of conditional information, iterative sampling employs classifier-free guidance (CFG): predictions are made simultaneously using both the conditional vector and the empty conditional vector, and the two predictions are extrapolated using the guidance coefficient. In this embodiment, the number of inference steps is 200, and the CFG guidance coefficient is 1.5.

[0078] Disease-adaptive attention: The attention weights for each category are obtained by looking up a table based on the disease grading index (under different grades, the attention weights for the femur, tibia, and cartilage categories corresponding to areas such as osteophytes and subchondral sclerosis are different). The attention weights are multiplied by the segmentation logits output by the denoising network and then the argmax is taken to obtain the final segmentation result, so that the network strengthens its attention to the corresponding anatomical regions for different disease grades.

[0079] Diffusion Refinement Mode: Given a coarse segmentation result (such as the output of a direct segmentation network), the coarse segmentation result can be used as the starting label. Noise is added to it according to a preset starting time step (50 steps in this embodiment). Then, it is refined by diffusion denoising with a small number of iteration steps (20 steps in this embodiment). While retaining the overall structure of the coarse segmentation, the boundary is refined to obtain the refined segmentation result.

[0080] Example 6: Experimental Results

[0081] On the SKI10 knee MRI dataset, this invention was compared with a direct segmentation network (Mamba-ResUNet), and the results are as follows. Figure 9 As shown. The Dice coefficient is calculated for each type of bone: femur, tibia, and cartilage.

[0082] (1) Overall Comparison: The present invention (classification diffusion) achieved femoral Dice of 85.1%, tibial Dice of 63.3%, cartilage Dice of 86.7%, and an average Dice of 75.8%; the direct segmentation network (Mamba-ResUNet, retrained) achieved femoral Dice of 85.3%, tibial Dice of 55.9%, cartilage Dice of 85.9%, and an average Dice of 75.7%. The present invention achieves overall accuracy comparable to the direct segmentation network with 84M parameters with approximately 9.3M parameters, reducing the number of parameters by approximately 9 times, and improving tibial Dice by 7.4 percentage points.

[0083] (2) Ablation Experiment: Based on Gaussian diffusion (noise prediction) (average Dice 51.9%), classification diffusion (+11.1 percentage points, reaching 63.0%), Dice loss weighting (+6.2 percentage points, reaching 69.2%), morphological prior (+4.3 percentage points, reaching 73.5%), and disease grading weighting (+2.3 percentage points, reaching 75.8%) were sequentially introduced. The ablation results verified the contribution of the stepwise introduction of each feature in this invention.

[0084] (3) Tibial analysis: The tibia occupies only about 1.4% of the image pixels (average about 230 pixels), and about 35% of the slices do not contain the tibia. The Dice of the present invention for the tibia (63.3%) is significantly better than that of the direct segmentation network (55.9%), indicating that classification diffusion and morphological priors are effective for fine structure segmentation.

[0085] This invention provides a knee joint MRI segmentation system, comprising: an image preprocessing module for acquiring and preprocessing knee joint MRI images to be segmented to obtain a standardized image; a morphological feature extraction module for extracting anatomical morphological prior features from the standardized image, including at least one of edge features, distance features, and skeletal features; a disease grading module for grading the standardized image and generating a conditional vector; and a classification-diffusion segmentation module for generating segmentation results including the femur, tibia, and cartilage from noise labels through iterative sampling, using the standardized image, the morphological prior features, and the conditional vector as conditions. Each of the above modules performs the corresponding steps in the aforementioned method embodiments and can be implemented by computer program instructions and integrated into a computer-readable storage medium.

[0086] The above description is merely 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 principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A knee joint MRI segmentation method based on classification diffusion and morphological prior, characterized in that, Includes the following steps: S1: Obtain the knee joint MRI image to be segmented, and preprocess the knee joint MRI image to obtain a standardized image; S2: Extract anatomical morphological prior features from the standardized image, wherein the morphological prior features include at least one of edge features, distance features, and skeleton features; S3: Input the standardized image into the disease grading network to obtain the disease grading result, and generate a condition vector based on the disease grading result; S4: Construct a classification-diffusion segmentation network, which is conditioned on the standardized image, the morphological prior features, and the conditional vector; during training, the segmentation labels are gradually blurred into a uniform distribution through a forward noise addition process, and the reverse noise reduction process is learned through a denoising network; S5: Starting from the noise labels, the trained classification diffusion segmentation network is used to perform iterative sampling on the knee joint MRI image to obtain segmentation results containing multiple anatomical structures including the femur, tibia and cartilage.

2. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, The preprocessing in S1 includes: S11: Perform min-max normalization on the original pixel values ​​of the knee joint MRI image to map the pixel values ​​to a preset grayscale range to obtain a grayscale image; S12: Scale the grayscale image to a preset size to obtain a standardized image.

3. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, In S2, the edge feature is obtained by performing Sobel convolution on the normalized image to obtain the edge map; the distance feature is obtained by performing distance transformation on the foreground region of the normalized image to obtain the distance map; and the skeleton feature is obtained by performing morphological thinning and iterative erosion on the foreground region of the normalized image to obtain the skeleton map.

4. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 3, characterized in that, In step S2, without a labeled mask, the foreground region is obtained by adaptive threshold segmentation of the standardized image. That is, the morphological prior features are extracted only from the standardized image itself, and the same extraction path is used in the training and inference phases.

5. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 3, characterized in that, The edge map, distance map, and skeleton map are concatenated along the channel direction, then weighted channel by channel by learnable weights, and finally fused by 1×1 convolution to obtain the fused morphological prior features.

6. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, The disease grading network in S3 is a Transformer-based classification network that outputs the KL grading logits of the knee joint; the condition vector is obtained by encoding the grading logits through a fully connected layer and a non-linear activation layer.

7. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, The denoising network is a U-Net with an encoder-decoder structure, including a time-step embedding module and a conditional modulation module; each skip connection of the U-Net is equipped with a dual attention module consisting of channel attention and position attention; the conditional vector is injected into the features of each layer of the denoising network through the conditional modulation module in a feature-level linear modulation manner.

8. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 7, characterized in that, The forward noise addition process uses cosine noise scheduling with a preset total number of diffusion steps T; the one-hot representation of the segmented label is weighted and mixed with the uniform distribution according to the cumulative decay coefficient of the current step, and then sampled by Gumbel-softmax to obtain the noisy label; the reverse denoising process is jointly supervised by cross-entropy loss and Dice loss.

9. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 8, characterized in that, In S5, the iterative sampling process involves the denoising network predicting the clean label distribution corresponding to the current noisy label at each step, and mixing the current noisy label with the predicted distribution according to the ratio of the cumulative attenuation coefficients of the two adjacent steps. The noisy label for the next step is obtained by Gumbel-softmax sampling. During the sampling process, a classifier-free guidance is adopted, that is, extrapolation is performed between the two predictions of conditional and empty conditional conditions to enhance the guiding role of the conditional vector.

10. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, The S5 further includes a condition-adaptive attention step: determining the attention weight of each anatomical structure category based on the condition grading result, and multiplying the attention weight with the segmentation result output by the denoising network to strengthen the focus on key anatomical structures.

11. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 1, characterized in that, The S5 further includes a diffusion refining step: taking the coarse segmentation result as the starting label, adding noise to the starting label according to a preset starting time step, and refining it through iterative sampling with fewer than the number of complete generation steps to obtain the refined segmentation result.

12. The knee joint MRI segmentation method based on classification diffusion and morphological prior as described in claim 8, characterized in that, The cross-entropy loss and Dice loss assign weights to each anatomical structure category according to the pixel percentage, and assign higher weights to anatomical structure categories with a small percentage.

13. A knee joint MRI segmentation system, characterized in that, include: The image preprocessing module is used to acquire and preprocess the knee joint MRI images to be segmented to obtain standardized images; A morphological feature extraction module is used to extract anatomical morphological prior features from the standardized image, including at least one of edge features, distance features, and skeleton features; The disease grading module is used to grade the disease status of the standardized image and generate a condition vector. The classification diffusion segmentation module is used to generate segmentation results containing the femur, tibia and cartilage from noise labels through iterative sampling, based on the standardized image, the morphological prior features and the conditional vector.