Hyperspectral image classification method and device based on state space model

Encoding, segmenting and feature extraction of hyperspectral images through the state space model solves the problem of low accuracy in hyperspectral image classification and achieves higher classification accuracy and computational efficiency.

CN118657997APending Publication Date: 2024-09-17AEROSPACE INFORMATION RES INST CAS

Patent Information

Application Number
CN202410803640.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The classification accuracy of hyperspectral images is low, mainly due to the difficulty in processing due to the high-dimensional feature space, and the existence of spectral variability and confusion, which reduces the classification accuracy.

Method used

A hyperspectral image classification method based on the state space model is adopted. The gating module is used to encode the relationship between pixels and neighborhoods. The segmented sequential scanning module is used to segment the spectral information. The state space module is used to extract features to reduce spectral variation and confusion. effect to improve classification accuracy.

Benefits of technology

By learning more discriminative spectral features, reducing spectral variation and confusion, making full use of object reflectance features, improving hyperspectral image classification accuracy, reducing computational complexity, and improving the accuracy of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657997A
    Figure CN118657997A
Patent Text Reader

Abstract

The invention provides a hyperspectral image classification method and device based on a state space model, and relates to the technical field of image processing, and the method comprises the steps: obtaining a to-be-classified hyperspectral image, inputting the to-be-classified hyperspectral image into a gating module in a trained classification model, and obtaining a hyperspectral image classification model; a semantic relationship between pixels and neighborhoods in the to-be-classified hyperspectral image is encoded through a gating module, an intermediate hyperspectral image is obtained, and a pixel value of each pixel in the to-be-classified hyperspectral image comprises spectral information of an object corresponding to the pixel under multiple wavebands; inputting the middle hyperspectral image into a segmentation sequence scanning module in the classification model, and segmenting spectral information corresponding to each wave band in the middle hyperspectral image through the segmentation sequence scanning module to obtain a plurality of segmentation tensors; and inputting the segmented tensor into a state space module in the classification model, and obtaining a classification result output by the state space module. The method can improve the classification accuracy of the hyperspectral image.
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 processing, and in particular to a hyperspectral image classification method and device based on a state space model. Background Art

[0002] Unlike traditional photography, which only acquires images within a limited wide spectral band, the hyperspectral imaging system captures both spatial and spectral information by measuring the spectrum of energy at each pixel. The generated three-dimensional hyperspectral image is actually a three-dimensional hyperspectral data cube, which contains a nearly continuous spectral profile of each spatial resolution element, making it possible to more accurately quantify and identify the imaging content. Thanks to the development of aerospace and instrument technology, hyperspectral imaging has gradually become an indispensable tool for remote sensing.

[0003] In the field of remote sensing, the main goal of hyperspectral image classification is to accurately identify various land cover or land use types of interest in the image using detailed spectral features associated with each pixel. Although hyperspectral imaging can capture hundreds of narrow bands (usually from the visible spectrum to the near-infrared region) to provide in-depth characterization of the spectral properties of different materials, there are still two long-standing challenges in its practical application, resulting in low accuracy of hyperspectral image classification results: First, as the number of bands increases, the number of dimensions of the hyperspectral image increases, and the size of the feature space grows exponentially, making the processing and analysis of hyperspectral images increasingly difficult and cumbersome, and the classification accuracy decreases; second, hyperspectral data often exhibit spectral variability and spectral confusion. The former refers to the fact that the same material will show different spectral features under different conditions, and the latter refers to the fact that different materials may show similar spectral characteristics. Summary of the invention

[0004] The present invention provides a hyperspectral image classification method, device, equipment, storage medium and program product based on a state space model, so as to solve the defect of low accuracy of hyperspectral image classification in the prior art and improve the accuracy of hyperspectral image classification.

[0005] The present invention provides a hyperspectral image classification method based on a state space model, comprising: Acquire a hyperspectral image to be classified, input the hyperspectral image to be classified into a gating module in a trained classification model, encode the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified by the gating module, and obtain an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; Inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain a plurality of segmented tensors; The segmented tensor is input into a state space module in the classification model to obtain a classification result output by the state space module, wherein the classification result includes target categories corresponding to each region in the hyperspectral image to be classified.

