A hyperspectral image classification method and system based on upsampling and multi-branching

Through the upsampling and multi-branching method, the problems of data redundancy and insufficient sample size in hyperspectral image classification are solved, more valuable features are extracted, classification accuracy is improved, and different application needs are adapted to the needs of remote sensing images. Classification performance.

CN117765397BActive Publication Date: 2024-11-22INNER MONGOLIA AGRICULTURAL UNIVERSITY
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311833814.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2024-11-22
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

The existing hyperspectral image classification method based on deep learning has data redundancy problems when processing hyperspectral images, resulting in low classification accuracy, insufficient sample size affects performance, and the model size cannot meet different application needs.

Method used

Using the hyperspectral image classification method based on upsampling and multi-branch, the StemNet model and feature extraction network are used to perform de-redundant processing and feature extraction, and more valuable discriminant features are extracted using spectral and spatial information, which is suitable for small samples. Condition.

Benefits of technology

Without losing information, the classification accuracy of hyperspectral images is improved, suitable for different application scenarios, and the classification performance of remote sensing images is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117765397B_ABST
    Figure CN117765397B_ABST
Patent Text Reader

Abstract

The present invention discloses a hyperspectral image classification method and system based on upsampling and multi-branching, and belongs to the field of information technology service technology. The method includes: S1, collecting hyperspectral remote sensing image data, and obtaining a neighborhood block for each pixel point of the hyperspectral image data; the neighborhood block size is 9×9×b, b represents the number of spectral bands; S2, extracting features from the neighborhood block to obtain a feature map; constructing a StemNet model, and performing redundancy processing on the feature map based on the StemNet model to obtain a de-redundant feature map; S3, constructing a feature extraction network, and selecting a model for the feature extraction network based on the input parameters of the StemNet model, and extracting and fusing the de-redundant feature map based on the selected model to obtain a fusion feature; S4, completing hyperspectral image classification based on the fusion feature. The present invention is applied to the field of airborne remote sensing intelligent processing, and can improve the classification performance of hyperspectral remote sensing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of information technology services, and in particular relates to a hyperspectral image classification method and system based on upsampling and multi-branching. Background Art

[0002] In recent years, with the continuous development of sensor technology, hyperspectral image classification has gradually become a research hotspot in the field of remote sensing. The essence of hyperspectral image classification is to label each pixel in the image with a certain category. Hyperspectral image data is a three-dimensional data cube that can effectively reflect the relevant information of the imaging target. Therefore, hyperspectral image classification is widely used in precision agriculture, medical diagnosis, environmental monitoring, mineral analysis, etc.

[0003] In the early days, the classification of hyperspectral images mainly adopted traditional machine learning methods, such as SVM, logistic regression, K nearest neighbor, etc. These methods are generally divided into two stages to complete the classification task, which is called "two-stage classification". The two-stage classification method divides the hyperspectral image classification process into two steps: feature extraction and classifier design. The classification method based on traditional machine learning is generally based on artificially designed shallow features, which cannot reflect the essential characteristics of the observed object, and cannot guarantee the classification accuracy and robustness of the algorithm in complex situations.

[0004] Deep learning is a new technology for machine learning. Due to its strong learning and adaptability, and good portability, it has attracted more and more attention from researchers in recent years. Compared with traditional machine learning-based methods, deep learning-based methods can automatically learn deeper feature expressions from complex high-dimensional data and are more suitable for hyperspectral image classification. The classification method based on deep learning is also called an "end-to-end" integrated classification method.

[0005] The existing hyperspectral image classification methods based on deep learning have the following main shortcomings: (1) The nearly continuous spectral bands of hyperspectral images provide richer features for classification, but also cause a large amount of data redundancy. How to effectively remove redundant information without losing spectral spatial information is crucial to improving classification performance. (2) Hyperspectral images are difficult to obtain and the sample size is scarce. However, algorithm models based on deep learning generally require a large number of training samples, and insufficient sample size will seriously affect the classification performance of the algorithm. The classification accuracy of existing algorithms is not high in the case of small samples. (3) Generally, deep learning-based classification methods will increase the training time of the algorithm while deepening the network structure to improve the classification accuracy of the algorithm. However, when classification accuracy and training time cannot be achieved at the same time, different application scenarios have different requirements. Existing hyperspectral image classification methods do not distinguish the size of their own algorithm models to meet different application requirements. Summary of the invention

[0006] The present invention aims to solve the shortcomings of the prior art and proposes a hyperspectral image classification method and system based on upsampling and multi-branching, which makes full use of the spectral and spatial information of the hyperspectral image, eliminates the redundant information in the hyperspectral image and extracts more valuable discriminative features without losing information, thereby improving the classification accuracy of the hyperspectral image under small samples.

[0007] To achieve the above object, the present invention provides the following scheme: a hyperspectral image classification method based on upsampling and multi-branching, comprising the following steps:

[0008] S1, collecting hyperspectral remote sensing image data, and obtaining a neighborhood block for each pixel point of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands;

[0009] S2, extracting features from the neighborhood block to obtain a feature map; constructing a StemNet model, and performing redundancy removal processing on the feature map based on the StemNet model to obtain a de-redundant feature map;

[0010] S3, constructing a feature extraction network, and selecting a model for the feature extraction network based on the input parameters of the StemNet model, and extracting and fusing features of the de-redundant feature map based on the selected model to obtain fused features;

[0011] S4. Complete hyperspectral image classification based on the fusion features.

[0012] Further preferably, the method for obtaining the feature map includes:

[0013] The neighborhood block is input into a 3D-CNN with a size of (1×1×7, 24) and a BN layer with a Mish activation function to obtain the feature map with a size of (9×9×b, 24).

[0014] Further preferably, the StemNet model includes: an upsampling module and a model selection module;

