Fundus disease image classification method based on Bayesian element learning

An image classification model for fundus diseases was constructed using the Bayesian meta-learning method. The model was trained using Bayesian loss, KL divergence loss, and cross-entropy loss, which solved the problem of low classification accuracy for rare fundus diseases and achieved efficient identification under limited sample conditions.

CN120852833APending Publication Date: 2025-10-28SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510678372.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing deep learning models cannot accurately identify rare fundus diseases in the classification of fundus diseases because there are very few labeled images of rare fundus diseases and the recognition computation is very complex, resulting in low classification accuracy.

Method used

A Bayesian meta-learning-based approach is adopted to construct training sets for common disease categories and target tasks. By combining feature extractors and meta-learners, the model is trained using Bayesian loss, KL divergence loss, and cross-entropy loss to enhance the ability to identify rare disease categories.

Benefits of technology

It significantly improves the identification accuracy of rare fundus diseases, reduces computational complexity, and enhances the real-time performance and applicability of the model, enabling effective classification of fundus diseases under limited sample conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852833A_ABST
    Figure CN120852833A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of disease detection, in particular to a Bayesian element learning-based fundus disease image classification method, which comprises the following steps of: constructing a common disease training set and a target task training set containing common diseases, rare diseases and normal images, and combining various common disease categories in the target task training set into a single common disease category; processing the two training sets through a feature extractor, and inputting the processed training sets into two meta-learners: outputting a common disease prediction probability and calculating cross entropy loss by the first meta-learner, and outputting a target task set prediction probability and calculating KL divergence loss by the second meta-learner; combining the prediction probabilities of the two meta-learners to construct Bayesian loss, and finally fusing three-item loss to optimize the two meta-learners; after training is completed, the feature extractor and the second meta-learner are combined to serve as a fundus disease image classification model. According to the invention, the classification precision of the rare eye disease image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of disease detection technology, and in particular to a method for classifying fundus disease images based on Bayesian meta-learning. Background Technology

[0002] As one of the leading causes of blindness worldwide, early and accurate diagnosis of eye diseases relies on pathological analysis of structures such as the macula, retinal vessels, and optic nerve head. Traditional diagnostic methods depend on the experience of ophthalmologists, but due to the uneven distribution of medical resources and the scarcity of rare disease samples, misdiagnosis and missed detection often occur.

[0003] Currently, deep learning models have achieved significant results in fundus disease classification tasks, learning the characteristics of different fundus diseases from large-scale labeled retinal fundus images, thus enabling accurate classification of various retinal fundus images. However, existing deep learning methods rely on large-scale labeled data. While there are numerous clinical samples of common fundus diseases, allowing models to effectively extract their feature information, clinical samples of rare fundus diseases (such as retinitis pigmentosa and punctate inner choroidal lesions) are extremely scarce and labeling costs are very high. This prevents models from accurately capturing the feature information of rare fundus diseases, thus hindering their ability to accurately identify rare fundus diseases from a large dataset. In other words, existing fundus disease classification methods overemphasize common fundus diseases; while they can accurately classify common fundus diseases, they cannot identify rare ones, thus failing to provide effective theoretical guidance for doctors in analyzing eye diseases. Summary of the Invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problem that there are very few labeled samples of rare fundus disease images in the prior art, the high computational complexity and lack of real-time performance of rare fundus disease identification, which affects the classification accuracy of rare eye disease images.

[0005] To address the aforementioned technical problems, this invention provides a method for classifying fundus disease images based on Bayesian meta-learning, comprising:

[0006] Acquire multiple retinal and fundus images with real labels, construct a common disease category training set based on images of various common disease categories, construct a target task training set based on images of various common disease categories, images of various rare disease categories, and normal category images, and merge the various common disease categories in the target task training set into a single common disease category;

[0007] Each image in the common disease category training set is processed by a feature extractor and then input into the first-order learner. The learner outputs the predicted probability distribution of each image in the common disease category training set, and constructs the meta-training cross-entropy loss.

[0008] Each image in the target task training set is processed by a feature extractor and then input into a second-order learner. The learner outputs the predicted probability distribution of each image in the target task training set and constructs the KL divergence loss.

[0009] Based on the joint probability distribution between the predicted probability distribution of common disease category images obtained by the first-element learner and the predicted probability distribution obtained by the second-element learner, a Bayesian loss is constructed.

[0010] The target loss function is constructed based on KL divergence loss, cross-entropy loss and Bayesian loss, and a first-order learner and a second-order learner are trained. The feature extractor is combined with the trained second-order learner to form an image classification model for fundus diseases.

[0011] Preferably, after combining the feature extractor with the trained second-order learner to form a fundus disease image classification model, the model further includes:

[0012] Input each image in the target task training set into the fundus disease image classification model, output the predicted probability distribution of each image in the target task training set, and construct a fine-tuned cross-entropy loss.

[0013] By minimizing the fine-tuning cross-entropy loss, the image classification model for fundus diseases is fine-tuned to obtain the target image classification model for fundus diseases.

[0014] Preferably, inputting each image from the target task training set into the fundus disease image classification model includes:

[0015] A subset of images representing common disease categories, multiple rare disease categories, and normal categories are selected from the target task training set to construct a few-sample target task sample set.

[0016] Input each image from the sample set of the target task with a small number of samples into the fundus disease image classification model.

[0017] Preferably, KL divergence loss The expression is:

[0018] ;

[0019] in, Indicates that the categories in the training set of the target task are Images; Representing an image The true label; The image representing the output of the second-order learner The predicted classification results; This represents the model parameters of the second-order learner; Representing an image The true probability distribution The image obtained by the second-order learner The predicted probability distribution; This represents the total number of categories in the training set for the target task.

[0020] Preferably, cross-entropy loss The expression is:

[0021] ;

[0022] in, The common disease category training set is categorized as follows: Images; Representing an image The true label; The image represents the output of the first-order learner. The predicted classification results; Representing an image The true probability distribution; The image obtained by the first-order learner Predict the probability distribution; This represents the total number of categories in the common disease category training set.

[0023] Preferably, Bayesian loss The expression is:

[0024] ;

[0025] in, This represents the total number of categories in the common disease category training set; Common disease categories training set categories Images; Representing an image The true label; Representing an image The true probability distribution; The image represents the output of the first-order learner. The predicted probability distribution; The image representing the output of the second-order learner The predicted probability distribution; express and The joint probability distribution.

[0026] Preferably, the target loss function The expression is:

[0027] ;

