Hyperspectral remote sensing image classification method and device

By adopting a multi-feature fusion and retention network model in hyperspectral remote sensing image classification, the problem of manual feature extraction in traditional methods is solved, and more efficient and accurate image classification is achieved.

CN119723152AActive Publication Date: 2025-03-28GUANGZHOU UNIVERSITY

Patent Information

Application Number
CN202411602557.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-28
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

Traditional hyperspectral remote sensing image classification methods rely on manual feature extraction, which consumes time and is inefficient, and fails to fully utilize the spatial and spectral characteristics of the land objects, resulting in low classification accuracy.

Method used

The target multi-feature fusion retention network model is adopted, and the hyperspectral remote sensing images are featured through multi-feature fusion network and retained coding network, and the quality of model input is improved by using preprocessing and random sampling technology.

Benefits of technology

The efficiency and accuracy of hyperspectral remote sensing image classification are improved, and the spatial and spectral characteristics of the land objects can be used more effectively to achieve higher classification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723152A_ABST
    Figure CN119723152A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral remote sensing image classification method and apparatus. The method comprises the steps of obtaining a to-be-classified image; inputting a to-be-classified image into the target multi-feature fusion reservation network model to obtain a hyperspectral remote sensing image classification result; the target multi-feature fusion reservation network model is obtained through the following steps: obtaining an initial hyperspectral remote sensing image; preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image; randomly sampling the target hyperspectral remote sensing image according to a preset size to obtain a model input image; constructing an initial multi-feature fusion reservation network model; and inputting the plurality of model input images into the initial multi-feature fusion reservation network model, so that the initial multi-feature fusion reservation network model is trained, and a target multi-feature fusion reservation network model is obtained. According to the invention, hyperspectral remote sensing image classification is realized, and efficiency and accuracy are improved. The method can be widely applied to the technical field of image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a hyperspectral remote sensing image classification method and device. Background Art

[0002] Hyperspectral remote sensing images record hundreds of bands on the electromagnetic spectrum for each pixel. Different objects differ in the emission, reflection, and absorption of electromagnetic waves, which enables hyperspectral images to identify and detect objects at a fine-grained level. Different objects differ in the emission, reflection, and absorption of electromagnetic waves, which enables hyperspectral images to identify and detect objects at a fine-grained level. Traditional classification uses a variety of machine learning methods, but usually relies on manual feature extraction, which is time-consuming and inefficient. At the same time, the spatial and spectral characteristics of objects are ignored, resulting in low classification accuracy.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention

[0004] The embodiments of the present invention provide a hyperspectral remote sensing image classification method and device, which effectively improves efficiency and accuracy.

[0005] On the one hand, an embodiment of the present invention provides a hyperspectral remote sensing image classification method, comprising the following steps:

[0006] Get the image to be classified;

[0007] Inputting the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result;

[0008] The target multi-feature fusion retention network model is obtained by the following steps:

[0009] Acquire initial hyperspectral remote sensing images;

[0010] Preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image;

[0011] According to a preset size, the target hyperspectral remote sensing image is randomly sampled to obtain a model input image;

[0012] Construct an initial multi-feature fusion preservation network model;

[0013] Input a plurality of the model input images into the initial multi-feature fusion retention network model so that the initial multi-feature fusion retention network model is trained to obtain the target multi-feature fusion retention network model.

[0014] In some embodiments, the preprocessing of the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image includes:

[0015] Performing principal component analysis on the initial hyperspectral remote sensing image to obtain a first image, wherein the number of channels of the first image is less than the number of channels of the initial hyperspectral remote sensing image;

[0016] According to the filling width, the first image is edge filled by using a zero-marked pixel filling method to obtain the target hyperspectral remote sensing image.

[0017] In some embodiments, the construction process of the initial multi-feature fusion preservation network model includes:

[0018] Constructing a first multi-feature fusion network, wherein the first multi-feature fusion network is used to extract significant features from the model input image to obtain a first multi-feature fusion network output feature map;

[0019] After the first multi-feature fusion network, a second multi-feature fusion network is constructed, wherein the second multi-feature fusion network is used to extract subtle features from the first multi-feature fusion network output feature map to obtain a second multi-feature fusion network output feature map;

[0020] After the second multi-feature fusion network, a reserved coding network is constructed, wherein the reserved coding network is used to extract the intrinsic correlation of spatial spectral features from the feature map output by the second multi-feature fusion network;

[0021] After the reserved encoding network, a global pooling layer is constructed;

[0022] After the global pooling layer, a linear layer is constructed.

[0023] In some embodiments, the process of constructing the first multi-feature fusion network includes:

[0024] Constructing a first convolutional layer, where the convolution kernel size of the first convolutional layer is 3×3, and the first convolutional layer is used to convolve the model input image to obtain a first feature map;

[0025] After the first convolutional layer, a first channel attention layer is constructed, where the first channel attention layer is used to reorder the first feature map according to the color depth to obtain a second feature map;

[0026] After the first channel attention layer, construct a first partial convolution processing layer, wherein the first partial convolution processing layer is used to perform partial convolution processing on the dark gray feature map in the second feature map according to a preset number of channels to obtain a third feature map;

[0027] After the first partial convolution processing layer, a second convolution layer is constructed, the convolution kernel size of the second convolution layer is 1×1, and the second convolution layer is used to convolve the third feature map to obtain a fourth feature map;

[0028] After the second convolutional layer, a first batch of normalization layers is constructed, and the first batch of normalization layers is used to batch normalize the fourth feature map according to a preset activation function to obtain the first multi-feature fusion network output feature map.

[0029] In some embodiments, the process of constructing the second multi-feature fusion network includes:

[0030] Constructing a third convolutional layer, wherein the convolution kernel size of the third convolutional layer is 3×3, and the third convolutional layer is used to convolve the feature map output by the first multi-feature fusion network to obtain a fifth feature map;