[0015] The upsampling module is used to group the feature maps and divide each feature map; splice an equal portion of the feature map in each feature map to obtain the de-redundant feature map;

[0016] The model selection module is used to select a model based on the input parameters.

[0017] Further preferably, the feature extraction network includes: FTBTA-s model, FTBTA-m model and FTBTA-l model;

[0018] The FTBTA-s model includes a branch, which is a spectral branch, for extracting features using spectral information to obtain a spectral feature map;

[0019] The FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch, which are used to extract spectral feature graphs and spatial feature graphs respectively;

[0020] The FTBTA-1 model includes three branches, a spectral branch, a spatial X branch, and a spatial Y branch, which are respectively used to extract spectral feature graphs, spatial X feature graphs, and spatial Y feature graphs.

[0021] Further preferably, the method for the spectral branch to obtain the spectral characteristic graph comprises:

[0022] The de-redundant feature map is passed through a dense spectrum block to obtain a first feature map; the size of the first feature map is (18×18×c, 60), where c is an input parameter;

[0023] Then, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain a second feature map; the size of the second feature map is (18×18×1, 60);

[0024] Then the second feature map is weighted by a spectral attention block to obtain a third feature map;

[0025] Finally, the third feature map passes through the BN layer with Mish, the Dropout layer and the global average pooling layer in sequence to obtain the spectral feature map with a size of 1×60.

[0026] The present invention also provides a hyperspectral image classification system based on upsampling and multi-branching, the classification system is used to implement the above classification method, including: a neighborhood block acquisition module, a feature processing module, a fusion module and a classification module;

[0027] The neighborhood block acquisition module is used to collect hyperspectral remote sensing image data and obtain a neighborhood block for each pixel point of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands;

[0028] The feature processing module is used to extract features from the neighborhood block to obtain a feature map; construct a StemNet model, and perform redundancy removal processing on the feature map based on the StemNet model to obtain a redundancy-removed feature map;

[0029] The fusion module is used to construct a feature extraction network, and select a model for the feature extraction network based on the input parameters of the StemNet model, and extract and fuse features of the de-redundant feature map based on the selected model to obtain fused features;

[0030] The classification module is used to complete the hyperspectral image classification based on the fusion features.

[0031] Further preferably, the method for the feature processing module to obtain the feature map includes:

[0032] The neighborhood block is input into a 3D-CNN with a size of (1×1×7, 24) and a BN layer with a Mish activation function to obtain the feature map with a size of (9×9×b, 24).

[0033] Further preferably, the StemNet model includes: an upsampling module and a model selection module;

[0034] The upsampling module is used to group the feature maps and divide each feature map; splice an equal portion of the feature map in each feature map to obtain the de-redundant feature map;

[0035] The model selection module is used to select a model based on the input parameters.

[0036] Further preferably, the feature extraction network includes: FTBTA-s model, FTBTA-m model and FTBTA-l model;

[0037] The FTBTA-s model includes a branch, which is a spectral branch, for extracting features using spectral information to obtain a spectral feature map;

[0038] The FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch, which are used to extract spectral feature graphs and spatial feature graphs respectively;

[0039] The FTBTA-1 model includes three branches, a spectral branch, a spatial X branch, and a spatial Y branch, which are respectively used to extract spectral feature graphs, spatial X feature graphs, and spatial Y feature graphs.

[0040] Further preferably, the method for the spectral branch to obtain the spectral characteristic graph comprises:

[0041] The de-redundant feature map is passed through a dense spectrum block to obtain a first feature map; the size of the first feature map is (18×18×c, 60), where c is an input parameter;

[0042] Then, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain a second feature map; the size of the second feature map is (18×18×1, 60);

[0043] Then the second feature map is weighted by a spectral attention block to obtain a third feature map; finally, the third feature map is sequentially passed through a BN layer with Mish, a Dropout layer and a global average pooling layer to obtain the spectral feature map with a size of 1×60.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The present invention can make full use of the spectral and spatial information of hyperspectral images, eliminate redundant information in hyperspectral images and extract more valuable discriminative features without losing information, thereby improving the classification accuracy of hyperspectral images under small samples. Applied in the field of airborne remote sensing intelligent processing, it can improve the classification performance of hyperspectral remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0047] Figure 1 A schematic flow chart of a hyperspectral image classification method based on upsampling and multi-branching is provided for the implementation of the present invention;

[0048] Figure 2 A schematic diagram of the network structure of the StemNet model according to an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of the specific implementation details of the upsampling module of the StemNet model according to an embodiment of the present invention;

[0050] Figure 4 Schematic diagram of the structure of FTBTA-s model, FTBTA-m model and FTBTA-1 model according to the embodiment of the present invention;

[0051] Figure 5 A schematic diagram of the network structure of the triple attention mechanism used in the feature extraction process of an embodiment of the present invention;

[0052] Figure 6 The network structure diagram of the FTBTA-1 model implemented in the present invention;

[0053] Figure 7 This is a schematic diagram of classification results of an embodiment of the present invention;

[0054] (a) is a pseudo-color image of the Indian Pines (IP) dataset, and (b) is the real object category label;

[0055] Figure 8 This is a visualization diagram of the classification results of different methods on the Indian Pines (IP) dataset according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] Embodiment 1:

[0059] like Figure 1 As shown, this embodiment provides a hyperspectral image classification method based on upsampling and multi-branching (FTBTA), comprising the following steps:

[0060] S1. Collect hyperspectral remote sensing image data and obtain a neighborhood block for each pixel of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands.

[0061] In this embodiment, the hyperspectral dataset X1 is set to be composed of N labeled pixels. Select the central pixel x from the hyperspectral dataset X1 i The set of 9×9 neighboring pixels that generate the three-dimensional cube is If the target pixel is at the edge of the image, the missing neighboring pixel values ​​are set to 0.