[0006] According to the hyperspectral image classification method based on the state space model provided by the present invention, the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified is encoded by the gating module to obtain an intermediate hyperspectral image, including: Through the gate control module, the following operations are performed: Combining the pixel values ​​of the target pixel and the neighboring pixels in the hyperspectral image to be classified into a target tensor; Performing depth convolution and point-by-point convolution processing on the target tensor to obtain a convolution result; The convolution result and the target tensor are summed along the spatial dimension to obtain a pixel value of a pixel corresponding to the target pixel position in the intermediate hyperspectral image.

[0007] According to the hyperspectral image classification method based on the state space model provided by the present invention, segmenting the spectral information corresponding to each band in the intermediate hyperspectral image by the segmented sequential scanning module includes: The pixel value of each pixel in the intermediate hyperspectral image is divided into R segments to convert the pixel value of each pixel in the intermediate hyperspectral image into the segmented tensor of size C*R, wherein each segment includes spectral information corresponding to C wavelengths, and C and R are positive integers greater than 1.

[0008] According to the hyperspectral image classification method based on the state space model provided by the present invention, the step of inputting the hyperspectral image to be classified into a gating module in a trained classification model comprises: The hyperspectral image to be classified is segmented to obtain at least one image block of a preset size, and the at least one image block is input into the gating module respectively.

[0009] According to the hyperspectral image classification method based on the state space model provided by the present invention, the state space module includes a selective state space module.

[0010] According to the hyperspectral image classification method based on the state space model provided by the present invention, the step of inputting the segmented tensor into the state space module in the classification model to obtain the classification result output by the state space module comprises: inputting the segmented tensor into the first branch and the second branch of the state space module respectively to obtain the first processing tensor output by the first branch and the second processing tensor output by the second branch, wherein the first branch comprises an expansion module and the selective state space module, the expansion module is used to perform dimension expansion on the segmented tensor, and the second branch is used to perform excitation processing on the segmented tensor; The segmented tensor, the first processed tensor and the second processed tensor are summed to obtain extracted features; The extracted features are input into the output layer of the state space module to obtain the classification result.

[0011] The present invention also provides a hyperspectral image classification device based on a state space model, comprising: A gated calling module is used to obtain a hyperspectral image to be classified, input the hyperspectral image to be classified into a gated module in a trained classification model, encode the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gated module, and obtain an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; A segmented sequential scanning calling module is used to input the intermediate hyperspectral image into the segmented sequential scanning module in the classification model, and segment the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain a plurality of segmented tensors; The state space calling module is used to input the segmented tensor into the state space module in the classification model to obtain the classification result output by the state space module, wherein the classification result includes the target categories corresponding to each area in the hyperspectral image to be classified.

[0012] The present invention also provides an electronic 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, any of the above-mentioned hyperspectral image classification methods based on the state space model is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the hyperspectral image classification method based on the state-space model as described above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for classifying hyperspectral images based on a state-space model as described above is implemented.

[0015] The hyperspectral image classification method and device based on the state space model provided by the present invention encodes the semantic relationship between the pixels and the neighborhood in the hyperspectral image to be classified through the gating module to obtain an intermediate hyperspectral image, and then inputs the hyperspectral image into a segmented sequential scanning module to segment the spectral information corresponding to each wavelength in the intermediate hyperspectral image to obtain a plurality of segmented tensors, and then inputs the segmented tensors into the state space module to obtain a classification result. By encoding the semantic relationship between pixels and the neighborhood, the present invention can learn more discriminative spectral features, thereby reducing spectral variation and confusion effects, and by segmenting the spectral information and performing segmented scanning on a large number of bands for feature extraction, it is possible to make full use of the reflectivity characteristics of different types of objects, pay attention to important or ignore unimportant specific band features, and improve the accuracy of hyperspectral image classification. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 It is a flow chart of a hyperspectral image classification method based on a state space model provided by the present invention.

[0018] Figure 2 It is a schematic diagram of the architecture of a classification model in a hyperspectral image classification method based on a state space model provided by the present invention.