[0031] After the third convolutional layer, construct a second channel attention layer, wherein the second channel attention layer is used to reorder the fifth feature map according to the color depth to obtain a sixth feature map;

[0032] After the second channel attention layer, construct a second partial convolution processing layer, wherein the second partial convolution processing layer is used to perform partial convolution processing on the light gray feature map in the sixth feature map according to a preset number of channels to obtain a seventh feature map;

[0033] After the second partial convolution processing layer, construct a fourth convolution layer, the convolution kernel size of the fourth convolution layer is 1×1, and the fourth convolution layer is used to convolve the seventh feature map to obtain an eighth feature map;

[0034] After the fourth convolutional layer, a second batch normalization layer is constructed, and the second batch normalization layer is used to batch normalize the eighth feature map according to a preset activation function to obtain the second multi-feature fusion network output feature map.

[0035] In some embodiments, the process of constructing the reserved coding network includes:

[0036] Constructing a feature flattening layer, wherein the feature flattening layer is used to flatten the feature map output by the second multi-feature fusion network to obtain a feature sequence;

[0037] After the feature flattening layer, a simple retention layer is constructed, and the simple retention layer is used to perform feature extraction processing on the feature sequence to obtain output features of the simple retention layer;

[0038] After the simple retention layer, a feed-forward network layer is constructed.

[0039] In some embodiments, performing partial convolution processing on the dark gray feature map in the second feature map according to a preset number of channels to obtain a third feature map includes:

[0040] According to a preset number of channels, the second feature map is divided to obtain a first divided feature map and a second divided feature map, wherein the first divided feature map has the preset number of channels, and the number of dark gray feature maps in the first divided feature map is greater than the number of dark gray feature maps in the second divided feature map;

[0041] Convolving the first divided feature map to obtain a feature map to be spliced;

[0042] The feature map to be spliced ​​is spliced ​​with the second divided feature map to obtain the third feature map.

[0043] In some embodiments, the step of performing feature extraction processing on the feature sequence to obtain a simple retention layer output feature includes:

[0044] Performing matrix transformation on the feature sequence to obtain a feature matrix;

[0045] Calculating a query matrix based on the feature matrix and the query learnable matrix;

[0046] Calculating a key matrix according to the feature matrix and the key learnable matrix;

[0047] Calculating a value matrix according to the feature matrix and the value learnable matrix;

[0048] According to the scalar constant, the combination matrix of the causal mask and the exponential decay along the relative distance is calculated;

[0049] The simple retention layer output features are calculated according to the query matrix, the key matrix, the value matrix and the combination matrix of the causal mask and the exponential decay along the relative distance.

[0050] On the other hand, an embodiment of the present invention provides a hyperspectral remote sensing image classification device, comprising:

[0051] The first module is used to obtain the image to be classified;

[0052] The second module is used to input the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result;

[0053] The target multi-feature fusion retention network model is obtained by the following steps:

[0054] Acquire initial hyperspectral remote sensing images;

[0055] Preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image;

[0056] According to a preset size, the target hyperspectral remote sensing image is randomly sampled to obtain a model input image;

[0057] Construct an initial multi-feature fusion preservation network model;

[0058] Input a plurality of the model input images into the initial multi-feature fusion retention network model so that the initial multi-feature fusion retention network model is trained to obtain the target multi-feature fusion retention network model.

[0059] In another aspect, an embodiment of the present invention provides a computer device, comprising:

[0060] at least one processor;

[0061] at least one memory for storing at least one program;

[0062] When the at least one program is executed by the at least one processor, the at least one processor implements the described method.

[0063] The beneficial effects of the present invention are as follows:

[0064] The embodiment of the present invention first obtains an image to be classified, and then inputs the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result, thereby realizing hyperspectral remote sensing image classification and improving efficiency and accuracy. Among them, the target multi-feature fusion retention network model first obtains an initial hyperspectral remote sensing image, preprocesses the initial hyperspectral remote sensing image, obtains a target hyperspectral remote sensing image, and then randomly samples the target hyperspectral remote sensing image according to a preset size to obtain a model input image, and then constructs an initial multi-feature fusion retention network model, and finally inputs multiple model input images into the initial multi-feature fusion retention network model, so that the initial multi-feature fusion retention network model is trained, thereby improving the model accuracy through a multi-feature fusion network and a retention coding network.

[0065] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0067] Figure 1 A flow chart of a hyperspectral remote sensing image classification method according to an embodiment of the present invention;

[0068] Figure 2 This is a flow chart of an embodiment of the present invention for obtaining a target multi-feature fusion retention network model;

[0069] Figure 3 A schematic diagram of a central point pixel according to an embodiment of the present invention;

[0070] Figure 4 A schematic diagram of edge pixel filling according to an embodiment of the present invention;

[0071] Figure 5 A schematic diagram of a multi-feature fusion retention network model structure according to an embodiment of the present invention;

[0072] Figure 6 A schematic diagram of a partial convolution processing process according to an embodiment of the present invention;

[0073] Figure 7 A schematic diagram of a comparison result of classification accuracy of a model according to an embodiment of the present invention;

[0074] Figure 8 A three-channel RGB image according to an embodiment of the present invention;

[0075] Fig. 9 A real object label map according to an embodiment of the present invention;

[0076] Fig.10 This is a HybridSn classification result diagram of an embodiment of the present invention;

[0077] Fig.11 This is a PiT classification result diagram of an embodiment of the present invention;

[0078] Fig.12 This is a HiT classification result diagram of an embodiment of the present invention;

[0079] Fig.13 This is a classification result diagram of an embodiment of the present invention;

[0080] Fig.14 A schematic diagram of the overall process of a training target multi-feature fusion retention network model according to an embodiment of the present invention;

[0081] Fig.15 This is a schematic diagram of the structure of a hyperspectral remote sensing image classification device according to an embodiment of the present invention;