[0062] At the same time, the three-dimensional cube set A is randomly divided into training sets X train , validation set X val And the test set X test , the corresponding labels are Y train , Y val and Y test . The training set X train Each pixel a i , and its neighboring pixels of size 9×9 on Friday, are input into the following StemNet model. valAnd the test set X test Used for subsequent testing and optimization of the network model.

[0063] S2. Extract features from the neighborhood blocks to obtain a feature map; construct a StemNet model, and perform redundancy removal processing on the feature map based on the StemNet model to obtain a de-redundant feature map.

[0064] Specifically, the neighborhood block obtained above is input into a 3D-CNN of size (1×1×7, 24) and a BN layer with a Mish activation function to obtain a feature map of size (9×9×b, 24).

[0065] Among them, the calculation of the convolution operation of 3D-CNN is as follows:

[0066]

[0067] In the formula, Represents the output of the j-th feature map of the i-th layer at the (x, y, z) position. i , T i and R i are the width, height and spectral dimension of the convolution kernel respectively. Represents the output of the jth convolution kernel of the i-th layer at the position (s, t, r). Represents the output value of the mth feature map of the previous layer at the position (x+s,y+t,z+r).

[0068] Since the ReLU activation function forces negative values ​​to be set to 0, when the input is negative, the weights cannot be updated, resulting in neuron death. This embodiment uses the Mish activation function. Mish is a self-regularized non-monotonic activation function with a range of [-0.31,∞]. The calculation of Mish is as follows:

[0069] Mish(x) = x × tanh(ln(1+e x )),

[0070] Where x represents the input and tanh is the activation function.

[0071] like Figure 2 As shown in Figure 1, the StemNet model includes: an upsampling module and a model selection module. The upsampling module is used to group feature maps and split each feature map; an equal portion of feature maps in each feature map is spliced ​​to obtain a de-redundant feature map. The model selection module is used to select a model based on the input parameter c.

[0072] like Figure 3As shown in , the main function of upsampling is to remove redundant information by compressing the spectral spatial features without losing the spectral spatial information. The specific operation is: divide all feature maps into 4 groups, and then cut each spectral feature map into 4 equal parts. Then, select one equal part of a feature map from each group for splicing, and then concat every 4 spliced ​​feature maps into a spectral feature. The specific implementation details are as follows Figure 3 Taking the Indian Pines (IP) dataset as an example, the size becomes (18×18×50,24), the feature map is reduced to 1 / 4 of the original size, and the spatial size is expanded to 4 times the original size.

[0073] The implementation details of the StemNet model are shown in Table 1.

[0074] Table 1

[0075]

[0076] S3. Construct a feature extraction network, select a model for the feature extraction network based on the input parameters of the StemNet model, extract and fuse the de-redundant feature map based on the selected model, and obtain the fused feature.

[0077] In order to be applied to different scenarios, in this embodiment, Figure 4 As shown in Figure 2, the feature extraction network is divided into three different models: FTBTA-s model, FTBTA-m model and FTBTA-l model. The network structures of the three models are different, such as Figure 4 shown.

[0078] The FTBTA-s model includes a branch, which is a spectral branch, which is used to extract features using spectral information to obtain a spectral feature map; the FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch; they are used to extract spectral feature maps and spatial feature maps respectively; the FTBTA-l model includes three branches, one is a spectral branch, one is a spatial X branch, and one is a spatial Y branch; they are used to extract spectral feature maps, spatial X feature maps and spatial Y feature maps respectively.

[0079] In this embodiment, a=b / 4 is set, c is related to a, and the c value of different models is different. Taking the FTBTA-l model as an example, in the IP data set, after 2 3D-CNN convolution operations and transpose, the final output feature map is (18×18×50,24). Then input it into the three branches respectively to extract the features on the three branches. The values ​​of c of the model selection module of the FTBTA-s model, FTBTA-m model and FTBTA-l model are shown in Table 2.

[0080] Table 2

[0081]

[0082] In the feature extraction process, this embodiment uses a DenseNet module and an attention module based on 3D-CNN.

[0083] Among them, DenseNet connects all layers to each other, greatly reducing the number of parameters, strengthening feature propagation, and realizing feature reuse. In DenseNet, the calculation method of the dense block of the lth layer is as follows:

[0084] x l =H l ([x0,x1,...,x l-1 ]),

[0085] In the formula, H l (.) represents the nonlinear transformation operation of the lth layer. [x0,x1,...,x l-1 ] represents the concatenation of feature map tensors from layer 0 to layer l-1, i.e., the stacking operation is performed on the channel dimension. Assuming that a network has l layers, the number of connections of DenseNet is l(l+1) / 2.

[0086] In the feature extraction network, a triple attention mechanism is also used, such as Figure 5 As shown. In the figure, the attention map The input feature map Directly calculated. Where C represents the number of channels, H×W represents the size of the input image block. N×N represents the size of the attention matrix, where N is equal to C in the spectral branch, N is equal to H in the spatial X branch, and N is equal to W in the spatial Y branch. The formula for calculating the attention map is as follows:

[0087]

[0088] In the formula, A i , A j They represent the feature maps of channel i and channel j respectively.

[0089] Then transpose it and do matrix multiplication with the reshaped A, multiply it by the scale factor α, and then reshape it back to the original shape. Finally, add it to A to get the final output feature map Among them, α is initialized to 0 and gradually learns to obtain larger weights. The final output feature map is calculated as follows:

[0090]

[0091] The following describes the three models of this embodiment:

[0092] FTBTA-s: In the StemNet model, the value of the model selection module c is: c = a / 4, where a = b / 4. FTBTA-s only uses spectral information to extract features for classification. In the dense block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. FTBTA-s only uses the spectral attention block in the triple attention mechanism in the network structure.

