A neural network image classifier confidence calibration method and system
Through the high-dimensional feature extraction of the neural network classifier and the probability prediction of the machine learning module, the confidence of the neural network image classifier is calibrated, which solves the problem of being unable to distinguish between correct classification and incorrect classification in the existing technology, and realizes the prediction of image categories. accurate distinction.
Patent Information
- Application Number
- CN202210690392.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-06-17
AI Technical Summary
Existing neural network image classification models cannot effectively reduce confidence predictions, resulting in the inability to distinguish between correct classification and incorrect classification based on confidence.
Extract high-dimensional features from the target image through the neural network classifier, calculate the distance between the target features and the high-dimensional feature database, use the machine learning module to predict the probability of correct classification, and calibrate the initial category confidence to obtain the calibrated category confidence Spend.
It is achieved to effectively distinguish the predicted category of the target image based on the calibrated category confidence, and whether it is correctly classified.
Smart Images

Figure CN114898164B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and image recognition, and in particular to a confidence calibration method and system for a neural network image classifier. Background Art
[0002] It is very meaningful to enable the neural network image classification model to output a well-calibrated confidence level, so that in the actual operating environment, real-time judgment can be made on whether the image prediction classification result is correct based on the confidence level, thereby providing a reliable and robust AI system in a complex real-world environment. Current neural network image classification models usually output too high confidence levels, especially for samples with incorrect prediction results. Therefore, how to reduce the confidence level prediction given by the neural network image classifier is a major problem that needs to be solved in modern neural network applications.
[0003] Existing confidence prediction techniques are divided into three categories: softmax calibration, deep integration, and Bayesian neural network methods. The Bayesian method estimates the confidence of the results predicted by the neural network based on the Bayesian network and Monte Carlo sampling; the deep integration method obtains the prediction results and confidence estimates by calculating the average value of multiple neural networks; the softmax calibration method adjusts the probability of the output of the original neural network softmax layer to reduce the confidence estimate. Among them, the softmax calibration method includes histogram segmentation, roc segmentation, Bayesian segmentation, isobaric regression, boosting, Platt calibration, and temperature calibration. However, the existing confidence prediction technology reduces the confidence prediction value of all images input into the neural network model, and cannot distinguish between correct classification and incorrect classification based on the confidence of the prediction results of the neural network model. Summary of the invention
[0004] The purpose of the present invention is to provide a neural network image classifier confidence calibration method and system to solve the problem that the predicted category of the target image cannot be distinguished between correct classification and wrong classification according to the confidence.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A neural network image classifier confidence calibration method, the method comprising:
[0007] A neural network classifier is used to extract high-dimensional features of a target image, and the target image is classified according to the extracted high-dimensional features to obtain an initial category confidence of the target image;
[0008] Calculating the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier through high-dimensional feature extraction of the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier through high-dimensional feature extraction of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence;
[0009] Inputting each of the distances into a machine learning module respectively, predicting the probability of the target image being correctly classified, and obtaining a plurality of correct classification prediction probabilities;
[0010] The initial category confidence is calibrated according to the correct classification prediction probability to obtain the calibrated category confidence of the target image.
[0011] Optionally, calibrating the initial category confidence according to the correct classification prediction probability to obtain the calibrated category confidence of the target image specifically includes:
[0012] Calculating the average of all the correct classification prediction probabilities to obtain an average correct probability;
[0013] The initial category confidence is calibrated using the average correct probability to obtain the calibrated category confidence of the target image.
[0014] Optionally, it also includes: constructing a high-dimensional feature database;
[0015] The steps of constructing a high-dimensional feature database are as follows:
[0016] Acquire correctly classified training samples in a training set; the correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier;
[0017] Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features;
[0018] The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
[0019] Optionally, before inputting the distances into the machine learning module respectively, the method further includes: training the machine learning module, and the training method is as follows:
[0020] Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier;
[0021] Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database;
[0022] According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified;
[0023] The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
[0024] Optionally, the target feature is an output feature of the last convolutional layer of the neural network classifier.
[0025] Optionally, the adopting the average correct probability to calibrate the initial category confidence to obtain the calibrated category confidence of the target image specifically includes: multiplying the average correct probability by the initial category confidence to obtain the calibrated category confidence of the target image.
[0026] Optionally, the using the sample distances and the labels of the sample distances to train the machine learning module to obtain a trained machine learning module specifically includes:
[0027] The machine learning module is trained using a machine learning algorithm using the sample distances and the labels of the sample distances to obtain a trained machine learning module; the machine learning algorithm is a decision tree or a random forest or a K-nearest neighbor or a support vector machine or a neural network.
[0028] A neural network image classifier confidence calibration system, the system comprising: a neural network classifier, a detector and a confidence calibration module;
[0029] The neural network classifier is used to: extract high-dimensional features of a target image, and classify the target image according to the extracted high-dimensional features to obtain an initial category confidence of the target image;
[0030] The detector includes a distance module, a machine learning module and a probability module;
[0031] The distance module is used to calculate the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence;
[0032] The machine learning module is used to predict the probability of the target image being correctly classified according to each distance, and obtain multiple correct classification prediction probabilities;
[0033] The probability module is used to calculate the average value of all the correct classification prediction probabilities to obtain the average correct probability;
[0034] The confidence calibration module is used to calibrate the initial category confidence using the average correct probability to obtain the calibrated category confidence of the target image.
[0035] Optionally, it also includes: a high-dimensional feature database construction module;
[0036] The high-dimensional feature database construction module is used for:
[0037] Acquire correctly classified training samples in a training set; the correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier;
[0038] Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features;
[0039] The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
[0040] Optionally, it also includes: a machine learning module training module;
[0041] The machine learning module training module is used to:
[0042] Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier;
[0043] Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database;
[0044] According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified;
[0045] The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
[0046] According to the specific embodiments provided by the present invention, the following technical effects are disclosed: the neural network image classifier confidence calibration method and system provided by the present invention include: using a neural network classifier to extract high-dimensional features of a target image, and classifying the target image according to the extracted high-dimensional features to obtain an initial category confidence of the target image; calculating the distance between the target feature and each first reference feature in a high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier to extract high-dimensional features of the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier to extract high-dimensional features of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence; each distance is input into a machine learning module respectively, and the probability of the target image being correctly classified is predicted to obtain multiple correct classification prediction probabilities; the initial category confidence is calibrated according to the correct classification prediction probability to obtain the calibrated category confidence of the target image. The present invention obtains the correct classification prediction probability based on the distance prediction between the target feature and each first reference feature in the high-dimensional feature database, and uses the correct classification prediction probability to calibrate the initial category confidence of the target image to obtain the calibrated category confidence of the target image. The correct classification and incorrect classification can be well distinguished for the predicted category of the target image according to the calibrated category confidence. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic flow chart of a method for calibrating the confidence of a neural network image classifier provided in Example 1 of the present invention;
[0049] Figure 2This is a structural diagram of the neural network image classifier confidence calibration system provided in Example 2 of the present invention.
[0050] Reference numerals:
[0051] 1-Neural network classifier; 2-Detector; 3-Confidence calibration module; 21-Distance module; 22-Machine learning module; 23-Probability module. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the 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.
[0053] The purpose of the present invention is to provide a neural network image classifier confidence calibration method and system to solve the problem that the predicted category of the target image cannot be distinguished between correct classification and wrong classification according to the confidence.
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Example 1
[0056] This embodiment provides a neural network image classifier confidence calibration method, see Figure 1 and Figure 2 , the method comprising:
[0057] Step S1: extract high-dimensional features of a target image using a neural network classifier, and classify the target image according to the extracted high-dimensional features to obtain an initial category confidence of the target image.
[0058] Step S2: Calculate the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier for extracting high-dimensional features from the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier for extracting high-dimensional features from the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence.
[0059] Step S3: Input each of the distances into a machine learning module, predict the probability of the target image being correctly classified, and obtain a plurality of correct classification prediction probabilities.
[0060] Step S4: calibrating the initial category confidence according to the correct classification prediction probability to obtain the calibrated category confidence of the target image.
[0061] Wherein, step S1 specifically includes:
[0062] The target image is input into the neural network classifier to obtain the predicted class of the neural network model. and the initial category confidence of the target image, the initial category confidence of the target image represents the probability that the target image is correctly classified by the neural network classifier. In this embodiment, the probability p output by the softmax layer is used. NN Represents the category confidence of the target image, that is p NN =f(x * ).
[0063] In this embodiment, before using the neural network classifier to extract high-dimensional features from the target image, the process further includes: training the neural network classifier, as follows:
[0064] Sample image set for training Need to be divided into training set X (train) and validation set X (valid) There are two parts. The training set is used to train the neural network classifier, and the validation set is used to optimize the hyperparameters in the neural network classifier and train the machine learning module. Training a neural network classifier for image classification in is the encoding of L categories. The neural network classifier can classify any target sample image and Corresponding to a certain category in , that is, classifying and predicting the target sample image, using represents the predicted output of the neural network classifier, then
[0065] In this embodiment, the neural network classifier structure adopts a convolutional neural network, and the training process adopts a cross entropy loss function, an Adam optimizer or an SGD optimizer, which can be implemented based on tools such as pytorch.
[0066] Before step S2, the method further includes: constructing a high-dimensional feature database;
[0067] The steps of constructing a high-dimensional feature database are as follows:
[0068] Acquire correctly classified training samples in a training set; the correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier;
[0069] Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features;
[0070] The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
[0071] For example, select the training set with label l (l is the category of the label corresponding to the target image) and the classification is correct (so the predicted class is also l, that is, ), input the correctly classified training samples into the neural network classifier for high-dimensional feature extraction, and obtain the high-dimensional feature vectors of the correctly classified training samples. These high-dimensional feature vectors are the features of the l-class images learned by the neural network classifier, denoted as High-dimensional features are extracted from the correctly classified training samples of each category to obtain their high-dimensional feature vectors, and the high-dimensional feature database is constructed using the high-dimensional feature vectors of all correctly classified training samples.
[0072] The target feature in step S2 is the output feature of the last convolutional layer of the neural network classifier. A first reference feature is selected from the high-dimensional feature database, where the first reference feature is a high-dimensional feature obtained by extracting a target sample image of the same prediction class as the target image, and the distance between the target feature and each first reference feature is calculated. Specifically:
[0073] Calculate the target image x respectively * The target high-dimensional feature c * =g(x * ) and the high-dimensional feature data C of category l in the high-dimensional feature database l (train) The distance of each first reference feature in is obtained to obtain the distance set set up The distance
[0074] Before inputting each of the distances into the machine learning module in step S3, the method further includes: training the machine learning module, and the training method is as follows:
[0075] Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier;
[0076] Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database;
[0077] According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified;
[0078] The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
[0079] Here, the training method of the machine learning module is explained using the validation sample images with prediction class l in the validation set:
[0080] Select the prediction class in the validation set as l (i.e. ) to extract its feature vector from the verification sample image and form a set Verify the predicted class of the sample image (using ) and label class (with y i By comparing with , we can judge whether the predicted category is correct: if Then verify that the predicted category of the sample image is correct (i.e., "correct"), if Then the predicted category of the verification sample image is wrong (ie, "incorrect").
[0081] Will Each high-dimensional feature vector in Calculate the distance vector for each high-dimensional feature vector in to form a distance vector set The number of samples in the distance vector set is M l ×N l . Verify whether the predicted category of the image sample is correct according to the verification set corresponding to each of the sample distances, add a label to each sample distance vector, and when the predicted category of the verification sample image is correct, mark the distance vector corresponding to the verification sample image as "correct" and use 1 as the positive class during training. When the predicted category of the verification sample image is wrong, mark it as "incorrect" and use 0 as the negative class, thereby obtaining the label of each sample distance.
[0082] The machine learning module is trained using a machine learning algorithm using the sample distances and the labels of the sample distances to obtain a trained machine learning module; the machine learning algorithm includes a decision tree, random forest, K nearest neighbor, support vector machine, neural network, etc., and the algorithm with the best performance is selected according to the accuracy index on the test set. The neural network algorithm training process generally uses a cross entropy loss function, an Adam optimizer or an SGD optimizer, and other machine learning algorithms are generally implemented based on the machine learning tool Sklearn.
[0083] The distances d obtained in step S2 are i Input it into the trained machine learning module, and predict the probability of the target image being correctly classified to obtain multiple correct classification prediction probabilities, denoted as p[ml(d i )=1].
[0084] In step S4, the initial category confidence is calibrated according to the correct classification prediction probability to obtain the calibrated category confidence of the target image, which specifically includes:
[0085] The average correct probability is calculated by averaging all the correct classification prediction probabilities to obtain the average correct probability, that is, The initial category confidence is calibrated using the average correct probability to obtain the calibrated category confidence of the target image.
[0086] In this embodiment, the average correct probability is multiplied by the initial category confidence of the target image to obtain the calibrated category confidence of the target image, that is, conf = p NN ×p D .
[0087] Example 2
[0088] like Figure 2 As shown, this embodiment provides a neural network image classifier confidence calibration system, which includes: a neural network classifier 1, a detector 2 and a confidence calibration module 3.
[0089] The neural network classifier 1 is used to extract high-dimensional features from a target image, and classify the target image according to the extracted high-dimensional features to obtain an initial category confidence of the target image.
[0090] The detector 2 includes a distance module 21, a machine learning module 22 and a probability module 23;
[0091] The distance module 21 is used to calculate the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence.
[0092] The machine learning module 22 is used to predict the probability of the target image being correctly classified according to each distance, and obtain multiple correct classification prediction probabilities.
[0093] The probability module 23 is used to calculate the average value of all the correct classification prediction probabilities to obtain the average correct probability.
[0094] The confidence calibration module 3 is used to calibrate the initial category confidence of the target image using the average correct probability to obtain the calibrated category confidence of the target image.
[0095] The system also includes: a high-dimensional feature database construction module;
[0096] The high-dimensional feature database construction module is used for:
[0097] Acquire correctly classified training samples in a training set; the correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier;
[0098] Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features;
[0099] The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
[0100] The system also includes: a machine learning module training module;
[0101] The machine learning module training module is used to:
[0102] Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier;
[0103] Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database;
[0104] According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified;
[0105] The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
[0106] The present invention adds a detector to the neural network classifier. The construction of the detector utilizes the network intermediate layer information (i.e., high-dimensional features) of the data samples participating in the training of the neural network classifier and the correctness information of the predicted output. The information is easy to obtain and does not require the collection of new data samples. The network intermediate layer information of the training samples is used to reflect the information that the neural network classifier has learned, and the difference vector is used to measure the distance between two feature vectors. The detector can estimate the probability that the neural network classifier predicts the correct output category, and combines this probability with the probability predicted by the softmax layer (i.e., the initial category confidence), which can effectively reduce the confidence of the misclassified samples, and can well distinguish the correct classification and the wrong classification of the predicted category of the target image according to the calibrated category confidence.
[0107] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0108] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A neural network image classifier confidence calibration method, characterized in that: include: A neural network classifier is used to extract high-dimensional features of a target image, and the target image is classified according to the extracted high-dimensional features to obtain an initial category confidence of the target image; Calculating the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier through high-dimensional feature extraction of the target image, each of the first reference features corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier through high-dimensional feature extraction of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence; Inputting each of the distances into a machine learning module respectively, predicting the probability of the target image being correctly classified, and obtaining a plurality of correct classification prediction probabilities; Calibrating the initial category confidence according to the correct classification prediction probability to obtain the calibrated category confidence of the target image specifically includes: Calculating the average of all the correct classification prediction probabilities to obtain an average correct probability; The average correct probability is used to calibrate the initial category confidence to obtain the calibrated category confidence of the target image, specifically including: multiplying the average correct probability by the initial category confidence to obtain the calibrated category confidence of the target image.
2. The method according to claim 1, characterized in that: Also includes: Build a high-dimensional feature database; The steps of constructing a high-dimensional feature database are as follows: Acquire correctly classified training samples in a training set; the correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier; Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features; The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
3. The method according to claim 2, characterized in that Before inputting each of the distances into the machine learning module, the method further includes: training the machine learning module, and the training method is as follows: Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier; Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database; According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified; The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
4. The method according to claim 1, characterized in that The high-dimensional features are output features of the last convolutional layer of the neural network classifier.
5. The method according to claim 3, characterized in that: The method of training the machine learning module by using the sample distances and the labels of the sample distances to obtain a trained machine learning module specifically includes: The machine learning module is trained using a machine learning algorithm using the sample distances and the labels of the sample distances to obtain a trained machine learning module; the machine learning algorithm is a decision tree or a random forest or a K-nearest neighbor or a support vector machine or a neural network.
6. A neural network image classifier confidence calibration system, characterized in that: include: Neural network classifiers, detectors, and confidence calibration modules; The neural network classifier is used to: extract high-dimensional features of a target image, and classify the target image according to the extracted high-dimensional features to obtain an initial category confidence of the target image; The detector includes a distance module, a machine learning module and a probability module; The distance module is used to calculate the distance between the target feature and each first reference feature in the high-dimensional feature database; the target feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target image, each first reference feature corresponds to a target sample image, the first reference feature is a high-dimensional feature obtained by the neural network classifier to extract the high-dimensional feature of the target sample image, the target sample image is an image of the same category as the target image and correctly classified by the neural network classifier, and the category of the target image is determined according to the initial category confidence; The machine learning module is used to predict the probability of the target image being correctly classified according to each distance, and obtain multiple correct classification prediction probabilities; The probability module is used to calculate the average value of all the correct classification prediction probabilities to obtain the average correct probability; The confidence calibration module is used to: calibrate the initial category confidence using the average correct probability to obtain the calibrated category confidence of the target image, specifically including: multiplying the average correct probability by the initial category confidence to obtain the calibrated category confidence of the target image.
7. The system according to claim 6, characterized in that Also includes: High-dimensional feature database construction module; The high-dimensional feature database construction module is used for: Obtain the correctly classified training samples in the training set; The correctly classified training samples are sample images correctly classified by the neural network classifier; the training set is used to train the neural network classifier; Inputting each of the correctly classified training samples into the neural network classifier to extract high-dimensional features; The high-dimensional feature database is constructed using the high-dimensional features extracted from each correctly classified training sample as an element.
8. The system according to claim 7, characterized in that Also includes: Machine learning module training module; The machine learning module training module is used to: Obtain high-dimensional features of each verification sample image in a verification set; the verification set is used to verify the neural network classifier; Calculating the sample distance between each high-dimensional feature of the verification sample image and each second reference feature; the second reference feature is a high-dimensional feature of an image of the same category as the verification sample image in the high-dimensional feature database; According to the predicted category of each verification sample image and the category label of the verification sample image, determine whether the verification sample image is correctly classified, and obtain a label of each sample distance; the predicted category is the category obtained by the verification sample image being classified by the neural network classifier; the label of the sample distance indicates whether the verification sample image is correctly classified; The machine learning module is trained using the sample distances and the labels of the sample distances to obtain a trained machine learning module.
Citation Information
Patent Citations
Neural network model prediction confidence calibration method and system and storage medium
CN112183751A
Target detection method and device based on deep learning confidence estimation
CN113191332A
