CN114387474A - Small sample image classification method based on Gaussian prototype classifier - Google Patents

Small sample image classification method based on Gaussian prototype classifier Download PDF

Info

Publication number
CN114387474A
CN114387474A CN202210033297.6A CN202210033297A CN114387474A CN 114387474 A CN114387474 A CN 114387474A CN 202210033297 A CN202210033297 A CN 202210033297A CN 114387474 A CN114387474 A CN 114387474A
Authority
CN
China
Prior art keywords
prototype
image
sample
class
classifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202210033297.6A
Other languages
Chinese (zh)
Inventor
杨赛
杨慧
周伯俊
胡彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong University
Original Assignee
Nantong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong University filed Critical Nantong University
Priority to CN202210033297.6A priority Critical patent/CN114387474A/en
Publication of CN114387474A publication Critical patent/CN114387474A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of small sample image classification in the field of computer vision, in particular to a small sample image classification method based on a Gaussian prototype classifier, which comprises the steps of firstly carrying out Gaussian operation on features extracted from a trunk convolution neural network so as to make the features of an image sample obey Gaussian distribution; then, the prototype features of the base class data are used as prior information, and a maximum posterior estimation method is utilized to obtain reliable Gaussian prototype features for each new class; finally, the query sample in the new class is classified as the class to which the prototype that is most similar belongs. The invention can realize one-step correction of the prototype without the help of additional labeling information or a complex optimization process, thereby improving the classification performance of the small sample image.

Description

