Spatial-spectral combined hyperspectral image classification method based on deep learning

By introducing dual-branch multi-scale spatial spectrum feature fusion and self-attention mechanism into the hyperspectral image classification model, combined with dense dual-branch pyramid and channel-spatial attention module, the problem of insufficient feature extraction is solved and the classification accuracy is significantly improved.

CN118587482AActive Publication Date: 2024-09-03DALIAN NATIONALITIES UNIVERSITY

Patent Information

Application Number
CN202410640445.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-09-03
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

Hyperspectral image classification models have problems with feature loss and insufficient extraction capabilities during the feature extraction process, especially in the case of limited samples, resulting in low classification accuracy.

Method used

A hyperspectral image classification model based on deep learning-based dual-branch multi-scale spatial spectrum feature fusion and self-attention mechanism is used to reduce the correlation between bands through data preprocessing, and establish a dense dual-branch pyramid feature extraction module and channel-spatial attention. module, combined with the deep feature fusion strategy, extracts multi-scale spatial-spectral feature information.

Benefits of technology

It significantly improves the accuracy of hyperspectral image classification, alleviates the problems of feature loss and insufficient extraction capabilities, improves the model's ability to extract salient features, and improves classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587482A
    Figure CN118587482A
Patent Text Reader

Abstract

The invention provides a deep learning-based spatial-spectral combined hyperspectral image classification method. The method comprises the following steps of: performing data preprocessing on hyperspectral image data; establishing an original hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and an injection self-intention mechanism by using a convolutional neural network; based on the preprocessed hyperspectral image data, training the original hyperspectral image classification model to obtain a hyperspectral image classification model; and classifying the pixel categories of the whole hyperspectral image by using the hyperspectral image classification model. The invention provides a double-branch multi-scale spatial-spectral information feature fusion method capable of performing high-efficiency spatial-spectral joint feature extraction and spatial information extraction. A self-attention mechanism for enhancing the significant feature extraction capability of the model is provided; and a deep feature fusion strategy for enhancing the feature multiplexing capability is provided, and compared with the prior art, the classification precision can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hyperspectral image classification, and in particular relates to a spatial-spectral combined hyperspectral image classification method based on deep learning. Background Art

[0002] Hyperspectral remote sensing is a multi-dimensional information acquisition technology that integrates imaging technology and spectral technology. It detects the two-dimensional spatial information and one-dimensional spectral information of ground objects at the same time, thereby obtaining hyperspectral images with high spectral resolution and multiple bands. Hyperspectral images can reflect nearly continuous spectral characteristic curves of ground objects, contain rich spatial and spectral information, and are comprehensive carriers of multiple information. Hyperspectral image classification is the basis of various hyperspectral applications. Its main goal is to determine the pixels in the image, so as to realize the automatic recognition of ground object categories and provide services for other departments. From classical machine learning theories such as SVMs, KNN, etc. to deep neural networks, deep learning model frameworks represented by convolutional neural networks have been widely used in hyperspectral image classification and have achieved remarkable results. Compared with traditional methods, convolutional neural networks do not require manual features, but automatically obtain high-level features of data in the training set through the combination of continuous convolution blocks, so that the classification model can better express the characteristics of the data set itself, avoiding the process of manually designing features through expert prior knowledge, and greatly improving the classification accuracy.

[0003] Due to the special data characteristics of hyperspectral images, there are still the following challenges when using convolutional neural networks to build network models:

[0004] (1) The spectral dimension of hyperspectral data has hundreds of band values, and the information between bands is redundant, resulting in high data dimension and rich spectral information. However, when the number of available labeled samples is limited, this high-dimensionality of the data will bring about the curse of dimensionality problem (often also known as the Hughes phenomenon), that is, as the number of bands involved in the calculation increases, the classification accuracy first increases and then decreases.

[0005] (2) The high cost of HSI sample annotation leads to insufficient labeled samples, which causes the model to overfit and leads to poor generalization performance.

[0006] (3) Due to the effects of convolution kernels and pooling layers, as the network continues to deepen, it will cause unavoidable problems such as feature loss and insufficient feature extraction.