[0019] Figure 3 It is a schematic diagram of the effect of a hyperspectral image classification method based on a state space model provided by the present invention.

[0020] Figure 4 It is a structural schematic diagram of a hyperspectral image classification device based on a state space model provided by the present invention.

[0021] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] like Figure 1 As shown, a hyperspectral image classification method based on a state space model provided by the present invention comprises the following steps: S110, obtaining a hyperspectral image to be classified, inputting the hyperspectral image to be classified into a gating module in a trained classification model, encoding the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gating module, and obtaining an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; S120, inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain a plurality of segmented tensors; S130, inputting the segmented tensor into a state space module in the classification model, and obtaining a classification result output by the state space module, wherein the classification result includes target categories corresponding to each region in the hyperspectral image to be classified.

[0024] The method provided by the present invention can learn more discriminative spectral features by encoding the semantic relationship between pixels and neighborhoods, thereby reducing spectral variation and confusion effects. By segmenting the spectral information and scanning a large number of bands in segments for feature extraction, the reflectivity characteristics of different types of objects can be fully utilized, and important or unimportant specific band features can be paid attention to, thereby improving the accuracy of hyperspectral image classification.

[0025] In the method provided by the present invention, the classification model used is a deep learning model. Deep learning has developed rapidly in many research fields. The remote sensing field has also begun to explore this powerful hyperspectral data analysis learning paradigm, using its ability to learn representations directly from data, thereby reducing the inherent cognitive bias caused by insufficient modeling in traditional methods. That is, in the method provided by the present invention, the classification model is pre-trained using multiple sets of training data, and the training data may include sample hyperspectral images to be classified and classification result labels corresponding to the sample hyperspectral images to be classified. The classification result labels reflect the actual classification results in the sample hyperspectral images to be classified, and can be obtained by manual annotation.

[0026] Among various deep learning architectures for hyperspectral image classification, convolutional neural networks have long dominated. Typical CNNs form local receptive fields through sliding window convolutions, successfully achieving end-to-end extraction of hierarchical features and high-level semantic information of input data. Although convolutional neural networks are good at utilizing local contextual information, their inherent local connectivity and weight sharing inevitably limit the long-range correlation and dynamic modeling of data sequences and across data sequences. Sequence models, such as recurrent neural networks (RNNs) and transformers, have entered the public eye due to their effectiveness in processing sequence data. By orderly unfolding the spectra of hyperspectral images into long sequences, RNNs and transformers can capture long-range and short-range features of spectra through recursive hidden state modeling and attention mechanisms, respectively. These sequence models have been shown to be better than CNNs in handling nonlinear data distributions in complex remote sensing scenarios. Although there have been many works to improve the problems of difficulty in parallel training and computational complexity of sequence models, it is difficult to get rid of the trade-off between performance and computational efficiency. The development of state space models (SSMs) provides new ideas for sequence modeling. Deep state-space models based on classical control theory and deep learning can capture long-range dependencies over tens of thousands of time steps while achieving efficient computation and have achieved state-of-the-art performance in many fields. Existing state-space models are mostly used for low-dimensional sequences such as audio and speech, and their potential for high-dimensional visual data such as hyperspectral images has not been fully explored.

[0027] The method provided by the present invention deeply explores the potential and feasibility of the state-space model in the hyperspectral image classification task, and proposes a classification model with a pixel-level hyperspectral image classification framework, which extracts more effective spatial spectral features from the data through a special scanning mechanism. Specifically, Figure 2 As shown, in the method provided by the present invention, the classification model mainly includes three modules: a gating module, a segmented sequential scanning module and a state space module. In the method provided by the present invention, the computational burden of the deep learning model in the hyperspectral image classification task is reduced from the perspective of sequence modeling based on the state space model. However, it is not easy to directly extend the state space model to the classification application of hyperspectral images. Based on the insights into the prior knowledge of hyperspectral images and the structure of the state space model, the method provided by the present invention provides a method based on the state space model, adding a gating strategy and a segmented sequential scanning strategy to solve the dense prediction problem of hyperspectral images. The data processing process of each module of the classification model used in the method provided by the present invention is described in detail below.