[0093] FTBTA-m: In the StemNet model, the value of the model selection module c is: c = a / 2. FTBTA-m is divided into two branches: the spectral branch and the spatial branch extract features respectively. Then, the features extracted from the two branches are fused for classification. In the dense spectral block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. In the dense spatial block, the size of the 3D-CNN convolution kernel is 5×5×1. In addition, FTBTA-m also applies spectral attention blocks and spatial attention blocks in the two branches respectively. Compared with the triple attention mechanism, the spatial attention block is not divided into spatial X attention block and spatial Y attention block.

[0094] FTBTA-1: In the StemNet module, the value of the model selection module c is: c = a. The detailed network structure of FTBTA-1 is as follows Figure 6 As shown. FTBTA-l is divided into three branches: spectral branch, spatial X branch and spatial Y branch to extract features respectively. Then, the features extracted from the three branches are fused for classification. In the dense spectral block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. In the dense spatial X block, the size of the 3D-CNN convolution kernel is 5×1×1. In the dense spatial Y block, the size of the 3D-CNN convolution kernel is 1×5×1. In addition, a triple attention mechanism is used in the three branches.

[0095] Since FTBTA-s only uses spectral information, that is, there is only one branch in the feature extraction process, the extracted features can be directly used for hyperspectral image classification without merging branches. FTBTA-m extracts features from the spectral branch and the spatial branch separately, so the two branches must be merged together before the classification task is performed, and the splicing operation is used when merging branches instead of a simple addition operation. FTBTA-l extracts features from the spectral branch, the spatial X branch, and the spatial Y branch separately, so the features extracted from the three branches must be spliced ​​together before the classification task is performed.

[0096] This embodiment takes the FTBTA-1 model as an example. The network structure and implementation process of FTBTA-s and FTBTA-m are similar to FTBA-1, except that the number of branches and the size of the parameter c input to the model selection module in the StemNet module are different. FTBTA-s only retains the spectral branch. FTBTA-m is a two-branch network model. Compared with FTBTA-1, the spatial branch is not divided into spatial X and spatial Y branches. The FTBA-1 model is divided into three branches: the spectral branch, the spatial X branch and the spatial Y branch extract the spectral feature map, the spatial X feature map and the spatial Y feature map respectively, and the spectral attention block, the spatial X attention block and the spatial Y attention block are respectively applied to the three branches to refine the extracted features, and then the feature maps extracted from the three branches are fused for classification.

[0097] The method of obtaining the spectral characteristic graph of the spectral branch includes:

[0098] The de-redundant feature map is passed through a dense spectrum block to obtain the first feature map; the dense spectrum block consists of 3 groups of 3D-CNN and BN layer with Mish. Each 3D-CNN has 12 channels and the convolution kernel size is 1×1×7. The size of the first feature map is (18×18×c, 60), where c is the input parameter.

[0099] After that, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain the second feature map; the second feature map size is (18×18×1, 60); and it is used as the input of the spectral attention block.

[0100] The second feature map is then weighted by a spectral attention block to obtain the third feature map; the spectral attention block does not change the size of the input feature map, and its function is to increase the weight of useful spectral information.

[0101] Finally, the third feature map passes through the BN layer with Mish, the Dropout layer, and the global average pooling layer in sequence to obtain a spectral feature map of size 1 × 60. The implementation details of the spectral branch are shown in Table 3.

[0102] Table 3

[0103]

[0104] Spatial X-branch feature extraction: The implementation process of the spatial X-branch is the same as that of the spectral branch. The spatial X-branch consists of a dense spatial X-block based on 3D-CNN and a spatial X-attention block. The 3D-CNN convolution kernel size of the dense spatial X-block is 5×1×1. After passing through the spatial X-branch, a spatial X-feature map of size 1×60 is obtained. The implementation details of the spatial X-branch are shown in Table 4.

[0105] Table 4

[0106]

[0107] Spatial Y branch feature extraction: The implementation process of the spatial Y branch is the same as that of the spectral branch and the spatial X branch. The spatial Y branch consists of a dense spatial Y block and a spatial Y attention block. The size of the 3D-CNN convolution kernel in the dense spatial Y block is 1×5×1. After passing through the spatial Y branch, the output is a spatial Y feature map of size 1×60. The implementation details of the spatial Y branch are shown in Table 5.

[0108] Table 5

[0109]

[0110] The feature fusion process includes:

[0111] Through the spectral branch, spatial X branch and spatial Y branch, the spectral feature map, spatial X feature map and spatial Y feature map are obtained. Then, the three features are fused together for classification by splicing. Since the three feature maps are not in the same domain, the splicing operation is used instead of the simple addition operation. The splicing operation can maintain the independence between the three branches, while the addition operation will mix the features of the three branches together.

[0112] S4. Complete hyperspectral image classification based on fusion features.

[0113] Finally, the fusion features are passed through the fully connected layer and the softmax activation function to obtain the final classification result. Figure 7 shown.

[0114] Embodiment 2:

[0115] In order to verify the feasibility and effectiveness of the hyperspectral image classification method based on upsampling and multi-branching proposed in the present invention, this embodiment selects a public airborne hyperspectral remote sensing image dataset Indian Pines (IP) dataset, and experiments are carried out on the hyperspectral remote sensing image classification algorithm proposed in the present invention. The dataset was collected by the airborne visible / infrared imaging spectrometer (AVIRIS) sensor in northwestern Indiana, USA in 1992. It has 224 spectral bands and a spatial resolution of 145×145 pixels. After removing some invalid bands and background pixels, the entire dataset contains 200 spectral bands, 10,249 pixels and 16 types of ground objects for experimental research and comparative analysis.

[0116] In addition, this implementation method selects 7 novel hyperspectral remote sensing image classification algorithms in the past six years as comparison methods, including:

[0117] 1) The CDCNN method proposed by Lee and Kwon in their paper “Going deeper with contextual CNN for hyperspectral image classification[J].IEEE Trans Image Process.2017,26(10):4843-4855.”

