Few-shot cotton leaf spots disease classification based on metric learning
Abstract Background: Cotton diceases seriously affect the yield and quality of cotton. The type of pest or disease suffered by cotton can be determined by the disease spots on the cotton leaves. This paper presents a small-sample learning framework that can be used for cotton leaf disease spot classification task, which using deep learning techniques is constructed based on a metric learning approach, to prevent and control cotton diseases timely. First, disease spots on cotton leaf's disease images are segmented by different methods, compared by using support vector machine (SVM) method and threshold segmentation, and discussed the suitable one. With segmented disease spot images as input, a disease spot dataset is established, and the cotton leaf disease spots were classified using a classical convolutional neural network classifier, the structure and framework of convolutional neural network had been designed, and the setting of relevant parameters and the detailed network structure configuration are analyzed according to the experimental environment. The features of two different images are extracted by a parallel two-way convolutional neural network with weight sharing. Then, the network uses a loss function to learn the metric space, in which similar leaf samples are close to each other and different leaf samples are far away from each other. Results: To achieve the classification of cotton leaf spots by small sample learning, this paper constructs a metric-based learning method to extract cotton leaf spot features and classify the leaves. In the process of leaf spot extraction, image segmentation of the spots is performed by threshold segmentation and SVM, and comparative analysis is performed. In the process of leaf spot classification, the structural framework of leaf spot feature extractor and feature classifier is constructed, and the overall framework is built using the idea of two-way parallel convolutional neural network. A variety of excellent convolutional neural network feature extractors such as Vgg, DesenNet, and ResNet were used for feature extraction work, and a combination design based on the small sample classification framework was performed and compared. Experimentally, it is demonstrated that the classification accuracy is improved by nearly 7.7% on average for different number of samples in the case of using this optimizer. S-DesneNet have the highest accuracy. When n is 5, 10, 15 and 20, the accuracy is 58.63%, 84.41% ,92.51% and 91.75%, respectively, and the average accuracy is improved by nearly 7.7% compared with DenseNet. Conclusions: To solve the problem of classification accuracy degradation due to small number of samples in small sample training tasks, a spatial structure optimizer (SSO) acting on the training process is proposed for this purpose.