Hyperspectral image classification method, device and equipment based on dense graph attention neural network

Through the method of dense graph attention neural network, the graph subnet, spectral subnet and spatial subnet are used to extract features and the parallel attention module fusion is solved, and the problem of insufficient feature extraction in hyperspectral image classification is improved, and classification accuracy is improved.

CN120526207APending Publication Date: 2025-08-22PENG CHENG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510605175.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

Inadequate feature extraction and unreasonable feature utilization in the existing hyperspectral image classification methods lead to limited classification accuracy, especially in class boundary areas that are prone to misclassification.

Method used

The method based on dense graph attention neural network is adopted, and topological relationship attention features, spectral attention features and spatial attention features are extracted through graph subnets, spectral attention features and spatial attention features, and fusion is carried out through parallel attention modules to obtain classification features.

Benefits of technology

Fully explore the spectral features, spatial features and topological relationship features in hyperspectral images, improve classification accuracy and improve classification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526207A_ABST
    Figure CN120526207A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral image classification method, device and equipment based on a dense image attention neural network, and relates to the technical field of hyperspectral image classification, and the method comprises the steps: inputting a hyperspectral image into the dense image attention neural network for feature extraction, and obtaining a topological relation attention feature, a spectral attention feature and a spatial attention feature; connecting the spectral attention characteristics with the spatial attention characteristics to obtain spectral spatial attention characteristics; fusing the topological relation attention features and the spectral space attention features to obtain classification features; and determining a classification result of the hyperspectral image based on the classification features. Through the above mode, spectral features, spatial features and topological relation features in the hyperspectral image are fully mined by using the dense graph attention neural network, different types of features in the hyperspectral image can be fully extracted, and the different types of features are effectively fused, so that reasonable application of the features is ensured, and the accuracy of the hyperspectral image is improved. Therefore, the hyperspectral image classification precision is improved, and the classification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hyperspectral image classification, and in particular to a hyperspectral image classification method, apparatus, and device based on a dense graph attention neural network. Background Art

[0002] In the field of hyperspectral image classification, commonly used methods mainly include pattern recognition methods, methods based on convolutional neural networks (CNNs), and methods based on graph convolutional neural networks (GCNs).

[0003] Pattern recognition methods primarily rely on hand-crafted features and traditional machine learning algorithms for classification. However, these methods have limited ability to extract hand-crafted features, making it difficult to automatically learn deep, discriminative features. They also fail to fully utilize the complex spectral and spatial information in hyperspectral images, resulting in limited classification performance and prone to misclassification in class boundary regions. CNN-based methods utilize convolutional neural networks to automatically learn feature representations. However, these methods typically perform convolution based on regular square regions, making it difficult to capture geometric variations across different object regions and effectively handling the complex and diverse shapes and distributions of objects in hyperspectral images. Furthermore, during feature extraction, each convolution kernel applies the same weight to all image patches, resulting in the loss of important information in complex situations such as class boundary regions, a failure to highlight key features, and poor classification accuracy. GCN-based methods utilize graph convolution operations to process hyperspectral images. These methods treat image pixels as graph vertices and represent vertex relationships using an adjacency matrix. These methods extract and utilize topological relationships between samples through graph convolution operations. However, when processing hyperspectral images, these methods use the same weight for each vertex, failing to consider the differences in the contributions of different vertices to the classification. This inability to effectively highlight important vertex features limits their classification performance.

[0004] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a hyperspectral image classification method, device and equipment based on dense graph attention neural network, aiming to solve the technical problems in the existing technology of insufficient feature extraction and unreasonable feature utilization of traditional classification methods, which affect the classification accuracy.

[0006] To achieve the above objectives, the present application provides a hyperspectral image classification method based on a dense graph attention neural network, the method comprising:

[0007] The hyperspectral image is input into the dense graph attention neural network for feature extraction, and topological attention features, spectral attention features and spatial attention features are obtained.

[0008] Connect the spectral attention feature and the spatial attention feature to obtain the spectral spatial attention feature;

[0009] fusing the topological relationship attention feature with the spectral space attention feature to obtain a classification feature;

[0010] Based on the classification features, a classification result of the hyperspectral image is determined.

[0011] In one embodiment, the dense graph attention neural network includes at least a graph subnetwork, a spectral subnetwork, and a spatial subnetwork. The step of inputting a hyperspectral image into the dense graph attention neural network for feature extraction to obtain topological attention features, spectral attention features, and spatial attention features includes:

[0012] Inputting the hyperspectral image into the graph sub-network to obtain the topological relationship attention feature;

[0013] Inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature;

[0014] The hyperspectral image is input into the spatial sub-network to obtain the spatial attention feature.

[0015] In one embodiment, the step of inputting the hyperspectral image into the graph sub-network to obtain the topological attention feature includes:

[0016] Obtaining a corresponding adjacency graph based on an adjacency matrix of the hyperspectral image and a graph node corresponding to each pixel in the hyperspectral image;

[0017] Dividing the adjacency graph into multiple adjacency subgraphs, and performing dense graph convolution on each of the adjacency subgraphs to obtain output features of the adjacency subgraphs;

[0018] Determining graph features based on the output features of the adjacent subgraph, and using the graph features as vertex features;

[0019] Based on the vertex features and the normalized attention coefficients of the vertex features, topological attention features of the hyperspectral image are determined.

[0020] In one embodiment, the step of determining the topological attention features of the hyperspectral image based on the vertex features and the normalized attention coefficients of the vertex features includes:

[0021] Get the correspondence between vertex features, weight matrix and normalized attention coefficient;

[0022] Determining a normalized attention coefficient of the vertex feature based on the vertex feature, the weight matrix, and the corresponding relationship;

[0023] Determining a graph attention feature based on the vertex feature and a normalized attention coefficient of the vertex feature;

[0024] The graph attention features are concatenated to obtain the topological relationship attention features.

[0025] In one embodiment, the step of inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature includes:

[0026] Performing three-dimensional convolution processing on the hyperspectral image to obtain spectral features;

[0027] Refining the spectral feature based on the spectral attention value to obtain an initial spectral attention feature;

[0028] Pooling is performed on the initial spectral attention features to obtain spectral attention features of the hyperspectral image.

[0029] In one embodiment, the step of inputting the hyperspectral image into the spatial sub-network to obtain the spatial attention feature includes:

[0030] Extracting spatial features from the hyperspectral image and dividing the normalized spatial features into a plurality of subspace features;

