Construction method of image diagnosis algorithm based on contrastive learning and DS evidence theory
By applying image diagnosis algorithms with comparative learning and DS evidence theory in chicken disease diagnosis, the problem of low diagnostic efficiency and low accuracy caused by relying on professional veterinary and scarce data in the prior art is solved, and the diagnosis results with high accuracy and reliability in a small sample environment are achieved.
Patent Information
- Application Number
- CN202411722767.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing chicken epidemic diagnosis methods rely on professional veterinarians, which are inefficient and costly. Especially when small and medium-sized farms lack high-level veterinary resources, it is difficult to meet the needs of real-time diagnosis. At the same time, deep learning models perform poorly in the case of scarce data, which can easily lead to missed diagnosis and misdiagnosis.
The image diagnosis algorithm based on contrast learning and DS evidence theory is adopted, and the deep features of the disease image are extracted under a small number of samples through the MoCoV2 comparison learning framework, and multi-level evidence fusion is carried out in combination with DS evidence theory to improve the accuracy and reliability of the diagnosis.
In the case of scarce data, the accuracy and robustness of chicken epidemic image recognition are improved, missed diagnosis and misdiagnosis are reduced, and efficient and low-threshold epidemic diagnosis tools are provided, suitable for small and medium-sized breeding farms.
Smart Images

