A Hyperspectral Image Classification Method and System

By using technologies such as channel interaction and spatial window expansion in hyperspectral image classification method, combining the double-headed self-attention layer to capture non-local spatial information, the problem of spectral spatial feature extraction in traditional methods is solved, and the performance and generalization ability of classification tasks are improved.

CN114581789BActive Publication Date: 2025-03-14INSPUR OPTOELECTRONICS SATELLITE TECHNOLOGY (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210158771.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2025-03-14
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

Traditional hyperspectral image classification methods are difficult to efficiently extract discriminant and sufficiently robust spectral spatial features, especially in complex scenarios.

Method used

A hyperspectral image classification method is adopted to obtain mapping features through channel interaction and compression of cell spectral dimensions, as well as spatial window expansion and completeness of cell sample spatial dimensions. Then, two information interactions are performed based on the mapping features, and non-local spatial interaction information is captured using the double-headed self-attention layer to obtain the spectral-space features. Ultimately, a classifier is used for cell classification.

Benefits of technology

This method expands the receptive field of capturing spatial information, acquires richer and more robust spectral spatial features, and improves the model performance and generalization capabilities of hyperspectral image classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581789B_ABST
    Figure CN114581789B_ABST
Patent Text Reader

Abstract

The present invention provides a hyperspectral image classification method and system, including: obtaining a hyperspectral image and preprocessing the hyperspectral image; performing channel interaction and compression of the pixel spectral dimension, and spatial window expansion and matching of the pixel sample space dimension on the preprocessed hyperspectral image to obtain mapping features; based on the mapping features, performing two information interactions in sequence to obtain spectral-spatial features; based on the spectral-spatial features, using a classifier to obtain the category to which each pixel in the acquired hyperspectral image belongs; wherein the information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain output features. The receptive field for capturing spatial information is expanded, and more abundant and robust spectral spatial information can be captured to efficiently complete the hyperspectral image classification task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a hyperspectral image classification method and system. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Hyperspectral image classification is the core technology of hyperspectral image processing and interpretation. According to a given set of ground object categories and based on the spectral and spatial characteristics of hyperspectral images, the hyperspectral image classification task aims to assign a unique semantic label to each hyperspectral image pixel.

[0004] Traditional hyperspectral image classification methods have difficulty in efficiently extracting discriminative and sufficiently robust spectral-spatial features from the spectral and spatial dimensions to complete the pixel label assignment task, and in complex scenes, the generalization ability of traditional hyperspectral image classification methods is often tested. In recent years, hyperspectral image classification methods based on deep learning often extract stacked spectral-spatial features in an end-to-end mode to achieve more robust pixel classification results, which has promoted the development of hyperspectral image classification tasks.

[0005] Among the numerous deep learning models, classification methods based on convolutional neural networks have attracted extensive attention and demonstrated excellent performance in hyperspectral image classification tasks due to their local perception and parameter sharing characteristics. Similar to typical computer vision tasks such as semantic segmentation, object detection, and instance segmentation, in hyperspectral image classification tasks, modeling of long-range or non-local spatial information is also beneficial to assist in completing pixel classification tasks. In order to globally aggregate the locally captured filter values, convolution-based structures need to stack convolutional layers deeply to capture spatial features of different granularities.

[0006] However, due to the dual difficulties of image acquisition and data annotation, hyperspectral images are accompanied by the small sample problem, which limits the depth of the convolutional layer stacking of the model used to process hyperspectral image classification tasks. In addition, deeper convolutional models will also affect the efficiency of model task processing in terms of model parameter quantity and running time. Summary of the invention

[0007] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a hyperspectral image classification method and system, which expands the receptive field of capturing spatial information and can capture richer and more robust spectral spatial information to efficiently complete the hyperspectral image classification task.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] A first aspect of the present invention provides a hyperspectral image classification method, which comprises:

[0010] Acquire hyperspectral images and preprocess the hyperspectral images;

[0011] For the preprocessed hyperspectral image, channel interaction and compression of the pixel spectral dimension, as well as spatial window expansion and matching of the pixel sample space dimension are performed to obtain mapping features;

[0012] Based on the mapping features, the spectral-spatial features are obtained after two information interactions in sequence;

[0013] Based on the spectral-spatial features, a classifier is used to obtain the category to which each pixel in the acquired hyperspectral image belongs;

[0014] Among them, information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain the output features.