[0028] The semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified is encoded through the gating module to obtain an intermediate hyperspectral image, including: Through the gate control module, perform the following operations: The pixel values ​​of the target pixel and the neighboring pixels in the hyperspectral image to be classified are combined into a target tensor; Perform depth convolution and point-by-point convolution on the target tensor to obtain the convolution result; The convolution result and the target tensor are summed along the spatial dimension to obtain the pixel value of the pixel corresponding to the target pixel position in the intermediate hyperspectral image.

[0029] The traditional spatial spectrum feature extraction method treats each patch equally by using a fixed convolution kernel. The present invention introduces a gating module to further improve content perception by adaptively embedding the spatial spectrum through a dynamic gating function. Specifically, the gating module selectively extracts input features and ignores unimportant features by introducing a gating mechanism to perform adaptive spatial spectrum embedding. The data processing process in the gating module can be expressed as: Among them, GSSM() represents the data processing of the gating module, X patch represents the pixel value of the target pixel, which can be any pixel of the image input to the gating module, DW and f PW They represent the depth (DW) convolution and point-by-point (PW) convolution functions respectively, h is the sigmoid activation function, Represents the Einstein sum along the spatial dimension, combining two tensors of shape L×P×P into a 1-D vector of length L.

[0030] By using the gating module, the semantic relationship between the central pixel and its neighborhood can be adaptively encoded, and then better and smaller spectral features can be learned, thereby alleviating spectral variation and confusion effects.

[0031] In a possible implementation, in order to improve the applicability of the model, in the method provided by the present invention, the hyperspectral image to be classified is input into the gating module, including: The hyperspectral image to be classified is segmented to obtain at least one image block of a preset size, and the at least one image block is respectively input into the gating module.

[0032] That is to say, in one implementation of the present invention, the hyperspectral image to be classified is not input as a whole into the gating module for processing, but is divided into image blocks of preset size and then input into the gating module for processing. The classification model based on the image block can be flexibly converted into a pixel-by-pixel corresponding model. That is to say, the classification model inputs a hyperspectral image of shape (B, L, H, W), where B is the batch size, L is the number of bands, and H and W are the length and width of the image. After dividing the input into image blocks, a tensor of shape (B, L, P, P) can be obtained, where P is the size of the image block. The tensor of the divided image blocks is used as input and processed by the gating module.

[0033] The spectral information in the intermediate hyperspectral image is segmented by the segmented sequential scanning module to obtain multiple segmented tensors, including: The pixel value of each pixel in the intermediate hyperspectral image is divided into R segments to convert the pixel value of each pixel in the intermediate hyperspectral image into a segmented tensor of size C*R, wherein each segment includes spectral information corresponding to C wavelengths, and C and R are positive integers greater than 1.

[0034] The data processing performed in the segmented sequential scanning module can be expressed by the following formula: Pss(X pixel )=[S1x pixel , ..., S R X pixel ]; Among them, Pss() represents the data processing of the segmented sequential model. Represents the pixel value X of a pixel in the intermediate hyperspectral image pixel The spectral information corresponding to the nth band in . By using segmented sequential scanning before inputting to the state space module to extract features, when the input is 1-dimensional (i.e., the pixel value of a single pixel), the output will become a two-dimensional tensor with a shape of C*R, and then input to the state space module to further extract features. After softmax, a classification vector with a length of K is obtained. In other words, each pixel will correspond to a classification vector with a length of K, and based on the classification vector, the corresponding category can be obtained.

[0035] The segmented sequential scanning mechanism is a new scanning method designed for hyperspectral data, which performs segmented sequential scanning along the spectral dimension. Through the segmented sequential scanning mechanism, the model can focus on important or ignore unimportant specific band features, thereby solving the problem of input band redundancy of hyperspectral images.