[0028] in, Indicates the KL divergence loss; This represents the weights corresponding to the KL divergence loss; Represents cross-entropy loss; This represents the weights corresponding to the cross-entropy loss; Indicates Bayesian loss; This represents the weights corresponding to the Bayesian loss.

[0029] Preferably, the feature extractor is a pre-trained deep Transformer model, which includes 24 attention blocks and a 1024-dimensional embedding vector;

[0030] Both the first-order learner and the second-order learner consist of a four-layer CNN shallow network and a fusion classification module.

[0031] Preferably, the training process of the first-order learner and the second-order learner includes:

[0032] Based on the training set of common disease categories, construct N meta-training task sample sets, where each meta-training task sample set includes M common disease categories;

[0033] The images of common disease categories in each meta-training task sample set are divided into a first support set and a second query set; wherein, both the first support set and the first query set include images of M common disease categories;

[0034] Based on N meta-training task sample sets, N target task sample sets corresponding to the N meta-training task sample sets are obtained respectively; for each target task sample set, the images of M common disease categories in the corresponding meta-training task sample set are constructed together with the images of each rare disease category and the normal category in the target task training set.

[0035] The images of M common disease categories, each rare disease category, and normal category in the sample set of each target task are divided into a second support set and a second query set; wherein, both the second support set and the second query set include images of M common disease categories, each rare disease category, and normal category.

[0036] The first-order learner and the second-order learner are trained using N first support sets and N second support sets until the value of the regularization correction function of the target loss function is minimized, thus obtaining the initial first-order learner and the initial second-order learner.

[0037] The initial first-ary learner and the initial second-ary learner are trained again using N first query sets and N second query sets until the expected value between the target loss function and the regularization correction function of the target loss function is minimized, thus obtaining the trained first-ary learner and second-ary learner.

[0038] Preferably, the expression for minimizing the regularization correction function of the target loss function is:

[0039] ;

[0040] in, This represents the task adaptability parameters in the meta-learner group. This represents the task adaptability parameters of the unary learner. This represents the task adaptability parameters of the second-order learner; This represents the image in the first support set; This represents the image in the second support set; This represents the target loss function value calculated based on the first and second support sets. This represents the model parameters of the meta-learner group. This represents the model parameters of the first-order learner. This represents the model parameters of the second-order learner; Represents the regularization term;

[0041] The expression for minimizing the expected value between the value of the objective loss function and the value of the regularization correction function of the objective loss function is:

[0042] ;

[0043] in, This represents the model parameters of the initial meta-learner group. This represents the model parameters of the initial unary learner. This represents the model parameters of the initial second-order learner; Represents the images in the first query set; Represents the images in the second query set; This represents the expected value between the value of the target loss function and the value of the regularization correction function of the target loss function.

[0044] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0045] This invention discloses a Bayesian meta-learning-based image classification method for fundus diseases. It acquires a large number of labeled retinal fundus images. Since common disease categories are easily distinguishable, while rare disease and normal categories are difficult to identify due to sample size limitations, this application considers accurately identifying only rare and normal categories. For images of common disease categories, it is sufficient to identify them as common disease categories, without needing precise category identification. Therefore, this application constructs a common disease category training set and a target task training set, merging multiple common disease categories in the target task training set into a single common disease category. Then, a first-order learner is trained using the common disease category training set. By minimizing the meta-training cross-entropy loss, a first-order learner capable of accurately identifying multiple common disease categories is obtained. Finally, a second-order learner is trained using the target task training set. By minimizing the KL divergence loss of the target task, a second-order learner capable of identifying a single common disease category is obtained. A second-order learner is used for multiple rare disease categories and normal categories. Considering the correlation between the predicted probability categories of common disease categories output by the two learners, when the first predicted probability distribution of a common disease category image output by the first learner has a peak, the second-order learner aims to make the probability of belonging to the rare disease and normal categories in the second predicted probability distribution of the common disease category image as close to 0 as possible. A Bayesian loss is constructed based on the joint probability distribution between the first and second predicted probability distributions of the common disease category. This allows the second-order learner to extract common knowledge from the rich data of common disease category images, so as to constrain the interdependence between common disease identification and rare disease identification. By using common fundus diseases to assist in the identification of rare fundus diseases, the gradient update between common and rare diseases is effectively balanced, knowledge transfer between common and rare diseases is strengthened, and the fundus disease identification ability of the second-order learner is improved.

[0046] This invention presents a method for classifying fundus disease images based on Bayesian meta-learning. It proposes a network architecture consisting of a feature extractor and a meta-learner. The feature extractor acquires global features from the image, while the meta-learner performs local feature extraction, feature fusion, and classification, ultimately yielding the classification result for fundus disease images. A pre-trained deep Transformer model is used as the feature extractor, effectively distinguishing subtle differences between common and rare diseases. Simultaneously, the meta-learner utilizes a four-layer shallow CNN network to enhance the capture of local lesion details, significantly improving the network architecture's feature representation capability under limited sample conditions. This enables efficient subsequent classification of fundus diseases and improves the accuracy of fundus disease image classification. During the training of the first and second meta-learners, the parameters of the feature extractor are frozen, and the meta-learner optimizes common knowledge of common diseases, significantly reducing computational overhead and improving the real-time performance of fundus disease identification. In the fine-tuning stage, the parameters of both the feature extractor and the second meta-learner are updated to adapt to the specific distribution of the target task, improving the applicability of the fundus disease image classification model. Attached Figure Description

[0047] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0048] Figure 1 This is a flowchart of a method for classifying fundus disease images based on Bayesian meta-learning provided by the present invention;

[0049] Figure 2 This is an architecture diagram of the eye disease recognition model designed in this invention;

[0050] Figure 3 This is a schematic diagram of three rare fundus diseases; among them, Figure 3 (a) in the text represents PIC: Figure 3 In this context, (b) represents VRL; Figure 3 In this context, (c) represents RP;

[0051] Figure 4 This is a schematic diagram of the eyeball structure;

[0052] Figure 5 This is a schematic diagram of a retinal fundus image;

[0053] Figure 6 This is a flowchart of the Bayesian meta-training strategy for the rare eye disease identification model designed in this invention;

[0054] Explanation of the reference numerals in the instruction manual: 1. Iris; 2. Pupil; 3. Cornea; 4. Lens; 5. Sclera; 6. Choroid; 7. Retina; 8. Retinal vessels; 9. Macula; 10. Optic nerve; 11. Vitreous body. Detailed Implementation

[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0056] Reference Figure 1 As shown, the present invention provides a method for classifying fundus disease images based on Bayesian meta-learning, which specifically includes:

[0057] S1: Construct as follows Figure 2 As shown, a dual-channel network architecture (MetaFound) includes a feature extractor and a meta-learner. The feature extractor is a self-supervised learning-based base model (RETFound), which adopts a deep Transformer model (ViT-large) with 24 attention blocks and 1024-dimensional embedding vectors. This base model can learn global semantic features in images through the masked autoencoder (MAE) method, and can efficiently resolve microstructural differences in fundus images, such as changes in retinal layer thickness and morphological features of lesion areas. Compared to traditional supervised learning models (such as ResNet or ViT pre-trained on ImageNet), RETFound demonstrates significant advantages in cross-domain data generalization and labeling efficiency, especially when dealing with highly imbalanced disease distributions. Its high-dimensional feature space can effectively distinguish subtle differences between common and rare diseases. The initial meta-learner consists of a four-layer shallow CNN network and a feature fusion classifier. The shallow network has a smaller parameter scale, which reduces the risk of overfitting in small sample training. Furthermore, the local perception characteristics of CNN can supplement the global representation of Transformer, enhancing the ability to capture local details of lesions. The high-dimensional features extracted by RETFound and the local features output by CNN are concatenated through the feature fusion layer of the fusion classification module to form multi-scale fusion features, which are finally input into the fully connected layer of the fusion classification module to complete disease classification. The feature extractor is pre-trained using large-scale unlabeled retinal fundus images to obtain a pre-trained feature extractor. All feature extractors used in subsequent processes are pre-trained feature extractors.

[0058] S2: Acquire multiple retinal fundus images with real labels, and construct a common disease category training set based on images of various common disease categories; construct a target task training set based on images of various common disease categories, images of various rare disease categories, and normal category images, and merge the various common disease categories in the target task training set into a single common disease category; In a specific embodiment of the present invention, the target task is designed as a five-class classification problem to meet actual clinical needs: classify 12 common diseases into the "common disease" category, and add normal fundus and 3 rare diseases (RP, PIC, VRL); a schematic diagram of the three rare fundus diseases is shown below. Figure 3 As shown; the structure of the eyeball is as follows Figure 4 As shown; retinal fundus images are acquired using optical coherence tomography (OCT), such as... Figure 5 As shown.

[0059] S3: After processing each image in the common disease category training set by the feature extractor, input it into the first-order learner. The learner outputs the predicted probability distribution of each image in the common disease category training set, and constructs the meta-training cross-entropy loss, the expression of which is:

[0060] ;

[0061] in, Indicates that the category in the current meta-training task is Images; Representing an image The true label; The image represents the output of the first-order learner. The predicted classification results; Representing an image The true probability distribution; The image obtained by the first-order learner The predicted probability distribution; This represents the total number of categories in the current meta-training task; the cross-entropy loss function learns the meta-training task by calculating its total entropy, ensuring that the network does not forget the common fundus disease features of the meta-training task when learning rare fundus diseases of the target task.

[0062] The images in the training set for the target task are processed by a feature extractor and then input into a second-order learner. The learner outputs the predicted probability distribution of each image in the training set for the target task, and constructs the KL divergence loss, the expression of which is:

[0063] ;

[0064] in, Indicates that the categories in the training set of the target task are Images; Representing an image The true label; The image representing the output of the second-order learner The predicted classification results; This represents the model parameters of the second-order learner; Representing an image The true probability distribution The image obtained by the second-order learner The predicted probability distribution; This represents the total number of categories for the target task; where KL divergence (KL divergence for short) is a metric that measures the difference between two probability distributions, also known as relative entropy; the KL divergence loss function learns the target tasks by calculating the relative entropy between the true and predicted probability distributions; in a specific embodiment of the present invention, the second-order learner has the same structure as the first-order learner;

[0065] Based on the joint probability distribution between the predicted probability distributions of common disease category images obtained through the first-order learner and the predicted probability distributions obtained through the second-order learner, a Bayesian loss is constructed, the expression of which is:

[0066] ;

[0067] in, This indicates the total number of categories for the current meta-training task; The training focus on common diseases is categorized as follows: Images; Representing an image The true label; The image represents the output of the first-order learner. The predicted classification results; The image representing the output of the second-order learner The predicted probability distribution; Representing an image The true probability distribution; express and The joint probability distribution of is expressed as:

[0068] ;

[0069] in, Indicates category as The prior probability; Indicates the model parameters of the first-order learner; This represents the model parameters of the second-order learner; This represents the output of the first-order learner; This represents the output of the second-order learner; Indicates the output of the lemma learner With the output of the second-order learner Under the given conditions, the classification result is The probability of; Indicates the output of the first-order learner The classification result is The probability of; Indicates the output of the second-order learner The classification result is The probability of; Represents the normalization factor; where, the Bayesian loss function By constraining the network to learn the interdependencies between the meta-training task and the target task, the gap between the two is bridged, thereby improving the diagnostic ability for rare fundus diseases. In the meta-training stage, MetaFound uses Bayesian meta-learning to constrain the network to learn the interdependencies between the meta-training task and the target task, thereby bridging the gap between the two and further improving the diagnostic ability of the potential model obtained from meta-training for rare fundus diseases.

[0070] In summary, MetaFoundation's Bayesian meta-training strategy is one of the core mechanisms enabling it to achieve superior performance in the diagnosis of rare fundus diseases. This strategy constructs a multi-task meta-training set to simulate the complex disease distribution in real clinical scenarios, aiming to extract common knowledge from rich data on common diseases and transfer it to the diagnostic task of rare diseases. At the same time, based on the Bayesian multi-objective loss function, it constrains the interdependence between the network learning meta-training tasks and target tasks, thereby improving the model's diagnostic ability for rare fundus diseases.

[0071] S4: Construct a target loss function based on KL divergence loss, cross-entropy loss, and Bayesian loss, and train a first-order learner and a second-order learner; combine the feature extractor with the trained second-order learner as a fundus disease image classification model;

[0072] The target loss function Its expression is:

[0073] ;

[0074] in, Indicates the KL divergence loss; This represents the weights corresponding to the KL divergence loss; Represents cross-entropy loss; This represents the weights corresponding to the cross-entropy loss; Indicates Bayesian loss; This represents the weights corresponding to the Bayesian loss; in a specific embodiment of the present invention, The values ​​are 0.5, 0.3, and 0.2 respectively.

[0075] The process of training the first-order learner and the second-order learner includes:

[0076] Based on the training set of common disease categories, construct N meta-training task sample sets, where each meta-training task sample set includes M common disease categories;

[0077] The images of common disease categories in each meta-training task sample set are divided into a first support set and a second query set; wherein, both the first support set and the first query set include images of M common disease categories;

[0078] Based on N meta-training task sample sets, N target task sample sets corresponding to the N meta-training task sample sets are obtained respectively; for each target task sample set, the images of M common disease categories in the corresponding meta-training task sample set are constructed together with the images of each rare disease category and the normal category in the target task training set.

[0079] The images of M common disease categories, each rare disease category, and normal category in the sample set of each target task are divided into a second support set and a second query set; wherein, both the second support set and the second query set include images of M common disease categories, each rare disease category, and normal category.

[0080] The first-order learner and the second-order learner are trained using N first support sets and N second support sets until the value of the regularization correction function of the target loss function is minimized, thus obtaining the initial first-order learner and the initial second-order learner; wherein, the expression for minimizing the regularization correction function of the target loss function is:

[0081] ;

[0082] in, This represents the task adaptability parameters in the meta-learner group. This represents the task adaptability parameters of the unary learner. This represents the task adaptability parameters of the second-order learner; This represents the image in the first support set; This represents the image in the second support set; This represents the target loss function value calculated based on the first and second support sets. This represents the model parameters of the meta-learner group. This represents the model parameters of the first-order learner. This represents the model parameters of the second-order learner; Represents the regularization term;

[0083] The initial first-gram learner and the initial second-gram learner are trained again using N first query sets and N second query sets until the expected value between the target loss function and the regularization correction function of the target loss function is minimized, thus obtaining the trained first-gram learner and second-gram learner; wherein, the expression for minimizing the expected value between the target loss function and the regularization correction function of the target loss function is:

[0084] ;

[0085] in, This represents the model parameters of the initial meta-learner group. This represents the model parameters of the initial unary learner. This represents the model parameters of the initial second-order learner; Represents the images in the first query set; Represents the images in the second query set; The expected value between the value of the target loss function and the value of the regularization correction function of the target loss function;

[0086] This two-layer optimization forces the meta-learner to learn model parameters that can quickly adapt to new tasks, rather than overfitting solutions for a single task.

[0087] To alleviate the scarcity of medical image data, MetaFound integrates the pre-trained RETFound feature extractor. During the meta-training phase, the parameters of the RETFound feature extractor are frozen, relying solely on its pre-trained parameters to provide high-dimensional feature representations, while the meta-learner (a four-layer CNN and a fusion classification module) learns shared knowledge across tasks through multi-task optimization.

[0088] S5: Combining the feature extractor with the trained second-order learner to form a fundus disease image classification model also includes: fine-tuning the fundus disease image classification model.

[0089] The fine-tuned fundus disease image classification model includes two strategies: full-data fine-tuning and few-sample adaptation.

[0090] The full-data fine-tuning involves fine-tuning the fundus disease image classification model using the target task training set. Specifically, it utilizes the complete training set of the target task to perform end-to-end optimization of the potential model generated by meta-training, including parameter unfreezing in the RETFound module. This includes inputting each image from the target task training set into the fundus disease image classification model, outputting the predicted probability distribution of each image in the target task training set, and constructing a fine-tuned cross-entropy loss. By minimizing the fine-tuned cross-entropy loss, the fundus disease image classification model is fine-tuned to obtain the target fundus disease image classification model.

[0091] The few-shot adaptation involves: constructing a few-shot task sample set based on the target task training set; and fine-tuning the fundus disease image classification model using the few-shot task sample set. Specifically, this involves constructing a few-shot task (e.g., a 5-shot-15-query configuration) and rapidly adapting to the target distribution through a small number of gradient updates (e.g., 10 iterations). Specifically, multiple images of common diseases, various rare diseases, and normal categories are selected from the target task training set to construct a few-shot target task sample set. Each image in the few-shot target task sample set is input into the fundus disease image classification model, and the predicted probability distribution of each image in the few-shot task sample set is output. Combined with the corresponding true probability distribution, a fine-tuned cross-entropy loss is constructed. By minimizing the fine-tuned cross-entropy loss, the fundus disease image classification model is fine-tuned to obtain the target fundus disease image classification model.

[0092] The fine-tuning process is achieved by minimizing the loss function of the target task. The fine-tuning process uses the cross-entropy loss function, namely: , This represents the training set for the target task.

[0093] The implementation flow of the MetaFound Bayesian meta-learning algorithm based on S1-S7 is shown in Table 1.

[0094] Table 1 Implementation flow of MetaFoundation Bayesian meta-learning algorithm

[0095] During the fine-tuning phase, the parameters of all modules (including RETFound) are updated to adapt to the specific distribution of the target task. MetaFound innovatively achieves dynamic coupling between the representation capabilities of the base model and the task-specific patterns by constructing a meta-knowledge-guided dual-channel adaptive network architecture.

[0096] In summary, the Bayesian meta-learning method based on MetaFound proposed in this invention is specifically designed for the identification of rare fundus diseases. First, a meta-training task is constructed using data from multiple common fundus diseases, while a target task (rare fundus disease diagnosis task) is constructed using data from rare fundus diseases. Second, Bayesian meta-training is performed based on the meta-training and target tasks. During the meta-training phase, MetaFound constrains the network's learning of the interdependencies between the meta-training and target tasks through Bayesian meta-learning, thereby bridging the gap between them and further improving the diagnostic capability of the potential model obtained from meta-training for rare fundus diseases compared to MetaTrans. Finally, the potential model obtained from meta-training is fine-tuned based on limited rare fundus disease data.

[0097] MetaFound's core design philosophy lies in integrating a self-supervised pre-trained base model with meta-learning algorithms to address the challenges of data scarcity and highly imbalanced class distribution in clinical scenarios. Existing methods often suffer from limitations in handling such problems due to the tendency of deep neural networks to overfit small sample data and the insufficient ability of traditional meta-learning algorithms to represent complex medical images. MetaFound uses Bayesian meta-learning methods and innovatively integrates the RETFound base model with a meta-learner built from shallow convolutional networks, achieving synergistic optimization of feature extraction capabilities and rapid task adaptability.

[0098] The present invention provides a method for classifying fundus disease images based on Bayesian meta-learning. By integrating Bayesian meta-learning with a base model adaptive optimization mechanism, it has achieved several breakthroughs in the diagnosis of rare fundus diseases:

[0099] 1. Significantly improves diagnostic accuracy in scenarios with few samples: To address the problem of scarce samples for rare diseases, the dual-channel network architecture (base model RETFound + shallow CNN meta-learner) proposed in this invention effectively captures fine-grained differences in lesions (such as low-contrast edges of microbleeds and spatial distribution of pigment deposition) through global-local feature fusion; combined with Bayesian multi-objective loss functions (KL divergence, cross-entropy, and inter-distillation loss), it explicitly models the dependencies between tasks, significantly improving the diagnostic accuracy of rare fundus diseases.

[0100] 2. Enhanced cross-domain generalization ability: Through a heterogeneous meta-task construction strategy (covering OCT data from multiple devices and combinations of 12 common diseases and 3 rare diseases), the model can dynamically adapt to the multi-center data distribution shift. The Bayesian meta-learning framework achieves high classification performance on multiple device datasets (such as Heidelberg and Topcon OCT) by optimizing generalization ability across task distributions.

[0101] 3. Reduce computational complexity: The meta-training stage freezes the base model parameters and optimizes only the shallow meta-learner (four-layer CNN), which greatly reduces computational overhead, avoids the risk of overfitting of deep networks in scenarios with few samples, and accelerates training convergence.

[0102] 4. Supports robust diagnosis in complex clinical scenarios: For long-tailed data distribution, the dual-channel network suppresses gradient interference of the majority class (such as CNV) on rare diseases (such as VRL) by dynamically coupling the general features of the base model with the task-specific patterns, so that the model can maintain high diagnostic accuracy even in class imbalance.

[0103] 5. Promoting the Inclusive Deployment of Smart Healthcare: This invention, through its low labeling dependency and high generalization design, significantly reduces the threshold for medical resources required for the diagnosis of rare diseases. In resource-scarce areas, only a small number of labeled samples are needed for rapid model deployment, providing primary care physicians with intuitive AI-assisted decision-making support, improving the efficiency of rare fundus disease screening, and contributing to the optimization of the hierarchical medical system.

[0104] To verify the effectiveness of the Bayesian meta-learning-based image classification method for fundus diseases provided in this invention, the following experiments were conducted:

[0105] The effectiveness of meta-training depends on the richness of multi-class data. Therefore, this invention constructs a multi-disease category OCT dataset, Meta-OCT (covering 12 common fundus diseases, 3 rare diseases, and normal fundus data), named Meta-OCT, to support the application of meta-learning algorithms in ophthalmic medical image analysis. Meta-OCT contains 16 categories of OCT images, covering 12 common fundus diseases, 3 rare fundus diseases, and 1 category of normal fundus images, as shown in Table 2. Specifically, common fundus diseases include 6,578 OCT B-scan slices from 685 patients, rare fundus diseases include 360 ​​OCT B-scan slices from 36 patients, and normal fundus images include 530 OCT B-scan slices from 53 patients. All retinal cross-sectional OCT images were obtained from the following devices: Triton DRI OCT (Topcon, Tokyo, Japan), Topcon 3D OCT-2000 (Topcon Corporation, Tokyo, Japan), or Spectralis OCT (Heidelberg Engineering, Heidelberg, Germany).

[0106] Table 2 Dataset Meta-OCT

[0107] The 12 common categories of fundus diseases include: Acute Central Serous Chorioretinopathy (CSC), Acute Retinal Artery Occlusion (RAO), Acute Retinal Vein Occlusion (RVO), Acute Vogt-Koyanagi-Harada Disease (VKH), Dry Age-Related Macular Degeneration (dAMD), Macular-Off Rhegmatogenous Retinal Detachment (RDD), Myopic Choroidal Neovascularization (mCNV), Myopic Traction Macular Degeneration (MTM), Neovascular Age-Related Macular Degeneration (nAMD), and Non-Proliferative Diabetic Retinopathy. Retinopathy (NPDR), polypoidal choroidal vasculopathy (PCV), and proliferative diabetic retinopathy (PDR). Three rare retinal diseases include PIC, RP, and VRL.

[0108] Rare fundus diseases pose a significant challenge to ophthalmological diagnosis and treatment due to their complex pathological mechanisms, insidious clinical manifestations, and limited treatment options. Peripheral retinal lesions (PICs), as an idiopathic inflammatory disease, are typically characterized by multiple white or yellow punctate lesions in the choroid and outer retina. Figure 3 As shown in (a), its pathogenesis is closely related to immune-mediated choroidal capillary vasculitis, which can lead to choroidal retinal atrophy and secondary neovascularization. VRL belongs to the ocular subtype of primary central nervous system lymphoma, mainly affecting the retina and vitreous cavity, manifesting as vitreous opacities, retinal infiltrative lesions, and macular exudates, such as... Figure 3As shown in (b) of the diagram. Epidemiological data shows that the global annual incidence of VRL is approximately 0.5 per million. It is highly aggressive, with a five-year survival rate of only 61%, indicating an extremely poor prognosis. RP, as a chronic, progressive, hereditary retinal degenerative disease, is characterized by progressive atrophy of RPE layer cells, accompanied by photoreceptor cell apoptosis and retinal vascularization, as shown in (b). Figure 3 As shown in (c), the clinical manifestations include night blindness, progressive narrowing of the visual field, and loss of central vision. Currently, there are no effective treatments for PIC, RP, and VRL. Nutritional interventions (such as vitamin A supplementation) can only slow the progression of RP. VRL treatment relies on systemic chemotherapy and local radiotherapy, but the recurrence rate is high and it is prone to neurological complications.

[0109] To ensure the model's generalization ability, the dataset was divided into training and test sets, with 20% of the training set used as a validation set. Images in the training and test sets came from different patients to avoid data leakage. The specific data distribution is shown in Table 2. The training set contained 7,384 OCT B-scan slices from 744 patients, while the test set contained 104 OCT B-scan slices from 32 patients.

[0110] As shown in Table 2, this invention randomly divides the data into training and testing sets based on patients. 20% of the training set is used as a validation set, used for training the model, adjusting model parameters, and evaluating the generalization ability of the final model, respectively. All models are loaded with ImageNet pre-trained weights. All experiments retain the model with the highest accuracy on the validation set and use the same data preprocessing methods to ensure fairness. To reduce computational costs, this paper resizes all images to 224×224 using bilinear interpolation. Data augmentation is an effective strategy for increasing the diversity of data distribution and mitigating overfitting; therefore, this paper also employs random rotation, random vertical and horizontal flipping for data augmentation.