[0118] 2) The SSRN method proposed by Zhong et al. in their paper “Spectral-spatial residual network for hyperspectral image classification: A 3-D deep learning framework [J]. IEEE Trans Geosci Remote Sens. 2018, 56(2): 847-858.”

[0119] 3) The FDSSC method proposed by Wang et al. in their paper “A fast dense spectral-spatial convolution network frame work for hyperspectral images classification[J]. RemoteSens. 2018, 10(7): 1068.”

[0120] 4) The DBMA method proposed by Ma et al. in their paper “Double-branch multi-attention mechanism networkfor hyperspectral image classification[J]. Remote Sens. 2019, 11(11): 1307.”

[0121] 5) The DBDA method proposed by Li et al. in their paper “Classification of hyperspectral image based on double-branch dual-attention mechanism network[J]. Remote Sens. 2020, 12(3): 582.”

[0122] 6) A proposed by Roy et al. in their paper “Attention-Based Adaptive Spectral-SpatialKernel ResNet for Hyperspectral Image Classification[J].IEEE Trans. Geosci. Remote Sens., 2021.59(9):7831-7843.” 2 S 2 K-ResNet method.

[0123] 7) The GMA-Net method proposed by Lu et al. in their paper “Grouped Multi-Attention Network for Hyperspectral Image Spectral-Spatial Classification[J].IEEE Trans. Geosci. Remote Sens., 2023. 61: 1-12.”

[0124] For fair comparison, all experiments were performed on the same platform. All experiments were implemented on PyTorch1.10.0 and NVIDIA GeForce RTX 3060 GPU with 32GB RAM. The batch size was set to 16, the optimizer was set to Adan, and the learning rate was 0.0005. The total number of epochs was set to 150, and the step size of each epoch was 30. Each method was independently iterated for 10 times, and the experimental results were the average of the results of 10 iterations. The input size was 9×9×b, where b is the number of spectral bands.

[0125] In the Indian Pines (IP) dataset, the bands severely affected by water vapor are removed, and the number of valid samples is 10249. Among them, 3% is the training set, 3% is the validation set, and the remaining 94% is the test set. Table 6 shows the quantitative experimental results of the classification algorithm proposed in the present invention and the above 7 comparison methods on the IP dataset, including overall classification accuracy (OverallAccuracy, OA), average classification accuracy (AverageAccuracy, AA) and Kappa coefficient, where the best classification result in each category is bolded. The classification result visualization diagram is shown in the figure Figure 8 shown.

[0126] Table 6

[0127]

[0128] As can be seen from Table 6, compared with several other methods, the proposed method FTBTA-1 has the highest OA and Kappa scores, which are 95.86% and 95.28% respectively. FTBTA-s has the best AA result, which is 94.49%. Due to the very limited training samples, the CDCNN method has not been well trained, and its accuracy is much lower than other methods, with an OA of only 64.21%. Due to the dual-branch architecture and better use of the attention mechanism, DBDA and GMA-Net also achieved relatively good classification results. The three network models of FTBTA: FTBTA-s, FTBTA-m and FTBTA-l all use StemNet, DenseNet based on 3D-CNN and attention modules, which effectively utilize the spectral and spatial information of hyperspectral images, and the OA can reach more than 95%.

[0129] In addition, from Figure 8 It can be seen that the classification map of the CDCNN method based on 2D-CNN has more noise points and the boundary area is seriously misclassified. The three models based on 3D-CNN: SSRN, FDSSC, DBMA, DBDA, A2S2K-ResNet, GMA-Net and the proposed method FTBTA significantly reduce the classification noise points and the misclassification of the boundary area. Among them, the three proposed methods have the highest degree of restoration of the original labels.

[0130] In order to further verify the effectiveness of the three FTBTA models, different proportions of training samples are used to verify the OA of 10 different methods, as shown in Table 7, where the highest OA is bolded. In addition, in addition to the IP dataset, three public datasets are added: Pavia University (UP), Salinas Valley (SV), and Houston 2013 (HT) experiments. The proportions of training samples in the IP and HT datasets are 0.5%, 1%, 3%, and 5%, respectively, and the proportions of training samples in the UP and SV datasets are 0.1%, 0.5%, 1%, and 5%, respectively.

[0131] Table 7

[0132]

[0133] As the proportion of training samples increases, the OA of each method gradually improves, and the classification performance gap gradually narrows. Among all the methods, the models proposed in the present invention: FTBTA-s, FTBTA-m and FTBTA-l show better classification performance, among which FTBTA-l has the best classification performance. Compared with other methods, the FTBTA method proposed in the present invention adopts the StemNet module, which can effectively remove redundant information without losing information. In addition, the 3D-CNN-based DenseNet and attention mechanism are used to extract features, making full use of the spectral and spatial information of hyperspectral images. Among them, FTBTA-l adopts a three-branch structure, which can extract more valuable features for hyperspectral image classification, so its classification accuracy is higher than that of FTBTA-s and FTBTA-m.

[0134] Table 8 compares the inference time and computational complexity of different methods. It can be observed that in terms of the number of trainable weight parameters (Parameters) updated during back propagation, the three FTBTA models proposed in the present invention have certain advantages over other networks. FTBTA-s and FTBTA-m use the least number of parameters, and even the FTBTA-l model with a three-branch structure uses less than 1M parameters.

[0135] Table 8

[0136]

[0137] In addition, Table 8 also compares the inference time of different methods on the IP, UP, SV and HT datasets. In the experiment, the batch size is 12, and the inference time is averaged 1000 times, that is, the average running time of each batch size. For the IP dataset, the inference time of FTBTA-s is at least 2.28ms. For the UP, SV and HT datasets, the inference time of CDCNN is the shortest, which is 2.35ms, 2.22ms and 2.23ms respectively. Secondly, the inference time of FTBTA-s is the second shortest, which is 3.91ms, 3.02ms and 3.43ms respectively. However, compared with CDCNN, the classification accuracy of the method proposed in the present invention is higher. CDCNN is a method based on 2D-CNN, and FTBTA-s has the shortest inference time among all 3D-CNN-based methods. Due to its complex network structure, FTBTA-l has the highest inference time among all methods, but the classification accuracy is the highest among all methods.