[0036] In the method provided by the present invention, the classification model dynamically models the characteristics of hyperspectral image data through gated spatial spectral merging and selective sequence learning in hidden state space. In view of the dimensionality curse, spectral variability and confusion problems in the hyperspectral image classification task, the gated module and the segmented sequential scanning module can fully encode the spatial regularity and spectral characteristics, and produce more robust feature representations through a completely lightweight structure. Specifically, the present invention proposes a novel sequential scanning strategy for hyperspectral data, which reduces the computational complexity by decomposing hundreds of band spectra into fragments. The segmented scanning strategy proposed in the present invention not only enables the model to extract local features of the spectral profile, but also further improves the efficiency by reducing the width of the network. In addition, since the design of the previous gated module is based on the observation that the semantic relationship between the central pixel and its neighboring pixels may change in space and time. A lightweight mask learner can efficiently capture the dynamic changes of this highly spatial-spectral hyperspectral data, thereby generating a merged spectrum with better discrimination ability, so as to facilitate the subsequent sequence feature learning in the state space. Compared with the prior art, the segmented sequential scanning strategy in the classification model provided by the present invention can match the efficient feature selection through state evolution in the state space module, retain the local spectral pattern and expand the feature dimension of the sequence, while further improving the computational efficiency. More importantly, it can be verified through practice that non-overlapping scanning, that is, R = L / C, is sufficient to have better performance under a lower computational burden. On the other hand, unlike traditional gated convolutions in natural images, the gating module in the present invention provides a lightweight gating mechanism for capturing dynamic features of highly spatial-spectral variations, which is not only suitable for maintaining spectral sequentiality, but also complements content-aware learning in the state space through efficient spatial-spectral correction.

[0037] The state space module is introduced below. The state space module includes a selective state space module (S6). The segmented tensor is input into the state space module in the classification model to obtain the classification result output by the state space module, including: the segmented tensor is input into the first branch and the second branch of the state space module respectively to obtain the first processing tensor output by the first branch and the second processing tensor output by the second group. The first branch includes an expansion module and a selective state space module. The expansion module is used to expand the dimension of the segmented tensor, and the second branch is used to excite the segmented tensor. The segmented tensor, the first processed tensor and the second processed tensor are summed to obtain extracted features; The extracted features are input into the output layer in the state space module to obtain the classification results.

[0038] The selective state space module S6 is described below.

[0039] Inspired by classical state-space models and modern advances in deep learning, structured state-space models (S4) have attracted considerable attention in modeling sequential data. Such models are usually derived from continuous-time systems that have implicit latent states. The input function or sequence Mapping to output response signal It can usually be expressed by formula (1) and formula (2): h'(t)=Ah(t)+Bx(t) (1) y(t)=Ch(t)+Dx(t) (2)

[0040] in and Controls how the current latent state evolves over time and is transformed into output, and They describe how the input affects the latent state and the output, respectively. Here, we consider the case of a single-input single-output system with O=M=1, and omit the Dx(t) term by treating it as a skip connection of the S4 model.

[0041] The first step in applying SSM to discrete signals such as speech and text is to discretize the system parameters. The most commonly used method is the zero-order hold rule, which maps the parameters to the discrete space through formulas (3) and (4).

[0042]

[0043] The time scale parameter Δ represents the sampling step, that is, x k =x(kΔ), which also weighs the state and current input during the optimization process. Through the above discretization operation, the discretized SSM system can be expressed as the recursive expression form of formula (5) and formula (6).

[0044] y k =Ch k (6)

[0045] Since the recursive expression is difficult to calculate in parallel, S4 converts formula (6) into a convolutional expression, thereby accelerating the calculation of the network on the GPU. The SSM convolution expression is shown in formula (7).

[0046]

[0047] in is the convolution kernel of SSM, and L represents the length of the input sequence.

[0048] In addition to linearity, another assumption of the above system is time invariance, that is, all system parameters are defined to be time-independent. Recently, a new class of selective SSMs (S6) breaks this limitation by parameterizing (Δ, B, C) as a function of the input, thereby giving SSMs additional selective capabilities to focus on important or ignore unimportant features. The state-space module in the method provided by the present invention combines the neural network architecture with the S6 module to model the dependencies of sequential data, and also proposes a hardware-aware optimization to ensure its efficient implementation.

