A small sample image classification method based on component-supervised network

By using component supervision networks in small sample image classification, constructing standard, component supervision and self-supervised tasks, generating multi-labels and using linear regression functions, the problem of unsuitable feature extraction is solved and the performance and adaptability of image classification are improved.

CN114255371BActive Publication Date: 2024-09-27CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111567708.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-09-27
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In small-sample image classification, it is difficult for pre-trained feature extractors to adapt to new data sets, leading to the problem of feature extraction maladaptation.

Method used

A method based on component supervision network is adopted to assist in training the feature extractor by constructing standard classification tasks, component supervision auxiliary tasks and self-supervised auxiliary tasks, generating multi-labels and using linear regression functions for classification, thereby improving the adaptability of the feature extractor.

Benefits of technology

It improves the performance of small sample image classification, enhances the adaptability of the feature extractor, can better handle cross-domain data, and reduces the difficulty of feature extraction in new data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255371B
    Figure CN114255371B
Patent Text Reader

Abstract

The present invention relates to the field of pattern recognition technology, and in particular to a small sample image classification method based on a component supervision network, which aims to solve the problem of feature extraction inadaptability in the current field of small sample image classification. The small sample image classification method based on a component supervision network proposes a new solution to improve the performance of small sample image classification - a component supervision network, which refers to the commonly used hierarchical dictionary WordNet in natural language processing, collects component information of samples and generates multiple labels, constructs auxiliary tasks based on component supervision, uses standard classification tasks, auxiliary tasks of component supervision and self-supervision auxiliary tasks to assist in training feature extractors, uses the trained feature extractors to extract features of new class data, and uses a linear classifier to complete the final classification task to improve the adaptability of the feature extractor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pattern recognition, and in particular to a small sample image classification method based on a component supervision network. Background Art

[0002] The small sample image classification process usually includes two stages. The first stage is to use the base class data to train the feature extraction model. The second stage is to use the trained feature extraction model to extract the features of the new class data and use the designed classifier to complete the classification task. The design of the feature extraction model and classifier is an important part of the small sample image classification system and has always been the core issue in the field of small sample image classification.

[0003] At present, the main methods for designing small sample image classifiers are as follows: (1) Data-based small sample image classification: Data-based small sample learning uses data augmentation to enhance the training set. Schwartz et al. used an autoencoder to find the deformation between different samples of the same category, and then used it to generate new samples for samples of other categories, and finally used the augmented data set to train the classifier. Hariharan and Girshick believed that the differences between different samples of the same category can be generalized to other categories. Based on this idea, a generator was designed to expand the training data. Kim et al. used the adversarial idea to augment the support set data, fixed the feature extractor and classifier, and used the adversarial idea to augment a feature for each class of the support set. The generated features were constrained to minimize the difference in the probability of classification, that is, the generated data was close to the classification boundary. Yang et al. proposed to correct the distribution of fewer classes by transferring the statistical information of the class with sufficient samples, and then extracting a sufficient number of samples from the corrected distribution to expand the input of the classifier. (2) Metric-based small sample image classification: Metric-based small sample learning combines metric learning with small sample learning. Its basic principle is to learn metric distance functions according to different tasks. The prototype network proposed by Snell et al. is a simple and efficient small sample learning method. It judges the category by calculating the Euclidean distance from the embedded features of the test sample to each prototype. Oreshkin et al. found that the metric scale and metric task conditional effects are important for improving the performance of small sample algorithms. They proposed a simple and effective method to constrain the learner to the task sample set, thereby learning the task-related metric space. In addition, they proposed an end-to-end optimization process based on auxiliary task collaborative training to learn the task-related metric space. Ren et al. extended the prototype network method to the semi-supervised field. Wang et al. generated additional data through a generative model to expand the diversity of samples and used the prototype network for training. Data expansion can effectively reduce the impact of insufficient samples on class prototype calculation. The matching network proposed by Vinyals et al. maps to the feature space through a kernel function and then uses a k-nearest neighbor classifier for classification.

[0004] The purpose of small sample image classification is to solve the classification problem on a cross-domain basis when there is insufficient labeled data. Usually, researchers pre-train a feature extractor with base class data, and then use it to extract features of new data and identify them. However, the new dataset has only a small number of annotated samples and the categories are completely different from those of the base class dataset, which causes the pre-trained feature extractor to not adapt well to the new data and there is a problem of feature extraction inadaptability. Summary of the invention