[0082] Fig.16 The figure is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0083] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0084] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0085] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0086] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0087] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0088] Hyperspectral Remote Sensing Images: It is a multi-dimensional information acquisition technology that combines imaging technology and spectral technology. It can not only detect the two-dimensional spatial information of the target, but also obtain one-dimensional spectral information, thereby generating continuous, narrow-band image data with high spectral resolution.

[0089] In the related art, hyperspectral remote sensing images record hundreds of bands on the electromagnetic spectrum for each pixel. Different objects have differences in the emission, reflection and absorption of electromagnetic waves, which enables hyperspectral images to identify and detect objects at a fine-grained level. The rich spectral information in hyperspectral images makes them indispensable in various fields such as ecosystem measurement, mineral analysis and precision agriculture. Pixels are the basic units of hyperspectral remote sensing image data, and the main goal of hyperspectral remote sensing image classification is to assign a unique category label to each pixel. In the prior art, a variety of machine learning methods have been tried in the field of hyperspectral image classification, including K-nearest neighbors (K-NNs), random forests (RFs) and support vector machines (SVMs). Although these methods have achieved certain results in some cases, they generally have some limitations. First, these methods usually rely on manual feature extraction, which is not only time-consuming but also may not be accurate enough and inefficient. Second, they fail to make full use of the spatial and spectral characteristics of objects, which limits the accuracy of classification and has low accuracy. Finally, when applied to complex data sets, the training effect of these methods is often unsatisfactory. With the development of computer technology, a variety of deep learning-based methods have been introduced in the field of hyperspectral image classification, such as stacked autoencoders (SAE), convolutional neural networks (CNN), transformers, and recurrent neural networks (RNN). Compared with traditional machine learning algorithms, these methods can automatically extract features, but they also have some limitations when processing hyperspectral images. Although convolutional neural networks (CNNs) perform well in image classification, they mainly focus on local feature extraction, while the global information and long-range dependencies of hyperspectral images are one of the key factors for their classification accuracy. CNNs have deficiencies in modeling this global information, which limits their performance in hyperspectral image classification. Secondly, although complex convolution operations can extract rich features, this also makes it difficult for the model to distinguish the importance of different spectral features, which may ignore subtle features that have a key impact on classification. Although recurrent neural networks (RNNs) are good at processing sequence data, in the classification of hyperspectral remote sensing images, over-reliance on the order of spectral bands may lead to the gradient vanishing problem, affecting the learning effect of the model. Although the Transformer based on the multi-head self-attention mechanism can focus on extracting significant features when processing hyperspectral images, it may ignore subtle spectral differences, which are crucial to improving classification performance. At the same time, hyperspectral remote sensing images contain hundreds of bands and a large amount of redundant information. How to extract effective features from this redundant information has a decisive impact on the performance of the model.

[0090] In view of this, this embodiment provides a hyperspectral remote sensing image classification method, by After preprocessing, the target hyperspectral remote sensing image is obtained And in the target hyperspectral remote sensing image X image The model input image is obtained by random sampling As the input of the network. Then two multi-feature fusion network modules are used to extract and fuse the input model input image x. The main structure of the retention coding network module is composed of a simple retention layer and a feedforward network. It captures the long-range dependencies between different pixels and bands in the hyperspectral remote sensing image, explores the intrinsic connection of the spectrum, and distinguishes subtle spectral differences. Finally, the global pooling layer and the linear layer are connected to obtain the target multi-feature fusion retention network model, and the target multi-feature fusion retention network model is used to predict the image to be classified to obtain the hyperspectral remote sensing image classification result.

[0091] A hyperspectral remote sensing image classification method provided in an embodiment of the present application relates to the field of image recognition technology. A hyperspectral remote sensing image classification method provided in an embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in a blockchain network; the software can be an application that implements a hyperspectral remote sensing image classification method, etc., but is not limited to the above forms.

[0092] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0093] The following is a detailed explanation of the embodiments of the present application in conjunction with the accompanying drawings:

[0094] Figure 1 is an optional flow chart of a hyperspectral remote sensing image classification method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to step S101 to step S102.

[0095] Step S101, obtaining an image to be classified;

[0096] Step S102: input the image to be classified into the target multi-feature fusion retention network model to obtain the hyperspectral remote sensing image classification result.

[0097] In some embodiments, the image to be classified can be acquired first, and then the image to be classified can be input into the target multi-feature fusion retention network model to obtain the hyperspectral remote sensing image classification result, so that the hyperspectral remote sensing image classification can be realized through the target multi-feature fusion retention network model, thereby improving efficiency and accuracy.

[0098] In some embodiments, Figure 2 As shown, obtaining the target multi-feature fusion retention network model may include but is not limited to steps S201 to S205.

[0099] Step S201, obtaining an initial hyperspectral remote sensing image;

[0100] Step S202, preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image;

[0101] Step S203: randomly sampling the target hyperspectral remote sensing image according to a preset size to obtain a model input image;

[0102] Step S204, constructing an initial multi-feature fusion retention network model;

[0103] Step S205: Input multiple model input images into the initial multi-feature fusion retention network model to train the initial multi-feature fusion retention network model to obtain a target multi-feature fusion retention network model.

[0104] Steps S201 to S205 shown in the embodiment of the present application obtain a target multi-feature fusion retention network model, thereby improving the model accuracy.

[0105] In step S201 of some embodiments, the initial hyperspectral remote sensing image may be obtained through an image database. The initial hyperspectral remote sensing image may also be obtained through other methods, not limited thereto. For example, the initial hyperspectral remote sensing image obtained may be a three-dimensional data Its bands (channels) contain useful spectral information and have a large number of bands, where H is the height of the initial hyperspectral remote sensing image, W is the width of the initial hyperspectral remote sensing image, and C is the number of channels of the initial hyperspectral remote sensing image.

[0106] In some embodiments, in step S202, preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image may include but is not limited to the following steps:

[0107] Performing principal component analysis on the initial hyperspectral remote sensing image to obtain a first image, wherein the number of channels of the first image is less than the number of channels of the initial hyperspectral remote sensing image;