[0138] The above network structure derivation and comparative experimental results analysis prove the effectiveness of the algorithm of the present invention in reducing the complexity of deep models and improving classification performance.

[0139] Embodiment three:

[0140] This embodiment provides a hyperspectral image classification system based on upsampling and multi-branching, including: a neighborhood block acquisition module, a feature processing module, a fusion module and a classification module.

[0141] The neighborhood block acquisition module is used to collect hyperspectral remote sensing image data and obtain a neighborhood block for each pixel of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands. Specifically, the working process of the neighborhood block acquisition module includes:

[0142] In this embodiment, the hyperspectral dataset X1 is set to be composed of N labeled pixels. Select the central pixel x from the hyperspectral dataset X1 i The set of 9×9 neighboring pixels that generate the three-dimensional cube is If the target pixel is at the edge of the image, the missing neighboring pixel values ​​are set to 0.

[0143] At the same time, the three-dimensional cube set A is randomly divided into training sets X train , validation set X val And the test set X test , the corresponding labels are Y train , Y val and Y test . The training set X train Each pixel a i , and its neighboring pixels of size 9×9 on Friday, are input into the following StemNet model. val And the test set X test Used for subsequent testing and optimization of the network model.

[0144] The feature processing module is used to extract features from the neighborhood blocks to obtain feature maps; build a StemNet model, and perform redundancy removal on the feature maps based on the StemNet model to obtain redundancy-free feature maps. Specifically, the working process of the feature processing module includes:

[0145] Specifically, the neighborhood block obtained above is input into a 3D-CNN of size (1×1×7, 24) and a BN layer with a Mish activation function to obtain a feature map of size (9×9×b, 24).

[0146] Among them, the calculation of the convolution operation of 3D-CNN is as follows:

[0147]

[0148] In the formula, Represents the output of the j-th feature map of the i-th layer at the (x, y, z) position.i , T i and R i are the width, height and spectral dimension of the convolution kernel respectively. Represents the output of the jth convolution kernel of the i-th layer at the position (s, t, r). Represents the output value of the mth feature map of the previous layer at the position (x+s,y+t,z+r).

[0149] Since the ReLU activation function forces negative values ​​to be set to 0, when the input is negative, the weights cannot be updated, resulting in neuron death. This embodiment uses the Mish activation function. Mish is a self-regularized non-monotonic activation function with a range of [-0.31,∞]. The calculation of Mish is as follows:

[0150] Mish(x) = x × tanh(ln(1+e x )),

[0151] Where x represents input and tanh represents activation function.

[0152] like Figure 2 As shown in Figure 1, the StemNet model includes: an upsampling module and a model selection module. The upsampling module is used to group feature maps and split each feature map; an equal portion of feature maps in each feature map is spliced ​​to obtain a de-redundant feature map. The model selection module is used to select a model based on the input parameter c.

[0153] like Figure 3 As shown in , the main function of upsampling is to remove redundant information by compressing the spectral spatial features without losing the spectral spatial information. The specific operation is: divide all feature maps into 4 groups, and then cut each spectral feature map into 4 equal parts. Then, select one equal part of a feature map from each group for splicing, and then concat every 4 spliced ​​feature maps into a spectral feature. The specific implementation details are as follows Figure 3 Taking the IndianPines (IP) dataset as an example, the size becomes (18×18×50,24), the feature map is reduced to 1 / 4 of the original size, and the spatial size is expanded to 4 times the original size.

[0154] The fusion module is used to build a feature extraction network, select a model for the feature extraction network based on the input parameters of the StemNet model, extract and fuse the de-redundant feature map based on the selected model, and obtain fused features. Specifically, the working process of the fusion module includes:

[0155] In order to be applied to different scenarios, in this embodiment, Figure 4As shown in Figure 2, the feature extraction network is divided into three different models: FTBTA-s model, FTBTA-m model and FTBTA-l model. The network structures of the three models are different, such as Figure 4 shown.

[0156] The FTBTA-s model includes a branch, which is a spectral branch, which is used to extract features using spectral information to obtain a spectral feature map; the FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch; they are used to extract spectral feature maps and spatial feature maps respectively; the FTBTA-l model includes three branches, one is a spectral branch, one is a spatial X branch, and one is a spatial Y branch; they are used to extract spectral feature maps, spatial X feature maps and spatial Y feature maps respectively.

[0157] In this embodiment, a=b / 4 is set, c is related to a, and the c value of different models is different. Taking the FTBTA-1 model as an example, in the IP data set, after 2 3D-CNN convolution operations and transpose, the final output feature map is (18×18×50,24). Then it is input into the three branches respectively to extract the features on the three branches.

[0158] In the feature extraction process, this embodiment uses a DenseNet module and an attention module based on 3D-CNN.

[0159] Among them, DenseNet connects all layers to each other, greatly reducing the number of parameters, strengthening feature propagation, and realizing feature reuse. In DenseNet, the calculation method of the dense block of the lth layer is as follows:

[0160] x l =H l ([x0,x1,...,x l-1 ]),

[0161] In the formula, H l (.) represents the nonlinear transformation operation of the lth layer. [x0,x1,...,x l-1 ] represents the concatenation of feature map tensors from layer 0 to layer l-1, i.e., the stacking operation is performed on the channel dimension. Assuming that a network has l layers, the number of connections of DenseNet is l(l+1) / 2.

