In recent years, the method of plant leaf classification by deep learning has gradually become mature. However, training a leaf classifier based on deep learning requires a large number of samples for supervised training. In this paper, a few-shot learning method based on the Siamese network framework is proposed to solve a leaf classification problem with a small sample size. First, 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. In addition, a spatial structure optimizer (SSO) method for constructing the metric space is proposed, which will help to improve the accuracy of leaf classification. Finally, a k-nearest neighbor (kNN) classifier is used to classify leaves in the learned metric space. The average classification accuracy is used as a performance measure. The open access Flavia, Swedish and Leafsnap datasets are used to evaluate the performance of the method. The experimental results show that the proposed method can achieve a high classification accuracy with a small size of supervised samples.