| In recent years,with the rapid development of hyperspectral imaging technology,hyperspectral images have been applied in agriculture,medicine,military and other fields.However,hyperspectral imaging will be affected by internal or external environmental factors of hyperspectral instrument,resulting in band redundancy and resulting in band redundancy and the phenomenon of “same object different spectrum and same spectrum foreign body”.In addition,hyperspectral image labeling is difficult and the number of labeled data samples is limited,which also brings challenges to hyperspectral image classification.This paper carries out research on the above problems,and the main work is as follows:(1)Most of the public hyperspectral data sets are related to the application of ground object separation at present.In this paper,the hyperspectral data about cucumber and tomato diseases and insect pests are collected by using hyperspectral imager in vegetable experimental base,and these data are preprocessed and labeled to construct a hyperspectral dataset of vegetable diseases and insect pests.(2)In order to make full use of spectral and spatial information of hyperspectral images,a dual-branch network structure is proposed to extract spectral and spatial features for hyperspectral image classification.The algorithm is mainly composed of spectral spatial branch and spatial branch.The spectral spatial branch uses two-dimensional convolution and channel attention are used to extract spectral spatial features.The spatial branch is to use the spectral block using spatial attention and Transformer to extract a variety of different spatial features from the spectral block to supplement the features in the spectral spatial branch.(3)A small sample classification algorithm based on twin networks is studied.The annotation of hyperspectral image data is difficult,and it is difficult to obtain a large amount of data training deep neural network.In order to solve this problem,this paper proposes a small sample hyperspectral image classification algorithm based on twin network.Firstly,a new training sample pair is constructed from the original data.Then,multi-scale spectral and spatial features are extracted from spectral blocks by convolution block and spectral self-attention,and deep spectral spatial features are extracted by convolution block and mixed space spectral self-attention.Different from other twin networks,this paper uses cross entropy loss and contrast loss to combine learning,so that the extracted features have the characteristics of “large distance between classes and small distance within classes”.For the above two algorithms,this paper designs multiple sets of contrast experiments and ablation experiments on two types of hyperspectral image datasets to verify the effectiveness and practicability of the algorithm.Experiments are carried out on three public hyperspectral datasets of ground object separation types,and the experimental results show that the proposed algorithm has good performance.In order to verify the applicability of the proposed algorithm in the agricultural field,experiments are carried out on the dataset of vegetable diseases and insect pests collected from the vegetable experimental base,and good results are obtained.Compared with other algorithms,the algorithm proposed in this paper has good performance in terms of accuracy and time efficiency,and can quickly and accurately identify pest areas from hyperspectral images,which is conducive to the realization of precision agriculture. |