[0031] Determining a subspace attention feature corresponding to the subspace feature, and aggregating the subspace attention feature to obtain an aggregated enhanced feature;

[0032] Performing a residual connection between the aggregated enhanced feature and the spatial feature to obtain an enhanced spatial feature;

[0033] Inputting the enhanced spatial features into a multi-layer perceptron for processing to obtain initial spatial attention features;

[0034] Pooling is performed on the initial spatial attention features to obtain spatial attention features of the hyperspectral image.

[0035] In one embodiment, the step of determining the subspace attention feature corresponding to the subspace feature includes:

[0036] Performing multi-layer three-dimensional convolution processing on the subspace features to obtain new subspace features, wherein the new subspace features include a first subspace feature, a second subspace feature, and a third subspace feature;

[0037] Calculating an influence weight based on the first subspace feature and the second subspace feature;

[0038] The subspace attention feature is obtained based on the third subspace feature and the influence weight.

[0039] In one embodiment, the step of fusing the topological relationship attention feature with the spectral space attention feature to obtain a classification feature includes:

[0040] Based on a first preset convolution kernel, convolution processing is performed on the topological relationship attention feature and the spectral spatial attention feature to obtain a deep topological relationship attention feature and a deep spectral spatial attention feature;

[0041] Transpose and multiply the deep topological relational attention feature and the deep spectral spatial attention feature to obtain a parallel attention mapping feature;

[0042] Based on a second preset convolution kernel, convolution processing is performed on the topological relationship attention feature to obtain a new topological relationship attention feature;

[0043] Multiplying the new topological relationship attention feature by the parallel attention mapping feature to obtain a parallel attention feature;

[0044] The parallel attention feature, the topological relationship attention feature and the spectral space attention feature are spliced ​​to obtain the classification feature.

[0045] In addition, to achieve the above objectives, the present application also proposes a hyperspectral image classification device based on a dense graph attention neural network. The hyperspectral image classification device based on a dense graph attention neural network includes:

[0046] The feature extraction module is used to input the hyperspectral image into the dense graph attention neural network for feature extraction, and obtain the topological attention features, spectral attention features and spatial attention features;

[0047] Feature fusion module, used to connect spectral attention features and spatial attention features to obtain spectral spatial attention features;

[0048] The feature fusion module is further configured to fuse the topological relationship attention feature with the spectral space attention feature to obtain a classification feature;

[0049] The image classification module is used to determine the classification result of the hyperspectral image based on the classification features.

[0050] In addition, to achieve the above-mentioned purpose, the present application also proposes a hyperspectral image classification device based on a dense graph attention neural network. The hyperspectral image classification device based on a dense graph attention neural network includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the hyperspectral image classification method based on a dense graph attention neural network as described above.

[0051] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of the hyperspectral image classification method based on dense graph attention neural network are implemented as described above.

[0052] In addition, to achieve the above objectives, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the hyperspectral image classification method based on dense graph attention neural network as described above.

[0053] The present application provides a hyperspectral image classification method based on a dense graph attention neural network. The method inputs a hyperspectral image into a dense graph attention neural network for feature extraction to obtain topological relationship attention features, spectral attention features, and spatial attention features; connects the spectral attention features with the spatial attention features to obtain spectral-spatial attention features; fuses the topological relationship attention features with the spectral-spatial attention features to obtain classification features; and determines the classification results of the hyperspectral image based on the classification features. The present application utilizes a dense graph attention neural network to fully mine the spectral features, spatial features, and topological relationship features in the hyperspectral image. It can fully utilize effective information, fully extract different types of features in the hyperspectral image, and effectively fuse different types of features, ensuring the rational use of features, thereby improving the accuracy of hyperspectral image classification and improving classification accuracy. It solves the technical problems of insufficient feature extraction and unreasonable feature utilization in traditional classification methods, which affect classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0056] Figure 1 This is a flowchart of Example 1 of the hyperspectral image classification method based on dense graph attention neural network of this application;

[0057] Figure 2 Schematic diagram of the parallel attention module fusion strategy of the hyperspectral image classification method based on dense graph attention neural network provided in Example 1 of the present application;

[0058] Figure 3This is a flowchart of Example 2 of the hyperspectral image classification method based on dense graph attention neural network of this application;

[0059] Figure 4 Schematic diagram of a multi-path graph attention module of a hyperspectral image classification method based on a dense graph attention neural network provided in Example 2 of the present application;

[0060] Figure 5 Schematic diagram of spatial attention blocks of the hyperspectral image classification method based on dense graph attention neural network provided in Example 2 of the present application;

[0061] Figure 6 This is a schematic diagram of the module structure of a hyperspectral image classification device based on a dense graph attention neural network according to an embodiment of the present application;

[0062] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the hyperspectral image classification method based on dense graph attention neural network in the embodiment of the present application.

[0063] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0064] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0065] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0066] The main solution of the embodiment of the present application is: input the hyperspectral image into the dense graph attention neural network for feature extraction to obtain topological relationship attention features, spectral attention features and spatial attention features; connect the spectral attention features and the spatial attention features to obtain spectral-spatial attention features; fuse the topological relationship attention features and the spectral-spatial attention features to obtain classification features; and determine the classification results of the hyperspectral image based on the classification features.

[0067] At present, in the field of hyperspectral image classification, commonly used methods mainly include pattern recognition methods, methods based on convolutional neural networks (CNNs), and methods based on graph convolutional neural networks (GCNs). However, these methods have insufficient feature extraction and unreasonable feature utilization, which limits the classification ability.

[0068] This application provides a solution that uses dense graph attention neural networks to fully mine the spectral features, spatial features and topological relationship features in hyperspectral images. It can make full use of effective information, fully extract different types of features in hyperspectral images, and effectively fuse different types of features, ensuring the rational use of features, thereby improving the accuracy of hyperspectral image classification and improving classification accuracy. It solves the technical problems of insufficient feature extraction and unreasonable feature utilization in traditional classification methods, which affect classification accuracy.

[0069] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution capabilities, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the aforementioned functions, such as a hyperspectral image classification device based on a dense graph attention neural network, etc. This embodiment does not specifically limit this. The hyperspectral image classification device based on a dense graph attention neural network is used as an example to illustrate this embodiment and the following embodiments.