[0007] Generally speaking, as the network continues to deepen, the extracted features will gradually move from low-level features to high-level features. However, due to the objective conditions of the convolutional neural network, it will cause a certain degree of feature loss, as well as difficulties in model training and gradient disappearance. Researchers have tried to use different methods to build efficient and high-precision models, but while they have achieved certain results, there are also various defects. For example, a hyperspectral image classification method based on a twin network uses PCA to reduce the dimensionality of the original hyperspectral image, which will inevitably cause the loss of spatial spectrum information, resulting in low classification performance; a hyperspectral image classification method and system based on 3DUnet spectral-spatial information fusion, as the network depth continues to increase, the required training cost continues to increase, and due to the objective limitations of convolution and pooling, it leads to inevitable feature loss and information loss, and its classification performance also decreases accordingly; a hyperspectral image classification method combined with a spatial pyramid attention mechanism still uses PCA dimensionality reduction for the original hyperspectral image, resulting in inevitable information loss, and a large number of pooling layers are used in the model for feature fusion, but the pooling layer will lead to inevitable feature loss. At the same time, the model pays different attention to features during training, resulting in important features being ignored, so the classification effect is not satisfactory.

[0008] Traditional residual connections or dense connections are used to alleviate the problem of feature loss and insufficient feature extraction, but the effect is still poor. The reason is that the model pays different attention to features during training. In order to solve this problem, the attention mechanism has gradually become a hot application for hyperspectral image classification. Researchers have proposed some hyperspectral image classification models based on attention mechanisms, such as dense convolutional neural networks based on feedback attention and dual-branch multi-attention mechanism networks based on convolutional block attention modules. Although these methods have good results, they do not specifically solve the problem of feature loss and insufficient feature extraction. Especially in the case of limited samples, feature loss has a very large impact on the HIC effect and cannot obtain satisfactory classification results.

[0009] Based on this background, the present invention proposes a spatial-spectral joint hyperspectral image classification method based on deep learning. Summary of the invention

[0010] The purpose of the present invention is to propose a hyperspectral image classification model based on deep learning, dual-branch multi-scale spatial-spectral feature fusion and self-attention mechanism, in response to the problem of feature loss and insufficient feature extraction ability in the feature extraction process of the hyperspectral image classification model based on the traditional convolutional neural network. Compared with the existing technology, the classification accuracy can be significantly improved.

[0011] To achieve the above object, the present invention provides a spatial-spectral combined hyperspectral image classification method based on deep learning, comprising:

[0012] Perform data preprocessing on hyperspectral image data;

[0013] Using convolutional neural networks, a raw hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism is established;

[0014] Based on the preprocessed hyperspectral image data, the original hyperspectral image classification model is trained to obtain a hyperspectral image classification model;

[0015] The hyperspectral image classification model is used to classify the overall hyperspectral image pixel categories.

[0016] Optionally, preprocessing the hyperspectral image data includes:

[0017] The hyperspectral image data is converted into a compact representation by weighting with attention coefficients;

[0018] The image data converted into a compact representation is divided into several patches; each patch includes the spectral information of the pixel to be classified and the spatial information of the pixel within a preset distance around it.

[0019] Optionally, converting the hyperspectral image data into a compact representation weighted by an attention coefficient includes:

[0020] Get the Hellinger distance between bands in hyperspectral image data;

[0021] Based on the Hellinger distance, obtaining the attention coefficient of the band;

[0022] Convert the attention coefficient of the whole band into a column vector representation;

[0023] Convert the column vector representation into the compact representation.

[0024] Optionally, the Hellinger distance is:

[0025]

[0026] Among them, b i , b j They represent the i-th band and the j-th band of the original hyperspectral image, respectively, and b ik represents the kth pixel in the i-th band, n represents the total number of pixels in the original hyperspectral image, and H(i,j) represents b i , b j Hellinger distance between ;

[0027] The attention coefficient is:

[0028]

[0029] Among them, y i represents the attention coefficient of the i-th band, N represents the number of bands of the original hyperspectral image, m represents the m-th band, and H(i,m) represents the Hellinger distance between the i-th band and the m-th band;

[0030] The compact representation is:

[0031]

[0032] Where X represents the hyperspectral image data, represents element multiplication, ba is a column vector representation, ba=(y1,y2,…,y N ) T ,y N indicates, T indicates.

[0033] Optionally, the original hyperspectral image classification model includes: a dense dual-branch pyramid feature extraction module, a spatial feature extractor and a classifier;