[0162] In the feature extraction network, a triple attention mechanism is also used, such as Figure 5 As shown. In the figure, the attention map The input feature map Directly calculated. Where C represents the number of channels, H×W represents the size of the input image block. N×N represents the size of the attention matrix, where N is equal to C in the spectral branch, N is equal to H in the spatial X branch, and N is equal to W in the spatial Y branch. The formula for calculating the attention map is as follows:

[0163]

[0164] In the formula, A i , A j They represent the feature maps of channel i and channel j respectively.

[0165] Then transpose it and do matrix multiplication with the reshaped A, multiply it by the scale factor α, and then reshape it back to the original shape. Finally, add it to A to get the final output feature map Among them, α is initialized to 0 and gradually learns to obtain larger weights. The final output feature map is calculated as follows:

[0166]

[0167] The following describes the three models of this embodiment:

[0168] FTBTA-s: In the StemNet model, the value of the model selection module c is: c = a / 4, where a = b / 4. FTBTA-s only uses spectral information to extract features for classification. In the dense block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. FTBTA-s only uses the spectral attention block in the triple attention mechanism in the network structure.

[0169] FTBTA-m: In the StemNet model, the value of the model selection module c is: c = a / 2. FTBTA-m is divided into two branches: the spectral branch and the spatial branch extract features respectively. Then, the features extracted from the two branches are fused for classification. In the dense spectral block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. In the dense spatial block, the size of the 3D-CNN convolution kernel is 5×5×1. In addition, FTBTA-m also applies spectral attention blocks and spatial attention blocks in the two branches respectively. Compared with the triple attention mechanism, the spatial attention block is not divided into spatial X attention block and spatial Y attention block.

[0170] FTBTA-1: In the StemNet module, the value of the model selection module c is: c = a. The detailed network structure of FTBTA-1 is as follows Figure 6As shown. FTBTA-l is divided into three branches: spectral branch, spatial X branch and spatial Y branch to extract features respectively. Then, the features extracted from the three branches are fused for classification. In the dense spectral block, the size of the 3D-CNN convolution kernel is 1×1×7, and each 3D-CNN has 12 channels. In the dense spatial X block, the size of the 3D-CNN convolution kernel is 5×1×1. In the dense spatial Y block, the size of the 3D-CNN convolution kernel is 1×5×1. In addition, a triple attention mechanism is used in the three branches.

[0171] Since FTBTA-s only uses spectral information, that is, there is only one branch in the feature extraction process, the extracted features can be directly used for hyperspectral image classification without merging branches. FTBTA-m extracts features from the spectral branch and the spatial branch separately, so the two branches must be merged together before the classification task is performed, and the splicing operation is used when merging branches instead of a simple addition operation. FTBTA-l extracts features from the spectral branch, the spatial X branch, and the spatial Y branch separately, so the features extracted from the three branches must be spliced ​​together before the classification task is performed.

[0172] This embodiment takes the FTBTA-1 model as an example. The network structure and implementation process of FTBTA-s and FTBTA-m are similar to FTBA-1, except that the number of branches and the size of the parameter c input to the model selection module in the StemNet module are different. FTBTA-s only retains the spectral branch. FTBTA-m is a two-branch network model. Compared with FTBTA-1, the spatial branch is not divided into spatial X and spatial Y branches. The FTBA-1 model is divided into three branches: the spectral branch, the spatial X branch and the spatial Y branch extract the spectral feature map, the spatial X feature map and the spatial Y feature map respectively, and the spectral attention block, the spatial X attention block and the spatial Y attention block are respectively applied to the three branches to refine the extracted features, and then the feature maps extracted from the three branches are fused for classification.

[0173] The method of obtaining the spectral characteristic graph of the spectral branch includes:

[0174] The de-redundant feature map is passed through a dense spectrum block to obtain the first feature map; the dense spectrum block consists of 3 groups of 3D-CNN and BN layer with Mish. Each 3D-CNN has 12 channels and the convolution kernel size is 1×1×7. The size of the first feature map is (18×18×c, 60), where c is the input parameter.

[0175] After that, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain the second feature map; the second feature map size is (18×18×1, 60); and it is used as the input of the spectral attention block.

[0176] The second feature map is then weighted by a spectral attention block to obtain the third feature map; the spectral attention block does not change the size of the input feature map, and its function is to increase the weight of useful spectral information.

[0177] Finally, the third feature map passes through the BN layer with Mish, the Dropout layer, and the global average pooling layer in sequence to obtain a spectral feature map of size 1×60.

[0178] Spatial X branch feature extraction: The implementation process of the spatial X branch is the same as that of the spectral branch. The spatial X branch consists of a dense spatial X block based on 3D-CNN and a spatial X attention block. The 3D-CNN convolution kernel size of the dense spatial X block is 5×1×1. After the spatial X branch, a spatial X feature map of size 1×60 is obtained.

[0179] Spatial Y branch feature extraction: The implementation process of the spatial Y branch is the same as that of the spectral branch and the spatial X branch. The spatial Y branch consists of a dense spatial Y block and a spatial Y attention block. The size of the 3D-CNN convolution kernel in the dense spatial Y block is 1×5×1. After the spatial Y branch, the output is a spatial Y feature map of size 1×60.

[0180] The feature fusion process includes:

[0181] Through the spectral branch, spatial X branch and spatial Y branch, the spectral feature map, spatial X feature map and spatial Y feature map are obtained. Then, the three features are fused together for classification by splicing. Since the three feature maps are not in the same domain, the splicing operation is used instead of the simple addition operation. The splicing operation can maintain the independence between the three branches, while the addition operation will mix the features of the three branches together.

[0182] The classification module is used to complete the hyperspectral image classification based on fusion features.

[0183] Finally, the fusion features are passed through a fully connected layer and a softmax activation function to obtain the final classification result.