[0070] The present invention provides a method for hyperspectral image classification based on dense graph attention neural network. Figure 1 , Figure 1 This is a flowchart of the first embodiment of the hyperspectral image classification method based on dense graph attention neural network in this application.

[0071] In this embodiment, the hyperspectral image classification method based on dense graph attention neural network includes steps S10 to S40:

[0072] Step S10, inputting the hyperspectral image into a dense graph attention neural network for feature extraction to obtain topological attention features, spectral attention features, and spatial attention features;

[0073] It should be noted that a hyperspectral image (HSI) is an image with high spectral resolution that can record the reflectance or radiation intensity of each pixel in multiple continuous spectral bands. In this embodiment, the hyperspectral image is generally the hyperspectral image that needs to be classified.

[0074] In addition, it should be noted that the dense graph attention neural network (DGANet) is a new network architecture designed in this embodiment, which mainly includes a graph sub-network, a spectral sub-network, and a spatial sub-network. Hyperspectral images usually contain rich topological relationships, spectral information, and spatial information. After inputting the hyperspectral image, the dense graph attention neural network can fully mine the topological relationships, spectral information, and spatial information in the hyperspectral image, make full use of the effective information, and extract the attention features of the topological relationship, the attention features of the spectral information, and the attention features of the spatial information from the hyperspectral image. Among them, the graph sub-network is usually used to extract the attention features of the topological relationship, namely the topological relation attention features (Topological relation attention features), the spectral sub-network is usually used to extract the attention features of the spectral information, namely the spectral attention features, and the spatial sub-network is usually used to extract the attention features of the spatial information, namely the spatial attention features.

[0075] It can be understood that by using the dense graph attention neural network, different types of features in the hyperspectral image are fully extracted to obtain the topological relationship attention features, spectral attention features and spatial attention features of the hyperspectral image.

[0076] Step S20, connecting the spectral attention feature and the spatial attention feature to obtain the spectral spatial attention feature;

[0077] It should be noted that both the spectral sub-network and the spatial sub-network can extract features based on three-dimensional convolution operations. At this time, the spectral attention features and the spatial attention features can be connected to obtain spectral-spatial attention features.

[0078] Step S30, fusing the topological relationship attention feature with the spectral space attention feature to obtain a classification feature;

[0079] It should be noted that, in order to better integrate different types of features, this embodiment designs an effective parallel attention module for topological relationship attention features, spectral attention features, and spatial attention features.

[0080] It can be understood that this embodiment utilizes a parallel attention module to fuse topological relational attention features and spectral spatial attention features.

[0081] In a feasible implementation, step S30 may include steps S301 to S305:

[0082] Step S301, based on a first preset convolution kernel, convolution processing is performed on the topological relationship attention feature and the spectral spatial attention feature to obtain a deep topological relationship attention feature and a deep spectral spatial attention feature;

[0083] It should be noted that the first preset convolution kernel can generally be set to 1×1, and there is no specific limitation on this. The deep topological relationship attention feature is a deeper topological relationship attention feature, and the deep spectral spatial attention feature is a deeper spectral spatial attention feature.

[0084] Understandably, the reference Figure 2 In order to further extract deeper topological relationship features and spectral spatial attention features, this embodiment uses two convolution layers with a convolution kernel of 1×1 to convolve the topological relationship attention feature T and the spectral spatial attention feature S, thereby obtaining the deep topological relationship attention feature T ' With deep spectral spatial attention feature S ' .

[0085] Step S302, transpose and multiply the deep topological relationship attention feature and the deep spectral spatial attention feature to obtain a parallel attention mapping feature;

[0086] Understandably, the reference Figure 2 , after obtaining the deep topological relationship attention feature T ′ With deep spectral spatial attention feature S ′ After that, the deep topological relationship attention feature T ′ With deep spectral spatial attention feature S ′ Transpose and multiply to obtain the parallel attention map feature P.

[0087] Step S303: performing convolution processing on the topological relationship attention feature based on a second preset convolution kernel to obtain a new topological relationship attention feature;

[0088] It should be noted that the second preset convolution kernel can generally be set to 1×1, and there is no specific limitation on this. The new topological relationship attention feature is a new feature obtained after the topological relationship attention feature is convolved.

[0089] Understandably, the reference Figure 2 , the topological relationship attention feature T is input into a new convolution layer with a convolution kernel of 1×1 to generate a new topological relationship attention feature T″.

[0090] Step S304, multiplying the new topological relationship attention feature and the parallel attention mapping feature to obtain a parallel attention feature;

[0091] Understandably, the reference Figure 2 After obtaining the new topological relationship attention feature T″, the new topological relationship attention feature T″ is multiplied by the parallel attention mapping feature P to obtain the parallel attention feature O.

[0092] Step S305 , concatenating the parallel attention feature, the topological relationship attention feature, and the spectral space attention feature to obtain the classification feature.

[0093] It should be understood that reference Figure 2 , the parallel attention feature O, the topological relationship attention feature T and the spectral space attention feature S are spliced ​​using the fully connected layer, and the spliced ​​features are the classification features.

[0094] It is understandable that the parallel attention module can organically combine these complementary features, avoiding the limitations of a single type of feature and helping the hyperspectral image classification model better adapt to different data distributions and scenarios. At the same time, by fusing multi-dimensional features through the parallel attention module, DGANet can learn more representative and generalizable feature representations. When faced with new, unseen hyperspectral image data, the model can make more accurate classification predictions based on the fused features.

[0095] Step S40: determining a classification result of the hyperspectral image based on the classification features.

[0096] It should be noted that the final classification result can be obtained based on the classification features, and the classification result is usually expressed in the form of probability.

[0097] It can be understood that in a specific implementation, a hyperspectral image classification model can be constructed according to the DGANet network architecture and parallel attention module proposed in this embodiment, and the hyperspectral image to be classified is input into the hyperspectral image classification model to obtain the final classification result. The specific calculation relationship is as follows:

[0098]

[0099] Where, represents the classification result, x represents the input hyperspectral image, the size of which is r×r×L, that is, the length and width are both r, the number of frequency bands is L, and x graph The data representing the topological relationship of the input hyperspectral image x, θ represents the network weight of DGANet.

[0100] It should be understood that in practical applications, hyperspectral image datasets suffer from class imbalance, i.e., the number of samples in different classes varies greatly. To address this issue and stabilize the network training process, this embodiment uses a balanced loss function and regularization method. The calculation relationship is as follows:

[0101]