Figure QLYQS_1 
Figure QLYQS_4
Abstract
Description
Technical Field
[0001] The present invention relates to the field of disease image diagnosis, and in particular to a method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory. Background Art
[0002] In egg-laying and broiler farming, the traditional chicken disease diagnosis method mainly relies on professional veterinarians. However, the traditional method is highly dependent on the veterinarian's professional knowledge and experience, and the diagnosis process is often inefficient. In addition, small and medium-sized farms lack high-level veterinary resources, resulting in the inability to meet the real-time requirements of chicken disease diagnosis, which brings unnecessary economic losses to farmers.
[0003] At present, the diagnosis of chicken disease mainly adopts veterinary expert system. By building a chicken disease identification expert system, the user inputs the text description of the chicken's symptoms, and the system asks questions to the user according to the symptom level, continuously narrowing the scope of the disease, and inputting these symptom descriptions into the database for comparative analysis with the entered chicken disease symptoms, so as to identify the chicken disease. However, the performance of the expert system is greatly dependent on a large number of expert rules manually defined by domain experts. Therefore, the expert system requires high maintenance costs and is not easy to expand. For ordinary farmers, the threshold for use is high, and the system's learning ability is weak. The reasoning ability is closely related to the number and quality of rules. It is difficult to find the deep connection between symptoms and diseases, which makes the system's diagnostic ability and practicality poor.
[0004] With the development of deep learning and computer vision, the use of deep learning technology for chicken disease diagnosis has gradually become a trend. Deep learning can automatically learn features through large-scale chicken disease image data, effectively improving the accuracy of image recognition. However, deep learning methods also face some problems in practical applications, such as dependence on data volume and sensitivity to sample scarcity. In the chicken disease diagnosis scenario, since chicken disease images are difficult to collect and data annotation requires the support of professional veterinarians, it is difficult to obtain a large number of labeled samples, and the performance of existing deep learning models often fails to achieve the expected results. At the same time, since a single chicken disease image only contains the pathological features of a single organ, and many diseases have similar or identical pathological features on the same organ, diagnosing chicken disease through only one disease image is prone to missed diagnosis and misdiagnosis.
[0005] In order to solve the deficiencies in the prior art, it is necessary to introduce a new diagnostic method to solve the above problems. Summary of the invention
[0006] In order to solve the above technical problems, the present invention discloses a method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory. The algorithm first extracts effective features based on a small number of samples through contrastive learning methods to enhance the model's learning ability for disease characteristics. Then, combined with DS evidence theory, a multi-level evidence fusion mechanism is established to improve the accuracy and reliability of diagnosis.
[0007] The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory of the present invention comprises the following steps:
[0008] Step S1, data set preparation: collect chicken images of different body parts of normal chickens without disease labels as pre-training data sets; collect disease images of abnormal chickens with disease labels as training data sets; and use disease labels corresponding to disease images as label sets;
[0009] Step S2, pre-training: Based on the MoCoV2 contrastive learning framework, contrastive learning is performed through the query encoder and the momentum encoder to obtain a trained query encoder; the query encoder and the momentum encoder are both trained using a pre-training dataset;
[0010] Step S3, training: constructing a classification model based on the trained query encoder, performing refinement training through the training data set, and performing supervised learning through the label set to obtain a trained classification model;
[0011] Step S4, diagnosis result fusion: multiple images of different parts of the chicken to be diagnosed are input into the trained classification model to obtain the probability distribution of the disease category corresponding to each image to be diagnosed; based on the DS evidence theory and the probability distribution of the disease category corresponding to each image to be diagnosed, the predicted probability of the disease category of the chicken to be diagnosed is obtained.
[0012] A further improvement of the present invention is that the pre-training step includes the following steps:
[0013] Step S21: Divide the pre-training data set into multiple batches, each batch includes multiple chicken images, and randomly select a batch;
[0014] Step S22: The batch of chicken images is subjected to data enhancement to generate two views, which are anchor points and positive samples of the chicken images, and the corresponding negative samples are obtained from them;
[0015] Step S23: input the anchor point as a query image into the query encoder to obtain a feature vector of the anchor point; input the positive sample into the momentum encoder to obtain a feature vector of the positive sample; input the negative sample into the momentum encoder to obtain a feature vector of the negative sample;
[0016] Step S24: Based on the MoCoV2 contrastive learning framework, the feature vector of the anchor point, the feature vector of the positive sample, and the feature vector of the negative sample are input into the loss function for contrastive learning training;
[0017] Step S25: When the similarity between the anchor point and the positive sample is maximized and the similarity between the anchor point and the negative sample is minimized, the pre-training is completed and a trained query encoder is obtained.
[0018] A further improvement of the present invention is that step S3 comprises the following steps:
[0019] Step S31: using the trained query encoder as the backbone network, adding a fully connected layer as the initialization form of the classification model;
[0020] Step S32: input the training data set into the initialization form of the classification model for refinement training, and use the cross entropy loss function through the label set to perform supervised learning;
[0021] Step S33: When the difference between the disease probability predicted by the classification model and the label of the label set is minimized, a trained classification model is obtained.
[0022] A further improvement of the present invention is that step S4 comprises the following steps:
[0023] Step S41: input multiple images of different parts of the chicken to be diagnosed into the trained classification model, and the trained classification model predicts the probability distribution of the disease category corresponding to each image to be diagnosed, and saves it into the matrix A; the matrix A has C disease categories;
[0024] Step S42: Based on the DS evidence theory, the combination between each image to be diagnosed is calculated through the matrix A, all combinations are traversed, the joint probability after the combination is calculated and saved in the matrix AB;
[0025] Step S43: Calculate the inconsistency factor of the combination;
[0026] Step S44: If the inconsistency factor is 0, the matrix AB is the predicted probability of the final disease category of the chicken to be diagnosed;
[0027] If the inconsistency factor is not 0, the predicted probability of the disease category of the chicken to be diagnosed is calculated using the following formula:
[0028] ;
[0029] in, , k represents the inconsistency factor, B[i] represents the predicted probability of the disease category of the chicken to be diagnosed; i represents the disease category of the chicken to be diagnosed.
[0030] A further improvement of the present invention is that the weight of the momentum encoder is updated by a momentum update rule; and the weight of the query encoder is updated by using the gradient information of the loss function.
[0031] A further improvement of the present invention is that the formula for momentum update is:
[0032]
[0033] in, represents the model weights of the query encoder, represents the model weight of the momentum encoder and m represents the momentum parameter.
[0034] A further improvement of the present invention is that the range of m is 0-1.
[0035] A further improvement of the present invention is that the query encoder and momentum encoder are both ResNet50.
[0036] Beneficial effects of the present invention:
[0037] 1. The present invention can be applied to the rapid diagnosis of chicken diseases in the chicken farming process, providing farmers who lack professional veterinary resources with efficient and low-threshold disease diagnosis tools, helping them to identify and deal with chicken diseases in a timely manner, thereby reducing economic losses. In addition, the diagnostic algorithm can be integrated into the intelligent farming management system to achieve real-time monitoring and automatic diagnosis, and improve the intelligent level of farming management.
[0038] 2. Application of few-sample contrastive learning method: This paper adopts the MoCoV2 contrastive learning framework, and effectively extracts deep features of disease images based on a small number of labeled samples through the synergy of query encoder and momentum encoder. This innovation enables the model to achieve high diagnostic accuracy even when data is scarce.
[0039] 3. Diagnosis result fusion mechanism based on DS evidence theory: In view of the problem that a single image may only contain local lesion features, the present invention proposes a method for fusing the diagnosis results of multiple images. The DS evidence theory is used to fuse the results of chicken disease images from different parts, which effectively improves the accuracy and robustness of diagnosis and avoids the problems of missed diagnosis and misdiagnosis caused by insufficient information in a single image. This innovation enhances the reliability and comprehensiveness of the diagnosis results, and is particularly suitable for multi-part or multi-feature disease diagnosis tasks. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present invention are described clearly and completely below in conjunction with the embodiments of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0041] The present invention proposes a method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory, which successfully solves the problem of poor classification performance of existing chicken disease diagnosis methods under data scarcity. The contrastive learning method of the present invention effectively learns common image features with a small number of samples, and improves the recognition ability of the deep learning model in chicken disease images. In addition, the present invention combines the DS evidence theory to fuse the diagnosis results of multiple disease images, significantly improving the accuracy and reliability of diagnosis, and reducing missed diagnoses and misdiagnoses caused by a single image. The algorithm not only shows strong robustness in a small sample learning environment, but also can diagnose chicken disease in real time, and is suitable for small and medium-sized farms, providing farmers who lack high-level veterinary resources with an efficient and low-threshold disease diagnosis tool.
[0042] The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory of the present invention comprises the following steps:
[0043] Step S1, data set preparation: This step needs to provide pre-training data sets and training data sets for subsequent steps. Specifically:
[0044] Unlabeled data set preparation (pre-training data set): In order to perform effective contrastive learning, it is first necessary to collect a large number of unlabeled chicken images. In this embodiment, this step collects 10,000 photos of normal chickens, covering different body parts of different chickens (such as head, chest, abdomen, legs, etc.). These images come from chickens at different times and in different environments, so they are highly representative and diverse. These chicken images will be used in the pre-training step of the model, aiming to extract common visual features from them through contrastive learning methods and enhance the learning ability of the model in subsequent training steps. The pre-training data set is denoted as X_normal={X_1, X_2,..., Xi,..., X_10000}, where X_normal represents a set of images of normal chickens and Xi represents a single image of a normal chicken.
[0045] Preparation of labeled data set (training data set): In the training stage, in order to enable the model to accurately classify the disease category, 1,000 disease images of chickens are collected. These disease images cover a variety of common chicken diseases, such as avian influenza, Newcastle disease, etc. Each disease image is annotated by a professional veterinarian, and the annotation information includes the disease category (such as "avian influenza" and "Newcastle disease"). These disease images with disease labels will be used for supervised learning. By learning these disease images and their disease labels, the model can gradually learn how to extract disease-related features from the image. The training data set is recorded as X_diseased = {X1, X2, ..., Xi, ..., X1000}, where X_diseased represents the image set with disease labels and Xi represents a single disease image. The corresponding label set is Y_diseased = {y1, y2, ..., yi, ...y1000}, where yi represents the disease label corresponding to the disease image Xi.
[0046] Step S2, pre-training: Based on the MoCoV2 contrastive learning framework, contrastive learning is performed through the query encoder and momentum encoder to obtain a trained query encoder; both the query encoder and the momentum encoder are trained using the pre-training dataset X_normal. In order to ensure that the image feature structures extracted by the query encoder and the momentum encoder are similar, both use ResNet50 as the encoder. The reason for choosing ResNet50 as the encoder is that it has been pre-trained on a large-scale dataset and has a strong image feature extraction capability. The goal of ResNet50 is to learn common visual features from unlabeled images through contrastive learning methods. However, the two encoders have different ways of updating model weights. The query encoder uses the gradient information of the loss function to update the weights, and the momentum encoder updates the weights through momentum.
[0047] The core idea of the MoCoV2 contrastive learning framework is to maintain a dynamic dictionary (queue) to store negative samples, compare query images with corresponding positive and negative samples, and optimize the learning objectives to complete pre-training.
[0048] The pre-training of step S2 includes the following steps:
[0049] Step S21: Divide the pre-training data set X_normal into multiple batches, each batch including multiple chicken images.
[0050] Step S22: two views are generated from the batch of chicken images by data enhancement, and the two views are anchor points and positive samples of the chicken images, and corresponding negative samples are obtained from them.
[0051] A batch is randomly selected from the pre-training dataset X_normal, and the batch size is B, that is, B chicken images are processed each time. For each chicken image, two different views can be generated through data augmentation, and these two views serve as anchors and positive samples of the chicken image. In the same batch, other chicken images are regarded as negative samples. That is, X_normal_batch = {X_1, X_2, ..., X_i, ..., X_B} represents a batch randomly selected from the pre-training dataset X_normal, and B is the batch size. X_i represents the i-th chicken image in the batch, and are the anchor points and positive samples generated by data augmentation. In the same batch, all other chicken images are used as negative samples. Assume that the i-th chicken image in the batch is the anchor point , then all non All chicken images are used as negative samples X_neg, and the anchor point That is, X_neg={X_j|j≠i, 1≤j≤B} means that all non Chicken images are used as negative samples.
[0052] Step S23: input the anchor point as a query image into the query encoder to obtain a feature vector of the anchor point; input the positive sample into the momentum encoder to obtain a feature vector of the positive sample; input the negative sample into the momentum encoder to obtain a feature vector of the negative sample;
[0053] In each training, select anchor points in the batch As the query image (Query), the feature vector extracted from the query encoder to the anchor point is expressed as The positive sample corresponding to this anchor point is , the feature vector extracted from the momentum encoder is The samples in the dynamic dictionary are the set of feature vectors extracted from the momentum encoder by the negative sample X_neg, expressed as K={K_j|j≠i, 1≤j≤B}.
[0054] Step S24: Based on the MoCoV2 contrastive learning framework, the anchor The eigenvector of , positive sample The eigenvector of , the feature vector of the negative sample X_neg is input into the loss function for contrastive learning training;
[0055] The training goal of contrastive learning is to maximize the similarity between the anchor point and the positive sample, while minimizing the similarity between the anchor point and the negative sample. The specific loss function is as follows:
[0056] ;
[0057] Wherein, τ is the temperature coefficient. In contrastive learning, a larger τ will result in a smoother similarity distribution, while a smaller τ will make the difference in similarity more significant. Proper adjustment of τ can improve the training effect. In this embodiment, τ is set between 0.1 and 0.5.
[0058] The weights of the momentum encoder are not updated directly through the gradient information, but through the momentum update rule. The goal of the momentum update is to make the weights of the momentum encoder gradually approach the weights of the query encoder as training progresses, but it does not directly depend on each gradient update. The purpose is to make the weights of the momentum encoder gradually updated, but the update amplitude is smaller than the weights of the query encoder. This ensures that the negative sample features in the dynamic dictionary remain consistent during training, while avoiding instability caused by frequent updates. The momentum update formula is:
[0059] ;
[0060] in, represents the model weights of the query encoder, represents the model weight of the momentum encoder, and m represents the momentum parameter, ranging from 0 to 1.
[0061] Step S25: When the similarity between the anchor point and the positive sample is maximized and the similarity between the anchor point and the negative sample is minimized, the pre-training is completed and a trained query encoder is obtained.
[0062] Step S3, training: construct a classification model based on the trained query encoder, perform refinement training based on the training data set, and perform supervised learning through the label set to obtain a trained classification model.
[0063] The trained query encoder will be used as the basic network for disease diagnosis tasks for further fine-tuning training. The goal of this step is to apply the pre-trained model to the specific chicken disease diagnosis task and perform refined training through the labeled image dataset X_diseased. Specifically, the following steps are included:
[0064] Step S31: Use the trained query encoder as the backbone network and add a fully connected layer as the initialization form of the classification model.
[0065] Backbone network: trained query encoder (ResNet50), used to extract disease features of images. Classification head: add a fully connected layer based on ResNet50 to map the extracted disease features to specific disease categories. Assuming there are C different chicken disease categories, the output size of this fully connected layer is C.
[0066] The initialization form of the classification model is:
[0067] ;
[0068] in, Represents the input of a single disease image, ResNet50 represents the trained query encoder, and FC represents the fully connected layer, which is used to classify disease features.
[0069] Step S32: input the training data set into the initialization form of the classification model for refinement training, and use the cross entropy loss function through the label set to perform supervised learning;
[0070] The cross entropy loss function is used for supervised learning to ensure that the difference between the predicted probability distribution and the corresponding disease label is minimized. Specifically, given the predicted probability distribution of each disease image
[0071] And the corresponding disease label, the cross entropy loss function is: ;
[0072] Step S34: When the difference between the disease probability predicted by the classification model and the disease label in the label set is minimized, a trained classification model is obtained.
[0073] Step S4, diagnosis result fusion: multiple images of different parts of the chicken to be diagnosed are input into the trained classification model to obtain the probability distribution of the disease category corresponding to each image to be diagnosed; based on the DS evidence theory calculation, the combination is combined to obtain the predicted probability of the chicken disease category to be diagnosed.
[0074] The previous step obtains a trained classification model, which can diagnose a single disease image and predict the corresponding disease category. Since a single disease image may only contain local lesion features, and different organs may show similar lesion features, relying solely on a single disease image may lead to missed diagnosis or misdiagnosis. Therefore, it is necessary to fuse the diagnostic results from different organs or different feature sources to improve the accuracy and reliability of the overall diagnosis.
[0075] Specifically, the implementation steps are as follows:
[0076] Step S41: Input multiple images of different parts of the chicken to be diagnosed into the trained classification model respectively; the trained classification model predicts the probability distribution of the disease category corresponding to each image to be diagnosed and stores it in matrix A. Matrix A is used to store the prediction results of each image to be diagnosed. Assuming that the prediction result of each image to be diagnosed (evidence) is a probability distribution of C dimensions (here it is assumed that there are C disease categories), then matrix A is an n×C matrix, where n represents the number of input images to be diagnosed and C represents the number of disease categories.
[0077] Step S42: Based on the DS evidence theory, the combination of each image to be diagnosed is calculated through the matrix A, all the combinations are traversed, the joint probability after the combination is calculated and saved in the matrix AB.
[0078] Matrix AB: used to store the combined results. The size of matrix AB is C×C. Each element in matrix AB represents the combination between two disease categories. Matrix AB contains the classification results of all the images to be diagnosed. Each element in matrix AB represents the joint probability between disease categories, that is, the predicted probability obtained by fusing the information of multiple images to be diagnosed.
[0079] For each image a and b to be diagnosed and each pair of disease categories c1 and c2, the matrix AB is updated by the following formula:
[0080] AB[c1][c2]+=A[a][c1]×A[b][c2]
[0081] Each element AB[c1][c2] represents the joint probability of disease category c1 and disease category c2.
[0082] Variables a and b only represent the row index in matrix A. Each row in matrix A is the probability distribution of different images to be diagnosed. Variables c1 and c2 only represent the column index in matrix A. Each column in matrix A is the predicted probability of a disease category for different images to be diagnosed.
[0083] Step S43: Calculate the inconsistency factor k of the combination (ie, the conflict degree of each combination of the images to be diagnosed).
[0084] Initialize the inconsistency factor k=0; traverse each pair of off-diagonal elements of matrix AB (i.e. a≠b) and accumulate their values: k+=AB[a][b].
[0085] Step S44: If the inconsistency factor k=0, it means that the results of all the images to be diagnosed are consistent, and the fusion prediction result is directly output, that is, B[i]=AB[i][i].
[0086] If the inconsistency factor k≠0, the combined prediction probability needs to be calculated according to the following process:
[0087] calculate ;
[0088] For each disease category i, update the matrix B using the following formula:
[0089] ;
[0090] C-1 represents the index of the last disease category. Each element of the matrix B represents the predicted probability of the final disease category.
[0091] Matrix B will contain the final combined results, which represent the disease diagnosis results based on multiple images to be diagnosed (from different organs or parts). B[i] is the final predicted probability of each disease category, and the disease category corresponding to the maximum value in B[i] is the disease category of the chicken to be diagnosed.
[0092] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
Claims
1. A method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory, characterized in that: The following steps are involved: Step S1, data set preparation: collect chicken images of different body parts of normal chickens without disease labels as pre-training data sets; collect disease images of abnormal chickens with disease labels as training data sets; and use disease labels corresponding to disease images as label sets; Step S2, pre-training: Based on the MoCoV2 contrastive learning framework, contrastive learning is performed through the query encoder and the momentum encoder to obtain a trained query encoder; The query encoder and momentum encoder are both trained using a pre-training dataset; Step S3, training: constructing a classification model based on the trained query encoder, performing refinement training through the training data set, and performing supervised learning through the label set to obtain a trained classification model; Step S4, diagnosis result fusion: multiple images of different parts of the chicken to be diagnosed are input into the trained classification model to obtain the probability distribution of the disease category corresponding to each image to be diagnosed; based on the DS evidence theory and the probability distribution of the disease category corresponding to each image to be diagnosed, the predicted probability of the disease category of the chicken to be diagnosed is obtained; Step S4 includes the following steps: Step S41: input multiple images of different parts of the chicken to be diagnosed into the trained classification model, and the trained classification model predicts the probability distribution of the disease category corresponding to each image to be diagnosed, and saves it into the matrix A; the matrix A has C disease categories; Step S42: Based on the DS evidence theory, the combination between each image to be diagnosed is calculated through the matrix A, all combinations are traversed, the joint probability after the combination is calculated and saved in the matrix AB; Step S43: Calculate the inconsistency factor of the combination; Step S44: If the inconsistency factor is 0, the matrix AB is the predicted probability of the final disease category of the chicken to be diagnosed; If the inconsistency factor is not 0, the predicted probability of the disease category of the chicken to be diagnosed is calculated using the following formula: ; in, , k represents the inconsistency factor, B[i] represents the predicted probability of the disease category of the chicken to be diagnosed, B represents the matrix B; i represents the disease category of the chicken to be diagnosed; AB represents the matrix AB, and the matrix AB is C A matrix of size C; AB[i][i] represents the joint probability between disease category i and disease category i; AB[i][C-1] represents the joint probability between disease category i and the last disease category C-1, and AB[C-1][i] represents the joint probability between the last disease category C-1 and disease category i.
2. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 1, characterized in that: The pre-training step includes the following steps: Step S21: Divide the pre-training data set into multiple batches, each batch includes multiple chicken images, and randomly select a batch; Step S22: The batch of chicken images is subjected to data enhancement to generate two views, which are anchor points and positive samples of the chicken images, and the corresponding negative samples are obtained from them; Step S23: input the anchor point as a query image into the query encoder to obtain a feature vector of the anchor point; input the positive sample into the momentum encoder to obtain a feature vector of the positive sample; input the negative sample into the momentum encoder to obtain a feature vector of the negative sample; Step S24: Based on the MoCoV2 contrastive learning framework, the feature vector of the anchor point, the feature vector of the positive sample, and the feature vector of the negative sample are input into the loss function for contrastive learning training; Step S25: When the similarity between the anchor point and the positive sample is maximized and the similarity between the anchor point and the negative sample is minimized, the pre-training is completed and a trained query encoder is obtained.
3. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 2, characterized in that: The step S3 comprises the following steps: Step S31: using the trained query encoder as the backbone network, adding a fully connected layer as the initialization form of the classification model; Step S32: input the training data set into the initialization form of the classification model for refinement training, and use the cross entropy loss function through the label set to perform supervised learning; Step S33: When the difference between the disease probability predicted by the classification model and the label of the label set is minimized, a trained classification model is obtained.
4. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 1, characterized in that: The weight of the momentum encoder is updated by the momentum update rule; the weight of the query encoder is updated by the gradient information of the loss function.
5. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 4, characterized in that: The formula for momentum update is: ; in, represents the model weights of the query encoder, represents the model weight of the momentum encoder and m represents the momentum parameter.
6. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 5, characterized in that: The range of m is 0-1.
7. The method for constructing an image diagnosis algorithm based on contrastive learning and DS evidence theory according to claim 1, characterized in that: The query encoder and the momentum encoder are both ResNet50.
Citation Information
Patent Citations
Domestic garbage image classification model training method and device based on comparative learning
CN116704293A