[0184] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A hyperspectral image classification method based on upsampling and multi-branching, characterized in that: The following steps are involved: S1, collecting hyperspectral remote sensing image data, and obtaining a neighborhood block for each pixel point of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands; S2, extracting features from the neighborhood block to obtain a feature map; constructing a StemNet model, and performing redundancy removal processing on the feature map based on the StemNet model to obtain a de-redundant feature map; The StemNet model includes: an upsampling module and a model selection module; The upsampling module is used to group the feature maps and divide each feature map; splice an equal portion of the feature map in each feature map to obtain the de-redundant feature map; The model selection module is used to select a model based on the input parameter c; S3, constructing a feature extraction network, and selecting a model for the feature extraction network based on the input parameters of the StemNet model, and extracting and fusing features of the de-redundant feature map based on the selected model to obtain fused features; The feature extraction network includes: FTBTA-s model, FTBTA-m model and FTBTA-l model; The FTBTA-s model includes a branch, which is a spectral branch, for extracting features using spectral information to obtain a spectral feature map; in the StemNet model, the value of the model selection module c is: c = a / 4, where a = b / 4; The FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch, which are used to extract spectral feature maps and spatial feature maps respectively. In the StemNet model, the value of the model selection module c is: c = a / 2; The FTBTA-1 model includes three branches, one is a spectral branch, one is a spatial X branch, and one is a spatial Y branch; they are used to extract spectral feature graphs, spatial X feature graphs, and spatial Y feature graphs respectively; in the StemNet model, the value of the model selection module c is: c=a; S4. Complete hyperspectral image classification based on the fusion features.

2. The hyperspectral image classification method based on upsampling and multi-branching according to claim 1, characterized in that: The method for obtaining the feature map includes: The neighborhood block is input into a 3D-CNN with a size of (1×1×7, 24) and a BN layer with a Mish activation function to obtain the feature map with a size of (9×9×b, 24).

3. The hyperspectral image classification method based on upsampling and multi-branching according to claim 1, characterized in that: The method for the spectral branch to obtain the spectral characteristic graph includes: The de-redundant feature map is passed through a dense spectrum block to obtain a first feature map; the size of the first feature map is (18×18×c, 60), where c is an input parameter; Then, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain a second feature map; the size of the second feature map is (18×18×1, 60); Then the second feature map is weighted by a spectral attention block to obtain a third feature map; Finally, the third feature map passes through the BN layer with Mish, the Dropout layer and the global average pooling layer in sequence to obtain the spectral feature map with a size of 1×60.

4. A hyperspectral image classification system based on upsampling and multi-branching, the classification system is used to implement the classification method according to any one of claims 1 to 3, characterized in that: include: Neighborhood block acquisition module, feature processing module, fusion module and classification module; The neighborhood block acquisition module is used to collect hyperspectral remote sensing image data and obtain a neighborhood block for each pixel point of the hyperspectral image data; the neighborhood block size is 9×9×b, where b represents the number of spectral bands; The feature processing module is used to extract features from the neighborhood block to obtain a feature map; construct a StemNet model, and perform redundancy removal processing on the feature map based on the StemNet model to obtain a redundancy-removed feature map; The StemNet model includes: an upsampling module and a model selection module; The upsampling module is used to group the feature maps and divide each feature map; splice an equal portion of the feature map in each feature map to obtain the de-redundant feature map; The model selection module is used to select a model based on the input parameter c; The fusion module is used to construct a feature extraction network, and select a model for the feature extraction network based on the input parameters of the StemNet model, and extract and fuse features of the de-redundant feature map based on the selected model to obtain fused features; The feature extraction network includes: FTBTA-s model, FTBTA-m model and FTBTA-l model; The FTBTA-s model includes a branch, which is a spectral branch, for extracting features using spectral information to obtain a spectral feature map; in the StemNet model, the value of the model selection module c is: c = a / 4, where a = b / 4; The FTBTA-m model includes two branches, one is a spectral branch and the other is a spatial branch, which are used to extract spectral feature maps and spatial feature maps respectively. In the StemNet model, the value of the model selection module c is: c = a / 2; The FTBTA-1 model includes three branches, a spectral branch, a spatial X branch, and a spatial Y branch, which are respectively used to extract spectral feature maps, spatial X feature maps, and spatial Y feature maps; in the StemNet model, the value of the model selection module c is: c=a; the classification module is used to complete the hyperspectral image classification based on the fusion features.

5. The hyperspectral image classification system based on upsampling and multi-branching according to claim 4, characterized in that: The method for the feature processing module to obtain the feature map includes: The neighborhood block is input into a 3D-CNN with a size of (1×1×7, 24) and a BN layer with a Mish activation function to obtain the feature map with a size of (9×9×b, 24).

6. The hyperspectral image classification system based on upsampling and multi-branching according to claim 5, characterized in that: The method for the spectral branch to obtain the spectral characteristic graph includes: The de-redundant feature map is passed through a dense spectrum block to obtain a first feature map; the size of the first feature map is (18×18×c, 60), where c is an input parameter; Then, the first feature map passes through a 3D-CNN with a size of 1×1×c and a BN layer with Mish to obtain a second feature map; the size of the second feature map is (18×18×1, 60); Then the second feature map is weighted by a spectral attention block to obtain a third feature map; Finally, the third feature map passes through the BN layer with Mish, the Dropout layer and the global average pooling layer in sequence to obtain the spectral feature map with a size of 1×60.

Citation Information

Patent Citations

  • Hyperspectral image classification method based on attention mechanism and weight sharing

    CN113095409A

  • Three-branch three-attention mechanism hyperspectral image classification method combined with D3D

    CN114758170A

  • Hyperspectral remote sensing image classification method based on attention joint network

    CN115564996A

  • Image classification method of fusion network based on convolutional neural network and enhanced graph attention network

    CN116152561A

  • Hyperspectral image classification method and system based on multiple branches and improved Dense2Net

    CN116883726A