• 学术论文 •

### 基于样本对元学习的小样本图像分类方法

1. 武汉科技大学冶金自动化与检测技术教育部工程研究中心，湖北 武汉 430081
• 收稿日期:2021-04-09 修回日期:2021-10-31 出版日期:2022-02-25 发布日期:2022-02-25
• 作者简介:李维刚 男，1977年生，湖北通城人.博士、教授、博导，主要研究方向为人工智能与机器学习算法.
甘 平（通讯作者） 男，1995年生，湖北武汉人.硕士，主要研究方向为小样本学习、GAN.E-mail: 383615194@qq.com
• 基金资助:
国家自然科学基金面上项目(51774219);湖北省重点研发计划(2020BAB098)

### A Few-Shot Image Classification Method by Pairwise-Based Meta Learning

LI Wei-gang, GAN Ping, XIE Lu, LI Song-tao

1. Engineering Research Center for Metallurgical Automation and Measurement Technology（Ministry of Education），Wuhan University ofScience and Technology，Wuhan，Hubei 430081，China
• Received:2021-04-09 Revised:2021-10-31 Online:2022-02-25 Published:2022-02-25

Abstract:

In this paper, a pairwise-based meta learning(PML) method is proposed for few-shot image classification. Transitive transfer learning is used to fine tune the pre-trained Resnet50 model to get a feature encoder that is more suitable for few shot task. The feature encoder is used as the initial feature encoder of the meta-learning model to train the model, which further enhances the generalization ability of the meta-learning model. Based on the similarity between the support set and the query set samples, a meta loss(ML) function is proposed, which considers the relationship between all the samples of the query set in the feature space, so as to reduce the within-class distance of positive samples and increase the between-class distance of positive and negative samples, thus improving the classification accuracy.The experimental results show that the classification accuracy of the methods in this paper is 77.65% and 89.65% on 1-shot and 5-shot tasks, respectively, and it is 7.38% and 5.65% higher than the latest meta-learning method, Meta-baseline.

Extended Abstract
Fully supervised learning models have achieved high precision prediction of many datasets, but it rely heavily on a large number of labeled samples. In many fields, it is difficult to obtain enough labeled samples, so the generalization ability of the fully supervised models is insufficient. In order to solve this problem, this paper proposes a pairwise-based meta learning (PML) method for few-shot image classification. Inspired by the characteristics of transfer learning and meta learning, the PML achieves high-precision classification of the few-shot datasets, and improves the generalization ability of the model. Firstly, the characteristics of transfer learning is transferring the prior knowledge to different fields, in order to reduce the difference of the source domain and target domain, the pre-trained Resnet50 model is fine-tuned to obtain a feature encoder that is more suitable for the few-shot tasks by transfer learning. The feature encoder is utilized as the initial feature encoder of the meta learning model to train the model, further enhancing the generalization ability of the meta learning model; at the same time, this paper also proposes a meta loss function (ML) based on the multiple similarities between the support set and the query set samples, it uses the positive relative similarity P to roughly mine teh difficult pairwise samples, and then combines the self similarity S and negative relative similarity N to further weight the pairwise samples, which takes into account the relationship of all samples in the query set in the feature space, so as to reduce the intra class distance of the positive samples and increase the inter class distance of the positive and negative samples, thus the classification accuracy of the model is improved. The experimental results show that the proposed method achieve 77.65% and 89.65% classification accuracy respectively on 1-shot and 5-shot tasks of steel microstructure image data set, which are 7.38% and 5.65% higher than the latest meta learning method meta baseline.