[0049] Specifically, if Figure 2 As shown, in the state space module, three branches are included. The main branch, i.e., the first branch, includes two different LayerNorm layers in the input and extended state space, three linear layers for expanding, maintaining, and compressing feature dimensions, SiLU nonlinear activation, and S6 modules. The second branch is a multiplication for excitation. The third branch is a jump connection, that is, the segmented tensor input to the state space module passes through the third branch without processing and is directly summed with the outputs of the remaining two branches. The second and third branches can adaptively transform the original information across layers. In the state space module, the use of jump connections and nonlinearity is crucial for stable training with fast convergence, while the actual performance is insensitive to the choice of normalization and activation functions. After the spatial-spectral features are extracted through the above three branches, the output dimension is adjusted through the linear layer and the normalization layer, and finally the classification result is output through the softmax function to achieve pixel-level classification.

[0050] Compared with other existing methods for hyperspectral image classification, the method provided by the present invention can achieve effective feature selection through segmented sequential scanning and state-space modules, retain local spectral patterns and expand the dimension of sequence features, while further improving computational efficiency. In addition, the method provided by the present invention can capture the dynamic characteristics of spatial-spectral changes through a lightweight gating mechanism, which is not only suitable for maintaining spectral sequentiality, but also can supplement subsequent content-aware learning in the state space through efficient spatial-spectral correction, thereby effectively improving the accuracy of classification results.

[0051] In order to verify the effect of the method provided by the present invention, Figure 3 As shown, through extensive experimental comparison of four benchmark hyperspectral datasets acquired by satellite, aircraft and UAV platforms, the method provided by the present invention is effective at the generally minimum computing resource cost. Due to the image classification network of the remaining scenic spots, the influence of each module of the method provided by the present invention on the recognition results is further verified through ablation experiments.

[0052] The hyperspectral image classification device based on the state space model provided by the present invention is described below. The hyperspectral image classification device based on the state space model described below and the hyperspectral image classification method based on the state space model described above can be referred to each other. Figure 4 As shown, the hyperspectral image classification device based on the state space model provided by the present invention includes: A gated calling module 410 is used to obtain a hyperspectral image to be classified, input the hyperspectral image to be classified into a gated module in a trained classification model, encode the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gated module, and obtain an intermediate hyperspectral image. The pixel value of each pixel in the hyperspectral image to be classified includes spectral information of the object corresponding to the pixel in multiple bands. The segmented sequential scanning calling module 420 is used to input the intermediate hyperspectral image into the segmented sequential scanning module in the classification model, and segment the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain multiple segmented tensors; The state space calling module 430 is used to input the segmented tensor into the state space module in the classification model to obtain the classification result output by the state space module, wherein the classification result includes the target categories corresponding to each region in the hyperspectral image to be classified.

[0053] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the hyperspectral image classification method based on the state-space model. The hyperspectral image classification method based on the state-space model includes: obtaining a hyperspectral image to be classified, inputting the hyperspectral image to be classified into a gating module in a trained classification model, encoding the semantic relationship between the pixel and the neighborhood in the hyperspectral image to be classified through the gating module, and obtaining an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes the spectral information of the object corresponding to the pixel in multiple bands; inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, and segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain multiple segmented tensors; inputting the segmented tensor into a state-space module in the classification model, and obtaining a classification result output by the state-space module, wherein the classification result includes the target category corresponding to each area in the hyperspectral image to be classified.

[0054] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0055] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the hyperspectral image classification method based on the state-space model provided above. The hyperspectral image classification method based on the state-space model includes: obtaining a hyperspectral image to be classified, inputting the hyperspectral image to be classified into a gating module in a trained classification model, encoding the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gating module, and obtaining an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, and segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain multiple segmented tensors; inputting the segmented tensor into a state-space module in the classification model, and obtaining a classification result output by the state-space module, wherein the classification result includes target categories corresponding to each region in the hyperspectral image to be classified.

[0056] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the hyperspectral image classification method based on the state-space model provided above, and the hyperspectral image classification method based on the state-space model comprises: obtaining a hyperspectral image to be classified, inputting the hyperspectral image to be classified into a gating module in a trained classification model, encoding the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gating module, and obtaining an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, and segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain multiple segmented tensors; inputting the segmented tensor into a state-space module in the classification model, and obtaining a classification result output by the state-space module, wherein the classification result includes target categories corresponding to each region in the hyperspectral image to be classified.

