Font Size: a A A

A Study On Few-shot Image Classification Algorithm Based On Global And Local Feature Extraction

Posted on:2024-02-07Degree:MasterType:Thesis
Country:ChinaCandidate:X LiFull Text:PDF
GTID:2568307106499654Subject:Computer application technology
Abstract/Summary:
In recent years,deep learning has been widely used in several fields,and in some cases,deep learning-based image classification algorithms have surpassed humans in terms of classification accuracy.The success of deep learning techniques relies on large data samples,however,in reality,sufficient sample data is not available in many fields,such as endangered plants and animals or rare disease research.Therefore,few-shot learning direction is emerging.Small-sample learning faces more difficulties than traditional learning methods that rely on a large number of samples.On the one hand,when the amount of sample data is insufficient,it is difficult for the model to extract robust image features from a few of samples and avoid overfitting.On the other hand,small-sample image classification exists in a variety of situations based on the task.When the class difference in the task is slight(e.g.,tiger and cat),it is more convincing from a local perspective;when the class difference in the task is large(e.g.,tiger and teacup),it is easier to discriminate from a global scale.In other words,the different degrees of differences in classes in the task add difficulty to the classification.To address these problems,this paper investigates few-shot image classification methods based on global and local feature extraction methods in two stages:pre-training and fine-tuning.Thus,the main contributions of this paper include the following two aspects:In order to be able to extract more robust image features,this paper proposes a two-way multi-stage model pre-training algorithm based on contrast learning.Traditional feature extraction methods usually use the same feature extractor to extract local features and global features,so that the extracted features do not represent the desired scale well in many cases.In this paper,feature extractors based on different scales are trained from both local and global scales.The network consists of two subnetworks,a global feature subnet and a local feature subnet.By adding contrast loss to the features,the local feature subnetwork and the global feature subnetwork learn from each other to optimize the network parameters and adjust the output strategy.Finally,a set of feature extractors capable of extracting robust global-local features is trained.For the global scale,the model needs to be able to accurately determine the category to which the items belong;for the local scale,the local features need to be able to more accurately represent the semantic information of textures or small targets.The pre-trained model proposed in this paper can be applied to any multi-scale based downstream task with good generalization performance.To address the problem of different class differences in tasks,this paper proposes a self-attentive task-based adaptive small-sample image classification fine-tuning algorithm for multi-level tasks.Based on the pre-training model in the previous paper,the network is further fine-tuned and optimized to improve the accuracy.Images are encoded from global as well as local scales,respectively,and global-local weights are reasonably assigned according to the degree of difference of classes judged adaptively by the task.The network is also composed of two subnetworks,global features and local features.The global feature subnetwork consists of a lightweight feature extractor,a task adaptive module,and a metric learning classification model based on global features.By extracting global features,the classification model can classify images at the global level.The task adaptive module can determine the degree of difference of classes adaptively based on global features and give global-local weights based on the degree of difference.The local feature subnetwork,on the other hand,consists of a feature extractor,a self-attentive module,and a metric learning classification model based on local features.Since the feature extractor of the local feature subnet is only sensitive to image texture features during pre-training,in order to correlate the local features with each other and further optimize the features,we introduce a self-attention mechanism to enhance the representation of local features by dynamically transforming the features.After optimizing the local features,a local classification model based on metric learning is used to complete the local scale classification.Finally,the confidence degree is reasonably assigned according to the global-local weights to complete the final classification.In order to evaluate the algorithm effectiveness,the proposed method in this paper is validated on ordinary coarse-grained dataset and fine-grained dataset respectively.The experimental results prove that this method obtains good results in several benchmark datasets.
Keywords/Search Tags:deep neural networks, multi-level features, few-shot image classification, self-attentive mechanism, model pre-training
Related items