[0034] The dense dual-branch pyramid feature extraction module is used to extract multi-scale spatial-spectral feature information of hyperspectral image data;

[0035] The spatial feature extractor is used to generate a final feature map according to the scale space-spectral feature information;

[0036] The classifier is used to classify the hyperspectral image pixel categories based on the final feature map.

[0037] Optionally, the dense dual-branch pyramid feature extraction module includes: a space-spectrum joint feature extraction branch and an inter-spectrum feature extraction branch;

[0038] The spatial-spectral joint feature extraction branch is used to extract spatial and inter-spectral feature information of the hyperspectral image data;

[0039] The inter-spectral feature extraction branch is used to extract spectral feature information of the hyperspectral image data;

[0040] The dense dual-branch pyramid feature extraction module performs channel-level fusion of spatial and inter-spectral feature information and spectral feature information to obtain the multi-scale spatial-spectral feature information.

[0041] Optionally, the spatial-spectral joint feature extraction branch includes densely connected 3D convolution blocks with convolution kernel sizes of 7×3×3, 5×3×3, and 3×3×3, respectively.

[0042] Optionally, the inter-spectral feature extraction branch includes densely connected 3D convolution blocks with convolution kernel sizes of 7×1×1, 5×1×1, and 3×1×1, respectively.

[0043] Optionally, the spatial feature extractor adopts a channel-spatial attention module;

[0044] The channel-spatial attention module includes: a channel attention module and a spatial attention module;

[0045] The channel attention module uses GAP aggregated convolution features and one-dimensional convolution for local cross-channel interaction, and then passes through the Sigmoid activation function to multiply the output feature map after the Sigmoid activation function with the input feature map to obtain the output feature map of the channel attention module, wherein the output feature map after the Sigmoid activation function refers to the feature map after the overall channel-spatial attention module, and the input feature map refers to the feature map of the original input into the channel-spatial attention module:

[0046] The spatial attention module takes the feature map output by the channel attention module as input, first performs channel-based global maximum pooling and global mean pooling, connects the respective outputs in the channel dimension, then performs a convolution operation, outputs the feature map after reducing the number of channels, and finally multiplies the feature map output after reducing the number of channels with the feature map input into the spatial attention module to generate the final feature map.

[0047] Optionally, in the process of constructing the spatial feature extractor, a deep feature fusion strategy is adopted;

[0048] The deep feature fusion strategy is: upsampling the high-level feature map generated by the overall spatial feature extractor to the same size as the input low-level feature map, and then performing channel-level fusion. The high-level feature map refers to the feature map generated after passing through the overall spatial feature extractor.

[0049] The present invention has the following beneficial effects:

[0050] In the data preprocessing stage, the hyperspectral image data is converted into a compact representation through weighted attention coefficients to suppress the correlation between bands and reduce information redundancy, so as to improve data utilization; a dual-branch multi-scale spatial-spectral information feature fusion model is established for efficient spatial-spectral joint feature extraction and spatial information extraction, which can greatly alleviate the problems of feature loss and insufficient feature extraction capability; a new channel-spatial attention mechanism is proposed to enhance the significant feature extraction capability of the model, which greatly improves the model's ability to extract significant features; a spatial information extraction module based on a deep feature fusion strategy is proposed, which fully enhances the feature reuse capability and alleviates the feature loss problem caused by model deepening. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0052] Figure 1 A schematic diagram of a spatial-spectral combined hyperspectral image classification method based on deep learning according to an embodiment of the present invention;

[0053] Figure 2 A model block diagram of hyperspectral image classification based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism according to an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of a dense dual-branch pyramid feature extraction module according to an embodiment of the present invention;

[0055] Figure 4 Schematic diagram of a channel-spatial attention module according to an embodiment of the present invention;

[0056] Figure 5 This is a pseudo-color schematic diagram of the Indian Pines dataset according to an embodiment of the present invention;

[0057] Figure 6 This is a schematic diagram of real object labels of the Indian Pines dataset according to an embodiment of the present invention;