[0015] Furthermore, the channel interaction and compression of the pixel spectral dimension are achieved by a spectral compression group consisting of a 1×1 convolutional layer, a batch normalization operation and a ReLU activation function;

[0016] or,

[0017] The spatial window expansion and alignment of the pixel sample spatial dimension is achieved by a spatial expansion group consisting of a 2×2 convolutional layer, a batch normalization operation and a ReLU activation function.

[0018] Furthermore, the spectral feature channel compression is achieved through a first 1×1 convolutional layer;

[0019] The output channel of the first 1×1 convolutional layer is configured with a batch normalization operation and a ReLU activation function.

[0020] Furthermore, the non-local spatial information extraction is achieved through a dual-head self-attention layer;

[0021] The dual-headed self-attention layer configures the dot product multiplication and element-by-element addition operations of the matrix, the Softmax activation function, and the relative position encoding calculation operations.

[0022] Furthermore, the spectral feature channel expansion is achieved through a second 1×1 convolutional layer;

[0023] The output channel of the second 1×1 convolutional layer is configured with a ReLU activation function.

[0024] Furthermore, the fusion with the mapping feature is specifically as follows: the mapping feature and the output of the second 1×1 convolutional layer are sequentially subjected to a fusion addition operation and a Relu activation function to obtain interactive information.

[0025] Furthermore, the preprocessing includes performing mean-variance normalization processing on each spectral channel in the acquired hyperspectral image.

[0026] A second aspect of the present invention provides a hyperspectral image classification system, comprising:

[0027] A preprocessing module is configured to: acquire a hyperspectral image and preprocess the hyperspectral image;

[0028] The compression and expansion module is configured to: perform channel interaction and compression of the pixel spectral dimension, and spatial window expansion and matching of the pixel sample space dimension on the preprocessed hyperspectral image to obtain mapping features;

[0029] The self-attention module is configured to: obtain spectral-spatial features after performing two information interactions in sequence based on the mapping features;

[0030] A classification module is configured to: obtain the category of each pixel in the acquired hyperspectral image by using a classifier based on the spectral-spatial features;

[0031] Among them, information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain the output features.

[0032] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the hyperspectral image classification method as described above.

[0033] A fourth aspect of the present invention provides a computer device, comprising 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 in the hyperspectral image classification method described above are implemented.

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

[0035] The present invention provides a hyperspectral image classification method, which sequentially performs spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on mapping features, and then fuses them with mapping features to obtain interactive information, thereby further improving the model performance and generalization ability of the model on the hyperspectral image classification task; in particular, a dual-headed self-attention mechanism is used to capture non-local spatial interaction and correlation information, which expands the receptive field of capturing spatial information, and uses efficient matrix dot product multiplication to reduce the amount of model calculation and the amount of model parameters, which helps to improve the efficiency of classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0037] Figure 1 is a flow chart of a method according to Embodiment 1 of the present invention;

[0038] Figure 2 is a model training flow chart of the first embodiment of the present invention;

[0039] Figure 3 is a structural diagram of a Bottleneck Transformer sub-block according to the first embodiment of the present invention;

[0040] Figure 4 This is a diagram of the dual-head self-attention layer structure of Example 1 of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0042] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0043] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. 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 "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0044] Embodiment 1

[0045] This embodiment provides a hyperspectral image classification method, such as Figure 1 As shown, the specific steps include:

[0046] Step 1: Obtain a hyperspectral image and preprocess the hyperspectral image.

[0047] Specifically, the specific method of preprocessing is: perform mean-variance normalization on each spectral channel in the acquired hyperspectral image to accelerate the convergence speed of the proposed network model during the training process.

[0048] Step 2: Input the preprocessed hyperspectral image into the hyperspectral image classification network to obtain the category of each pixel in the acquired hyperspectral image. Figure 1 As shown, the hyperspectral image classification network includes a compression and expansion block (including a compression and expansion module), a self-attention block (self-attention module) and a classifier.

[0049] For the image blocks input by the network model, the compression and expansion blocks are used to perform channel interaction and compression in the pixel spectral dimension, as well as spatial window expansion and matching in the pixel sample space dimension, to obtain mapping features. Figure 1 As shown in Figure 1, the compression and expansion block includes a spectral compression group consisting of a 1×1 convolution layer, a batch normalization operation, and a Relu activation function, and a spatial expansion group consisting of a 2×2 convolution layer, a batch normalization operation (BN), and a Relu activation function. The spectral compression group realizes the channel interaction and compression of the spectral dimension of the pixel sample, and uses the spectral compression coefficient α to control the degree of channel interaction and compression of the spectral dimension. After experimental verification, α is set to 0.64; the spatial expansion group realizes the spatial window expansion and matching of the spatial dimension of the pixel sample, transforming the original 9×9×αC mapping features (feature mapping blocks, or mapping feature maps) into 12×12×αC mapping features.