[0111] This invention constructs 500 meta-training tasks using common disease training data. Each meta-training task is defined with a 5-way-15-shot-15-query configuration, meaning each task contains 5 disease categories, and each category consists of 5 support set samples and 15 query set samples. The support set is used for task-specific parameter adaptation (base-learning), while the query set is used for meta-level parameter updates (meta-learning). The tasks are formally represented as follows: ;in, and Samples are taken from the same disease distribution; this design enables the model to learn task-invariant features from a large number of heterogeneous tasks; such as... Figure 6 As shown, MetaFound's meta-training task samples from 12 common fundus diseases, while the target task samples from 3 rare fundus diseases, normal fundus diseases, and the 12 fundus diseases. The testing task consists of the training and testing sets for all diseases in Meta-OCT. For the full-data fine-tuning approach, the potential model generated by meta-training is optimized end-to-end using Meta-OCT's full-category training data (including common diseases, rare diseases, and normal groups). For the few-shot adaptation approach, multiple few-shot tasks (such as the 5-shot-15-query configuration) are constructed from the training set, supporting sampling of training data for the query set and independent sampling of test data for the query set, thereby evaluating the model's rapid adaptation ability under low sample size.

[0112] The proposed Bayesian meta-learning diagnostic method for rare fundus diseases based on MetaFoundation is implemented using the PyTorch framework and a GeForce RTX A6000 GPU with 48GB of memory, minimizing the loss function. Specific experimental parameters are shown in Table 2: the Meta Inner optimizer is SGD, the Meta Outer optimizer is Adam, the Meta Inner Loop is set to 5, the Meta Inner learning rate is set to 0.1, and the Meta Outer learning rate is set to 0.001. The total number of meta-training iterations (Meta Epoch) is set to 50, the total number of deep learning training iterations is set to 100, the Meta Batch Tasks size is set to 5, and the deep learning training batch size is set to 16.

[0113] To comprehensively evaluate the performance of different methods in the automatic classification of rare fundus diseases, this invention uses six metrics—AUC, accuracy (ACC), weighted recall (W_R), weighted precision (W_P), weighted F1 score (W_F1), and weighted Kappa (W_K)—to quantitatively analyze the experimental results. Recall, also known as sensitivity (SEN), is calculated using the same methods as accuracy.

[0114] Evaluation indicators include:

[0115] (1) Weighted Recall: Consider the recall of each class and weight it according to the number of samples in each class. Recall is the ratio of true positives to the total number of actual positives. The weighted recall is calculated in the same way as the precision. The formula is as follows:

[0116] ;

[0117] ;

[0118] in, Represents a true positive result; This indicates a false negative. Representing the The class weight is determined by the number of samples. Representing the Class Recall.

[0119] (2) Weighted Precision: Consider the precision for each class and weight the performance of each class. Precision is the ratio of true positives to the total number of positive predictions. The formula is as follows:

[0120] ;

[0121] ;

[0122] in, Represents a true positive result; This represents a false positive; represent The class weight is determined by the number of samples. Representing the Precision of the class.

[0123] (3) Weighted F1 score: This combines information from weighted recall and weighted precision, taking into account the model's performance in each...

[0124] Overall performance across categories. The F1 score is the harmonic mean of recall and precision, calculated as follows:

[0125] ;

[0126] (4) Weighted Kappa: This considers the consistency between the model and the actual categories, and weights the consistency between different categories. The Kappa value ranges from [-1, 1], where 0 indicates consistency with random classification and 1 indicates complete consistency. The calculation formula is as follows:

[0127] ;

[0128] ;

[0129] ;

[0130] in, and Represents the sample category; Represents the total number of samples; Total number of categories; Indicate category The number of actual samples; This indicates that the model predicts a category. The number of samples; The representative will be the first Classification is determined as the first The number of classes.

[0131] To comprehensively evaluate the clinical diagnostic efficacy of the MetaFound model, this invention conducted systematic experiments on the Meta-OCT test set, covering two scenarios: full-data fine-tuning and few-shot adaptation. The models were compared with mainstream deep learning methods (such as the ResNet series and ViT series) and the commonly used four-layer convolutional network (ConvNet4) in meta-learning. All comparison models were loaded with ImageNet pre-trained parameters. The experimental results are analyzed in depth from multiple dimensions to explore the potential mechanisms of model performance improvement and its clinical application value.

[0132] Experimental results and performance analysis include:

[0133] (a) Full data fine-tuning mode

[0134] Table 3. Results of the Full Data Fine-tuning Comparison Experiment

[0135] Table 3 shows the performance metrics of each method in the five-class classification task under the full-data fine-tuning mode. MetaFound significantly outperforms all baseline models with 98.34% AUC, 90.38% W_R, 92.79% W_P, 89.48% W_F1, and 87.91% W_R. Compared to the suboptimal method, the Vit_Small model trained by deep learning (D-Vit_Small), it improves AUC by 1.15%, W_R by 8.65%, W_P by 6.18%, W_F1 score by 8.23%, and W_K by 10.92%, indicating that the model has stronger discriminative ability in complex multi-class classification tasks, i.e., rare disease classification tasks. MetaFound's meta-learner (MetaLearner), trained with Bayesian meta-learning, has stronger discriminative ability for rare fundus diseases. The pre-trained RETFound module captures global semantic information (such as the topology of choroidal neovascularization) and achieves cross-scale information complementarity with features extracted by Meta Learner through feature concatenation. Furthermore, MetaFound achieves W_P and W_R of 92.79% and 90.38%, respectively, representing improvements of 4.53% and 8.65% over the second-best method and over D-ResNet50, indicating a significant advantage in reducing false positives and false negatives. This characteristic is particularly important in clinical scenarios; for example, in VRL diagnosis, high sensitivity (recall) reduces the risk of missed diagnoses, while high accuracy avoids unnecessary invasive treatments.

[0136] (II) The impact of meta-learners on performance

[0137] Table 4. Experimental results of different network architectures as Meta Learners

[0138] Table 4 further explores the performance differences of different networks when used as meta-learners. Because the MAML algorithm cannot directly optimize the multi-head attention mechanism of the Transformer, and hardware resources cannot support the excessively large number of parameters of ResNet101, it was not included in the comparative experiments. Experimental results show that the performance of traditional residual networks (such as ResNet18 and ResNet50) generally declines after meta-training. For example, when ResNet50 is used as a meta-learner, W_R drops from 81.73% (non-meta-training) to 55.77%, and AUC drops from 93.64% to 92.83%. This phenomenon may stem from the incompatibility between the deep architecture of residual networks and meta-learning tasks: deep networks are prone to overfitting in scenarios with few samples, while the two-layer optimization mechanism of meta-learning fails to effectively constrain its parameter space. In contrast, the lightweight convolutional network (ConvNet4) achieved a 13.46% improvement in W_R after meta-training (48.08% vs 34.62%), but its overall performance was still significantly lower than that of deep models, highlighting the dependence of complex medical imaging tasks on high-capacity models.