[0108] According to the filling width, the zero-marked pixel filling method is used to fill the edge of the first image to obtain the target hyperspectral remote sensing image.

[0109] In some embodiments, preprocessing the initial hyperspectral remote sensing image may include principal component analysis and image edge filling. The initial hyperspectral remote sensing image may be first subjected to principal component analysis to obtain a first image, wherein the number of channels of the first image is less than the number of channels of the initial hyperspectral remote sensing image. Exemplarily, the size of the initial hyperspectral remote sensing image may be set to 610×340×103, wherein H=610 represents the height, W=340 represents the width, and C=103 represents the number of channels. The principal component analysis method may be used to reduce the number of spectral bands (number of channels) in the initial hyperspectral remote sensing image X0 from C to c=30, and the first image is obtained after band reduction. Where c is the number of channels of the first image. Then, according to the filling width, the zero-marked pixel filling method is used to fill the edge of the first image to obtain the target hyperspectral remote sensing image. For example, the first image X PCA The edge pixels cannot form samples of the same size, and the spatial information (adjacent pixels in space) and spectral information (spectral information contained in the channel) of the patch samples cannot be fully utilized. You can use zero-marked pixels to fill X according to the filling width. PCA The edge of the final target hyperspectral remote sensing image is obtained Among them, the filling width is (P-1) / 2, h, w, c are the height, width and number of channels of the target hyperspectral remote sensing image respectively. It can be understood that the input of the model needs to be selected The size of the sample (patch), and the sample is the label of the central pixel as the input label, where p is the height and width of the model input. Further, when the required model input image is , where 9 is the height and width, and 30 is the number of channels. The center pixel is for the model input image x, and this center pixel is located at the red pixel on the 9×9 surface. The label represented by this center pixel is the model input image The label of the center pixel is as follows Figure 3 In addition, edge pixels refer to the pixel points at the edge of the initial hyperspectral remote sensing image. The edge pixel filling is as follows: Figure 4 As shown in the figure, the blue area is the initial hyperspectral remote sensing image, and the black area is the zero pixel point filled at the edge, and its filling width is 4. The edge pixels of the image are labeled (the center pixels of the patch) and cannot form a 9×9×30 patch sample, so the image edge needs to be filled, and the height and width of the image can be expanded to make full use of the spatial and spectral information of the patch sample. In addition, multiple initial hyperspectral remote sensing images can be preprocessed to obtain the corresponding target hyperspectral remote sensing images, and multiple target hyperspectral remote sensing images can be combined to obtain a model training data set.

[0110] In some embodiments, in step S203, the target hyperspectral remote sensing image may be randomly sampled according to a preset size to obtain a model input image. Fill the image edge to obtain the target hyperspectral remote sensing image After that, the preset size can be set to 9×9×30, the target hyperspectral remote sensing image is randomly sampled, a model input image in the form of a cube is obtained, and the label of the center pixel of the model input image is used as the label of the model input image. It can be understood that using this model input image in the form of a cube as input allows the model to give full play to the spatial information and spectral information of the hyperspectral remote sensing image.

[0111] In some embodiments, in step S204, the process of constructing the initial multi-feature fusion preservation network model may include but is not limited to the following steps:

[0112] Step S301: construct a first multi-feature fusion network, where the first multi-feature fusion network is used to extract significant features from a model input image to obtain a first multi-feature fusion network output feature map;

[0113] Step S302: after the first multi-feature fusion network, construct a second multi-feature fusion network, the second multi-feature fusion network is used to extract subtle features from the first multi-feature fusion network output feature map to obtain the second multi-feature fusion network output feature map;

[0114] Step S303: after the second multi-feature fusion network, construct a reserved coding network, the reserved coding network is used to extract the intrinsic correlation of spatial spectral features from the feature map output by the second multi-feature fusion network;

[0115] Step S304: after retaining the encoding network, construct a global pooling layer;

[0116] Step S305: After the global pooling layer, a linear layer is constructed.

[0117] In some embodiments, the multi-feature fusion retention network model adopts a structure that combines a convolutional neural network (multi-feature fusion network) with a retention coding network. A multi-feature fusion network module with channel attention (ECA) and spatial attention (ESA) is introduced to subdivide the spatial spectral features into significant spatial spectral features and subtle spatial spectral features, and perform feature fusion. The retention coding network module is used to explore the intrinsic correlation of spatial spectral features. The structure of the multi-feature fusion retention network model is as follows: Figure 5 As shown, the first multi-feature fusion network can be constructed first, then the second multi-feature fusion network can be constructed, and then the reserved coding network can be constructed, and finally the global pooling layer, the linear layer and the output layer can be constructed to obtain the initial multi-feature fusion reserved network model. Among them, the model input image can be subjected to significant feature extraction through the first multi-feature fusion network to obtain the first multi-feature fusion network output feature map. The first multi-feature fusion network output feature map can be subjected to subtle feature extraction through the second multi-feature fusion network to obtain the second multi-feature fusion network output feature map. The spatial spectral feature intrinsic correlation can be extracted from the second multi-feature fusion network output feature map through the reserved coding network. After the reserved coding network, the output features of the reserved coding network are passed through the global pooling layer, and then connected to a linear layer with an input dimension of 64 and an output dimension of 9 to obtain the model prediction output.

[0118] In some embodiments, in step S301, the process of constructing the first multi-feature fusion network may include but is not limited to the following steps:

[0119] Construct the first convolution layer. The convolution kernel size of the first convolution layer is 3×3. The first convolution layer is used to convolve the model input image to obtain the first feature map.

[0120] After the first convolutional layer, a first channel attention layer is constructed. The first channel attention layer is used to reorder the first feature map according to the color depth to obtain the second feature map;

[0121] After the first channel attention layer, a first partial convolution processing layer is constructed, and the first partial convolution processing layer is used to perform partial convolution processing on the dark gray feature map in the second feature map according to a preset number of channels to obtain a third feature map;