[0005] The present invention provides a small sample image classification method based on component supervision network, aiming to solve the problem of feature extraction inadaptability in the current field of small sample image classification.

[0006] In order to achieve the above object, the present invention provides a small sample image classification method based on a component supervision network, the method comprising:

[0007] Construct a standard classification task, input the image into a pre-trained feature extractor to obtain a feature vector, input the feature vector into a base classifier to predict the soft label, project the feature vector into a label space, and then convert it into a probability distribution. Finally, introduce the classification cross entropy function and calculate the standard classification loss, where the standard classification loss is:

[0008]

[0009] in,

[0010] Where x represents an image sample; represents the one-time true value label vector of sample x in the standard classification task; C b Indicates the number of base classes; represents the categorical cross entropy function; represents the base classifier; represents a pre-trained feature extractor; represents the predicted soft label of sample x in the standard classification task; Represents the feature vector projected into the label space;

[0011] Construct the auxiliary task of component supervision, input the image into the pre-trained feature extractor to obtain the feature vector, input the feature vector into the base classifier to predict the soft label, project the feature vector into a component-based label space, and then convert it into a binomial distribution. Finally, introduce the binary cross entropy function and calculate the component supervision auxiliary loss, where the component supervision auxiliary loss is:

[0012]

[0013] in,

[0014] Where x represents an image sample; represents the true multi-label of the component; C m Indicates the number of components; represents the binary cross entropy function; represents the base classifier; represents a pre-trained feature extractor; Represents the predicted soft multi-labels of the components; Represents the feature vector projected into the component-based label space;

[0015] Construct a self-supervised auxiliary task, map the rotated base data to the rotation-based label space, and then calculate the self-supervised auxiliary loss using the rotation-based probability distribution, where the self-supervised auxiliary loss is:

[0016]

[0017] Where x represents an image sample; represents the rotation-based label vector; represents a probability distribution based on rotation;

[0018] The standard classification loss, component supervision auxiliary loss, and self-supervision auxiliary loss are superimposed to calculate the overall loss of the component supervision network, where the overall loss of the component supervision network is:

[0019]

[0020] Here, α is an empirical parameter used to control the impact of component supervision auxiliary loss, which is determined by the accuracy of component-based multi-label.

[0021] The overall loss function of the component supervision network is used as the loss function of the training feature extraction module. In each round of training, the parameters of the feature extractor are gradient updated according to the loss value, and the parameters with the highest accuracy during the training process are selected as the parameters of the final feature extractor.

[0022] Use the above-trained feature extractor to extract the features of the new class data, use the method of directly calculating the linear regression function to obtain the classifier and complete the final classification task, where the linear regression objective function is:

[0023]

[0024] Among them, the classifier is:

[0025] W=Y s V s T (V s V s T +βI) -1

[0026] Among them, ||·|| F represents the Frobenius-norm, i.e., the true single-hot label matrix of the supporting data; represents the classifier to be learned, C n Indicates the number of new categories; N s Indicates the amount of supporting data; represents the labeled support features; dim represents the dimension of the sample; W represents the classifier; β represents a hyperparameter to prevent overfitting; I represents a diagonal matrix;

[0027] Use classifier W to classify V q Classification results in:

[0028] Y q =WV q

[0029] in, Represents the soft label matrix generated by the query sample; N represents unlabeled query features; q Indicates the amount of query data.

[0030] In the above-mentioned small sample image classification method based on component supervision network, optionally, in the standard classification task, a softmax activation function is used as a base classifier.

[0031] In the above-mentioned small sample image classification method based on component supervision network, optionally, in the component supervision auxiliary task, a sigmoid activation function is used as a base classifier.

[0032] The small sample image classification method based on component supervision network provided by the present invention proposes a new scheme for improving the small sample image classification performance - component supervision network, refers to the hierarchical dictionary WordNet commonly used in natural language processing, collects component information of samples and generates multiple labels, constructs auxiliary tasks based on component supervision, uses standard classification tasks, component supervision auxiliary tasks and self-supervised auxiliary tasks to assist in training feature extractors, uses the trained feature extractors to extract features of new class data, and uses linear classifiers to complete the final classification task to improve the adaptability of the feature extractor.

[0033] The construction of the present invention and other objects and advantageous effects thereof will become more apparent through the description of the preferred embodiments in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are 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.

[0035] Figure 1 A schematic diagram of a process flow of a small sample image classification method based on a component supervision network provided in an embodiment of the present invention; DETAILED DESCRIPTION

