Abstract:In order to solve the problem of the insufficient number of hyperspectral image samples due to the difficulty of artificial labeling, a small sample twin network algorithm combining attention and spatial neighborhood is proposed in this study. Firstly, the hyperspectral image is preprocessed by PCA to achieve data dimensionality reduction. Secondly, the training samples of the model are selected by means of interval sampling and edge sampling to effectively reduce redundant information. After that, the Siamese network combines the samples in the form of patches of different sizes and constructs the sample pairs for training as a training set, which not only realizes the effect of data enhancement but also fully extracts the spectral information of target pixels and the spatial information of its neighborhoods while extracting spectral information features. Finally, the attention module of spectral dimension and the similarity measurement module of spatial dimension are added to distribute the weight of spectral information and spatial neighborhood information respectively, so as to improve classification performance. The experimental results show that the proposed method achieves better experimental results compared with common methods on some public datasets.