[0050] The mapping feature is input into the self-attention block to extract the interactive information of the mapping feature (spectral interaction and non-local spatial interaction information, or spectral-spatial feature). Specifically, based on the mapping feature, two information interactions are performed in sequence to obtain the spectral-spatial feature; wherein the information interaction is to perform spectral feature channel compression, non-local spatial information extraction, and spectral feature channel expansion on the input feature in sequence, and then fuse it with the input feature to obtain the output feature. Figure 1 As shown in , the self-attention block consists of two information interaction sub-blocks (bottleneck Transformer sub-blocks) connected in sequence. Bottleneck Transformer sub-block, such as Figure 3As shown in the figure, it is a variation of Bottleneck, one of the basic units of the classic ResNet. Bottleneck consists of a 1×1 convolutional layer group, a 3×3 convolutional layer group, and a 1×1 convolutional layer group, with targeted batch normalization operations and Relu activation functions, plus a residual connection. The Bottleneck Transformer sub-block replaces the 3×3 convolutional layer group in Bottleneck with a dual-head self-attention layer, and the rest of the settings remain unchanged. Specifically, the Bottleneck Transformer sub-block consists of an input layer, a first 1×1 convolutional layer, a dual-head self-attention layer, a second 1×1 convolutional layer, and an output layer connected in sequence. The output channel of the first 1×1 convolutional layer is configured with a batch normalization operation and a Relu activation function, and the output channel of the second 1×1 convolutional layer is configured with a Relu activation function. The output of the input layer and the output of the second 1×1 convolutional layer are sequentially fused and added and the Relu activation function is input to the output layer. The first 1×1 convolutional layer is used to compress the spectral feature channel, the second 1×1 convolutional layer is used to expand the spectral feature channel, and the two-headed self-attention layer is used to model non-local spatial information. Figure 4 As shown in the figure, after the dual-head self-attention layer transforms the input data through the fully connected layer, it is split into three shared matrices of the same dimension: q, k, and v; specifically, × represents the dot product operation of the matrix, + represents the element-by-element addition operation of the matrix, 1×1 is the point convolution operation, Softmax represents the nonlinear activation operation of the Softmax function, and W q ,W k and W v Represents the trainable weight matrices corresponding to matrices q, k and v, R h and R w Respectively represent the relative position encoding of the height and width of the feature input map, r represents the position encoding matrix generated for the output feature map, and in addition, the transposed matrix of the variable matrix is ​​marked with a capital T in the upper left corner in the figure. The dot product multiplication and element-by-element addition operation of the dual-head self-attention layer configuration matrix, the Softmax activation function and the relative position encoding calculation operation. Specifically, first W q With W k The dot product result of q is nonlinearly activated using the softmax activation function to calculate the similarity between matrix q and matrix k, where the q matrix first completes the embedding of the relative position encoding, and then the similarity result is appropriately scaled. The corrected result is also the self-weight of the v matrix, and the self-weight is used to perform self-attention weighting to correct the matrix v input and output layer. In other words, the input image is processed by the 1×1 convolution layer to obtain the same initialized matrices q, k and v, and the matrix q and k are dot-producted to obtain the matrix qk T, corresponding to the relative position encoding R of the height and width of the input image h and R w After performing element-by-element addition, we get matrix r. After performing dot product operation on matrix q and r, we get matrix qr. T , the matrix qk T and qr T After element-by-element addition, the softmax activation function is used for nonlinear activation to obtain the similarity matrix between matrix q and matrix k. The similarity matrix is ​​dot-producted with matrix v to obtain the output result. The main part of the self-attention of the dual-head self-attention layer can be expressed as:

[0051]

[0052] Among them, DHSA(q,k,v) represents the output result (interaction information) of the dual-head self-attention layer, d k The dimension of the k vector is used as the dimension scaling of the intermediate result, T represents the vector transpose, and softmax is the softmax activation function.