[0122] After the first partial convolution processing layer, a second convolution layer is constructed. The convolution kernel size of the second convolution layer is 1×1. The second convolution layer is used to convolve the third feature map to obtain the fourth feature map.

[0123] After the second convolutional layer, a first batch of normalization layers is constructed, and the first batch of normalization layers is used to batch normalize the fourth feature map according to a preset activation function to obtain a first multi-feature fusion network output feature map.

[0124] In some embodiments, a first convolution layer may be constructed first, then a first channel attention layer may be constructed, then a first partial convolution processing layer may be constructed, then a second convolution layer may be constructed, and finally a first batch of normalization layers may be constructed to obtain a first multi-feature fusion network. In the feature extraction process, the model input image may be first convolved by the first convolution layer to obtain a first feature map, wherein the convolution kernel size of the first convolution layer is 3×3. It is understandable that only a 3×3 convolution layer will change the size of the feature map. In the first multi-feature fusion network, the convolution layer with a convolution kernel of 3×3 increases the number of channels of the feature map from 30 to 40. The first convolution layer is capable of extracting significant features. Then, according to the color depth, the first feature map is reordered by the first channel attention layer to obtain a second feature map. Exemplarily, in the first multi-feature fusion network, the channel attention ECA is capable of reordering the first feature map according to the channel weight, so that all dark gray feature maps are placed in front of the channel dimension, and light gray feature maps are placed behind the channel dimension. The dark gray feature map contains more significant information in the first feature map and the second feature map, while the light gray feature map is more subtle. Then, according to the preset number of channels, the dark gray feature map in the second feature map is partially convolved through the first partial convolution processing layer to obtain the third feature map. It can be understood that the partial convolution processing in the spatial attention ESA first extracts significant spatial spectral feature information from the dark gray feature map in the second feature map, and then splices the black feature map obtained by the partial convolution with the light gray part of the second feature map to generate the third feature map. Then, the third feature map is convolved through the second convolution layer to obtain the fourth feature map, so that the features are fused, wherein the convolution kernel size of the second convolution layer is 1×1. Finally, according to the preset activation function, the fourth feature map is batch normalized through the first batch of normalization layers to obtain the first multi-feature fusion network output feature map.

[0125] In some embodiments, according to a preset number of channels, a partial convolution process is performed on the dark gray feature map in the second feature map to obtain a third feature map, including:

[0126] According to a preset number of channels, the second feature map is divided to obtain a first divided feature map and a second divided feature map, wherein the first divided feature map has a preset number of channels, and the number of dark gray feature maps in the first divided feature map is greater than the number of dark gray feature maps in the second divided feature map;

[0127] Convolve the first divided feature map to obtain a feature map to be spliced;

[0128] The feature map to be spliced ​​is spliced ​​with the second divided feature map to obtain a third feature map.

[0129] In some embodiments, the second feature map may be first divided according to a preset number of channels to obtain a first divided feature map and a second divided feature map. The first divided feature map has a preset number of channels, and the number of dark gray feature maps in the first divided feature map is greater than the number of dark gray feature maps in the second divided feature map. Then, the first divided feature map is convolved to obtain a feature map to be spliced, and finally, the feature map to be spliced ​​is spliced ​​with the second divided feature map to obtain a third feature map. Exemplarily, the partial convolution process is as follows: Figure 6 As shown, given a second feature map with a height, width, and number of channels of 9, 9, and 24, respectively. Partial convolution performs a conventional convolution operation (i.e., 8 convolution kernels with a size of 3, a padding of 1, and a two-dimensional convolution with the input channel dimension consistent with the output channel dimension) on a selected area of ​​the second feature map (i.e., the first partitioned feature map). The height, width, and number of channels of the selected area are 9, 9, and 8, respectively, which is the dark gray feature map part that is sorted first. At the same time, in order to ensure that the spatial dimension and number of channels of the output third feature map are consistent with the input second feature map. The third feature map is obtained by splicing the feature map to be spliced ​​with the unconvolved part of the second feature map (i.e., the second partitioned feature map, whose height, width, and number of channels are 9, 9, and 16, respectively) in the channel dimension. The third feature map maintains the same spatial dimension and number of channels as the second feature map. Partial convolution processing is an effective feature extraction method by reducing computational redundancy and memory requirements.

[0130] In some embodiments, in step S302, the process of constructing the second multi-feature fusion network may include but is not limited to the following steps:

[0131] Construct a third convolution layer, the convolution kernel size of the third convolution layer is 3×3, and the third convolution layer is used to convolve the output feature map of the first multi-feature fusion network to obtain a fifth feature map;

[0132] After the third convolutional layer, a second channel attention layer is constructed, and the second channel attention layer is used to reorder the fifth feature map according to the color depth to obtain the sixth feature map;

[0133] After the second channel attention layer, a second partial convolution processing layer is constructed, and the second partial convolution processing layer is used to perform partial convolution processing on the light gray feature map in the sixth feature map according to a preset number of channels to obtain a seventh feature map;

[0134] After the second convolution processing layer, a fourth convolution layer is constructed. The convolution kernel size of the fourth convolution layer is 1×1. The fourth convolution layer is used to convolve the seventh feature map to obtain the eighth feature map.

[0135] After the fourth convolutional layer, a second batch normalization layer is constructed. The second batch normalization layer is used to batch normalize the eighth feature map according to a preset activation function to obtain a second multi-feature fusion network output feature map.

