Due to the complex background of flower images taken under natural conditions and their high intra-class variability and inter-class similarity,it is difficult to achieve accurate fine-grained classification by existing popular methods relying only on the convolution module to extract local features of flowers.To address the above problems,this paper proposes a high-precision and lightweight flower classification method(ConvTrans-ResMLP).It achieves global feature extraction of flower images by combining the Transformer module and the residual multi-layer perceptron(MLP)module,and adds convolutional computation to the Transformer module so that the model still retains the ability to extract local fea-tures.Meanwhile,in order to further deploy the model to edge devices,this study achieves compression and optimization of the model based on knowledge distillation.The experimental results show that the accuracy of proposed method achieves 98.62%,97.61%and 98.40%on Oxford 17,Oxford 102 and homemade Flowers 3 2 datasets,respectively.The size of the lightweight model in this paper is about 1/18 of the original one after knowledge distillation,while the accuracy rate only decreases by about 2%.Therefore,this study can better improve the efficiency of flower fine-grained classification by edge equipment,which is of practical significance to promote the automation of flower cultivation.
关键词
深度学习/花卉图像分类/自注意力机制/知识蒸馏/迁移学习
Key words
deep learning/flower image classification/self-attention mechanism/knowledge distillation/transfer learning