[0053] The mutual information is input into the classifier to obtain the category to which each pixel in the acquired hyperspectral image belongs. Figure 1 As shown, the present invention uses a classic three-layer classifier to perform the final hyperspectral image pixel classification, including a mean pooling layer, a flattening layer and a fully connected layer. The final classifier uses a softmax activation function to predict and generate a label classification probability vector.

[0054] like Figure 2 As shown in Figure 2, the training method of the hyperspectral image classification network is:

[0055] (1) Perform mean-variance normalization on each spectral channel of the hyperspectral image.

[0056] (2) Fill the preprocessed image borders with zeros; split the dataset according to the sample ratio of the dataset ground feature category. Randomly sample each category in the data scene according to the ratio of training sample: validation sample: test sample = r1:r2:r3. For example, for the Indian Pines dataset and the Kennedy Space Center dataset, r1:r2:r3 = 0.1:0.01:0.89, and for the Pavia University dataset, r1:r2:r3 = 0.05:0.01:0.945. When the number of samples in a certain category is too small to meet the sampling requirements of the validation set, set the minimum number of samples to ensure that each category is sampled evenly according to the sample number ratio of the category. When sampling each pixel sample, cut a 9×9×C image block with the pixel as the center, where 9×9 represents the spatial window size of the image block and C is the original spectral dimension of the image. The training samples, validation samples, and test samples of each category are aggregated into the training set, validation set, and test set, respectively.

[0057] (3) For each image block input into the network model, the spectral domain compression and spatial domain expansion of the pixel samples are achieved through the compression and expansion block; and the interactive information is extracted through the self-attention block.

[0058] (4) Determine whether the number of iterations of the hyperspectral image classification network reaches the set number of training iterations. If so, proceed to step (5); otherwise, return to step (3).

[0059] (5) The interactive information (spectral-spatial features) is sent to the classifier for pixel classification, and the loss value is calculated according to the label. The classifier uses the softmax activation function to predict the label classification probability vector, and then uses the cross entropy loss function to calculate the loss value. The proposed hyperspectral image classification network model is iteratively trained by back propagation to update the parameters of the proposed hyperspectral image classification network model. The cross entropy loss function used by the proposed hyperspectral image classification network model is expressed as:

[0060]

[0061] in, represents the calculated loss value, N represents the number of samples in a single batch training set in the small batch training mode adopted by the model, and the value here is 32, K represents the number of categories in the data scene, n and k respectively index the nth sample in the current batch training set and the kth category in the category label set, y n Represents the true value of the nth hyperspectral image block sample in the current batch training set, In(y n =k) ​​represents the indicator function, when y n When k is n=k) ​​is 1; otherwise, In(y n =k) ​​is 0. In addition, Represents the softmax function output probability value that the nth hyperspectral image patch sample under consideration belongs to category k.

[0062] The network model method proposed in the present invention uses the Adam optimizer, the learning rate is set to 0.001, and the single batch training set size in the small batch training mode is 32. In model training, the corresponding loss values ​​of the training set and the validation set are calculated after each round of iteration, and the model after 100 iterations is used as the final model. In the model testing stage, the model is tested in different hyperspectral scenes using a cropped image block test set. The classification performance of the model in each hyperspectral scene can be quantitatively measured according to the corresponding true value label, and the model can obtain a visual image of the entire scene by assigning a category label to each pixel in the scene.

[0063] The present invention makes up for the shortcomings of existing deep learning-based methods in hyperspectral image classification tasks to a certain extent, obtains richer and more robust spectral-spatial features, and further improves the model performance and generalization ability of the model in hyperspectral image classification tasks; in particular, the model uses a two-headed self-attention mechanism to capture non-local spatial interactions and correlation information, which expands the receptive field of capturing spatial information, and uses efficient matrix dot product multiplication to reduce the amount of model calculation and model parameters, which helps to improve the efficiency of the model.

[0064] Embodiment 2

[0065] This embodiment provides a hyperspectral image classification system, which specifically includes the following modules:

[0066] A preprocessing module is configured to: acquire a hyperspectral image and preprocess the hyperspectral image;

[0067] The compression and expansion module is configured to: perform channel interaction and compression of the pixel spectral dimension, and spatial window expansion and matching of the pixel sample space dimension on the preprocessed hyperspectral image to obtain mapping features;

[0068] The self-attention module is configured to: obtain spectral-spatial features after performing two information interactions in sequence based on the mapping features;

