Inplausible hyperspectral scene classification method
By constructing hyperspectral images as graph-structured data and using graph neural networks to extract spatial spectral features, the problem of insufficient performance of hyperspectral scene classification at low spatial resolution in the existing technology is solved, and higher classification accuracy and reliability are achieved. interpretive.
Patent Information
- Application Number
- CN202411391724.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
In the feature extraction of spatial perspectives, it is difficult to effectively utilize the characteristics of the null spectrum integration of hyperspectral images in the existing hyperspectral scene classification methods, resulting in poor classification results under conditions of low spatial resolution and poor texture information.
By concentration and distance measurement algorithm, the high spectrum image is constructed as a diagram structure data, using the diagram neural network to extract the empty spectrum features, predict the scenario category, and explains the explanation of the sub -diagram.
The accuracy and interpretability of the classification of high -spectrum scenarios, highlight the explanatory sub -diagram of the combination of ground objects, and enhance the credibility of the predicted results.
Smart Images

Figure CN119360094A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of information processing, urban planning, environmental protection and disaster detection, and specifically relates to an interpretable hyperspectral scene classification method. Background Art
[0002] With the development of science and technology, hyperspectral remote sensing images have been widely used in agriculture, military and other fields, playing an important role in land use planning and water resources management. Hyperspectral scene classification aims to assign corresponding scene categories to areas of interest. It is widely used in precision agriculture, military reconnaissance and smart cities. Research on hyperspectral scene classification has very important significance and application value.
[0003] At present, the hyperspectral scene classification method mainly extracts features from a spatial perspective. First, the three-channel image obtained by band selection or spectral response function of the hyperspectral image is extracted from the three-channel image. Spatial features with characterization capabilities are extracted from the three-channel image. Liu Yuan et al. applied three classic spatial perspective deep learning models, ResNet, VGGNet-16 and Swin Transformer, to hyperspectral scene classification in the document "Liu Yuan, Zheng Xiangtao, Lu Xiaoqiang. Zhuhai No. 1 Hyperspectral Scene Classification Dataset [J]. Journal of Remote Sensing, 2024, 28(01): 306-319." Since hyperspectral images are taken by satellites, the spatial resolution is low and the texture information is not rich, resulting in poor classification performance of the spatial perspective method on the HSCD-ZH dataset. Xu et al. designed an attention-based deep feature learning network in the paper "K.Xu, H.Huang and P.Deng,"Attention-based Deep Feature Learning Network for Scene Classification of Hyperspectral Images,"202155th Asilomar Conference on Signals, Systems, and Computers, Pacific Grove, CA, USA, 2021, pp.1690-1693.", cascading the hybrid attention module with ResNet. This type of method mainly uses convolutional neural networks to extract deep visual features of remote sensing scenes and converts hyperspectral images into a series of two-dimensional feature image processing, but this method still aims to extract spatial features for classification. Summary of the invention
[0004] In order to make full use of the spatial-spectral integration characteristics of hyperspectral images, the present invention clusters the spectral curves of each pixel, takes the cluster center as the basic unit, uses the graph structure to represent the spatial distribution of objects, extracts spatial-spectral features through the graph neural network, predicts the category of the scene and analyzes its main components. The interpretable features are represented by the interpretation subgraph in the original graph, providing prediction results similar to the original graph. The proposed interpretable graph neural network hyperspectral scene classification method not only has better classification performance, but also the graph structure data can highlight the interpretable features, and the interpretation subgraph representing the combination of objects can be the prediction result.
[0005] The present invention provides an effective method for extracting spatial spectrum features for hyperspectral scene classification, provides an interpretability solution for the existing black box model based on deep learning, ensures the accuracy of hyperspectral scene classification and provides intuitive interpretation capabilities. Its basic implementation steps include: (1) through clustering and distance measurement algorithms, the hyperspectral image in Euclidean space is constructed into a graph structure data composed of nodes and edges, the nodes are the ground feature obtained by spectral clustering, and the edges are the connection relationship between the ground feature; (2) the graph structure data is input into the constructed graph neural network model, and the probability distribution of the scene category is output. According to the graph neural network model, the explanation subgraph that contributes the most to the predicted label can be found in the graph structure data, reflecting the causal relationship between the ground feature in the scene and the predicted result, and providing interpretability; (3) in the training set, the number of iterations of the graph neural network model is set, and the network parameters are optimized by the back propagation algorithm in each iteration, so that the scene category output by the model is closer to the real scene category; (4) in the test set, all test samples are input into the trained network model for verification, the predicted scene category of the test sample is output, the experimental results are statistically analyzed, and the cumulative accuracy of the hyperspectral scene classification is calculated.
[0006] The technical solution specifically adopted by the present invention to solve the technical problem is:
[0007] An interpretable hyperspectral scene classification method: Through clustering and distance measurement algorithms, a hyperspectral image in Euclidean space is constructed into graph structure data consisting of nodes and edges, where nodes are land features obtained through spectral clustering, and edges are connection relationships between land features; the graph structure data is input into a constructed graph neural network model to output the probability distribution of scene categories: according to the graph neural network model, the explanatory subgraph that contributes the most to the predicted label is found in the graph structure data to reflect the causal relationship between the land features in the scene and the predicted results.
[0008] Furthermore, the specific process of constructing graph structure data is as follows: cluster the spectral curve of each pixel, take the cluster center as the basic unit, use the graph structure to represent the spatial distribution of objects, extract the spatial spectrum features through the graph neural network, predict the category of the scene and analyze its constituent objects; among them, the interpretable features are represented by the interpretation subgraph in the original graph, providing prediction results similar to the original graph:
[0009] Converting raw hyperspectral image data into graph structured data Firstly, the spectral sequence of each pixel is clustered, and m cluster centers are set, with m nodes in the graph structure. Secondly, through distance measurement, the first n nodes with similar distances are selected to establish adjacency relationships, corresponding to the number of edges n in the graph structure. The converted graph structure dataset is further divided into training sample set and test sample set for model training and testing.
[0010] Furthermore, the construction process of the graph neural network model is as follows: setting the number of iterations to T; inputting the data of the training sample set into the graph neural network; the number of layers of the graph neural network is p, and each layer aggregates and updates the representation of each node through a message propagation algorithm; after the iteration, the entire graph is represented by one node through global pooling, and cascaded with the fully connected neural network to output probability distribution vectors of k categories; the explanatory subgraph of the graph neural network represents the relationship between objects in the hyperspectral scene through nodes and edges.
[0011] Furthermore, during the training process, the number of iterations of the graph neural network model is set, and the network parameters are optimized through the back propagation algorithm in each iteration to make the scene category output by the model closer to the real scene category; during the testing process, all test samples are input into the trained network model for verification, and the predicted scene category of the test samples is output, the test results are statistically analyzed, and the cumulative accuracy of hyperspectral scene classification is calculated.
[0012] Furthermore, in the training sample set, the probability distribution vectors of k categories and the loss values of the real categories are calculated through the loss function, and the parameters of the graph neural network and the fully connected network are optimized through back propagation; after reaching the number of iterations T, the optimized network model is obtained;
[0013] In the test sample set, select the graph data in the test sample set, input the network model optimized by training, select the category with the largest probability in the output probability distribution vector as the prediction result, count the number of correct identifications, and obtain the total accuracy OA, F1 score and Kappa coefficient KC:
[0014]
[0015] Where N trueis the number of correctly classified test samples, N is the total number of test set samples; TP, FP, FN represent the number of true positive, false positive and false negative classification samples respectively, p o It represents the overall classification accuracy, that is, the sum of the number of correctly classified samples in each category divided by the total number of samples, p o The sum of the number of misclassified examples in each category divided by the total number of examples.
[0016] Furthermore, the original hyperspectral image is constructed as in and E represent the node set and edge set with features respectively; in the node set middle, Represents a hyperspectral image Each pixel of is obtained by the K-Means clustering algorithm to obtain the i-th cluster center. The cluster center is regarded as a node in the graph, i∈1,2,...,K, K is the number of cluster centers and the number of nodes in the graph; for each node in the graph, find its K nearest neighbor node set And for all Add a line from z j Point to z i Side A i,j , calculated using the radial basis function RBF:
[0017]
[0018] Among them, σ is a parameter that controls the width of RBF; all edges constitute the adjacency matrix
[0019] Furthermore, a graph convolutional neural network is constructed with p convolutional layers and T iterations. Given the adjacency matrix A, create the corresponding graph Laplacian matrix L = DA, where D is a diagonal matrix representing the degree of A: D i,i =∑ j A i,j ; Get the symmetric normalized Laplace matrix L sym :
[0020]
[0021] Where I is the identity matrix; the propagation rule for graph convolution in the spectral domain is as follows:
[0022]
[0023] in, and In addition, H (l) represents the output in the lth layer, and h(·) is the weight of all layers The weights and biases to learn The activation function is used; the entire graph is represented by one node through global pooling, and the hyperspectral scene classification results are generated using the fully connected layer FC and the Softmax layer; each input scene category c is assigned a corresponding prediction label As shown below:
[0024]
[0025] Furthermore, during the model training process, the loss function is used to calculate the loss value of the probability distribution vector of k categories and the true category. The cross entropy loss function is as follows:
[0026]
[0027] Among them, y c Represents the real scene category; optimizes the graph neural network and fully connected network parameters through back propagation of the loss function until the number of iterations T is reached to obtain the optimized network model.
[0028] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the above-mentioned interpretable hyperspectral scene classification method are implemented.
[0029] A non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of an interpretable hyperspectral scene classification method as described above.
[0030] Compared with the prior art, the present invention and its preferred solution first construct graph structure data based on the original hyperspectral image, and utilize the relationship between the feature information of the ground objects and the ground object targets in the graph structure data to improve the accuracy of scene classification. At the same time, the graph neural network model can explain the prediction results by extracting subgraphs of different sizes of the graph structure, thereby increasing the credibility of the prediction results, and can be used in fields such as urban planning, environmental protection, and disaster detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0032] Figure 1 This is a flow chart of hyperspectral scene classification based on spectral perspective of the present invention;
[0033] Figure 2 This is a schematic diagram of the results obtained by running the present invention on the HSC-OHS dataset. DETAILED DESCRIPTION
[0034] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:
[0035] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0036] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0037] In view of the shortcomings of the prior art, the present invention proposes an interpretable hyperspectral remote sensing image scene classification method. The technical solution for implementing the present invention comprises the following steps:
[0038] (1) Converting raw hyperspectral image data into graph structure data First, cluster the spectral sequence of each pixel, set m cluster centers, and the number of nodes in the graph structure is m; secondly, through the distance metric, select the first n nodes with similar distances to establish an adjacency relationship, corresponding to the number of edges in the graph structure n. The converted graph structure data set is further divided into a training sample set (train sample set) and a test sample set (test sample set) for subsequent model training and testing.
[0039] (2) Construct the network model to be trained and set the number of iterations to T. Input the data of the training sample set into the graph neural network (GNN). The number of layers of the graph neural network (GNN) is p, and each layer aggregates and updates the representation of each node through the message propagation algorithm. After the iteration, the entire graph is represented by one node through global pooling, and cascaded with the fully connected neural network to output the probability distribution vector of k categories. The interpretable features of the graph neural network, namely the explanatory subgraph, are composed of nodes and edges that contribute more to the prediction results. These nodes and edges represent the relationship between objects in the hyperspectral scene. Since they play a key role in the prediction results, they can provide explanations that humans can understand.
[0040] (3) In the training sample set, the loss function is used to calculate the loss value between the probability distribution vector of k categories and the true category, and the parameters of the graph neural network and the fully connected network are optimized by back propagation. After reaching the number of iterations T, the optimized network model is obtained.
[0041] (4) In the test sample set, select the graph data in the test sample set, input the network model optimized in step (3), select the category with the largest probability in the output probability distribution vector as the prediction result, count the number of correct identifications, and obtain the overall accuracy (OverallAccuracy), F1 score and Kappa coefficient (KC):
[0042]
[0043] Where N true is the number of correctly classified test samples, and N is the total number of test set samples. TP, FP, and FN represent the number of true positive, false positive, and false negative classification samples, respectively. o It represents the overall classification accuracy, that is, the sum of the number of correctly classified samples in each category divided by the total number of samples, p o The sum of the number of misclassified examples in each category divided by the total number of examples.
[0044] The present invention is further described below by an example:
[0045] like Figure 1 The implementation steps of this embodiment are as follows:
[0046] Step 1: construct the original hyperspectral image into a graph in and E represent the node set and edge set with features respectively. middle, Represents a hyperspectral image Each pixel in the graph is clustered by the K-Means algorithm to obtain the i-th cluster center, which is regarded as a node in the graph, i∈1,2,...,K, K is the number of cluster centers and the number of nodes in the graph. In addition, for each node in the graph, find its K nearest neighbor node set And for all Add a line from z j Point to z i Side A i,j , preferably a radial basis function (RBF) can be used to calculate,
[0047]
[0048] Among them, σ is a parameter that controls the width of the RBF. All edges form the adjacency matrix
[0049] Step 2: Build a graph neural network. This embodiment preferably uses a graph convolutional neural network (GCN) as an example. The number of convolutional layers is p, and the number of iterations is set to T. Given the adjacency matrix A, we create the corresponding graph Laplacian matrix L = DA, where D is a diagonal matrix representing the degree of A (i.e., D i,i =∑ j A i,j ). In order to enhance the generalization ability of the graph, the symmetric normalized Laplace matrix L can be obtained sym :
[0050]
[0051] Where I is the identity matrix. The propagation rule for graph convolution in the spectral domain is as follows:
[0052]
[0053] in, and In addition, H (l) represents the output in the lth layer, and h(·) is the weight of all layers The weights and biases to learn The activation function is (ReLU is used as the activation function in the preferred solution of this embodiment). The entire graph is represented by one node through global pooling, and the hyperspectral scene classification results are generated using the fully connected (FC) layer and the Softmax layer. Each input scene category c is assigned a corresponding prediction label As shown in the following formula:
[0054]
[0055] Step 3: In model training, the loss value of the probability distribution vector of k categories and the true category is calculated by the loss function (cross entropy loss is used in the preferred solution of this embodiment), and the loss function is as follows:
[0056]
[0057] Among them, y c Represents the real scene category. The parameters of the graph neural network and the fully connected network are optimized by back propagation of the loss function until the number of iterations T is reached, and the optimized network model is obtained;
[0058] Step 4: In the model test, the graph structure data in the test sample set is input into the optimized network model, and the category with the largest probability in the output probability distribution vector is selected as the prediction result. After all the data in the test set is processed, the number of correct identifications is counted to obtain the Overall Accuracy, F1 score and Kappa coefficient (KC):
[0059]
[0060] Where N true is the number of correctly classified test samples, and N is the total number of test set samples. TP, FP, and FN represent the number of true positive, false positive, and false negative classification samples, respectively. o It represents the overall classification accuracy, that is, the sum of the number of correctly classified samples in each category divided by the total number of samples, p o The sum of the number of misclassified samples in each category divided by the total number of samples;
[0061] The effect of the present invention can be further illustrated by the following experiments.
[0062] 1. Simulation conditions
[0063] The present invention is a simulation performed by using Python software and Pytorch framework on an Intel(R) Core i7-13700F 2.10GHZ CPU, 64G memory, and WINDOWS11 operating system.
[0064] The image database used in the experiment is a self-made hyperspectral scene classification HSC-OHS database, whose images come from four hyperspectral satellites (OHS-2A / B / C / D) of the Zhuhai-1 constellation.
[0065] 2. Simulation content
[0066] First, the experiment of the algorithm of the present invention (an interpretable hyperspectral scene classification method) was completed on the HSC-OHS dataset. The HSC-OHS dataset is a further improvement and expansion of the HSCD-ZH, with more scene categories and data. There are 5772 hyperspectral scenes in total. In order to prove the effectiveness of the algorithm, considering the popularity and novelty of the algorithm, this test example selected 3 spatial perspective methods and 3 spectral perspective methods as comparison methods. Among them, ResNet-50 was proposed in the document "K.He, X.Zhang, S.Ren, and J.Sun, Deep residual learning for image recognition, InCVPR, pages 770-778, 2016.". GoogleNet is introduced in detail in the document "C.Szegedy et al., Going deeper with convolutions, In CVPR, pages 1-9, 2015." Yolov8 was open sourced by Ultralytics on January 10, 2023. It implements the regression and classification decoupling of the detection head and can be used for image classification tasks. For details, see https: / / github.com / ultralytics / ultralytics. BoVW, LLC and IFK are classic encoding methods, which are described in detail in the document "G. Cheng, J. Han and X. Lu, Remote Sensing Image Scene Classification: Benchmark and State of the Art, Proceedings of the IEEE, 105 (10): 1865-1883, 2017."
[0067] In this experiment, the hyperspectral scene dataset HSC-OHS is first divided into a training sample set and a test sample set in a ratio of 6:4. The dataset contains 5772 hyperspectral scene images, 3471 of which are in the training sample set, and the rest are in the test sample set. The training sample set is constructed as graph structure data and input into the graph convolutional neural network for training. The graph convolutional neural network has 800 iterations, 3 layers, and 256, 512, and 512 hidden layers, respectively. By optimizing the target loss function in step 3, the model parameters of the graph convolutional network, i.e., the trained graph neural network, are obtained. The test sample set is converted into graph structure data, input into the trained graph neural network, output the classification results, and the classification accuracy is counted. Table 1 compares the prediction accuracy of different hyperspectral scene classification methods on the HSC-OHS dataset. The GCN network has a gain of 3%-12% on OA compared to the spatial perspective methods (resnet50-RGB, googlenet-RGB and yolov8-RGB), and a gain of 3%-6% compared to the spectral perspective encoding methods (BoVW, LLC and IFK). Table 2 compares the classification accuracy of the hyperspectral scene classification method based on GCN under different cluster centers. The number of edges of each node is set to 4. It can be seen that when the cluster center is set to 256, the optimal classification accuracy can be obtained.
[0068] Table 1 Prediction accuracy of different hyperspectral scene classification methods on the HSC-OHS dataset
[0069]
[0070] Table 2 Classification accuracy of hyperspectral scene classification method based on GCN under different clustering centers
[0071]
[0072] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0073] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0074] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0076] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0077] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
[0078] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of an interpretable hyperspectral scene classification method under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.
Claims
1. An interpretable hyperspectral scene classification method, characterized by: Through clustering and distance measurement algorithms, the hyperspectral image in Euclidean space is constructed into graph structure data consisting of nodes and edges, where nodes are the features of the objects obtained through spectral clustering, and edges are the connection relationships between the features of the objects. The graph structure data is input into the constructed graph neural network model, and the probability distribution of the scene category is output. According to the graph neural network model, the explanatory subgraph that contributes the most to the predicted label is found in the graph structure data to reflect the causal relationship between the features of the objects in the scene and the predicted results.
2. The method for classifying hyperspectral scenes according to claim 1, characterized in that: The specific process of constructing graph structure data is as follows: cluster the spectral curve of each pixel, use the cluster center as the basic unit, use the graph structure to represent the spatial distribution of the objects, and extract the spatial spectrum features through the graph neural network. Predict the category of the scene and analyze its constituent features; the interpretable features are represented by the interpretation subgraph in the original graph, providing prediction results similar to the original graph: The original hyperspectral image data is converted into graph structure data g; first, the spectral sequence of each pixel is clustered, and m cluster centers are set, and the number of nodes in the graph structure is m; secondly, through distance measurement, the first n nodes with similar distances are selected to establish adjacency relationships, corresponding to the number of edges in the graph structure n; the converted graph structure data set is further divided into training sample set and test sample set for model training and testing.
3. The interpretable hyperspectral scene classification method according to claim 1, characterized in that: The construction process of the graph neural network model is as follows: set the number of iterations to T; input the data of the training sample set into the graph neural network; the number of layers of the graph neural network is p, and each layer aggregates and updates the representation of each node through a message propagation algorithm; after the iteration, the entire graph is represented by one node through global pooling, and cascaded with a fully connected neural network to output probability distribution vectors of k categories; the interpretation subgraph of the graph neural network represents the relationship between objects in the hyperspectral scene through nodes and edges.
4. The method for classifying hyperspectral scenes according to claim 3, characterized in that: During the training process, the number of iterations of the graph neural network model is set, and the network parameters are optimized through the back propagation algorithm in each iteration, so that the scene category output by the model is closer to the real scene category; During the testing process, all test samples are input into the trained network model for verification, the predicted scene category of the test samples is output, the test results are statistically analyzed, and the cumulative accuracy of hyperspectral scene classification is calculated.
5. The interpretable hyperspectral scene classification method according to claim 4, characterized in that: In the training sample set, the loss function is used to calculate the loss value of the probability distribution vector of k categories and the true category, and the parameters of the graph neural network and the fully connected network are optimized by back propagation. After reaching the number of iterations T, the optimized network model is obtained; In the test sample set, select the graph data in the test sample set, input the network model optimized by training, select the category with the largest probability in the output probability distribution vector as the prediction result, count the number of correct identifications, and obtain the total accuracy OA, F1 score and Kappa coefficient KC: Where N true is the number of correctly classified test samples, N is the total number of test set samples; TP, FP, FN represent the number of true positive, false positive and false negative classification samples respectively, p o Represents the overall classification accuracy, that is, the sum of the number of correctly classified samples in each category divided by the total number of samples, p o The sum of the number of misclassified examples in each category divided by the total number of examples.
6. The method for classifying hyperspectral scenes according to claim 2, characterized in that: The original hyperspectral image is constructed as in and E represent the node set and edge set with features respectively; in the node set middle, Represents a hyperspectral image Each pixel of is obtained by the K-Means clustering algorithm to obtain the i-th cluster center. The cluster center is regarded as a node in the graph, i∈1,2,...,K, K is the number of cluster centers and the number of nodes in the graph; for each node in the graph, find its K nearest neighbor node set And for all Add a line from z j Point to z i Side A i,j , calculated using the radial basis function RBF: Among them, σ is a parameter that controls the width of RBF; all edges constitute the adjacency matrix 7. The interpretable hyperspectral scene classification method according to claim 2, characterized in that: Construct a graph neural network with a graph convolutional neural network, with p convolution layers and T iterations. After the vertex set V and the adjacency matrix A are given, create the corresponding graph Laplacian matrix L = DA, where D is a diagonal matrix representing the degree of A: D i,i =∑ j A i,j ; Get the symmetric normalized Laplace matrix L sym : Where I is the identity matrix; the propagation rule for graph convolution in the spectral domain is as follows: in, and In addition, H (l) represents the output in the lth layer, and h(·) is the weight of all layers The weights and biases to learn The activation function is used; the entire graph is represented by one node through global pooling, and the hyperspectral scene classification results are generated using the fully connected layer FC and the Softmax layer; each input scene category c is assigned a corresponding prediction label As shown below:
8. The interpretable hyperspectral scene classification method according to claim 4, characterized in that: During the model training process, the loss function is used to calculate the loss value of the probability distribution vector of k categories and the true category. The cross entropy loss function is as follows: Among them, y c Represents the real scene category; optimizes the graph neural network and fully connected network parameters through back propagation of the loss function until the number of iterations T is reached to obtain the optimized network model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of an interpretable hyperspectral scene classification method as described in any one of claims 1 to 8 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of an interpretable hyperspectral scene classification method as described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Hyperspectral image classification method and device based on subgraph adaptive neural network
CN120388284A