[0136] In some embodiments, the third convolution layer can be constructed first, then the second channel attention layer can be constructed, then the second partial convolution processing layer can be constructed, the fourth convolution layer can be constructed, and finally the second batch normalization layer can be constructed to obtain a second multi-feature fusion network. In the feature extraction process, the output feature map of the first multi-feature fusion network can be convolved by the third convolution layer to obtain a fifth feature map, wherein the convolution kernel size of the third convolution layer is 3×3. In the second multi-feature fusion network, the convolution layer with a convolution kernel of 3×3 increases the number of channels of the feature map from 40 to 64. Then, according to the color depth, the fifth feature map is reordered by the second channel attention layer to obtain the sixth feature map, and then according to the preset number of channels, the light gray feature map in the sixth feature map is partially convolved by the second partial convolution processing layer to obtain the seventh feature map, and then the fourth convolution layer is used to convolve the seventh feature map to obtain the eighth feature map, wherein the convolution kernel size of the fourth convolution layer is 1×1. Finally, according to the preset activation function, the eighth feature map is batch normalized through the second batch normalization layer to obtain the second multi-feature fusion network output feature map. It can be understood that the second multi-feature fusion network is partially similar to the first multi-feature fusion network. The main difference is that the partial convolution processing process in the spatial attention ESA is different. The second half of the channels of the second feature map after the attention ECA processing (i.e., the light gray feature map, whose height, width, and number of channels are 9, 9, and 8, respectively) are partially convolved to achieve subtle feature extraction, capture subtle spatial spectral feature information, and perform feature fusion in the convolution layer with a convolution kernel of 1×1. The residual jump connection in the multi-feature fusion network helps to propagate feature information to a deeper level and effectively capture spatial spectral feature information.

[0137] In some embodiments, in step S303, the construction process of the reserved coding network may include but is not limited to the following steps:

[0138] Constructing a feature flattening layer, the feature flattening layer is used to flatten the feature map output by the second multi-feature fusion network to obtain a feature sequence;

[0139] After the feature flattening layer, a simple retention layer is constructed. The simple retention layer is used to extract features from the feature sequence to obtain the output features of the simple retention layer.

[0140] After the simple retention layer, the feed-forward network layer is constructed.

[0141] In some embodiments, the retention encoding network (RE) is composed of two key components: a simple retention layer (SR) and a feed-forward network layer (FFN). The feature flattening layer can be constructed first, then the simple retention layer can be constructed, and then the feed-forward network layer can be constructed. In the feature extraction process, the second multi-feature fusion network output feature map can be firstly converted to the feature map by the feature flattening layer. Flatten to get the feature sequence As the input of RE, it is used to learn high-level semantic features and capture the global position information of different pixels in hyperspectral remote sensing images. Then, the feature sequence is processed by the simple retention layer to extract the feature, and the output feature of the simple retention layer is obtained. Finally, the output feature of the simple retention layer is input into the feedforward network layer to obtain the output feature of the feedforward network layer. Among them, the feedforward network layer FFN is composed of a linear layer, a nonlinear activation function layer and another linear layer in sequence. Its purpose is to learn more complex nonlinear features and improve the model's fit to the data. In addition, there is a normalization layer after FFN, which accelerates model training and reduces the risk of overfitting, thereby improving the generalization and accuracy of the model. Moreover, the mathematical expression of feature extraction of the retention encoding network RE can include: Y = SR (LN (X)) + X, Z = FFN (LN (Y)) + Y, RE (X) = LN (Z), where Y is the output feature of the simple retention layer, SR is the simple retention layer, LN is the layer normalization, X is the feature matrix, Z is the output feature of the feedforward network layer, FFN is the feedforward network layer, and RE is the retention encoding network.

[0142] In some embodiments, feature extraction processing is performed on the feature sequence to obtain simple retention layer output features, including:

[0143] Perform matrix transformation on the feature sequence to obtain a feature matrix;

[0144] Calculate the query matrix based on the feature matrix and the query learnable matrix;

[0145] Calculate the key matrix according to the feature matrix and the key learnable matrix;

[0146] Calculate the value matrix based on the feature matrix and the value learnable matrix;

[0147] According to the scalar constant, the combination matrix of the causal mask and the exponential decay along the relative distance is calculated;

[0148] The simple preserved layer output features are computed based on the combination matrix of query matrix, key matrix, value matrix and causal mask with exponential decay along relative distances.

[0149] In some embodiments, the feature sequence may be first transformed into a matrix to obtain a feature matrix Where X contains n vectors, each of which has a dimension of d. Then, the query matrix is ​​calculated based on the feature matrix and the query learnable matrix. The calculation formula of the query matrix is: Q = XW Q , where Q is the query matrix, X is the feature matrix, and W Q To query the learnable matrix. According to the feature matrix and the key learnable matrix, calculate the key matrix, where the calculation formula of the key matrix is: K = XW K , where K is the bond matrix, W K is the key learnable matrix. According to the feature matrix and the value learnable matrix, the value matrix is ​​calculated, where the calculation formula of the value matrix is: V = XW V , where V is the value matrix, W V It can be understood that the simple retention layer SR projects the feature matrix X into the query matrix Q, the key matrix K and the value matrix V. These three projections can be obtained by the learnable matrix Then, according to the scalar constant, the combination matrix of the causal mask and the exponential decay along the relative distance is calculated, where the calculation formula of the combination matrix is: Where D nm is the combination matrix of the causal mask and the exponential decay along the relative distance, γ n-m is a scalar constant, n and m both represent integers from 0 to d-1, and d is the dimension of the vector. Finally, the simple retention layer output feature is calculated based on the query matrix, key matrix, value matrix, and the combination matrix of causal mask and exponential decay along the relative distance, where the expression of the simple retention layer output feature is: SR(X)=(QK T ⊙D)V, where SR(X) is the output feature of the simple retention layer, K T represents the transposed matrix of K, D is the combination matrix of causal mask and exponential decay along relative distance, It can be understood that the simple retention layer SR is normalized using D.

[0150] In some embodiments, in step S205, multiple model input images can be input into the initial multi-feature fusion retention network model to train the initial multi-feature fusion retention network model to obtain a target multi-feature fusion retention network model. Exemplarily, a certain proportion of the number of training samples can be randomly selected for training the initial multi-feature fusion retention network model, that is, all categories are divided into training samples according to this proportion, and the rest are test samples. Select the number of training samples and train the model. 5% of each sample can be randomly selected from the Pavia University dataset as training samples for training. At the same time, the training cycle can be set to 100, the training batch can be set to 64, the learning rate can be set to 0.001, and the Adam optimizer can be used for optimization to obtain the target multi-feature fusion retention network model.