[0057] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A hyperspectral image classification method based on a state space model, characterized in that: include: Acquire a hyperspectral image to be classified, input the hyperspectral image to be classified into a gating module in a trained classification model, encode the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified by the gating module, and obtain an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; Inputting the intermediate hyperspectral image into a segmented sequential scanning module in the classification model, segmenting the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain a plurality of segmented tensors; The segmented tensor is input into a state space module in the classification model to obtain a classification result output by the state space module, wherein the classification result includes target categories corresponding to each region in the hyperspectral image to be classified.

2. The hyperspectral image classification method based on the state space model according to claim 1 is characterized in that: The method of encoding the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified by the gating module to obtain an intermediate hyperspectral image includes: Through the gate control module, the following operations are performed: Combining the pixel values ​​of the target pixel and the neighboring pixels in the hyperspectral image to be classified into a target tensor; Performing depth convolution and point-by-point convolution processing on the target tensor to obtain a convolution result; The convolution result and the target tensor are summed along the spatial dimension to obtain a pixel value of a pixel corresponding to the target pixel position in the intermediate hyperspectral image.

3. The hyperspectral image classification method based on the state space model according to claim 1 is characterized in that: The segmenting of the spectral information corresponding to each band in the intermediate hyperspectral image by the segmented sequential scanning module includes: dividing the pixel value of each pixel in the intermediate hyperspectral image into R segments to convert the pixel value of each pixel in the intermediate hyperspectral image into the segmented tensor of size C*R, wherein each segment includes spectral information corresponding to C wavelengths, and C and R are positive integers greater than 1.

4. The hyperspectral image classification method based on the state space model according to claim 1 is characterized in that: The step of inputting the hyperspectral image to be classified into a gating module in a trained classification model comprises: The hyperspectral image to be classified is segmented to obtain at least one image block of a preset size, and the at least one image block of the preset size is respectively input into the gating module.

5. The hyperspectral image classification method based on state space model according to claim 1, characterized in that: The state space module includes a selective state space module.

6. The hyperspectral image classification method based on the state space model according to claim 5 is characterized in that: The step of inputting the segmented tensor into a state space module in the classification model to obtain a classification result output by the state space module includes: Inputting the segmented tensor into the first branch and the second branch of the state space module respectively, obtaining a first processing tensor output by the first branch and a second processing tensor output by the second branch, wherein the first branch includes an expansion module and the selective state space module, the expansion module is used to perform dimension expansion on the segmented tensor, and the second branch is used to perform excitation processing on the segmented tensor; The segmented tensor, the first processed tensor and the second processed tensor are summed to obtain extracted features; The extracted features are input into the output layer of the state space module to obtain the classification result.

7. A hyperspectral image classification device based on a state space model, characterized in that: include: A gated calling module is used to obtain a hyperspectral image to be classified, input the hyperspectral image to be classified into a gated module in a trained classification model, encode the semantic relationship between pixels and neighborhoods in the hyperspectral image to be classified through the gated module, and obtain an intermediate hyperspectral image, wherein the pixel value of each pixel in the hyperspectral image to be classified includes spectral information of an object corresponding to the pixel in multiple bands; A segmented sequential scanning calling module is used to input the intermediate hyperspectral image into the segmented sequential scanning module in the classification model, and segment the spectral information corresponding to each band in the intermediate hyperspectral image through the segmented sequential scanning module to obtain a plurality of segmented tensors; The state space calling module is used to input the segmented tensor into the state space module in the classification model to obtain the classification result output by the state space module, wherein the classification result includes the target categories corresponding to each area in the hyperspectral image to be classified.

8. An electronic 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 hyperspectral image classification method based on the state space model as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the hyperspectral image classification method based on the state space model according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the hyperspectral image classification method based on the state space model according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Hyperspectral image classification method and device based on tensor ConvLSTM

    CN117274725A

Cited By

  • Hyperspectral image classification method and system based on spatial-spectral complementary Mama

    CN119810554A