| In the study of botany,flower classification is a very basic but necessary work.Due to the wide variety of flowers and the high similarity between many flowers,it puts forward high requirements for the professionalism of classification personnel.Therefore,it is an inevitable trend to automatically complete flower image classification through computer technology.At present,the field of image recognition mainly uses convolutional neural network to classify,but because the training process of convolutional neural network model needs a lot of training data as support,when the amount of training data is insufficient,the model is easy to appear the phenomenon of over-fitting,resulting in poor classification effect of the model.In order to solve the problem of over-fitting when training small sample data sets,this paper proposed a measurement model based on migration learning and KNN algorithm.The model was composed of feature extraction network and KNN classifier.The feature extraction network was responsible for training a feature mapping function,through which the input image data was mapped to feature vectors in high-dimensional space.KNN classifiers completed classification by comparing the similarity between high-dimensional spatial feature vectors.Compared with the deep neural network,the advantages of this model lied in:(1)The method of transfer learning was used to pre-train the model parameters,instead of the method of random initialization parameters.The model after pre-training by transfer learning converged faster and reduced the dependence of the model on training data.(2)The KNN classification algorithm without parameters replaced the full connection layer of the neural network for classification.KNN classification algorithm was classified by measuring the similarity between samples.The classification process did not require parameter training,so it can further reduce the dependence of the model on the amount of training data and reduce the probability of occurrence of over-fitting.After verification,the classification accuracy of this model on the small sample flower data set was 73.52%,which exceeds 58.47% of the prototype network and 73.14% of the MAML.In order to further improve the classification accuracy of the model,this paper improved the KNN classification algorithm from two aspects.One was to improve the voting mechanism of the KNN algorithm.Distance weighted voting mechanism was used to replace the fair voting mechanism.The accuracy of the improved model was 77.74%;The second was to improve the similarity measurement method of KNN algorithm,using neural network measurement function instead of Euclidean distance to measure sample similarity.The classification accuracy of the improved model was 79.27%. |