[0139] MetaFound circumvents the optimization challenges of meta-training in deep networks by freezing the pre-training parameters of the RETFound module, while simultaneously utilizing a meta-learner to achieve task-adaptive feature optimization. Experimental results show that its AUC (98.34%) is improved by 1.85% compared to the best residual network (Meta-ResNet34), W_R by 8.65%, W_P by 6.15%, W_F1 by 8.8%, and W_K by 10.92%. This result demonstrates that the synergistic effect of pre-trained features and meta-learning strategies can effectively balance the model's representational ability and generalization performance. Furthermore, MetaFound's F1 score (90.38%) is 9.13% higher than the second-best method, D-Vit_Small, reflecting its superior trade-off between precision and recall, which is particularly important for the diagnosis of imbalanced data in clinical settings (such as rare diseases).

[0140] (III) Results of small sample experiments

[0141] Table 5. Results of small-sample experiments using the 5ways-5shot-15query method.

[0142] As shown in Table 5, MetaFound demonstrated significant and rapid adaptability in the few-shot experiment (5-way-5-shot-15-query). Compared to the suboptimal method ResNet50, it improved the AUC (85.85% vs 84.68%), W_R (61.92% vs 60.51%), W_P (68.13% vs 63.2%), and W_K (52.4% vs 50.63%) metrics by 1.17%, 1.41%, 4.93%, 2.15%, and 1.77%, respectively. This phenomenon reveals MetaFound's unique advantage in low-sample-volume scenarios: MetaFound's Meta Learner, through the initialization parameters learned from the meta-training task and the pre-trained parameters of the RETFound feature extractor, can quickly capture the discriminative features of the target task without relying on a large amount of labeled data. For example, in five-class classification tasks of PIC, RP, VRL, Normal, and common diseases, MetaFound only requires five supporting samples for each rare fundus disease to achieve a PRE of 68.13%, which is 4.93% higher than ResNet50, indicating that it is more sensitive to small lesions (such as microbleeds).

[0143] In summary, this invention addresses the following key technical issues in existing technologies: overfitting and insufficient representational ability in scenarios with few samples; target offset between the base model and downstream tasks; cross-domain data distribution offset and insufficient generalization; high computational complexity and lack of real-time diagnostic capability; and missing modeling of inter-task dependencies, all of which affect the accuracy of rare ocular disease detection. These key technical points are:

[0144] 1. Dual-channel adaptive network architecture: Design a collaborative framework of base model (such as RETFound) and shallow meta-learner. The base model extracts global semantic features of fundus images (such as retinal layer structure and choroidal neovascularization morphology), while the meta-learner captures local pathological details (such as microbleeds and pigment deposition edges) through a lightweight convolutional network. The features of the two are fused at multiple scales through channel splicing to balance global representation ability and local discriminability.

[0145] 2. Bayesian Meta-Learning Optimization Strategy: A multi-objective combination of KL divergence, cross-entropy, and inter-distillation loss is proposed to explicitly model the probabilistic dependency between the meta-training task and the target task. KL divergence constrains task distribution alignment, cross-entropy preserves the general knowledge of the base model, and inter-distillation loss enhances knowledge transfer between tasks. A weighted mechanism is used to dynamically optimize model parameters.

[0146] 3. Heterogeneous Meta-Task Dynamic Construction Mechanism: By constructing heterogeneous meta-tasks (covering data from multiple OCT devices and combinations of 12 common diseases and 3 rare diseases), the ability of meta-learning algorithms to extract common prior knowledge from meta-tasks is improved, achieving high classification performance on multiple device datasets (such as Heidelberg and Topcon OCT).

[0147] 4. Efficient parameter optimization and rapid adaptation mechanism: During the meta-training phase, the base model parameters are frozen, and only the meta-learner is optimized to reduce computational complexity; during the fine-tuning phase, the base model is unfrozen for end-to-end updates. It supports gradient updates with few samples (e.g., 10 iterations in a 5-shot scenario), enabling rapid adaptation to new tasks.

[0148] Therefore, the meta-learning-driven adaptive framework designed in this invention combines the general representation capabilities of the base model with task-specific optimization strategies to improve the model's discrimination accuracy for rare diseases in low-sample scenarios, while avoiding overfitting. This solves the problems of model overfitting and insufficient representation capabilities in low-sample scenarios. By constructing a dual-channel adaptive network architecture, the global representation of the base model and the local features of the meta-learner are dynamically coupled. The dependencies between tasks are explicitly constrained through a Bayesian multi-objective loss function, bridging the semantic gap between the pre-training objective and the downstream task. This addresses the target offset between the base model and the downstream task, including: in class-imbalanced data (where common disease samples dominate), the gradient update direction is biased towards the majority class. The study addresses several issues, including the suppression of discriminative patterns for rare diseases, optimization bias under long-tailed distributions, and insufficient decoupling of global-local features due to the ineffective fusion of global semantic representations (e.g., retinal layered structures) and local pathological details (e.g., microbleeds) in the base model, leading to the loss of key information. A task-dynamic enhancement strategy is proposed, simulating real clinical distributions through heterogeneous meta-task construction (covering multiple devices and disease combinations). This is combined with Bayesian meta-learning to optimize the generalization ability on task distributions, improving the model's adaptability to cross-domain data. This addresses the problems of cross-domain data distribution bias and insufficient generalization, specifically the issue of multi-center fundus imaging data being affected by device differences (e.g., Heidelberg and Topcon). Different imaging protocols, such as OCT, cause domain shifts. Traditional transfer learning methods (e.g., domain adaptation) rely on the similarity of the source and target domains, which can easily lead to negative transfer when the domain differences are significant. Existing meta-learning methods assume uniform task distribution, which does not match the actual clinical scenarios (e.g., coexistence of multiple diseases, long-tail distribution of rare diseases), resulting in a decline in cross-task generalization performance. This paper designs an efficient parameter optimization strategy, freezes the base model parameters and updates only the shallow meta-learner, significantly reducing computational complexity and solving the bottleneck problems of computational complexity and real-time performance. Specifically, traditional meta-learning methods (e.g., Model-Agnostic Meta-Learning, MAML) require two-layer optimization on a large number of meta-tasks, resulting in excessive computational overhead and difficulty in meeting the needs of real-time diagnosis. Deep networks (e.g., ViT-large) have a large number of parameters and are prone to overfitting in scenarios with few samples, while lightweight networks have insufficient feature extraction capabilities and are difficult to balance model capacity and generalization performance.This paper introduces a Bayesian multi-objective loss function, using KL divergence loss to align task distributions, cross-entropy loss to preserve the general knowledge of the base model, and mutual distillation loss to strengthen inter-task dependencies. This achieves efficient transfer and collaborative optimization of cross-task knowledge, addressing the problem of incomplete modeling of inter-task dependencies. Specifically, existing methods lack explicit modeling of the probabilistic dependencies between the meta-training task and the target task. Traditional loss functions (such as cross-entropy) only optimize single-task objectives and do not utilize the synergistic effect of inter-task knowledge transfer, leading to suboptimal model performance in the diagnosis of complex multi-disease conditions. Ultimately, this improves the diagnostic accuracy of rare fundus diseases.