[0102] Where, represents the balance loss, Represents the classification result, yj represents the jth true label, r represents the length and width of the input hyperspectral image, the parameter ε represents the class balance adjustment coefficient, l2 represents the regularization process, and θ represents the regularization parameter, which is usually 0.001. The final overall loss can be expressed as:

[0103]

[0104] Where, L DGANet Represents the overall loss, represents the balance loss, and Q represents the number of hyperspectral images.

[0105] During implementation, the required parameters of the DGANet network are initialized, including convolutional layer parameters, pooling layer parameters, initial weights and biases for each network, the number of graph attention blocks, the adjacency matrix, and the input space size. Hyperspectral image data, such as the commonly used Indian Pines dataset, is collected to ensure that the data covers a rich range of feature categories and contains a sufficient number of samples to support model training and evaluation. Next, image preprocessing is performed. Based on the spectral characteristics of the hyperspectral image and the research objectives, the original spectral bands can be filtered or combined to remove bands that are severely affected by noise or have redundant information, thereby reducing data volume and computational complexity while preserving the key spectral information. Necessary processing operations, including cropping, scaling, and normalization, are performed on the spatial dimensions of the image to provide valid input data for the spatial subnetwork. Furthermore, pixels in the hyperspectral image are used as graph vertices. An adjacency matrix is ​​constructed based on spatial adjacency, spectral similarity, or other relevant features between pixels to determine the graph structure. This structured data is then constructed for the graph subnetwork. The data is then divided into training and test sets based on training and testing requirements. During the model training phase, it is necessary to first determine the training parameters, including the number of training rounds (e.g., 200), optimizer (e.g., Adam), learning rate, regularization parameter (e.g., 0.001), class balance adjustment coefficient (e.g., 2), batch size (e.g., 32), etc. The preprocessed training data is input into the constructed classification model, and the model is trained according to the selected optimization algorithm and loss function. In each round of training, the model performs forward propagation on the input data to calculate the prediction result, then calculates the loss function value, and calculates the gradient through the backpropagation algorithm, and finally uses the optimization algorithm to update the network parameters. As the training progresses, the model continuously learns the characteristic patterns in the data and gradually improves its classification ability for different types of objects until the maximum number of training rounds is reached or the convergence conditions are met. Among them, the learning rate is calculated dynamically, as shown below:

[0106]

[0107] Where lr represents the learning rate, β represents the pre-set basic learning rate, iter represents the current training round, and maxite represents the maximum training round.

[0108] After model training, multiple evaluation metrics are used to comprehensively measure model performance, including overall accuracy, average accuracy, Kappa coefficient, and individual accuracy for each feature class. A test dataset, independent of the training data, undergoes similar preprocessing steps as the training data, including spectral band processing, spatial feature extraction, and graph structure construction, to ensure the test data shares the same data format and feature representation as the training data. The test data is fed into the trained model to obtain predictions. Selected evaluation metrics are then calculated based on the predictions and the true labels of the test data. Analysis of these evaluation metrics provides insights into the model's performance in various areas, determining whether the model meets practical application requirements and enabling optimization. Based on actual needs, specific application scenarios for the model in hyperspectral image classification, such as land use classification and crop monitoring, are determined. For model deployment, a server equipped with a 3.6 GHz Intel Xeon CPU, 128 GB of memory, and an Nvidia GeForce GTX 3090 GPU can be used as the hardware platform. After deploying the optimized model on the selected hardware platform, the hyperspectral image test data that needs to be classified is input into the local model to achieve hyperspectral image classification.

[0109] This embodiment provides a hyperspectral image classification method based on a dense graph attention neural network. The method inputs a hyperspectral image into a dense graph attention neural network for feature extraction, obtaining topological attention features, spectral attention features, and spatial attention features. The spectral attention features are then concatenated with the spatial attention features to obtain spectral-spatial attention features. The topological attention features and spectral-spatial attention features are then fused to obtain classification features. Based on the classification features, the hyperspectral image classification result is determined. This embodiment utilizes a dense graph attention neural network to fully exploit the spectral, spatial, and topological features in the hyperspectral image. This method fully utilizes available information, fully extracts different types of features from the hyperspectral image, and effectively fuses these different types of features, ensuring the rational use of features. This improves the accuracy and precision of hyperspectral image classification.

[0110] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 , step S10 may include steps S101 to S103:

[0111] Step S101, inputting the hyperspectral image into the graph sub-network to obtain the topological attention feature;

[0112] It should be noted that the dense graph attention neural network in this embodiment includes at least a graph sub-network, a spectral sub-network, and a spatial sub-network. The graph sub-network is used to extract topological relationship attention features.

[0113] In a feasible implementation, step S101 may include steps S1011 to S1014:

[0114] Step S1011, obtaining a corresponding adjacency graph based on the adjacency matrix of the hyperspectral image and the graph nodes corresponding to each pixel in the hyperspectral image;

[0115] It should be noted that the graph sub-network includes a dense graph convolutional network and a multi-way graph attention module, which can extract topological attention features from the hyperspectral image. First, convert it into the corresponding feature matrix X. The calculation relationship is as follows:

[0116] N=H×W