[0036] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme in the embodiment of the present invention will be described in more detail below in conjunction with the drawings in the preferred embodiments of the present invention. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present invention, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limitations on the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. The embodiments of the present invention are described in detail below in conjunction with the drawings.

[0037] like Figure 1 As shown, the present invention provides a small sample image classification method based on a component supervision network, the method comprising:

[0038] Step 110: Construct a standard classification task and feed image x into a pre-trained feature extractor Get the feature vector Where dim represents the dimension of the feature vector, and the feature vector is input into the base classifier To predict soft labels, in standard classification tasks, the softmax activation function is used as the base classifier.

[0039] Project the feature vector into a label space, x→z sc ,in, C b represents the number of base classes; then convert it into a probability distribution and get:

[0040]

[0041] in, represents the predicted soft label of sample x in the standard classification task;

[0042] Finally, the classification cross entropy function is introduced The standard classification loss is calculated as:

[0043]

[0044] Where x represents an image sample; Represents the one-time true value label vector of sample x in the standard classification task;

[0045] Step 120: Although the categories of the base dataset and the new dataset are different, the components of the samples are similar (for example, cats and dogs both contain legs and head components). In fact, such entity components are stable within the class, and they have good cross-category versatility and new category versatility. Therefore, we refer to the hierarchical dictionary WordNet commonly used in natural language processing, collect component information of the samples and generate multi-labels, and construct component-based auxiliary tasks to improve the adaptability of the feature extractor. Through WordNet, we can get the components contained in each category of items, and each component is part of the multi-label.

[0046] Build a supervised auxiliary task that feeds images into a pre-trained feature extractor Get the feature vector Where dim represents the dimension of the feature vector, and the feature vector is input into the base classifier To predict soft labels, the sigmoid activation function is used as the base classifier in the component supervision auxiliary task.

[0047] Project the feature vector into a component-based label space, x→z cs ,in, C m represents the number of components; it is then transformed into a binomial distribution, giving:

[0048]

[0049] in, Represents the predicted soft multi-labels of the components;

[0050] Finally, the binary cross entropy function is introduced The component supervision auxiliary loss is calculated as:

[0051]

[0052]

[0053] Where x represents an image sample; Represents the true multi-label of the component;

[0054] It should be noted that the auxiliary task of component supervision generates component-based multi-labels for the base class data, and introduces multi-label component supervision auxiliary loss as the auxiliary loss for updating the network.

[0055] Step 130: In order to strengthen the rotation invariance of the network, self-supervised learning is introduced into the network model. Self-supervision helps capture general features without labels. Specifically, we rotate the basic data to four angles of 0°, 90°, 180° and 270° to predict the rotation angle of the image.

[0056] Construct a self-supervised auxiliary task to map the rotated base data to the rotation-based label space, x→z ss ,in, Then use the rotation-based probability distribution The self-supervised auxiliary loss is calculated as:

[0057]

[0058] Where x represents an image sample; represents the rotation-based label vector;

[0059] Step 140: The standard classification loss, component supervision auxiliary loss and self-supervision auxiliary loss are superimposed to calculate the overall loss of the component supervision network, and the result is:

[0060]

[0061] Here, α is an empirical parameter used to control the impact of component supervision auxiliary loss, which is determined by the accuracy of component-based multi-label.

[0062] It should be noted that the loss function can be used to show how well the network fits the accumulated data. The smaller the loss calculated by the loss function, the better the network fits to a certain extent. In the process of neural network training, the loss function is an indispensable part, which directly affects or guides the update "direction" of the network parameters.

[0063] Step 150: The overall loss function of the component supervision network is used as the loss function for training the feature extractor. In each round of training, the parameters of the feature extractor are gradient updated according to the loss value. The parameters with the highest accuracy during the training process are selected as the final feature extractor parameters for the next step to extract sample features.

[0064] It should be noted that the resnet-12 network is used as the feature extractor, the overall loss function of the component supervision network is used as the loss function for training the feature extractor, and then the trained feature extraction network is used to extract the features of the new class data.

[0065] Step 160: Use the feature extractor trained in step 150 to extract features of the new class data, use the method of directly calculating the linear regression function to obtain the classifier and complete the final classification task.

[0066] Send the new class data to the feature extractor trained in step 150 to obtain the new class data features Where V = [V s , V q ], represents the labeled supporting features, represents the unlabeled query feature, N s and N q represents the number of support and query data, and dim represents the dimension of the sample.