Small sample image classification method based on Gaussian prototype classifier
Technical Field
The invention relates to the technical field of small sample image classification in the field of computer vision, in particular to a small sample image classification method based on a Gaussian prototype classifier.
Background
In recent years, image classification has achieved unprecedented success with the aid of deep learning techniques, with performance in reference tests such as ImageNet [1] even exceeding human levels. However, classification models based on deep convolutional neural networks often require a large amount of labeled data for parameter optimization to achieve good performance. Therefore, they cannot be widely applied to many practical application scenarios because the cost of manpower and material resources required to accurately label mass data is very high. In contrast, human vision can accurately identify objects after observing a small sample of such objects. Inspired by the strong learning ability of human, the study of small sample image classification gradually arouses the extensive study interest of scholars. The method aims to train the convolutional neural network model in the training data set with the base class, so that under the condition that only a small number of support samples are given in each new class, the unlabeled query samples are subjected to classification decision.
The non-parameter classifier has the advantages of simplicity, strong generalization capability and the like, and is a rational classifier for solving the problem of small sample image classification. Wherein the low-capacity prototype classifier draws the attention of the students. However, due to the limited label data in the supporting sample data set, the prototype obtained by mean calculation has a deviation problem with the real prototype. In order to solve the above problems, several improvements have recently been made, which generally adopt a meta-learning strategy to modify the prototype. Since the scarcity of supporting sample data makes there insufficient information to obtain a representative prototype, a straightforward approach to solving this problem is with the aid of additional data or knowledge. For example, Ren et al (Ren M, Triantafillou E, Ravi S, et al. Meta-learning for semi-supervised raw-shot classification [ J ]. arXiv preprint arXiv:1803.00676,2018.) proposed a semi-supervised prototype network, which introduces an additional non-annotated dataset to correct the prototype; the prototypes generated by the above method are not highly reliable since the unlabeled samples are from different classes. Therefore, Xing et al (Xing C, Rostamzadeh N, Oreshkin B, Pinheiro P.Adaptive cross-modal raw-shot learning [ C ]// Proceedings of the 34th annular Conference on Neural Information Processing Systems, Cambridge, MA, USA: MIT Press,2020:1-8) propose to fuse the text and visual model Information to obtain a semantic prototype; zhang et al (Zhang B, Li X, YeY, Huang Z, Zhang L. ProtopType completion with private knowledge for raw-shot learning [ C ]// Proceedings of the 34th IEEE Conference on Computer Vision and Pattern registration. piscataway, NJ, USA: IEEE,2021: 4623-; although the above methods achieve good performance, they require the introduction of additional knowledge to complete prototype correction, which increases the labeling cost accordingly. For this purpose, Xue et al (Xue W, Wang W. one-shot image classification by study to restore protocols [ C ]// Proceedings of 35th AAAI Conference on Intelligent interest, New York, USA: AAAI,2020: 6558-. Cai et al (Cai C H, Yuan M L and Lu T. IFSM: iterative feature selection mechanism for raw-shot image classification [ C ]//25th International Conference on Pattern Recognition,2021: 9429) propose to use a control mechanism to generate new prototypes continuously and iteratively based on the prototypes generated in the previous step. In addition, continuous optimization iteration is also an effective method for prototype correction. For example, Si or the like (Si C, Chen W, WangW, et al. progressive Cluster Purification for transformed Few-shot Learning [ J ]. arXiv preprinting arXiv:1906.03847,2019.) takes the average value of each type of samples as an initial prototype, and the query sample is cyclically updated with the L samples having the highest correlation values in the type.
Although the above methods achieve good classification performance, these often implement a correction of the prototype by means of additional labeling information or a complex optimization process. Therefore, the invention provides a small sample image classification method based on a Gaussian prototype classifier. The method is a one-step prototype correction method, which performs Gaussian operation on features extracted from a backbone convolutional neural network, then takes the prototype features of base class data as prior information, and obtains reliable prototype features for each new class by utilizing a maximum posterior estimation method.
Disclosure of Invention
In view of the above problems, the present invention provides a small sample image classification method based on a gaussian prototype classifier, which can realize one-step correction of a prototype without the aid of additional labeling information or a complex optimization process, thereby improving the small sample image classification performance.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a small sample image classification method based on a Gaussian prototype classifier comprises the following steps:
step 1: preparing image data, and randomly classifying the image data into a base class data set I for a given image data set IbaseVerification of the data set IvalAnd a new class data set InovelThe method is respectively used for pre-training, hyper-parameter verification and test of the trunk convolutional neural network;
step 2: pre-training of the backbone convolutional neural network, the model is composed of the backbone neural network fθLinear classifier Cw() And a Softmax layer; inputting base class image data into a model, sequentially extracting features through a trunk convolutional neural network, calculating a classification score by a linear classifier and calculating a probability output value by a Softmax layer; then, calculating a cross entropy loss function based on the probability output value and a real label of the image and optimizing parameters in the model by using a gradient descent method;
and step 3: storing base class prototype features, fixing the backbone neural network fθParameter θ in (1), base class data set IbaseIs input to fθThen calculates the prototype feature of each kind of sample feature and combines all CbStoring the individual prototype features as prior information;
step 4, correcting the distribution of the characteristics of the new-type samples, namely inputting the support image samples and the query image samples constructed based on the new-type data set into a trunk convolution neural network to extract the characteristics, and correcting the characteristic distribution of the support image samples and the query image samples by utilizing a segmented power series function to ensure that the characteristic distribution of the samples meets Gaussian distribution;
and 5: correcting the new type prototype, calculating the initial prototype of each type of support sample and the average value of the initial prototype and L adjacent prototypes of the base type prototype as prior information, and then correcting the new type prototype by utilizing maximum posterior probability estimation;
step 6: and performing classification decision on the query sample, and performing classification decision on the query sample by using a Gaussian prototype classifier based on the corrected prototype.
Preferably, the specific steps of step 1 are as follows:
(1)Ibasecommon C in data setbA class, the c-th class set being represented as
Figure BDA0003467342380000031
NcFor the number of images in this class,
Figure BDA0003467342380000032
represents the i-th base class image,
Figure BDA0003467342380000033
indicates its corresponding tag;
(2) in the verification and test phase, in IvalAnd InovelConstructing an N-way-K-shot small sample image classification task on a data set: in particular, in data set IvalAnd InovelIn the method, N categories are randomly extracted, K image samples are randomly selected in each category to serve as a support sample set, Q image samples are randomly selected in the rest image samples to serve as a query sample set, and the support sample set of the nth category is expressed as
Figure BDA0003467342380000034
The query sample set is represented as
Figure BDA0003467342380000035
Preferably, the specific steps of step 2 are as follows:
(1) initializing a parameter theta in a trunk convolutional neural network in the model and a parameter matrix W in a classifier;
(2) in IbaseRandomly extracting M image samples in a data set, and inputting the ith base class image sample into a backbone neural network fθExtracting image features, wherein the image features are expressed as:
Figure BDA0003467342380000036
(3) inputting the features into a classifier, wherein the calculation formula of the classification score is as follows:
Figure BDA0003467342380000037
wherein
Figure BDA0003467342380000038
Representing weight vectors in the classifier;
(4) the calculation formula of converting the classification score into the classification output probability value by the Softmax layer is as follows:
Figure BDA0003467342380000039
wherein SijTo classify and score SiThe jth component of (a), wjIs the jth weight vector in the classifier parameter matrix W;
(5) the cross entropy loss function between the classification output probability value and the real label is:
Figure BDA00034673423800000310
wherein p isijOutput probability values, w, for classificationjIs the jth weight vector in the classifier parameter matrix W, and M is the number of image samples.
Preferably, the specific steps of step 3 are as follows:
(1) fixed backbone neural network fθParameter θ in (1), base class data set IbaseIs input to fθExtracting features of each sample, wherein the c-th class image feature set is represented as
Figure BDA00034673423800000311
Wherein
Figure BDA00034673423800000312
Features representing an ith image sample;
(2) the prototype feature calculation formula for the c-th category is:
Figure BDA0003467342380000041
preferably, the specific steps of step 4 are as follows:
(1) fixed backbone neural network fθThe new-class support image sample and the query image sample are input into the trunk neural network to extract features, and then the features of the kth support image sample are expressed as:
Figure BDA0003467342380000042
the characteristics of the qth supported image sample are represented as:
Figure BDA0003467342380000043
(2) the calculation formula for performing distribution correction on the kth supported image feature is as follows:
Figure BDA0003467342380000044
wherein beta is an adjustable parameter;
(3) the calculation formula for performing distribution correction on the qth support image feature is as follows:
Figure BDA0003467342380000045
wherein beta is an adjustable parameter.
Preferably, the specific steps of step 5 are as follows:
(1) for the new class, the initial prototype P of the nth classn0The calculation formula of (2) is as follows:
Figure BDA0003467342380000046
(2) initial prototype P of nth classn0The similarity calculation formula with the c-th base class prototype is as follows:
Figure BDA0003467342380000047
wherein K is a Cosine similarity calculation formula according to a similarity score SncDetermining the sum of Pn0L neighbor base class prototypes, the L neighbor prototype being denoted as Pl
(3) In order to obtain the information for prototype correction, an average value is calculated for the L neighboring base class prototypes, and the formula is as follows:
Figure BDA0003467342380000048
(4) the formula for correcting the initial element by using the maximum posterior probability method is as follows:
Pn=Pn0+λrn
preferably, the specific steps of step 6 are as follows:
the calculation formula for making classification decision on the query sample by using the prototype classifier based on the corrected prototype is as follows:
Figure BDA0003467342380000056
where d is the distance calculation formula.
The invention has the beneficial effects that:
the method can realize one-step correction of the prototype without the help of additional labeled information or a complex optimization process, thereby solving the problem that the common method for calculating the prototype by using the mean value deviates from the real prototype due to the scarcity of data of the support sample.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a visual comparison graph of a corrected prototype and a real prototype based on t-SNE technology.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, and thus the scope of the present invention is more clearly defined. The embodiments described herein are only a few embodiments of the present invention, rather than all embodiments, and all other embodiments that can be derived by one of ordinary skill in the art without inventive faculty based on the embodiments described herein are intended to fall within the scope of the present invention.
Referring to fig. 1, a small sample image classification method based on a gaussian prototype classifier includes the following steps:
step 1: preparing image data, and randomly classifying the image data into a base class data set I for a given image data set IbaseVerification of the data set IvalAnd a new class data set InovelThe method is respectively used for pre-training, hyper-parameter verification and test of the trunk convolutional neural network;
wherein (1) IbaseCommon C in data setbA class, the c-th class set being represented as
Figure BDA0003467342380000051
NcFor the number of images in this class,
Figure BDA0003467342380000052
represents the i-th base class image,
Figure BDA0003467342380000053
indicates its corresponding tag;
(2) in the verification and test phase, in IvalAnd InovelConstructing an N-way-K-shot small sample image classification task on a data set: in particular, in data set IvalAnd InovelIn the method, N categories are randomly extracted, K image samples are randomly selected in each category to serve as a support sample set, Q image samples are randomly selected in the rest image samples to serve as a query sample set, and the support sample set of the nth category is expressed as
Figure BDA0003467342380000054
The query sample set is represented as
Figure BDA0003467342380000055
Step 2: pre-training of the backbone convolutional neural network, the model is composed of the backbone neural network fθLinear classifier Cw() And a Softmax layer; inputting base class image data into a model, sequentially extracting features through a trunk convolutional neural network, calculating a classification score by a linear classifier and calculating a probability output value by a Softmax layer; then, calculating a cross entropy loss function based on the probability output value and a real label of the image and optimizing parameters in the model by using a gradient descent method;
initializing a parameter theta in a trunk convolutional neural network in a model and a parameter matrix W in a classifier;
(2) in IbaseRandomly extracting M image samples in a data set, and inputting the ith base class image sample into a backbone neural network fθExtracting image features, wherein the image features are expressed as:
Figure BDA0003467342380000061
(3) inputting the features into a classifier, wherein the calculation formula of the classification score is as follows:
Figure BDA0003467342380000062
wherein
Figure BDA0003467342380000063
Representing weight vectors in the classifier;
(4) the calculation formula of converting the classification score into the classification output probability value by the Softmax layer is as follows:
Figure BDA0003467342380000064
wherein SijTo classify and score SiThe jth component of (a), wjIs the jth weight vector in the classifier parameter matrix W;
(5) the cross entropy loss function between the classification output probability value and the real label is:
Figure BDA0003467342380000065
wherein p isijOutput probability values, w, for classificationjIs the jth weight vector in the classifier parameter matrix W, and M is the number of image samples.
And step 3: storing base class prototype features, fixing the backbone neural network fθParameter θ in (1), base class data set IbaseIs input to fθThen calculates the prototype feature of each kind of sample feature and combines all CbStoring the individual prototype features as prior information;
wherein, (1) a fixed trunk neural network fθParameter θ in (1), base class data set IbaseIn (1)Image samples are input to fθExtracting features of each sample, wherein the c-th class image feature set is represented as
Figure BDA0003467342380000066
Wherein
Figure BDA0003467342380000067
Features representing an ith image sample;
(2) the prototype feature calculation formula for the c-th category is:
Figure BDA0003467342380000068
step 4, correcting the distribution of the characteristics of the new-type samples, namely inputting the support image samples and the query image samples constructed based on the new-type data set into a trunk convolution neural network to extract the characteristics, and correcting the characteristic distribution of the support image samples and the query image samples by utilizing a segmented power series function to ensure that the characteristic distribution of the samples meets Gaussian distribution;
wherein, (1) a fixed trunk neural network fθThe new-class support image sample and the query image sample are input into the trunk neural network to extract features, and then the features of the kth support image sample are expressed as:
Figure BDA0003467342380000069
the characteristics of the qth supported image sample are represented as:
Figure BDA0003467342380000071
(2) the calculation formula for performing distribution correction on the kth supported image feature is as follows:
Figure BDA0003467342380000072
wherein beta is an adjustable parameter;
(3) the calculation formula for performing distribution correction on the qth support image feature is as follows:
Figure BDA0003467342380000073
wherein beta is an adjustable parameter.
And 5: correcting the new type prototype, calculating the initial prototype of each type of support sample and the average value of the initial prototype and L adjacent prototypes of the base type prototype as prior information, and then correcting the new type prototype by utilizing maximum posterior probability estimation;
wherein (1) for the new class, the initial prototype P of the nth classn0The calculation formula of (2) is as follows:
Figure BDA0003467342380000074
(2) initial prototype P of nth classn0The similarity calculation formula with the c-th base class prototype is as follows:
Figure BDA0003467342380000075
wherein K is a Cosine similarity calculation formula according to a similarity score SncDetermining the sum of Pn0L neighbor base class prototypes, the L neighbor prototype being denoted as Pl
(3) In order to obtain the information for prototype correction, an average value is calculated for the L neighboring base class prototypes, and the formula is as follows:
Figure BDA0003467342380000076
(4) the formula for correcting the initial element by using the maximum posterior probability method is as follows:
Pn=Pn0+λrn
step 6: carrying out classification decision on the query samples, and carrying out classification decision on the query samples by using a Gaussian prototype classifier based on corrected prototypes;
wherein, the calculation formula for making classification decision on the query sample by using the prototype classifier based on the corrected prototype is as follows:
Figure BDA0003467342380000077
where d is the distance calculation formula.
Example (b):
referring to fig. 2, a certain object class is randomly extracted from a public small sample image classification image data set MiniImageNet, 300 samples in the object class are randomly extracted, 5 samples in the 300 samples are randomly extracted as support samples, a trunk convolutional neural network trained by the method of the present invention is used to extract features from all samples, and the features of the samples are visualized by using a t-SNE technique, and the result is shown in fig. 2 (a). Similarly, a certain object class is randomly extracted from the public small sample image classification image data set CUBbird, 45 samples in the object class are randomly extracted, 5 samples in the 45 samples are randomly extracted as support samples, features of all the samples are extracted by using the trunk convolution neural network trained by the method of the invention, and the features of the samples are visualized by using the t-SNE technology, and the result is shown in fig. 2 (b). In the figure, a represents the feature of the image sample, a represents the real prototype feature in this category, □ represents the prototype resulting from the calculation of the feature of the support sample,
Figure BDA0003467342380000081
represents a corrected prototype obtained using the prototype correction method of the invention herein. As can be seen from the results in fig. 2(a) and 2(b), the corrected prototype obtained by the present invention is very close to the real prototype, and the deviation between the prototype calculated based on a small number of supporting samples and the real prototype is large.
The embodiments of the present invention have been described in detail, but the description is only for the preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. All equivalent changes and modifications made within the scope of the present invention shall fall within the scope of the present invention.

Claims (7)

1. A small sample image classification method based on a Gaussian prototype classifier is characterized by comprising the following steps:
step 1: preparing image data, and randomly classifying the image data into a base class data set I for a given image data set IbaseVerification of the data set IvalAnd a new class data set InovelThe method is respectively used for pre-training, hyper-parameter verification and test of the trunk convolutional neural network;
step 2: pre-training of the backbone convolutional neural network, the model is composed of the backbone neural network fθLinear classifier Cw() And a Softmax layer; inputting base class image data into a model, sequentially extracting features through a trunk convolutional neural network, calculating a classification score by a linear classifier and calculating a probability output value by a Softmax layer; then, calculating a cross entropy loss function based on the probability output value and a real label of the image and optimizing parameters in the model by using a gradient descent method;
and step 3: storing base class prototype features, fixing the backbone neural network fθParameter θ in (1), base class data set IbaseIs input to fθThen calculates the prototype feature of each kind of sample feature and combines all CbStoring the individual prototype features as prior information;
step 4, correcting the distribution of the characteristics of the new-type samples, namely inputting the support image samples and the query image samples constructed based on the new-type data set into a trunk convolution neural network to extract the characteristics, and correcting the characteristic distribution of the support image samples and the query image samples by utilizing a segmented power series function to ensure that the characteristic distribution of the samples meets Gaussian distribution;
and 5: correcting the new type prototype, calculating the initial prototype of each type of support sample and the average value of the initial prototype and L adjacent prototypes of the base type prototype as prior information, and then correcting the new type prototype by utilizing maximum posterior probability estimation;
step 6: and performing classification decision on the query sample, and performing classification decision on the query sample by using a Gaussian prototype classifier based on the corrected prototype.
2. The method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of step 1 are as follows:
(1)Ibasethere are Cb classes in the data set, and the c-th class set is expressed as
Figure FDA0003467342370000011
NcFor the number of images in this class,
Figure FDA0003467342370000012
represents the i-th base class image,
Figure FDA0003467342370000013
indicates its corresponding tag;
(2) in the verification and test phase, in IvalAnd InovelConstructing an N-way-K-shot small sample image classification task on a data set: in particular, in data set IvalAnd InovelIn the method, N categories are randomly extracted, K image samples are randomly selected in each category to serve as a support sample set, Q image samples are randomly selected in the rest image samples to serve as a query sample set, and the support sample set of the nth category is expressed as
Figure FDA0003467342370000014
The query sample set is represented as
Figure FDA0003467342370000015
3. The method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of the step 2 are as follows:
(1) initializing a parameter theta in a trunk convolutional neural network in the model and a parameter matrix W in a classifier;
(2) in IbaseRandomly extracting M image samples in a data set, and inputting the ith base class image sample into a backbone neural network fθExtracting image features, wherein the image features are expressed as:
Figure FDA0003467342370000021
(3) inputting the features into a classifier, wherein the calculation formula of the classification score is as follows:
Figure FDA0003467342370000022
wherein [ w1,w2,.......wcb]Representing weight vectors in the classifier;
(4) the calculation formula of converting the classification score into the classification output probability value by the Softmax layer is as follows:
Figure FDA0003467342370000023
wherein SijTo classify and score SiThe jth component of (a), wjIs the jth weight vector in the classifier parameter matrix W;
(5) the cross entropy loss function between the classification output probability value and the real label is:
Figure FDA0003467342370000024
wherein p isijOutput probability values, w, for classificationjIs the jth weight vector in the classifier parameter matrix W, and M is the number of image samples.
4. The method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of the step 3 are as follows:
(1) fixed backbone neural network fθParameter θ in (1), base class data set IbaseIs input to fθExtracting features of each sample, wherein the c-th class image feature set is represented as
Figure FDA0003467342370000025
Wherein
Figure FDA0003467342370000026
Features representing an ith image sample;
(2) the prototype feature calculation formula for the c-th category is:
Figure FDA0003467342370000027
5. the method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of the step 4 are as follows:
(1) fixed backbone neural network fθThe new-class support image sample and the query image sample are input into the trunk neural network to extract features, and then the features of the kth support image sample are expressed as:
Figure FDA0003467342370000028
the characteristics of the qth supported image sample are represented as:
Figure FDA0003467342370000029
(2) the calculation formula for performing distribution correction on the kth supported image feature is as follows:
Figure FDA0003467342370000031
wherein beta is an adjustable parameter;
(3) the calculation formula for performing distribution correction on the qth support image feature is as follows:
Figure FDA0003467342370000032
wherein beta is an adjustable parameter.
6. The method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of the step 5 are as follows:
(1) for the new class, the initial prototype P of the nth classn0The calculation formula of (2) is as follows:
Figure FDA0003467342370000033
(2) initial prototype P of nth classn0The similarity calculation formula with the c-th base class prototype is as follows:
Figure FDA0003467342370000034
wherein K is a Cosine similarity calculation formula according to a similarity score SncDetermining the sum of Pn0L neighbor base class prototypes, the L neighbor prototype being denoted as Pl
(3) In order to obtain the information for prototype correction, an average value is calculated for the L neighboring base class prototypes, and the formula is as follows:
Figure FDA0003467342370000035
(4) the formula for correcting the initial element by using the maximum posterior probability method is as follows:
Pn=Pn0+λrn
7. the method for classifying small sample images based on a gaussian prototype classifier according to claim 1, wherein the specific steps of the step 6 are as follows:
the calculation formula for making classification decision on the query sample by using the prototype classifier based on the corrected prototype is as follows:
Figure FDA0003467342370000036
where d is the distance calculation formula.
CN202210033297.6A 2022-01-12 2022-01-12 Small sample image classification method based on Gaussian prototype classifier Withdrawn CN114387474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210033297.6A CN114387474A (en) 2022-01-12 2022-01-12 Small sample image classification method based on Gaussian prototype classifier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210033297.6A CN114387474A (en) 2022-01-12 2022-01-12 Small sample image classification method based on Gaussian prototype classifier

Publications (1)

Publication Number Publication Date
CN114387474A true CN114387474A (en) 2022-04-22

Family

ID=81202517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210033297.6A Withdrawn CN114387474A (en) 2022-01-12 2022-01-12 Small sample image classification method based on Gaussian prototype classifier

Country Status (1)

Country Link
CN (1) CN114387474A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114782779A (en) * 2022-05-06 2022-07-22 兰州理工大学 Small sample image feature learning method and device based on feature distribution migration
CN116168257A (en) * 2023-04-23 2023-05-26 安徽大学 Small sample image classification method, device and storage medium based on sample generation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114782779A (en) * 2022-05-06 2022-07-22 兰州理工大学 Small sample image feature learning method and device based on feature distribution migration
CN116168257A (en) * 2023-04-23 2023-05-26 安徽大学 Small sample image classification method, device and storage medium based on sample generation

Similar Documents

Publication Publication Date Title
CN114241282B (en) Knowledge distillation-based edge equipment scene recognition method and device
CN110188227B (en) Hash image retrieval method based on deep learning and low-rank matrix optimization
CN105138973B (en) The method and apparatus of face authentication
CN111985581B (en) Sample-level attention network-based few-sample learning method
CN114298158A (en) Multi-mode pre-training method based on image-text linear combination
CN107480261A (en) One kind is based on deep learning fine granularity facial image method for quickly retrieving
CN106682694A (en) Sensitive image identification method based on depth learning
CN110942091B (en) Semi-supervised few-sample image classification method for searching reliable abnormal data center
CN114387474A (en) Small sample image classification method based on Gaussian prototype classifier
CN113378913B (en) Semi-supervised node classification method based on self-supervised learning
CN113222011B (en) Small sample remote sensing image classification method based on prototype correction
CN108710896B (en) Domain learning method based on generative confrontation learning network
CN112381179B (en) Heterogeneous graph classification method based on double-layer attention mechanism
CN101794396A (en) System and method for recognizing remote sensing image target based on migration network learning
CN103400144B (en) Active learning method based on K-neighbor for support vector machine (SVM)
CN110188827A (en) A kind of scene recognition method based on convolutional neural networks and recurrence autocoder model
CN112733866A (en) Network construction method for improving text description correctness of controllable image
CN113076927B (en) Finger vein identification method and system based on multi-source domain migration
CN107392241A (en) A kind of image object sorting technique that sampling XGBoost is arranged based on weighting
CN111488917A (en) Garbage image fine-grained classification method based on incremental learning
CN110110845B (en) Learning method based on parallel multi-level width neural network
CN114329031B (en) Fine-granularity bird image retrieval method based on graph neural network and deep hash
CN112200262B (en) Small sample classification training method and device supporting multitasking and cross-tasking
CN114580566A (en) Small sample image classification method based on interval supervision contrast loss
CN112861626A (en) Fine-grained expression classification method based on small sample learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220422