[0117] Where Reshape represents the matrix dimension reshaping operation, H and W represent the length and width of the input hyperspectral image, B represents the number of spectral channels, and the elements X in the matrix X are i Represents the spectral feature vector of the i-th pixel, that is, the node feature. Each pixel corresponds to a node in the adjacency graph, and the set of nodes is defined as V = {v1, v2, ..., v N The adjacency matrix is ​​typically used to describe the connectivity between nodes in an adjacency graph. In the graph subnetwork of hyperspectral image classification, it can reflect the spatial or other correlation relationships between pixels. Generally speaking, the adjacency matrix can be obtained by combining spatial proximity and spectral similarity. In terms of spatial proximity, the spatial neighbor matrix is ​​determined using a fixed-size spatial window (e.g., 7×7). The calculation relationship is as follows:

[0118]

[0119] Where, E spa (i, j) represents the spatial adjacency matrix of the pixel at position (i, j). In terms of spectral similarity, similar nodes are screened by spectral angular distance (SAM) and the spectral adjacency matrix is ​​determined. The calculation relationship is as follows:

[0120]

[0121] Where, E spe(i, j) represents the spectral adjacency matrix of the pixel at position (i, j), X i,: and X j,: Represents pixel v i and pixel v j The inner product of the spectral feature vector, ||X i,: || and ||X j,: || represent pixel v respectively i and pixel v j The modulus of the spectral eigenvector is , and arccos represents the inverse cosine function.

[0122] It can be understood that based on the spectral adjacency matrix and the spatial adjacency matrix, the adjacency matrix and the adjacency graph are obtained as shown below:

[0123] E=E spa ⊙E spe

[0124] G=(V,E)

[0125] Where E represents the adjacency matrix, E spa represents the spatial adjacency matrix, E spe represents the spectral adjacency matrix, G represents the adjacency graph, and V represents a node in the adjacency graph.

[0126] Step S102: Divide the adjacency graph into multiple adjacency subgraphs, perform dense graph convolution on each of the adjacency subgraphs, and obtain output features of the adjacency subgraphs;

[0127] It should be noted that an adjacency subgraph is a set of subgraphs of the adjacency graph obtained by partitioning. In traditional graph convolutional networks, all samples need to be input into the GCN individually, which usually results in a large amount of matrix multiplication and a heavy computational burden. The graph subnetwork in this embodiment partitions the complete adjacency graph G into a set of subgraphs Ψ:

[0128]

[0129] In the formula, Ψ represents the adjacent subgraph, M and Q represent the number of labeled samples and batch size respectively, a represents the number of the adjacent subgraph, G a Represents the ath adjacent subgraph of the adjacency graph. Thus, the graph convolutional network can be converted into a dense graph convolutional network as shown below:

[0130]

[0131] Where, Represents the output of the a-th adjacent subgraph in the l-th dense graph convolution layer, the feature matrix represents the bias term of the lth layer, Add the identity matrix to the adjacency matrix, W (l)is the weight matrix of layer l, ReLU is the activation function, and BN represents batch normalization. The output features of the adjacent subgraph are the output data obtained after the adjacent subgraph is input into the dense graph convolutional network.

[0132] Step S1013: determining graph features based on the output features of the adjacent subgraphs, and using the graph features as vertex features;

[0133] It can be understood that by using the above dense graph convolutional network, the output features of each adjacent subgraph are obtained in turn, and the output features of all adjacent subgraphs are combined. The final graph feature can be expressed as:

[0134]

[0135] Where V l represents the graph features of the lth layer, represents the output features of the ath adjacent subgraph at layer l, M and Q represent the number of labeled samples and batch size, respectively. In this embodiment, graph features are used as vertex features, i.e., vertex features.

[0136] Step S1014 : determining a topological attention feature of the hyperspectral image based on the vertex feature and the normalized attention coefficient of the vertex feature.

[0137] It should be noted that in hyperspectral image classification, different vertices contribute differently to the classification. The useful features of vertices can expand the distance between different classes and shorten the distance between the same classes. Therefore, this embodiment designs a multi-way graph attention module to generate different weights for each vertex. The multi-way graph attention module generally includes multiple graph attention blocks. For example, Figure 4 ,The multi-way graph attention module of this embodiment includes three-way graph attention blocks.

[0138] In a feasible implementation, step S1014 may include: obtaining the correspondence between vertex features, weight matrices and normalized attention coefficients; determining the normalized attention coefficients of the vertex features based on the vertex features, weight matrix and the correspondence; determining the graph attention features based on the vertex features and the normalized attention coefficients of the vertex features; and concatenating the graph attention features to obtain the topological relationship attention features.

[0139] It can be understood that the normalized attention coefficient of a vertex feature is the importance of other vertex features to the vertex feature. The corresponding relationship between the vertex feature, the weight matrix and the normalized attention coefficient is the calculation relationship of the normalized attention coefficient (applicable to each graph attention block), as shown below:

[0140] e ij=softmax(ReLU(a[Wv i ,Wv j ]))

[0141] Where, e ij Represents the vertex feature v j Vertex feature v u The importance of softmax is a normalization method that makes the coefficients easy to compare between different vertices. a represents the self-attention operation, W represents the weight matrix, and v i and v j Represent the feature vectors of vertex i and vertex j respectively, and ReLU is the activation function. The normalized attention coefficient is further used to calculate the linear combination of each vertex feature, namely the graph attention feature, as shown below:

[0142]

[0143] Where, v i ′ Represents the vertex feature v i The graph attention features obtained after processing by the graph attention block, e ij Represents the vertex feature v j Vertex feature v i The importance of W, W represents the weight matrix, and ReLU is the activation function. In order to stabilize the learning process of self-attention, K independent graph attention blocks can be used to perform it. The final topological relationship attention features are as follows:

[0144]

[0145] Where, v″ i Represents the vertex feature v i The topological relationship attention features are obtained after processing by the multi-way graph attention module. The parallel symbol || represents the series operation, that is, concatenating K graph attention features.

[0146] This embodiment designs a new graph sub-network structure, which includes a dense graph convolutional network and a multi-way graph attention module. This graph sub-network can extract useful topological relationship attention features while suppressing useless features, thereby expanding the distance between different categories and shortening the distance between the same categories.

[0147] Step S102, inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature;

[0148] It should be noted that hyperspectral images contain rich spectral information. In order to effectively extract useful spectral features, this embodiment designs a new spectral sub-network, which is used to extract spectral attention features. The spectral sub-network consists of three three-dimensional (3D) convolutional layers, three spectral attention blocks and a pooling layer.

[0149] In a feasible implementation, step S102 may include: performing three-dimensional convolution processing on the hyperspectral image to obtain spectral features; refining the spectral features based on spectral attention values ​​to obtain initial spectral attention features; and performing pooling processing on the initial spectral attention features to obtain spectral attention features of the hyperspectral image.

[0150] It can be understood that the use of 3D convolution layers can reduce the number of frequency bands of the input image, generate spectral features, and use the spectral attention block to extract spectral attention features. First, use the first 3D convolution layer to perform three-dimensional convolution processing on the hyperspectral image to obtain spectral features. The spectral features are input to the first spectral attention block, and the spectral attention value is determined using the following calculation relationship:

[0151] U = ReLU(W2*ReLU(W1*F))

[0152] Where F is the spectral feature, U is the spectral attention value, W1 and W2 represent the front and back convolution kernels of the 3D convolution layer respectively, and ReLU is the activation function. The spectral attention value is then used to further refine the spectral feature to obtain the output of the first spectral attention block, as shown below:

[0153]

[0154] Where, F ′ is the refined feature, F is the spectral feature, U is the spectral attention value, represents the multiplication of each element in the matrix. Next, the second 3D convolutional layer generates new features based on the output of the first spectral attention block, which serve as the input to the second spectral attention block. The same operation is then performed to obtain the output of the final spectral attention block, the initial spectral attention features. To facilitate the integration of topological attention features, the final spectral attention features are generated through average pooling in the pooling layer.

[0155] Step S103: input the hyperspectral image into the spatial sub-network to obtain the spatial attention feature.

[0156] It should be noted that hyperspectral images contain rich spatial information. To extract useful spatial information, this embodiment designs a spatial subnetwork that can learn useful spatial features and suppress useless spatial features. The spatial subnetwork is used to extract spatial attention features. The spatial subnetwork consists of a 3D convolutional layer, two spatial attention blocks, and a pooling layer.

[0157] In a feasible implementation, step S103 may include steps S1031 to S1035:

[0158] Step S1031, extracting spatial features from the hyperspectral image, and dividing the normalized spatial features into a plurality of subspace features;

[0159] It is understandable that the 3D convolution layer can be used to reduce the number of frequency bands of the input image and extract the corresponding spatial features from the mid- and high-spectral images. To further explore the relationship between the central pixel and its neighboring pixels, the two spatial attention blocks first normalize the input spatial features using the Batch Norm layer and then divide them into four smaller overlapping subspace features x1, x2, x3, and x4.

[0160] Step S1032, determining the subspace attention feature corresponding to the subspace feature, and aggregating the subspace attention feature to obtain an aggregated enhanced feature;

[0161] It should be noted that in order to enhance useful subspace areas and suppress useless subspace areas, the spatial attention block can be further used to perform attention calculation on each subspace feature to extract the subspace attention feature.

[0162] In a feasible embodiment, the step of determining the subspace attention feature corresponding to the subspace feature may include: performing multi-layer three-dimensional convolution processing on the subspace feature to obtain a new subspace feature, the new subspace feature including a first subspace feature, a second subspace feature and a third subspace feature; calculating the influence weight based on the first subspace feature and the second subspace feature; and obtaining the subspace attention feature based on the third subspace feature and the influence weight.

[0163] Understandably, the reference Figure 5 , assuming that the size of the input spatial feature X is s×w×w, three new subspace features are learned through three identical 3D convolutional layers, namely the first subspace feature K, the second subspace feature M, and the third subspace feature N. Then the three new subspace features are converted into K-sized s,g 、M s,g 、Ns,g The matrix features of g = w × w, where s is the number of features. The transformation can be achieved through matrix dimension reshaping, transposition, and normalized exponential function (softmax). Then, the following calculations are performed on the first subspace feature K and the second subspace feature M to obtain the corresponding influence weights:

[0164]

[0165] Where W ji Indicates the influence weight of the i-th pixel on the j-th pixel, K i represents the i-th pixel of the first subspace feature K, M j represents the j-th pixel of the second subspace feature M. The final subspace attention feature can be expressed as:

[0166]

[0167] Where G j represents the jth subspace attention feature, W ji represents the influence weight of the i-th pixel on the j-th pixel, τ is the learning parameter, N j Represents the jth pixel of the third subspace feature N. In order to ensure pixel constraints and feature fusion, four learnable parameters λ1, λ2, λ3, λ4 are used to aggregate these subspace attention features to obtain aggregated enhanced features. The calculation relationship is as follows:

[0168]

[0169] Where z represents the aggregation enhancement feature, G i represents the attention feature of the i-th subspace, λ i Represents the i-th learnable parameter, and the learnable parameter satisfies

[0170] Step S1033, performing a residual connection on the aggregated enhanced feature and the spatial feature to obtain an enhanced spatial feature;

[0171] It can be understood that the aggregated enhanced features are added to the original spatial features using the residual connection to generate enhanced spatial features, i.e., enhanced spatial features.

[0172] Step S1034, inputting the enhanced spatial features into a multi-layer perceptron for processing to obtain initial spatial attention features;

[0173] It can be understood that the enhanced spatial features are input into the multi-layer perceptron (MLP), and the multi-layer perceptron outputs the preliminary obtained spatial attention features, namely the initial spatial attention features, as shown below:

[0174] z ′ =MLP(ReLU(BN(z+x)))

[0175] Where z ′ Represents the initial spatial attention features, MLP represents the multi-layer perceptron, ReLU represents the activation function, and BN represents the batch normalization operation.

[0176] Step S1035 : performing pooling processing on the initial spatial attention features to obtain spatial attention features of the hyperspectral image.

[0177] It is understandable that, similar to the spectral sub-network, the average pooling operation is finally used to generate spatial attention features, which is convenient for fusion with spectral attention features and topological relationship attention features.

[0178] It should be understood that through the processing of the graph sub-network, the spectral sub-network and the spatial sub-network, this embodiment can fully exploit the spectral features, spatial features and topological relationship features in the hyperspectral image, which is more conducive to improving the classification accuracy of the hyperspectral image.

[0179] This embodiment provides a hyperspectral image classification method based on a dense graph attention neural network. The hyperspectral image is input into a graph subnetwork to obtain topological attention features; the hyperspectral image is input into a spectral subnetwork to obtain spectral attention features; and the hyperspectral image is input into a spatial subnetwork to obtain spatial attention features. The dense graph attention neural network fully exploits the spectral, spatial, and topological features in the hyperspectral image, fully utilizing available information to fully extract different types of features in the hyperspectral image and effectively fuse them, ensuring the rational use of features, thereby improving the accuracy and precision of hyperspectral image classification.

[0180] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the hyperspectral image classification method based on dense graph attention neural network of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.

[0181] This application also provides a hyperspectral image classification device based on dense graph attention neural network, please refer to Figure 6 , a hyperspectral image classification device based on dense graph attention neural network includes:

[0182] The feature extraction module 10 is used to input the hyperspectral image into the dense graph attention neural network for feature extraction, and obtain topological attention features, spectral attention features and spatial attention features;

[0183] A feature fusion module 20 is used to connect the spectral attention feature and the spatial attention feature to obtain the spectral spatial attention feature;

[0184] The feature fusion module 20 is further configured to fuse the topological relationship attention feature with the spectral space attention feature to obtain a classification feature;

[0185] The image classification module 30 is configured to determine a classification result of the hyperspectral image based on the classification features.

[0186] In a feasible embodiment, the dense graph attention neural network includes at least a graph sub-network, a spectral sub-network and a spatial sub-network, and the feature extraction module 10 is further used to input the hyperspectral image into the graph sub-network to obtain the topological relationship attention feature;

[0187] Inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature;

[0188] The hyperspectral image is input into the spatial sub-network to obtain the spatial attention feature.

[0189] In a feasible implementation, the feature extraction module 10 is further configured to obtain a corresponding adjacency graph based on the adjacency matrix of the hyperspectral image and the graph nodes corresponding to each pixel in the hyperspectral image;

[0190] Dividing the adjacency graph into multiple adjacency subgraphs, and performing dense graph convolution on each of the adjacency subgraphs to obtain output features of the adjacency subgraphs;

[0191] Determining graph features based on the output features of the adjacent subgraph, and using the graph features as vertex features;

[0192] Based on the vertex features and the normalized attention coefficients of the vertex features, topological attention features of the hyperspectral image are determined.

[0193] In a feasible implementation, the feature extraction module 10 is further configured to obtain a correspondence between vertex features, a weight matrix, and a normalized attention coefficient;

[0194] Determining a normalized attention coefficient of the vertex feature based on the vertex feature, the weight matrix, and the corresponding relationship;

[0195] Determining a graph attention feature based on the vertex feature and a normalized attention coefficient of the vertex feature;

[0196] The graph attention features are concatenated to obtain the topological relationship attention features.

[0197] In a feasible implementation manner, the feature extraction module 10 is further configured to perform three-dimensional convolution processing on the hyperspectral image to obtain spectral features;

[0198] Refining the spectral feature based on the spectral attention value to obtain an initial spectral attention feature;

[0199] Pooling is performed on the initial spectral attention features to obtain spectral attention features of the hyperspectral image.

[0200] In a feasible implementation manner, the feature extraction module 10 is further configured to extract spatial features from the hyperspectral image and divide the normalized spatial features into a plurality of subspace features;

[0201] Determining a subspace attention feature corresponding to the subspace feature, and aggregating the subspace attention feature to obtain an aggregated enhanced feature;

[0202] Performing a residual connection between the aggregated enhanced feature and the spatial feature to obtain an enhanced spatial feature;

[0203] Inputting the enhanced spatial features into a multi-layer perceptron for processing to obtain initial spatial attention features;

[0204] Pooling is performed on the initial spatial attention features to obtain spatial attention features of the hyperspectral image.

[0205] In a feasible implementation manner, the feature extraction module 10 is further configured to perform multi-layer three-dimensional convolution processing on the subspace features to obtain new subspace features, where the new subspace features include a first subspace feature, a second subspace feature, and a third subspace feature;

[0206] Calculating an influence weight based on the first subspace feature and the second subspace feature;

[0207] The subspace attention feature is obtained based on the third subspace feature and the influence weight.

[0208] In a feasible implementation manner, the feature fusion module 20 is further configured to perform convolution processing on the topological relationship attention feature and the spectral spatial attention feature based on a first preset convolution kernel to obtain a deep topological relationship attention feature and a deep spectral spatial attention feature;

[0209] Transpose and multiply the deep topological relational attention feature and the deep spectral spatial attention feature to obtain a parallel attention mapping feature;

[0210] Based on a second preset convolution kernel, convolution processing is performed on the topological relationship attention feature to obtain a new topological relationship attention feature;

[0211] Multiplying the new topological relationship attention feature by the parallel attention mapping feature to obtain a parallel attention feature;

[0212] The parallel attention feature, the topological relationship attention feature and the spectral space attention feature are spliced ​​to obtain the classification feature.

[0213] The hyperspectral image classification device based on a dense graph attention neural network provided in this application, which utilizes the hyperspectral image classification method based on a dense graph attention neural network described in the above-mentioned embodiments, can address the technical issues of insufficient feature extraction and irrational feature utilization in traditional classification methods, which affect classification accuracy. Compared with the prior art, the beneficial effects of the hyperspectral image classification device based on a dense graph attention neural network provided in this application are the same as those of the hyperspectral image classification method based on a dense graph attention neural network provided in the above-mentioned embodiments. Other technical features of the hyperspectral image classification device based on a dense graph attention neural network are the same as those disclosed in the above-mentioned embodiments and are not further described here.

[0214] The present application provides a hyperspectral image classification device based on a dense graph attention neural network. The hyperspectral image classification device based on a dense graph attention neural network includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the hyperspectral image classification method based on the dense graph attention neural network in the above-mentioned embodiment 1.

[0215] Reference below Figure 7 , which shows a schematic diagram of the structure of a hyperspectral image classification device based on a dense graph attention neural network suitable for implementing the embodiments of the present application. The hyperspectral image classification device based on a dense graph attention neural network in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The hyperspectral image classification device based on dense graph attention neural network shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0216] like Figure 7As shown, a hyperspectral image classification device based on a dense graph attention neural network may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a ROM (Read Only Memory) 1002 or programs loaded from a storage device 1003 into a RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the hyperspectral image classification device based on a dense graph attention neural network. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. Communication devices 1009 can allow the hyperspectral image classification device based on dense graph attention neural networks to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a hyperspectral image classification device based on dense graph attention neural networks with various systems, it should be understood that implementation or presence of all the illustrated systems is not required. More or fewer systems may alternatively be implemented or present.