[0067] Next, use V s Train a new classifier. Specifically, select the linear regression function as the classifier, and the linear regression objective function is:

[0068]

[0069] Among them, ||·|| F represents the Frobenius-norm, i.e., the true single-hot label matrix of the supporting data; represents the classifier to be learned, C n Represents the number of new categories; β represents a hyperparameter to prevent overfitting;

[0070] The objective function is optimized by direct derivation, and the classifier W is obtained as:

[0071] W=Y s V s T (V s V s T +βI) -1

[0072] Where I represents a diagonal matrix;

[0073] Use classifier W to classify V q Classification results in:

[0074] Y q =WV q

[0075] in, Represents the soft label matrix generated by the query sample.

[0076] The small sample image classification method based on component supervision network provided by the present invention proposes a new scheme for improving the small sample image classification performance - component supervision network, refers to the hierarchical dictionary WordNet commonly used in natural language processing, collects component information of samples and generates multiple labels, constructs auxiliary tasks based on component supervision, uses standard classification tasks, component supervision auxiliary tasks and self-supervised auxiliary tasks to assist in training feature extractors, uses the trained feature extractors to extract features of new class data, and uses linear classifiers to complete the final classification task to improve the adaptability of the feature extractor.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A small sample image classification method based on component supervision network, characterized in that: The method comprises: Construct a standard classification task, input the image into a pre-trained feature extractor to obtain a feature vector, input the feature vector into a base classifier to predict the soft label, project the feature vector into a label space, and then convert it into a probability distribution. Finally, introduce the classification cross entropy function and calculate the standard classification loss, where the standard classification loss is: in, Where x represents an image sample; represents the one-time true value label vector of sample x in the standard classification task; C b Indicates the number of base classes; represents the categorical cross entropy function; represents the base classifier; represents a pre-trained feature extractor; represents the predicted soft label of sample x in the standard classification task; Represents the feature vector projected into the label space; Construct the auxiliary task of component supervision, input the image into the pre-trained feature extractor to obtain the feature vector, input the feature vector into the base classifier to predict the soft label, project the feature vector into a component-based label space, and then convert it into a binomial distribution. Finally, introduce the binary cross entropy function and calculate the component supervision auxiliary loss, where the component supervision auxiliary loss is: in, Where x represents an image sample; represents the true multi-label of the component; C m Indicates the number of components; represents the binary cross entropy function; represents the base classifier; represents a pre-trained feature extractor; Represents the predicted soft multi-labels of the components; Represents the feature vector projected into the component-based label space; Construct a self-supervised auxiliary task, map the rotated base data to the rotation-based label space, and then calculate the self-supervised auxiliary loss using the rotation-based probability distribution, where the self-supervised auxiliary loss is: Where x represents an image sample; represents the rotation-based label vector; represents a probability distribution based on rotation; The standard classification loss, component supervision auxiliary loss, and self-supervision auxiliary loss are superimposed to calculate the overall loss of the component supervision network, where the overall loss of the component supervision network is: Among them, α is an empirical parameter used to control the impact of component supervision auxiliary loss, which is determined by the accuracy of component-based multi-label; The overall loss function of the component supervision network is used as the loss function of the training feature extraction module. In each round of training, the parameters of the feature extractor are gradient updated according to the loss value, and the parameters with the highest accuracy during the training process are selected as the parameters of the final feature extractor. Use the above-trained feature extractor to extract the features of the new class data, use the method of directly calculating the linear regression function to obtain the classifier and complete the final classification task, where the linear regression objective function is: Among them, the classifier is: W=Y s V s T (V s V s T +βI) -1 Among them, ||·|| F represents the Frobenius-norm, i.e., the true single-hot label matrix of the supporting data; represents the classifier to be learned, C n Indicates the number of new categories; N s Indicates the amount of supporting data; represents the labeled support features; dim represents the dimension of the sample; W represents the classifier; β represents a hyperparameter to prevent overfitting; I represents a diagonal matrix; Use classifier W to classify V q Classification results in: Y q =WV q in, Represents the soft label matrix generated by the query sample; N represents unlabeled query features; q Indicates the amount of query data.

2. The small sample image classification method based on component supervision network according to claim 1 is characterized in that: In the standard classification task, the softmax activation function is used as the base classifier.

3. The small sample image classification method based on component supervision network according to claim 1 or 2, characterized in that: In the component supervision auxiliary task, the sigmoid activation function is used as the base classifier.