[0069] A classification module is configured to: obtain the category of each pixel in the acquired hyperspectral image by using a classifier based on the spectral-spatial features;

[0070] Among them, information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain the output features.

[0071] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0072] Embodiment 3

[0073] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the hyperspectral image classification method described in the first embodiment are implemented.

[0074] Embodiment 4

[0075] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the hyperspectral image classification method described in the first embodiment are implemented.

[0076] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0077] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.

[0078] 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.

[0079] 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.

[0080] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A hyperspectral image classification method, characterized in that: include: Acquire hyperspectral images and preprocess the hyperspectral images; For the preprocessed hyperspectral image, channel interaction and compression of the pixel spectral dimension, as well as spatial window expansion and matching of the pixel sample space dimension are performed to obtain mapping features; Based on the mapping features, the spectral-spatial features are obtained after two information interactions in sequence; Based on the spectral-spatial features, a classifier is used to obtain the category to which each pixel in the acquired hyperspectral image belongs; Among them, information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain the output features; The channel interaction and compression of the pixel spectral dimension are achieved by a spectral compression group consisting of a 1×1 convolution layer, a batch normalization operation and a Relu activation function; or, The spatial window expansion and alignment of the pixel sample spatial dimension is achieved by a spatial expansion group consisting of a 2×2 convolutional layer, a batch normalization operation and a ReLU activation function; The spectral feature channel compression is achieved through the first 1×1 convolutional layer; The output channel of the first 1×1 convolutional layer is configured with a batch normalization operation and a ReLU activation function; The non-local spatial information extraction is achieved through a dual-head self-attention layer; The dual-head self-attention layer configures the matrix of the dot product multiplication and element-by-element addition operation, the Softmax activation function and the relative position encoding calculation operation; The spectral feature channel expansion is achieved through a second 1×1 convolutional layer; The output channel of the second 1×1 convolutional layer is configured with a Relu activation function; The fusion with the mapping feature is specifically as follows: the mapping feature and the output of the second 1×1 convolutional layer are successively subjected to a fusion addition operation and a Relu activation function to obtain interactive information.

2. A hyperspectral image classification method as claimed in claim 1, characterized in that: The preprocessing includes performing mean-variance normalization processing on each spectral dimension of all pixels in the acquired hyperspectral image.

3. A hyperspectral image classification system, characterized in that: include: A preprocessing module is configured to: acquire a hyperspectral image and preprocess the hyperspectral image; The compression and expansion module is configured to: perform channel interaction and compression of the pixel spectral dimension, and spatial window expansion and matching of the pixel sample space dimension on the preprocessed hyperspectral image to obtain mapping features; The self-attention module is configured to: obtain spectral-spatial features after performing two information interactions in sequence based on the mapping features; A classification module is configured to: obtain the category of each pixel in the acquired hyperspectral image by using a classifier based on the spectral-spatial features; Among them, information interaction is to perform spectral feature channel compression, non-local spatial information extraction and spectral feature channel expansion on the input features in sequence, and then fuse them with the input features to obtain the output features; The channel interaction and compression of the pixel spectral dimension are achieved by a spectral compression group consisting of a 1×1 convolution layer, a batch normalization operation and a Relu activation function; or, The spatial window expansion and alignment of the pixel sample spatial dimension is achieved by a spatial expansion group consisting of a 2×2 convolutional layer, a batch normalization operation and a ReLU activation function; The spectral feature channel compression is achieved through the first 1×1 convolutional layer; The output channel of the first 1×1 convolutional layer is configured with a batch normalization operation and a ReLU activation function; The non-local spatial information extraction is achieved through a dual-head self-attention layer; The dual-head self-attention layer configures the matrix of the dot product multiplication and element-by-element addition operation, the Softmax activation function and the relative position encoding calculation operation; The spectral feature channel expansion is achieved through a second 1×1 convolutional layer; The output channel of the second 1×1 convolutional layer is configured with a Relu activation function; The fusion with the mapping feature is specifically as follows: the mapping feature and the output of the second 1×1 convolutional layer are successively subjected to a fusion addition operation and a Relu activation function to obtain interactive information.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the hyperspectral image classification method as described in any one of claims 1 to 2 are implemented.

5. A computer 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 in the hyperspectral image classification method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Local and non-local multi-feature semantics-based hyperspectral image classification method

    CN106529508A

  • Image classification method based on channel expansion inverted convolutional neural network

    CN110781912A