Abstract:In order to achieve accurate image recognition in scenarios where the target domain samples are limited,such as agricultural pest Image recognition, few shot image classification methods have been developed as an extension of deep learning-based image classification .To further improve the accuracy in the few shot image classification, this paper proposes a general two-stage training model that integrates current mainstream methods and enhances their performance to improve the recognition accuracy in limited sample scenarios.Firstly, a feature enhancement module incorporating dual attention mechanism is proposed to solve the problem that the background similarity of different pest species is too high during training. Secondly, a feature generation module based on Gaussian distribution is proposed to solve the problem of overfitting that may occur in prediction in the case of a single sample. to improve the generalization ability. Finally, three typical few-shot recognition methods are unified into a two-stage training model to incorporate the proposed method. This idea and improvement are applied to the traditional pest classification dataset IP102 for the first time, and the recognition accuracy can be improved by 2.11% to 6.87% over the benchmark method. In order to further verify the effectiveness of the method in this paper, corresponding experiments were also carried out on the public dataset Mini-Imagenet in the field of few shot learning, the improvement effect is also significant.