[0058] Figure 7 Schematic diagrams of classification effects drawn for different classification methods of the embodiments of the present invention; among them, (a) is SVM, (b) is SSRN, (c) is A2S2K-ResNet, (d) is HyBridSN, (e) is SSDGL, (f) is RSSGL, (g) is LANet, and (h) is the classification model proposed in this embodiment. DETAILED DESCRIPTION

[0059] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0060] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0061] like Figure 1 As shown, this embodiment proposes a spatial-spectral combined hyperspectral image classification method based on deep learning, including:

[0062] Perform data preprocessing on hyperspectral image data;

[0063] Using convolutional neural networks, a raw hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism is established;

[0064] Based on the preprocessed hyperspectral image data, the original hyperspectral image classification model is trained to obtain a hyperspectral image classification model;

[0065] The hyperspectral image classification model is used to classify the overall hyperspectral image pixel categories.

[0066] Furthermore, data preprocessing of the hyperspectral image data includes:

[0067] The hyperspectral image data is converted into a compact representation by weighting with attention coefficients;

[0068] The image data converted into a compact representation is divided into several patches, wherein each patch includes the spectral information of the pixel to be classified and also contains the spatial information of the pixel within a preset distance around it.

[0069] Furthermore, the hyperspectral image data is converted into a compact representation by weighting the attention coefficients, including:

[0070] Get the Hellinger distance between bands in hyperspectral image data;

[0071] Based on the Hellinger distance, obtain the attention coefficient of the band;

[0072] Convert the attention coefficient of the entire band into a column vector representation;

[0073] Convert column vector representation into compact representation.

[0074] Specifically, in this embodiment, the hyperspectral image data is preprocessed, that is, the information redundancy caused by the strong correlation between the original hyperspectral data bands is reduced, and the hyperspectral image is processed into a size suitable for model operation, including: full-band attention module, segmentation of hyperspectral three-dimensional data blocks, etc. The preprocessed data is then divided into training set data and validation set data.

[0075] The spatial size of the original hyperspectral data cube is W×H, and the number of spectral bands is B, which can be expressed as C W×H×B , use the full-band attention module to reduce the redundant information caused by the high similarity between bands. After the attention module, the hyperspectral image can be recorded as U W×H×B , will U W×H×BThe image is divided into S patches of size c, where M is the predefined neighborhood size. The patch category is determined by the category of the central pixel. The patch contains not only the spectral information of the pixel to be classified, but also the spatial information of the pixel within a certain distance around it. Each patch can be represented as P M×M×B , the model will P M×M×B As input;

[0076] In order to solve the problem of information redundancy caused by strong correlation between bands and alleviate the negative impact of redundant information on the training process, this embodiment proposes a full-band attention module. The idea is to measure the similarity between bands by calculating the Hellinger distance between bands. Hellinger distance is a statistical distance metric used to measure the difference between two probability distributions. The attention coefficient is inferred based on the similarity. The attention coefficient reflects the similarity of each band relative to other bands. By introducing these attention coefficients, the original hyperspectral image data is weighted, emphasizing the bands with lower similarity and suppressing the bands with higher phase velocities, thereby achieving the suppression of strong correlation between bands. In other words, this embodiment converts the original hyperspectral image data into a compact representation by weighting the attention coefficient. This compact representation helps to reduce information redundancy and improve data utilization efficiency. At the same time, it is easier to capture the important features of the original hyperspectral image data during the training process.

[0077] Assume b i , b j are the i-th band and the j-th band of the original hyperspectral image, and the Hellinger distance between them is expressed as H(i,j), which is given by formula (1):

[0078]

[0079] Among them, b ik represents the kth pixel in the ith band, b jk represents the kth pixel in the jth band, and n represents the total number of pixels in the original hyperspectral image. The attention coefficient of the i-th band is expressed as y i , calculated by formula (2):

[0080]

[0081] Where N represents the number of bands of the original hyperspectral image. In this embodiment, the output full-band attention coefficient is represented by a column vector ba=(y1,y2,…,y N ) T The original hyperspectral image data is recorded as X, and its i-th band is X i , X is denoted as X={X1,X2,…,X N}, which is transformed into a compact representation through formula (3).

[0082]

[0083] in, Represents element-wise multiplication.

[0084] Further, the original hyperspectral image classification model includes: a dense dual-branch pyramid feature extraction module, a spatial feature extractor, and a classifier;