[0149] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for classifying fundus disease images based on Bayesian meta-learning, characterized in that, include: Acquire multiple retinal fundus images with real labels, and construct a training set for common disease categories based on images of various common disease categories; Based on images of multiple common disease categories, multiple rare disease categories, and normal category images, a target task training set is constructed, and multiple common disease categories in the target task training set are merged into a single common disease category; Each image in the common disease category training set is processed by a feature extractor and then input into the first-order learner. The learner outputs the predicted probability distribution of each image in the common disease category training set, and constructs the meta-training cross-entropy loss. Each image in the target task training set is processed by a feature extractor and then input into a second-order learner. The learner outputs the predicted probability distribution of each image in the target task training set and constructs the KL divergence loss. A Bayesian loss is constructed based on the joint probability distribution between the predicted probability distribution of images of common disease categories obtained by the first-element learner and the predicted probability distribution obtained by the second-element learner. The target loss function is constructed based on KL divergence loss, cross-entropy loss and Bayesian loss, and a first-order learner and a second-order learner are trained. The feature extractor is combined with the trained second-order learner to form an image classification model for fundus diseases.

2. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, Combining the feature extractor with the trained second-order learner to form an image classification model for fundus diseases also includes: Input each image in the target task training set into the fundus disease image classification model, output the predicted probability distribution of each image in the target task training set, and construct a fine-tuned cross-entropy loss. By minimizing the fine-tuning cross-entropy loss, the image classification model for fundus diseases is fine-tuned to obtain the target image classification model for fundus diseases.

3. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 2, characterized in that, The images from the target task training set are input into the fundus disease image classification model, including: A subset of images representing common disease categories, multiple rare disease categories, and normal categories are selected from the target task training set to construct a few-sample target task sample set. Input each image from the sample set of the target task with a small number of samples into the fundus disease image classification model.

4. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, KL divergence loss The expression is: ; in, Indicates that the categories in the training set of the target task are Images; Representing an image The true label; The image representing the output of the second-order learner The predicted classification results; This represents the model parameters of the second-order learner; Representing an image The true probability distribution The image obtained by the second-order learner The predicted probability distribution; This represents the total number of categories in the training set for the target task.

5. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, Cross-entropy loss The expression is: ; in, The common disease category training set is categorized as follows: Images; Representing an image The true label; The image represents the output of the first-order learner. The predicted classification results; Representing an image The true probability distribution; The image obtained by the first-order learner Predict the probability distribution; This represents the total number of categories in the common disease category training set.

6. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, Bayesian loss The expression is: ; in, This represents the total number of categories in the common disease category training set; Common disease categories training set categories Images; Representing an image The true label; Representing an image The true probability distribution; The image represents the output of the first-order learner. The predicted probability distribution; The image representing the output of the second-order learner The predicted probability distribution; express and The joint probability distribution.

7. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, The target loss function The expression is: ; in, Indicates the KL divergence loss; This represents the weights corresponding to the KL divergence loss; Represents cross-entropy loss; This represents the weights corresponding to the cross-entropy loss; Indicates Bayesian loss; This represents the weights corresponding to the Bayesian loss.

8. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, The feature extractor is a pre-trained deep Transformer model, which contains 24 attention blocks and 1024-dimensional embedding vectors. Both the first-order learner and the second-order learner consist of a four-layer CNN shallow network and a fusion classification module.

9. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 1, characterized in that, The training process for both unary and divariate learners includes: Based on the training set of common disease categories, construct N meta-training task sample sets, where each meta-training task sample set includes M common disease categories; The images of common disease categories in each meta-training task sample set are divided into a first support set and a second query set; wherein, both the first support set and the first query set include images of M common disease categories; Based on N meta-training task sample sets, N target task sample sets corresponding to the N meta-training task sample sets are obtained respectively; for each target task sample set, the images of M common disease categories in the corresponding meta-training task sample set are constructed together with the images of each rare disease category and the normal category in the target task training set. The images of M common disease categories, each rare disease category, and normal category in the sample set of each target task are divided into a second support set and a second query set; wherein, both the second support set and the second query set include images of M common disease categories, each rare disease category, and normal category; The first-order learner and the second-order learner are trained using N first support sets and N second support sets until the value of the regularization correction function of the target loss function is minimized, thus obtaining the initial first-order learner and the initial second-order learner. The initial first-ary learner and the initial second-ary learner are trained again using N first query sets and N second query sets until the expected value between the target loss function and the regularization correction function of the target loss function is minimized, thus obtaining the trained first-ary learner and second-ary learner.

10. The method for classifying fundus disease images based on Bayesian meta-learning according to claim 9, characterized in that, The expression for minimizing the regularization correction function of the objective loss function is: ; in, This represents the task adaptability parameters in the meta-learner group. This represents the task adaptability parameters of the unary learner. This represents the task-adaptive parameters of the second-order learner; This represents the image in the first support set; This represents the image in the second support set; This represents the target loss function value calculated based on the first and second support sets. This represents the model parameters of the meta-learner group. This represents the model parameters of the first-order learner. This represents the model parameters of the second-order learner; Represents the regularization term; The expression for minimizing the expected value between the value of the objective loss function and the value of the regularization correction function of the objective loss function is: ; in, This represents the model parameters of the initial meta-learner group. This represents the model parameters of the initial unary learner. This represents the model parameters of the initial second-order learner; Represents the images in the first query set; Represents the images in the second query set; This represents the expected value between the value of the target loss function and the value of the regularization correction function of the target loss function.