[0217] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0218] The hyperspectral image classification device based on a dense graph attention neural network provided in this application, which utilizes the hyperspectral image classification method based on a dense graph attention neural network described in the above-mentioned embodiment, can address the technical issues of insufficient feature extraction and irrational feature utilization in traditional classification methods, which affect classification accuracy. Compared with the prior art, the beneficial effects of the hyperspectral image classification device based on a dense graph attention neural network provided in this application are the same as those of the hyperspectral image classification method based on a dense graph attention neural network provided in the above-mentioned embodiment. Other technical features of the hyperspectral image classification device based on a dense graph attention neural network are the same as those disclosed in the above-mentioned embodiment and are not further described here.

[0219] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

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

[0221] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the hyperspectral image classification method based on dense graph attention neural network in the above embodiment.

[0222] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0223] The computer-readable storage medium may be included in the hyperspectral image classification device based on dense graph attention neural network; or may exist independently without being assembled into the hyperspectral image classification device based on dense graph attention neural network.

[0224] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a hyperspectral image classification device based on a dense graph attention neural network, the hyperspectral image classification device based on a dense graph attention neural network: inputs the hyperspectral image into the dense graph attention neural network for feature extraction to obtain topological relationship attention features, spectral attention features, and spatial attention features; connects the spectral attention features with the spatial attention features to obtain spectral-spatial attention features; fuses the topological relationship attention features with the spectral-spatial attention features to obtain classification features; and determines the classification results of the hyperspectral image based on the classification features.