[0085] Dense dual-branch pyramid feature extraction module, used to extract multi-scale spatial-spectral feature information of hyperspectral image data;

[0086] A spatial feature extractor is used to generate the final feature map according to the scale space-spectral feature information;

[0087] The classifier is used to classify the pixel categories of the hyperspectral image based on the final feature map.

[0088] Further, the dense dual-branch pyramid feature extraction module includes: a space-spectrum joint feature extraction branch and an inter-spectrum feature extraction branch;

[0089] The spatial-spectral joint feature extraction branch is used to extract the spatial and spectral feature information of hyperspectral image data;

[0090] The inter-spectral feature extraction branch is used to extract the spectral feature information of the hyperspectral image data;

[0091] The dense dual-branch pyramid feature extraction module fuses the spatial and inter-spectral feature information and the spectral feature information at the channel level to obtain multi-scale spatial-spectral feature information.

[0092] Specifically, in this embodiment, a convolutional neural network is used as the basic component of the model to establish a hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism. Figure 2 shown.

[0093] The hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism includes: dense dual-branch pyramid feature extraction module, such as Figure 3 As shown in Fig. 1, it includes a spatial-spectral joint feature extraction branch and an inter-spectral feature extraction branch. The spatial-spectral joint feature extraction branch is used to extract the spatial and inter-spectral information of the input hyperspectral data block. It is composed of 3D convolution blocks as basic components. Combined with dense connection technology, as shown in formula (4), 3D convolution blocks with convolution kernel sizes of 7×3×3, 5×3×3, and 3×3×3 are used to extract multi-scale spatial-spectral information. The detailed architecture is shown in Table 1. Among them, the use of dense connection alleviates the gradient vanishing problem, strengthens feature propagation, and greatly enhances feature reuse;

[0094] x i=f([x0,x1,…,x i-1 ]) (4)

[0095] In formula (4), x i represents the output of the i-th layer. The i-th layer receives the feature map [x0, x1, ..., x i-1 ], f(·) is defined as a composite function of three consecutive operations: batch normalization (BN), LeakyReLU, and 3D convolution.

[0096] Table 1. Branch architecture of space-spectrum joint feature extraction

[0097]

[0098] The inter-spectral feature extraction branch is also composed of 3D convolution blocks of sizes 7×1×1, 5×1×1, and 3×1×1 combined with dense connection technology, as shown in Table 2. Since the size of the feature map output by each layer is different, the feature map output by each layer is subjected to maximum pooling to adapt to the size of the densely connected feature map. In the process of spatial-spectral joint feature extraction, the dense dual-branch pyramid feature extraction module uses dense pyramid convolution to extract multi-scale spatial-spectral feature information in the sample; in the spectral branch, the dense pyramid convolution layer is used to extract spectral features, and then the high-level feature maps generated by the two branches are fused at the channel level. After the feature map is generated, Reshape is used to adjust the dimension of the feature map, and then it is fed to the subsequent spatial feature extractor.

[0099] Table 2 Branch architecture of inter-spectral feature extraction

[0100]

[0101] Furthermore, the spatial feature extractor adopts a channel-spatial attention module;

[0102] The channel-spatial attention module includes: a channel attention module and a spatial attention module;

[0103] The channel attention module uses GAP aggregated convolution features and one-dimensional convolution for local cross-channel interaction, and then passes through the SigMoid activation function. The output feature map after the Sigmoid activation function is multiplied by the input feature map to obtain the output feature map of the channel attention module. Among them, the output feature map after the Sigmoid activation function refers to the feature map after the overall channel-spatial attention module, and the input feature map refers to the feature map of the original input into the channel-spatial attention module:

[0104] The spatial attention module takes the feature map output by the channel attention module as input, first performs channel-based global maximum pooling and global mean pooling, connects their outputs in the channel dimension, then performs a convolution operation, outputs the feature map after reducing the number of channels, and finally multiplies the feature map output after reducing the number of channels with the feature map input into the spatial attention module to generate the final feature map.