[0151] In some embodiments, after the training is completed and the target multi-feature fusion retention network model is obtained, the test sample can be used for testing to obtain the hyperspectral remote sensing image classification result. 95% of each sample is randomly selected in the Pavia University dataset as the test sample for testing. Hyperspectral remote sensing images also have technical indicators for comparing and evaluating classification results. Common evaluation indicators include: Kappa coefficient (Kappa), overall classification accuracy (0A), and average classification accuracy (AA). In order to verify the method of this embodiment, experiments were conducted on the Pavia University dataset. This embodiment was compared with the HybridSn, PiT and HiT models based on deep learning on the PaviaUniversity dataset. The model classification accuracy comparison results are shown as follows. Figure 7 As shown in the figure, the objects are divided into 9 categories according to their numbers. In terms of the three evaluation indicators, this embodiment is superior to the other three algorithms and achieves the highest accuracy in multiple object classification and recognition. In the classification result diagram, this embodiment is compared with other deep learning-based HybridSn, PiT and HiT models. The three-channel RGB image is shown in the figure. Figure 8 As shown in the figure, the real object label map is as follows Fig. 9 As shown in the figure, the HybridSn classification results are as follows Fig.10 As shown in the figure, the PiT classification results are shown in Fig.11 As shown in the figure, the HiT classification results are shown in Fig.12 As shown, the classification result diagram of the embodiment of the present invention is as follows Fig.13 As shown. By comparing the classification result images of various algorithms, the images all have blurred spots to varying degrees. However, the classification result image of this embodiment is the cleanest, with the least noise, and is closer to the real object label image.

[0152] In some embodiments, the overall process of training the target multi-feature fusion retention network model is as follows Fig.14 As shown, we can first obtain a hyperspectral remote sensing image dataset, perform preprocessing, and select the sample size of the input model, then initially build a multi-feature fusion retention network model, select a certain proportion of training samples for training the network model, and obtain the target multi-feature fusion retention network model. Furthermore, we can test the network performance and obtain the classification results.

[0153] In some embodiments, this embodiment uses two multi-feature fusion network modules to process a large amount of redundant information of hyperspectral remote sensing images from the perspective of redundancy. This module combines the channel attention mechanism with the spatial attention mechanism. After 3×3 convolution, channel attention (ECA) is used to allow the feature map to be rearranged in the channel dimension according to the weight size. The part with large feature weight is arranged in front of the channel dimension, and the part with small weight is arranged in the back. Then, the partial convolution in the spatial attention ESA is used to refine the feature extraction of the feature map and perform feature fusion. In the process of feature extraction, only a part of the feature map can be convolved, and 1×1 convolution is used to perform feature fusion after splicing the feature map on the channel. The partial convolution of ESA in the first multi-feature fusion network module obtains significant features and then performs feature fusion. The partial convolution of ESA in the second multi-feature fusion network module obtains subtle features and then performs feature fusion. This method effectively improves the feature extraction capability of hyperspectral remote sensing images and the effect of feature fusion. The encoding network module of this embodiment retains a simple retention layer structure, which can effectively deal with a large amount of redundant information, avoid neglecting subtle spectral information, and effectively distinguish subtle spectral differences.

[0154] The beneficial effects of implementing the embodiments of the present invention include: the embodiments of the present invention first obtain an image to be classified, and then input the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result, thereby realizing hyperspectral remote sensing image classification and improving efficiency and accuracy. Among them, the target multi-feature fusion retention network model first obtains an initial hyperspectral remote sensing image, preprocesses the initial hyperspectral remote sensing image, obtains a target hyperspectral remote sensing image, and then randomly samples the target hyperspectral remote sensing image according to a preset size to obtain a model input image, and then constructs an initial multi-feature fusion retention network model, and finally inputs multiple model input images into the initial multi-feature fusion retention network model, so that the initial multi-feature fusion retention network model is trained, thereby improving the model accuracy through a multi-feature fusion network and a retention coding network.

[0155] like Fig.15 As shown, the embodiment of the present invention also provides a hyperspectral remote sensing image classification device, including:

[0156] The first module 801 is used to obtain an image to be classified;

[0157] The second module 802 is used to input the image to be classified into the target multi-feature fusion retention network model to obtain the hyperspectral remote sensing image classification result;

[0158] Among them, the target multi-feature fusion preservation network model is obtained through the following steps:

[0159] Acquire initial hyperspectral remote sensing images;

[0160] Preprocessing the initial hyperspectral remote sensing image to obtain the target hyperspectral remote sensing image;

[0161] According to the preset size, the target hyperspectral remote sensing image is randomly sampled to obtain the model input image;

[0162] Construct an initial multi-feature fusion preservation network model;

[0163] The multiple model input images are input into the initial multi-feature fusion preserved network model so that the initial multi-feature fusion preserved network model is trained to obtain the target multi-feature fusion preserved network model.

[0164] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0165] like Fig.16 As shown, an embodiment of the present invention further provides a computer device, including:

[0166] at least one processor 901;

[0167] At least one memory 902, used to store at least one program;

[0168] When at least one program is executed by at least one processor, the at least one processor implements Figure 1 The method shown.

[0169] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0170] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A hyperspectral remote sensing image classification method, characterized in that: The following steps are involved: Get the image to be classified; Inputting the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result; The target multi-feature fusion retention network model is obtained by the following steps: Acquire initial hyperspectral remote sensing images; Preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image; According to a preset size, the target hyperspectral remote sensing image is randomly sampled to obtain a model input image; Construct an initial multi-feature fusion preservation network model; Input a plurality of the model input images into the initial multi-feature fusion retention network model so that the initial multi-feature fusion retention network model is trained to obtain the target multi-feature fusion retention network model.