[0225] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0226] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0227] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0228] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned hyperspectral image classification method based on dense graph attention neural networks. This computer-readable storage medium addresses the technical issues of insufficient feature extraction and irrational feature utilization in traditional classification methods, which affect classification accuracy. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the hyperspectral image classification method based on dense graph attention neural networks provided in the aforementioned embodiments, and are not further elaborated here.

[0229] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for hyperspectral image classification based on dense graph attention neural network.

[0230] The computer program product provided in this application can address the technical issues of insufficient feature extraction and irrational feature utilization in traditional classification methods, which affect classification accuracy. Compared to the prior art, the computer program product provided in this application offers the same beneficial effects as the hyperspectral image classification method based on dense graph attention neural networks provided in the aforementioned embodiments, and will not be further elaborated here.

[0231] The above are only some embodiments of the present application and are not intended to limit the patent scope of the present application. All equivalent structural transformations made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A hyperspectral image classification method based on dense graph attention neural network, characterized by: The method comprises: The hyperspectral image is input into the dense graph attention neural network for feature extraction, and topological attention features, spectral attention features and spatial attention features are obtained. Connect the spectral attention feature and the spatial attention feature to obtain the spectral spatial attention feature; fusing the topological relationship attention feature with the spectral space attention feature to obtain a classification feature; Based on the classification features, a classification result of the hyperspectral image is determined.