[0105] The above spatial feature extractor is composed of three 2D convolution blocks as basic components, and the detailed settings are shown in Table 3. The convolution kernel sizes are 7×7, 5×5, and 3×3. In the process of building the spatial feature extractor, in order to increase the model's ability to extract significant features, a new channel-spatial attention module is used, such as Figure 4 As shown in the figure, the channel-spatial attention module abandons the process of reducing the dimension of the feature map by the traditional attention mechanism, and designs the attention mechanism through local cross-channel interaction. The channel-spatial attention module consists of two independent sub-modules, namely the channel attention module and the spatial attention module. The channel attention module uses GAP to aggregate convolution features and one-dimensional convolution to achieve local cross-channel interaction. The convolution kernel size is set to 3, and then passes through the SigMoid activation function. Finally, the output feature map is multiplied by the input feature map to obtain the output feature map of the channel attention module. Among them, the output feature map specifically refers to the feature map after the overall channel-spatial attention module, and the input feature map refers to the feature map of the original input into the channel-spatial attention module. In the spatial attention module, the feature map generated by the channel attention module is used as the input feature map of the spatial attention module. First, the global maximum pooling and global mean pooling based on the channel are performed, and the respective outputs are connected in the channel dimension. Then a convolution operation is performed. The convolution kernel size is 7×7, and the number of channels is reduced to 1. Finally, the output feature map is multiplied by the input feature map to generate the final feature map. The output feature map refers to the feature map after the convolution reduces the number of channels, and the input feature map refers to the output feature map of the channel attention module, that is, the feature map input into the spatial attention module, as shown in equations (5) and (6).

[0106] M C (F) = σ(C1D3(GAP(F)))·F (5)

[0107] In formula (5), F is the input feature map, σ(·) is the activation function Sigmoid function, C1D3 is a one-dimensional convolution block with a convolution kernel size of 3, and GAP is global average pooling.

[0108] M S (F′)=σ(C2D 7×7 ([GAP(F′);GMP(F′)]))·F′ (6)

[0109] In formula (6), F' is the input feature map, GMP(·) is the global maximum pooling, C2D 7×7 It is a 2D convolution block with a convolution kernel size of 7×7.

[0110] In the process of constructing the model spatial feature extractor, a deep feature fusion strategy is adopted to upsample the high-level feature map generated by the overall spatial feature extractor to the same size as the input low-level feature map, and then perform channel-level fusion. The high-level feature map refers to the feature map generated after passing through the overall spatial feature extractor, specifically, the feature map generated by the three-layer 2D convolution block of the fused channel-spatial attention module and the corresponding batch normalization layer (BN) and linear rectifier unit (ReLU); the low-level feature map refers to the input feature map of the spatial feature extractor.

[0111] Specifically, the high-level feature map generated by the spatial feature extractor is upsampled to the same size as the input low-level feature map, and then channel-level fusion is performed, which greatly alleviates the feature loss caused by convolution. Specifically: In the process of building the above-mentioned spatial feature extractor, the extracted high-level feature map is deconvolved to expand its size to the same size as the input low-level feature map, and then channel-level connection is performed, that is, the upsampled high-level feature map is fused with the low-level feature map. This fusion process not only makes full use of the rich semantic information of the high-level feature map, but also combines the fine-grained features of the low-level feature map, thereby constructing a more comprehensive and refined feature expression.

[0112] Table 3 Spatial feature extractor architecture

[0113]

[0114]

[0115] This embodiment uses two fully connected layers and the Softmax classification loss function to build a classifier, where the number of parameters in the first fully connected layer is up to 1568, and the number of nodes in the last fully connected layer is consistent with the number of categories in the corresponding given data set, which is 16. In addition, in order to effectively deal with the overfitting of the model caused by many model parameters and few training samples, Dropout is used to achieve a regularization effect to a certain extent to alleviate the occurrence of overfitting; ReLU is selected as the nonlinear activation function; and a BN layer is added after each layer of convolution to make training easier and accelerate convergence.

[0116] Use the training set data to train the model to obtain a trained model.

[0117] The computing environment of the embodiment of the present invention is an Intel Core i7-13700KF processor and an NVIDIA GeForceRTX 4090 graphics card. The programming language used is Python. The classification network is built using PyTorch, PyCharm is used as the compiler, the batch size is set to 32, Adam is used as the optimizer, and the learning rate is set to 0.001.

[0118] S4. Use the validation set to evaluate the model performance, automatically determine the overall hyperspectral image pixel category, and complete the classification task.