2. The method according to claim 1, characterized in that The preprocessing of the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image includes: Performing principal component analysis on the initial hyperspectral remote sensing image to obtain a first image, wherein the number of channels of the first image is less than the number of channels of the initial hyperspectral remote sensing image; According to the filling width, the first image is edge filled by using a zero-marked pixel filling method to obtain the target hyperspectral remote sensing image.

3. The method according to claim 1, characterized in that: The construction process of the initial multi-feature fusion preservation network model includes: Constructing a first multi-feature fusion network, wherein the first multi-feature fusion network is used to extract significant features from the model input image to obtain a first multi-feature fusion network output feature map; After the first multi-feature fusion network, a second multi-feature fusion network is constructed, wherein the second multi-feature fusion network is used to extract subtle features from the first multi-feature fusion network output feature map to obtain a second multi-feature fusion network output feature map; After the second multi-feature fusion network, a reserved coding network is constructed, wherein the reserved coding network is used to extract the intrinsic correlation of spatial spectral features from the feature map output by the second multi-feature fusion network; After the reserved encoding network, a global pooling layer is constructed; After the global pooling layer, a linear layer is constructed.

4. The method according to claim 3, characterized in that The construction process of the first multi-feature fusion network includes: Constructing a first convolutional layer, where the convolution kernel size of the first convolutional layer is 3×3, and the first convolutional layer is used to convolve the model input image to obtain a first feature map; After the first convolutional layer, a first channel attention layer is constructed, where the first channel attention layer is used to reorder the first feature map according to the color depth to obtain a second feature map; After the first channel attention layer, construct a first partial convolution processing layer, wherein the first partial convolution processing layer is used to perform partial convolution processing on the dark gray feature map in the second feature map according to a preset number of channels to obtain a third feature map; After the first partial convolution processing layer, a second convolution layer is constructed, the convolution kernel size of the second convolution layer is 1×1, and the second convolution layer is used to convolve the third feature map to obtain a fourth feature map; After the second convolutional layer, a first batch of normalization layers is constructed, and the first batch of normalization layers is used to batch normalize the fourth feature map according to a preset activation function to obtain the first multi-feature fusion network output feature map.

5. The method according to claim 3, characterized in that: The construction process of the second multi-feature fusion network includes: Constructing a third convolutional layer, wherein the convolution kernel size of the third convolutional layer is 3×3, and the third convolutional layer is used to convolve the feature map output by the first multi-feature fusion network to obtain a fifth feature map; After the third convolutional layer, construct a second channel attention layer, wherein the second channel attention layer is used to reorder the fifth feature map according to the color depth to obtain a sixth feature map; After the second channel attention layer, construct a second partial convolution processing layer, wherein the second partial convolution processing layer is used to perform partial convolution processing on the light gray feature map in the sixth feature map according to a preset number of channels to obtain a seventh feature map; After the second partial convolution processing layer, construct a fourth convolution layer, the convolution kernel size of the fourth convolution layer is 1×1, and the fourth convolution layer is used to convolve the seventh feature map to obtain an eighth feature map; After the fourth convolutional layer, a second batch normalization layer is constructed, and the second batch normalization layer is used to batch normalize the eighth feature map according to a preset activation function to obtain the second multi-feature fusion network output feature map.

6. The method according to claim 3, characterized in that The construction process of the reserved coding network includes: Constructing a feature flattening layer, wherein the feature flattening layer is used to flatten the feature map output by the second multi-feature fusion network to obtain a feature sequence; After the feature flattening layer, a simple retention layer is constructed, and the simple retention layer is used to perform feature extraction processing on the feature sequence to obtain output features of the simple retention layer; After the simple retention layer, a feed-forward network layer is constructed.

7. The method according to claim 4, characterized in that The method of performing partial convolution processing on the dark gray feature map in the second feature map according to the preset number of channels to obtain a third feature map includes: According to a preset number of channels, the second feature map is divided to obtain a first divided feature map and a second divided feature map, wherein the first divided feature map has the preset number of channels, and the number of dark gray feature maps in the first divided feature map is greater than the number of dark gray feature maps in the second divided feature map; Convolving the first divided feature map to obtain a feature map to be spliced; The feature map to be spliced ​​is spliced ​​with the second divided feature map to obtain the third feature map.

8. The method according to claim 6, characterized in that The step of performing feature extraction processing on the feature sequence to obtain output features of a simple retention layer includes: Performing matrix transformation on the feature sequence to obtain a feature matrix; Calculating a query matrix based on the feature matrix and the query learnable matrix; Calculating a key matrix according to the feature matrix and the key learnable matrix; Calculating a value matrix according to the feature matrix and the value learnable matrix; According to the scalar constant, the combination matrix of the causal mask and the exponential decay along the relative distance is calculated; The simple retention layer output features are calculated according to the query matrix, the key matrix, the value matrix and the combination matrix of the causal mask and the exponential decay along the relative distance.

9. A hyperspectral remote sensing image classification device, characterized in that: include: The first module is used to obtain the image to be classified; The second module is used to input the image to be classified into a target multi-feature fusion retention network model to obtain a hyperspectral remote sensing image classification result; The target multi-feature fusion retention network model is obtained by the following steps: Acquire initial hyperspectral remote sensing images; Preprocessing the initial hyperspectral remote sensing image to obtain a target hyperspectral remote sensing image; According to a preset size, the target hyperspectral remote sensing image is randomly sampled to obtain a model input image; Construct an initial multi-feature fusion preservation network model; Input a plurality of the model input images into the initial multi-feature fusion retention network model so that the initial multi-feature fusion retention network model is trained to obtain the target multi-feature fusion retention network model.

10. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image classification method and system

    CN107516061A

  • Hyperspectral image classification and identification method

    CN112836666A

  • Hyperspectral image classification method based on double-branch spatial-spectral global feature extraction network

    CN116563606A

  • Geosynchronization of an aerial image using localizing multiple features

    WO2024042508A1

Cited By

  • Pigment classification method and related device

    CN120747644A