2. The method according to claim 1, wherein The dense graph attention neural network includes at least a graph sub-network, a spectral sub-network, and a spatial sub-network. The step of inputting the hyperspectral image into the dense graph attention neural network for feature extraction to obtain topological relationship attention features, spectral attention features, and spatial attention features includes: Inputting the hyperspectral image into the graph sub-network to obtain the topological relationship attention feature; Inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature; The hyperspectral image is input into the spatial sub-network to obtain the spatial attention feature.

3. The method according to claim 2, wherein The step of inputting the hyperspectral image into the graph sub-network to obtain the topological relationship attention feature includes: Obtaining a corresponding adjacency graph based on an adjacency matrix of the hyperspectral image and a graph node corresponding to each pixel in the hyperspectral image; Dividing the adjacency graph into multiple adjacency subgraphs, and performing dense graph convolution on each of the adjacency subgraphs to obtain output features of the adjacency subgraphs; Determining graph features based on the output features of the adjacent subgraph, and using the graph features as vertex features; Based on the vertex features and the normalized attention coefficients of the vertex features, topological attention features of the hyperspectral image are determined.

4. The method according to claim 3, wherein The step of determining the topological relationship attention features of the hyperspectral image based on the vertex features and the normalized attention coefficients of the vertex features includes: Get the correspondence between vertex features, weight matrix and normalized attention coefficient; Determining a normalized attention coefficient of the vertex feature based on the vertex feature, the weight matrix, and the corresponding relationship; Determining a graph attention feature based on the vertex feature and a normalized attention coefficient of the vertex feature; The graph attention features are concatenated to obtain the topological relationship attention features.

5. The method according to claim 2, wherein The step of inputting the hyperspectral image into the spectral sub-network to obtain the spectral attention feature comprises: Performing three-dimensional convolution processing on the hyperspectral image to obtain spectral features; Refining the spectral feature based on the spectral attention value to obtain an initial spectral attention feature; Pooling is performed on the initial spectral attention features to obtain spectral attention features of the hyperspectral image.

6. The method according to claim 2, wherein The step of inputting the hyperspectral image into the spatial sub-network to obtain the spatial attention feature comprises: Extracting spatial features from the hyperspectral image and dividing the normalized spatial features into a plurality of subspace features; Determining a subspace attention feature corresponding to the subspace feature, and aggregating the subspace attention feature to obtain an aggregated enhanced feature; Performing a residual connection between the aggregated enhanced feature and the spatial feature to obtain an enhanced spatial feature; Inputting the enhanced spatial features into a multi-layer perceptron for processing to obtain initial spatial attention features; Pooling is performed on the initial spatial attention features to obtain spatial attention features of the hyperspectral image.

7. The method according to claim 6, wherein The step of determining the subspace attention feature corresponding to the subspace feature comprises: Performing multi-layer three-dimensional convolution processing on the subspace features to obtain new subspace features, wherein the new subspace features include a first subspace feature, a second subspace feature, and a third subspace feature; Calculating an influence weight based on the first subspace feature and the second subspace feature; The subspace attention feature is obtained based on the third subspace feature and the influence weight.

8. The method according to any one of claims 1 to 7, characterized in that The step of fusing the topological relationship attention feature with the spectral space attention feature to obtain a classification feature comprises: Based on a first preset convolution kernel, convolution processing is performed on the topological relationship attention feature and the spectral spatial attention feature to obtain a deep topological relationship attention feature and a deep spectral spatial attention feature; Transpose and multiply the deep topological relational attention feature and the deep spectral spatial attention feature to obtain a parallel attention mapping feature; Based on a second preset convolution kernel, convolution processing is performed on the topological relationship attention feature to obtain a new topological relationship attention feature; Multiplying the new topological relationship attention feature by the parallel attention mapping feature to obtain a parallel attention feature; The parallel attention feature, the topological relationship attention feature and the spectral space attention feature are spliced ​​to obtain the classification feature.

9. A hyperspectral image classification device based on dense graph attention neural network, characterized in that The device comprises: The feature extraction module is used to input the hyperspectral image into the dense graph attention neural network for feature extraction, and obtain the topological attention features, spectral attention features and spatial attention features; Feature fusion module, used to connect spectral attention features and spatial attention features to obtain spectral spatial attention features; The feature fusion module is further configured to fuse the topological relationship attention feature with the spectral space attention feature to obtain a classification feature; The image classification module is used to determine the classification result of the hyperspectral image based on the classification features.

10. A hyperspectral image classification device based on dense graph attention neural network, characterized in that The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the hyperspectral image classification method based on dense graph attention neural network according to any one of claims 1 to 8.