[0119] Preferably, the model is finally evaluated using the validation set data, and the classification performance of the model is evaluated using performance evaluation indicators. The performance evaluation indicators mainly include the overall classification accuracy (OA, Overall Accuracy) as shown in formula (7), the average accuracy (AA, Average Accuracy) as shown in formula (8) and the Kappa coefficient as shown in formula (9), where OA calculates the ratio of correctly classified samples to all samples in the test set, AA is used to determine the average classification accuracy of all categories, and it can well evaluate the classification results of classes with fewer training samples. The Kappa coefficient calculated based on the confusion matrix indicates the degree of consistency between the classification labels obtained by the classification model and the ground truth labels.

[0120]

[0121]

[0122]

[0123]

[0124] In order to illustrate the effectiveness of this embodiment, the following experimental example is disclosed:

[0125] First, the hyperspectral dataset used in the experiment is: Indian Pines dataset, such as Figure 5 and Figure 6 As shown, the scene was collected by the Airborne Visible / Infrared Imaging Spectrometer (AVIRIS) at the IP test site in northwestern India. It contains 145×145 pixels, 224 spectral bands, and a wavelength range of 0.4 to 2.5μm. Due to water absorption and damage, 24 of the spectral bands have been removed. The reference ground objects are designed as 16 vegetation categories, not all of which are mutually exclusive (i.e., there are spectral mixing, different objects with the same spectrum, and different spectra with the same object), and the sample sizes of some categories are highly unbalanced. The spatial resolution of the dataset is about 20 meters per pixel.

[0126] As shown in Table 4, the OA of the hyperspectral image classification model proposed in the embodiment of the present invention is 99.76%, which is 6.91%, 5.41%, 7.58%, 2.92%, 3.39% and 4.36% higher than the OA of other deep learning-based methods, respectively, showing very excellent classification performance. In addition, the classification accuracy of each category exceeds 98%, which is better than other deep learning-based classification models, such as Figure 7 As shown, Figure 7 (a) is SVM, Figure 7 (b) is SSRN, Figure 7 (c) is A2S2K-ResNet, Figure 7 (d) is HyBridSN, Figure 7 (e) is SSDGL, Figure 7 (f) is RSSGL, Figure 7 (g) A classification model is proposed for this embodiment.

[0127] Table 4 Classification accuracy of different methods on the dataset

[0128]

[0129]

[0130] Therefore, this embodiment proposes a high-precision dual-branch multi-scale feature aggregation and self-attention mechanism hyperspectral image classification model. The model uses dense dual-branch pyramid connection to achieve efficient extraction of spatial-spectral joint feature information and inter-spectral feature information, greatly reducing feature loss and enhancing the model's context information extraction capability; proposes a channel-spatial attention module ECBAM, which greatly improves the model's ability to extract significant features; proposes a spatial information extraction module based on a deep feature fusion strategy, fully enhancing the feature reuse capability and alleviating the feature loss problem caused by model deepening.

[0131] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A spatial-spectral combined hyperspectral image classification method based on deep learning, characterized in that: include: Perform data preprocessing on hyperspectral image data; Using convolutional neural networks, a raw hyperspectral image classification model based on dual-branch multi-scale spatial-spectral feature fusion and attention mechanism is established; Based on the preprocessed hyperspectral image data, the original hyperspectral image classification model is trained to obtain a hyperspectral image classification model; The hyperspectral image classification model is used to classify the overall hyperspectral image pixel categories.

2. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 1 is characterized in that: Data preprocessing of hyperspectral image data includes: The hyperspectral image data is converted into a compact representation by weighting with attention coefficients; The image data converted into a compact representation is divided into several patches; each patch includes the spectral information of the pixel to be classified and the spatial information of the pixel within a preset distance around it.

3. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 2 is characterized in that: The hyperspectral image data is converted into a compact representation by weighting with attention coefficients including: Get the Hellinger distance between bands in hyperspectral image data; Based on the Hellinger distance, obtaining the attention coefficient of the band; Convert the attention coefficient of the whole band into a column vector representation; Convert the column vector representation into the compact representation.

4. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 3 is characterized in that: The Hellinger distance is: Among them, b i , b j They represent the i-th band and the j-th band of the original hyperspectral image, respectively, and b ik represents the kth pixel in the i-th band, n represents the total number of pixels in the original hyperspectral image, and H(i,j) represents b i , b j Hellinger distance between ; The attention coefficient is: Among them, y i represents the attention coefficient of the i-th band, N represents the number of bands of the original hyperspectral image, m represents the m-th band, and H(i,m) represents the Hellinger distance between the i-th band and the m-th band; The compact representation is: Where X represents the hyperspectral image data, represents element multiplication, ba is a column vector representation, ba=(y1,y2,…,y N ) T ,y N represents the attention coefficient of the Nth band, and T represents the transpose of the matrix.

5. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 1 is characterized in that: The original hyperspectral image classification model includes: a dense double-branch pyramid feature extraction module, a spatial feature extractor and a classifier; The dense dual-branch pyramid feature extraction module is used to extract multi-scale spatial-spectral feature information of hyperspectral image data; The spatial feature extractor is used to generate a final feature map according to the scale space-spectral feature information; The classifier is used to classify the hyperspectral image pixel categories based on the final feature map.

6. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 5 is characterized in that: The dense dual-branch pyramid feature extraction module includes: a space-spectrum joint feature extraction branch and an inter-spectrum feature extraction branch; The spatial-spectral joint feature extraction branch is used to extract spatial and inter-spectral feature information of the hyperspectral image data; The inter-spectral feature extraction branch is used to extract spectral feature information of the hyperspectral image data; The dense dual-branch pyramid feature extraction module performs channel-level fusion of spatial and inter-spectral feature information and spectral feature information to obtain the multi-scale spatial-spectral feature information.

7. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 6 is characterized in that: The spatial-spectral joint feature extraction branch includes densely connected 3D convolution blocks with convolution kernel sizes of 7×3×3, 5×3×3, and 3×3×3, respectively.

8. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 6 is characterized in that: The inter-spectral feature extraction branch includes densely connected 3D convolution blocks with convolution kernel sizes of 7×1×1, 5×1×1, and 3×1×1, respectively.

9. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 5 is characterized in that: The spatial feature extractor adopts a channel-spatial attention module; The channel-spatial attention module includes: a channel attention module and a spatial attention module; The channel attention module uses GAP aggregated convolution features and one-dimensional convolution for local cross-channel interaction, and then passes through the Sigmoid activation function to multiply the output feature map after the Sigmoid activation function with the input feature map to obtain the output feature map of the channel attention module, wherein the output feature map after the Sigmoid activation function refers to the feature map after the overall channel-spatial attention module, and the input feature map refers to the feature map of the original input into the channel-spatial attention module: The spatial attention module takes the feature map output by the channel attention module as input, first performs channel-based global maximum pooling and global mean pooling, connects the respective outputs in the channel dimension, then performs a convolution operation, outputs the feature map after reducing the number of channels, and finally multiplies the feature map output after reducing the number of channels with the feature map input into the spatial attention module to generate the final feature map.

10. The spatial-spectral combined hyperspectral image classification method based on deep learning according to claim 9, characterized in that: In the process of constructing the spatial feature extractor, a deep feature fusion strategy is adopted; The deep feature fusion strategy is: upsampling the high-level feature map generated by the overall spatial feature extractor to the same size as the input low-level feature map, and then performing channel-level fusion. The high-level feature map refers to the feature map generated after passing through the overall spatial feature extractor.

Citation Information

Patent Citations

  • Monte carlo characteristics dimension reduction method for small-sample hyperspectral image

    CN102663438A

  • Hyperspectral image classification method based on depth feature cross fusion

    CN111191736A

  • Hyperspectral image classification method based on deep learning space-spectrum joint network

    CN111914907A

  • Hyperspectral image classification method and system based on double-branch multi-attention convolutional neural network

    CN113159189A

  • Systems and methods for polygon object annotation and a method of training an object annotation system

    US20190294970A1

Cited By

  • Hyperspectral image segmentation method based on spectrum-spatial feature combination

    CN119296102A

  • A hyperspectral image segmentation method based on combined spectral and spatial features

    CN119296102B

  • Remote sensing image classification method and system and storage medium

    CN119625442A

  • Signal unmixing and multi-task learning fused fresh corn quality detection method

    CN120489982A

  • A fresh corn quality detection method fusing signal unmixing and multi-task learning

    CN120489982B