Hyperspectral image classification method and system
By using 3D and 2D convolutional networks to extract multi-scale features in hyperspectral image classification, and combining ADMM and Mamba models to optimize auxiliary variables, the problem that the existing technology cannot adapt to the complex structure of hyperspectral data is solved, and high-accuracy hyperspectral image classification is achieved.
Patent Information
- Application Number
- CN202510428216.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-08
AI Technical Summary
The prior art cannot adapt to the complex structural characteristics of hyperspectral data and cannot effectively capture the long-range dependence characteristics in hyperspectral data, resulting in inaccurate classification results of hyperspectral data.
The 3D convolutional network and 2D convolutional network are used to extract feature in sequence to obtain multi-scale features; the joint optimization objective function is constructed using the alternating direction multiplication method ADMM, and auxiliary variables are optimized through the dual-branch processing mechanism based on the state space model Mamba, sparse coefficient features and dictionary features are obtained, fusion and input into the classifier to obtain the classification results of hyperspectral images.
By adaptively adjusting the structure to match the characteristics of hyperspectral image data, capturing linear relationships and complex structures in hyperspectral image data, adapting to the complex structural characteristics of hyperspectral image data, achieving high-accuracy hyperspectral image classification.
Smart Images

Figure CN119942248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hyperspectral image classification, and in particular to a hyperspectral image classification method and system. Background Art
[0002] Hyperspectral remote sensing images have the characteristics of "one image, multiple spectra" and can simultaneously record the spatial distribution and spectral response characteristics of objects.
[0003] Existing technologies mainly use two types of methods: one is a mathematical optimization framework based on the traditional alternating direction method of multipliers (ADMM), and the other is a pure data-driven deep learning model. However, the traditional ADMM method relies on manually set fixed thresholds and fixed iteration rules, and lacks adaptability when facing the complex band correlation of hyperspectral data; at the same time, its dictionary is usually pre-designed through mathematical rules (such as the dictionary learning algorithm K-Singular Value Decomposition, KSVD based on sparse representation), which is irrelevant to the goal of the classification task. Although pure deep learning methods can be trained end-to-end, stacking 3D convolutional layers leads to a sharp increase in computational overhead, and the "black box characteristics" of the model lead to a lack of interpretability in the decision-making process. In addition, the attention mechanism introduced to improve the ability to model long-range dependencies will significantly increase the computational complexity due to the expansion of the spectral dimension, making it difficult to apply in practice.
[0004] In summary, the existing technology cannot adapt to the complex structural characteristics of hyperspectral data and capture the long-range dependence characteristics in hyperspectral data, resulting in inaccurate classification results of hyperspectral data. Summary of the invention
[0005] The embodiments of the present invention provide a hyperspectral image classification method and system, which can solve the problem of inaccurate classification results of hyperspectral data in the prior art.
[0006] The embodiment of the present invention provides a hyperspectral image classification method, comprising the following steps: obtaining a hyperspectral image dataset containing multiple ground object categories, and sequentially using a 3D convolutional network and a 2D convolutional network to perform feature extraction to obtain multi-scale features; The alternating direction multiplier method (ADMM) is used to construct a joint optimization objective function for hyperspectral image classification and iterate the variables as a joint optimization model. A dual-branch processing mechanism based on the state-space model Mamba is used to optimize the auxiliary variables in the joint optimization model; wherein the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes through modal decomposition, using the main branch and the context branch to extract the global features and local features of the multiple independent modes respectively, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each linear transformation has layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing, and adds attention fusion; The multi-scale features are input into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; the sparse coefficient features and dictionary features are spliced to obtain fusion features; the fusion features are input into the classifier to obtain the classification results of the hyperspectral image.
[0007] Furthermore, the joint optimization objective function L is formulated as follows: ; in, is a multi-scale feature, is the dictionary matrix, is a sparse coefficient matrix, is an auxiliary variable, is an implicit prior regularization term for hyperspectral images, is the Lagrange multiplier, and These are trade-off parameters.
[0008] Furthermore, the dual-branch processing mechanism based on the state space model Mamba is used to optimize the auxiliary variables in the joint optimization model, and the specific steps include: The state space model Mamba is used to replace the solution method of the auxiliary variable Z in ADMM; The orthogonal projection matrix is used to map the auxiliary variables along the spectral mode, spatial height mode and spatial width mode. Decomposition is performed to generate orthogonal multimodal feature components; each modal component is processed by the Enhanced Mamba Block, which integrates selective state parameterization and adaptive time scale adjustment; The main branch uses a sequence of linear transformations with layer normalization and SiLU activation functions to obtain auxiliary variables by adjusting the dimensions of the linear layer to maintain feature consistency. The global characteristics of The context branch uses a small convolution kernel for spatial processing and adds attention fusion to obtain auxiliary variables Local features of Use layer normalization and linear projection to fuse the features obtained from the two branches to complete the auxiliary variables Optimization.
[0009] Furthermore, before obtaining the sparse coefficient feature, the method further includes: Get dictionary matrix Transpose and with the dictionary matrix Multiply to obtain the multiplication result; According to the multiplication result, the sparse coefficient matrix is completed by replacing the matrix inversion method with a 3×3 convolution. Optimization.
[0010] Furthermore, the step of obtaining multi-scale features specifically includes: The dimension of the hyperspectral image dataset is (B, C, H, W), where B is the batch size, C is the number of spectral channels, and H and W are spatial dimensions; it is converted to (B, 1, C, H, W) through dimension expansion; The dimension-converted hyperspectral image dataset is input into a 3D convolutional network for feature extraction to obtain spatial and spectral information. The 3D convolutional network uses convolution kernels of (7, 3, 3), (5, 3, 3), and (3, 3, 3), and uses a BatchNorm normalization layer and a ReLU nonlinear activation function. The number of channels changes to 8, 16, and 32 respectively. The spatial information and spectral information are enhanced using the channel attention mechanism to obtain enhanced features; The enhanced features are input into a 2D convolutional network for multi-scale spatial feature extraction to obtain spatial information. The number of channels of the 2D convolutional network is 32, 128, 256 and 512, and the maximum pooling operation is used to perform hierarchical transformation of the feature map size.
[0011] Furthermore, the classifier adopts a two-layer fully connected network.
[0012] Furthermore, the classifier is trained by a learning rate scheduling strategy combining warmup, a training method capable of gradually increasing the learning rate, and cosine annealing.
[0013] Furthermore, the loss function of the classifier is L total , the formula is: ; in, is the classification cross entropy loss function, is the dictionary coherence loss function, w 1 and w2 All are adjustable weight parameters.
[0014] An embodiment of the present invention provides a hyperspectral image classification system, comprising: The data acquisition module is used to acquire a hyperspectral image dataset containing multiple ground object categories, and sequentially use a 3D convolutional network and a 2D convolutional network to extract features and obtain multi-scale features; A joint optimization model building module is used to use the alternating direction multiplier method ADMM to build a joint optimization objective function for hyperspectral image classification for variable iterative solution as a joint optimization model; a dual-branch processing mechanism based on the state-space model Mamba is used to optimize the auxiliary variables in the joint optimization model; wherein the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes by modal decomposition, using the main branch and the context branch to extract the global features and local features of the multiple independent modes respectively, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each linear transformation has layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing, and adds attention fusion; The classification result output module is used to input the multi-scale features into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; splice the sparse coefficient features with the dictionary features to obtain fusion features; input the fusion features into the classifier to obtain the classification results of the hyperspectral image.
[0015] The embodiment of the present invention provides a hyperspectral image classification method and system, which has the following beneficial effects compared with the prior art: The hyperspectral image dataset is sequentially extracted using 3D convolutional networks and 2D convolutional networks to obtain multi-scale features. The alternating direction multiplier method ADMM is used to construct a joint optimization objective function for hyperspectral image classification to iteratively solve variables as a joint optimization model. The auxiliary variables in the joint optimization model are optimized using a dual-branch processing mechanism based on the state-space model Mamba. The dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes through modal decomposition, and using the main branch and context branch to extract the global features and local features of multiple independent modes respectively. The main branch uses multiple linear transformations, each with layer normalization and SiLU activation function, to maintain feature consistency by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing and adds attention fusion; the multi-scale features are input into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; the sparse coefficient features are concatenated with the dictionary features to obtain fused features; the fused features are input into the classifier to obtain the classification results of the hyperspectral image.
[0016] Among them, the state-space model Mamba has both a state transition mechanism and a state update mechanism. The learnable parameters in the state transition mechanism enable the model to adaptively adjust its structure to match the characteristics of hyperspectral image data and capture the linear relationships and complex structures in hyperspectral image data, thereby adapting to the complex structural characteristics of hyperspectral image data. At the same time, the state update mechanism allows the update of the model state to follow the update rule of linear time, that is, the state estimation at the current time depends on the state estimation at the previous time and the observation data at the current time, so that the state-space model Mamba implements a state update mechanism with linear complexity and captures the long-range dependency characteristics of hyperspectral image data. Finally, the state-space model Mamba can accurately obtain the classification results of hyperspectral image data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A general flow chart of a hyperspectral image classification method provided by an embodiment of the present invention; Figure 2 A feature extraction flow chart of a hyperspectral image classification method provided by an embodiment of the present invention; Figure 3 A flow chart of ADMM parameter iteration of a hyperspectral image classification method provided by an embodiment of the present invention; Figure 4 A graph showing the classification results of an Indian pine hyperspectral image according to a hyperspectral image classification method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0019] See also Figure 1 The present invention provides a method for classifying a hyperspectral image, comprising the following steps: Step 1: Obtain a hyperspectral image dataset containing multiple ground object categories, and use 3D convolutional networks and 2D convolutional networks to extract features in turn to obtain multi-scale features. Specifically, through the cascade processing of three-dimensional convolutional networks (3D CNN) and two-dimensional convolutional networks (2D CNN), multi-scale features with spatial-spectral joint characteristics are extracted.
[0020] Step 2: Use the alternating direction multiplier method ADMM to construct a joint optimization objective function for hyperspectral image classification for variable iterative solution as a joint optimization model. Use a dual-branch processing mechanism based on the state-space model Mamba to optimize the auxiliary variables in the joint optimization model; wherein, the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes through modal decomposition, using the main branch and the context branch to extract the global features and local features of multiple independent modes respectively, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each with layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing and adds attention fusion.
[0021] Specifically, by introducing the auxiliary variable Z to achieve the separability of the objective function, the core convex optimization problem can be expressed as: .
[0022] By introducing the Lagrangian multiplier U and the penalty parameter, the augmented Lagrangian function, i.e. the joint optimization objective function L, is defined as: .
[0023] in, is a multi-scale feature, is the learnable dictionary matrix, is a sparse coefficient matrix, is an auxiliary variable, is an implicit prior regularization term for hyperspectral images, is the Lagrange multiplier, and The dictionary matrix is set as a trainable parameter to implicitly learn the dynamic dictionary in an end-to-end manner.
[0024] The problem is solved effectively by setting the dictionary D as a learnable parameter and alternately iterating the sub-problems of minimizing the objective function L with respect to variables S, Z, and U within the ADMM framework while keeping other variables fixed.
[0025] For the optimization of the auxiliary variable Z, a dual-branch network based on the Mamba state-space model is designed to replace the traditional soft threshold algorithm, and the prior characteristics of the hyperspectral image are used for data-driven optimization. The optimization process first decomposes the input features into multiple independent modes through modal decomposition, and then combines the dual-branch mechanism to extract and fuse the decomposed features in a refined manner, and finally generates an auxiliary variable Z that satisfies the sparsity constraint. Among them, the dual-branch processing mechanism includes a main branch and a context branch, which are used to extract the global features and local spatial features of the auxiliary variable Z, respectively, and realize the effective integration of the two-branch features through layer normalization and linear projection operations; the main branch uses multiple linear transformations, each with layer normalization and SiLU activation function, and maintains feature consistency by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel ( convolution kernel) for spatial processing and add attention fusion.
[0026] The details of the main branch include: using a multi-layer linear transformation sequence to model global features, each layer of transformation is equipped with layer normalization, SiLU activation function and Dropout regularization module, and dynamically adjusting the linear layer dimension to ensure feature consistency. The input feature z_combined, that is, the combined feature after Mamba processing, is reshaped into [batch, height*width, channels] to adapt to the linear transformation requirements. The processing flow includes dimensionality enhancement, feature normalization, nonlinear activation and dimensionality reduction, and finally outputs the feature branch1out with the same input dimension. Specifically, the main branch performs feature reconstruction and expression enhancement on z_combined, expands the feature dimension through dimensionality enhancement operations, uses LayerNorm to maintain the stability of feature distribution, introduces nonlinear expression through SiLU activation function, and improves the robustness of the model, thereby outputting the feature branch1out with high consistency and optimized expression ability.
[0027] The details of the context branch include: extracting local spatial features from the input feature z_combined through a 3×3 convolution kernel, stabilizing the training process with batch normalization (BatchNorm), and implementing multi-scale feature fusion through the global-local attention mechanism (GlobalLocalAttention). The input features are reshaped into [batch, channels, height, width] to adapt to the convolution operation. The processing flow includes local spatial feature extraction, global pooling and attention fusion of local convolution, and finally outputs the feature branch2out. Specifically, the context branch captures local spatial correlation through convolution operations, and the GlobalLocalAttention module integrates global context and local detail information, significantly enhancing the spatial representation ability and multi-scale context perception ability of the feature.
[0028] The final feature fusion includes: concatenating the output of the main branch branch1out and the output of the context branch branch2out along the channel dimension to form a comprehensive feature tensor. The fused features are then optimized through a multi-layer processing sequence, including layer normalization, linear dimensionality reduction, SiLU nonlinear activation and final linear projection to generate the optimized auxiliary variable Z.
[0029] Step 3: Input the multi-scale features into the joint optimization model for variable iteration to obtain sparse coefficient features and dictionary features; concatenate the sparse coefficient features with the dictionary features to obtain fusion features; input the fusion features into the classifier to obtain the classification results of the hyperspectral image. The sparse coefficient features and dictionary features obtained in the optimization process are concatenated along the channel dimension.
[0030] Step 1: Data acquisition and preprocessing.
[0031] 1.1 Obtain a hyperspectral image dataset containing K ground object categories , category label . Indicates samples, C is the spectral dimension (number of spectral channels), and H×W is the spatial dimension, representing height and width respectively.
[0032] 1.2 Spatial-spectral joint feature extraction: The feature extraction module constructs a three-layer stacked 3D convolutional network to extract spatial-spectral joint features. The input data dimension is (B, C, H, W), where B is the batch size, C is the number of spectral channels, and H and W are spatial dimensions. By expanding the dimension to (B, 1, C, H, W), the network uses convolution kernels of (7, 3, 3), (5, 3, 3) and (3, 3, 3) in turn, and each layer is followed by a BatchNorm normalization layer and a ReLU nonlinear activation function. The number of channels changes to 8, 16, and 32 in turn. After three layers of 3D convolution, the features are reshaped into the form of (B, 32, H, W). Subsequently, weighted enhancement is performed through the channel attention mechanism, and then a three-layer 2D convolutional network is used to realize multi-scale spatial feature extraction. The number of channels is configured as 32→128→256→512, and the maximum pooling operation is used to realize the hierarchical transformation of the feature map size, which effectively captures the multi-scale spatial structure information, such as Figure 2 shown.
[0033] Step 2: Build a multi-constraint optimization framework.
[0034] 2.1 The ADMM-based solver introduces an auxiliary variable Z to achieve the separability of the objective function. Its core convex optimization problem can be expressed as: .
[0035] By introducing the Lagrangian multiplier U and the penalty parameter, the augmented Lagrangian function, i.e. the joint optimization objective function L, is defined as: .
[0036] in: The reconstructed hyperspectral data is the multi-scale features extracted using 3D convolutional networks and 2D convolutional networks. is the learnable dictionary matrix, is a sparse coefficient matrix, is an auxiliary variable, is an implicit prior regularization term for hyperspectral images, is the Lagrange multiplier, is a learnable trade-off parameter.
[0037] 2.2 Coefficient optimization design: Through matrix operations, we can get the coefficient matrix The closed-form solution to the subproblem is: . Compute the transpose of a dictionary and with Multiply them together, and then use a 3×3 trainable convolution to replace the matrix inversion, and we get , and then calculate the updated coefficient S in sequence. First calculate the dictionary transposition The product of the dictionary D is then approximated using a 3×3 trainable convolution kernel The inverse operation of , generates the intermediate result, and iterates and updates iteratively to obtain the optimized sparse coefficient S. At the same time, the dictionary is set to The trainable parameters of the dictionary are stabilized by layer normalization (LayerNorm), and then input into a two-layer fully connected network to map it into a 128-dimensional feature vector for enhancing classification performance.
[0038] 2.3Mamba auxiliary variable optimization: The Mamba state space model is used to replace traditional algorithms (such as soft thresholding), a hyperspectral image prior network is constructed, and the Z variable is optimized through a data-driven adaptive learning strategy. , through the mode decomposition strategy Convert to an unfolding sequence in three main directions. Use an orthographic projection matrix The input tensor is shaped along three main modes Decomposition: Spectral Modes , spatial height mode and space width modal Each modal component is processed by an Enhanced Mamba Block, which integrates selective state parameterization and adaptive time scaling. The state transition mechanism is a state parameterization calculated by a learnable projection matrix: ,in is the weight matrix, is the bias vector. The time scale is activated by the softplus function To modulate: , the state transfer matrix is derived by exponential transformation The state update follows the recursive formula ,in represents the Hadamard product, Adaptive information flow at different time scales is achieved.
[0039] in, Represents the hyperspectral image data at time step t The input feature tensor at is the initial sequence A modal component obtained after modal decomposition ( Z 1 , Z 2 , Z 3 ) at the current time step. Represents the time step t The discrete time interval parameter at is used to adjust the state transfer matrixA t The dynamic characteristics of δ Calculated and modulated by the softplus activation function. Represents the time step The hidden state at represents the output of the Mamba state space model at the previous moment.
[0040] The optimization process adopts a dual-branch processing mechanism: main branch Using a sequence of linear transformations with layer normalization LayerNorm and SiLU activation, Dimension configuration maintains feature consistency; context branching use Convolution kernel performs spatial processing to implement GlobalLocalAttention mechanism , combined with global features and local features , obtained through attention fusion The final output is passed through the fusion module get: , this module uses layer normalization and linear projection Combine features from both branches: .
[0041] 2.4 Lagrange multiplier update: Lagrange multiplier iterative update , where ρ is the step size parameter, S and Z are the solutions to the original problem and the dual problem, respectively. Each iteration coordinates the consistency of S and Z by adjusting U.
[0042] 2.5 Dictionary matrix update: The implicit dynamic dictionary D is constructed as follows: dictionary atoms are expressed through independent learnable parameters of the neural network, which are set as learnable network parameters, and implicit dictionary learning is achieved through end-to-end training; in the back-propagation process, the dictionary coherence loss and classification loss are jointly optimized to achieve task-oriented atom generation.
[0043] Step 3: Classification decision implementation.
[0044] 3.1 Feature fusion and classifier: First, the sparse coefficient feature F_sparse obtained by the ADMM network is concatenated with the dictionary feature F_dict in the channel dimension to obtain the fused feature F_combined. The classifier uses a two-layer fully connected network. The first layer uses the ReLU activation function, and the second layer outputs the probability distribution of each category, and introduces learnable category weights for balance. In order to optimize the model training process, a learning rate scheduling strategy combining warmup and cosine annealing is adopted: in the first 10 rounds of warm-up, the learning rate increases linearly from 0 to the initial value of 0.001; in the subsequent 90 rounds of training, the learning rate gradually decays according to the cosine function to achieve better optimization effects, such as Figure 3 shown.
[0045] 3.2 Loss Function: The loss function consists of two components : Classification cross entropy loss , where K is the number of categories, is the true label, is the predicted probability. Dictionary coherence loss ,in For the Normalized dictionary feature vectors, is the Kronecker function, is the number of dictionary features. The two losses are combined through learnable weights w1 and w2, where w1=1.0 and w2=0.1 are initialized to achieve adaptive weight adjustment.
[0046] The present invention also has the following effects: By expanding the traditional ADMM iterative process into trainable network layers and parameterizing the dictionary matrix as the trainable weights of the network, end-to-end implicit dictionary learning is achieved. This design breaks through the limitations of traditional explicit dictionary construction methods and forms a dual-effect synergy mechanism of data-driven regularization terms and model-driven optimization.
[0047] An embodiment of the present invention provides a hyperspectral image classification system, comprising: The data acquisition module is used to acquire a hyperspectral image dataset containing multiple ground object categories, and use a 3D convolutional network and a 2D convolutional network to extract features in turn to obtain multi-scale features.
[0048] A joint optimization model building module is used to use the alternating direction multiplier method ADMM to build a joint optimization objective function for hyperspectral image classification for variable iterative solution as a joint optimization model; a dual-branch processing mechanism based on the state-space model Mamba is used to optimize the auxiliary variables in the joint optimization model; wherein the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes through modal decomposition, using the main branch and the context branch to respectively extract the global features and local features of the multiple independent modes, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each linear transformation has layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing, and adds attention fusion.
[0049] The classification result output module is used to input the multi-scale features into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; splice the sparse coefficient features with the dictionary features to obtain fusion features; input the fusion features into the classifier to obtain the classification results of the hyperspectral image.
[0050] A specific embodiment is as follows: This embodiment discloses a hyperspectral image classification method, and the specific steps include the following: S1. A hyperspectral image acquired by an airborne visible / infrared imaging spectrometer (AVIRIS) at a test site was used. The spatial resolution of the hyperspectral image is 20 meters, and the original data contains 224 bands. After removing the low-quality and low-signal-noise bands caused by strip noise and water absorption, 200 bands were retained for classification. The image covers crops such as corn, soybeans, and wheat, as well as 16 different land cover categories such as forests, buildings, and grasslands. The data size of the experimental area is 145×145 pixels, and there are 10,366 pixels in groundTruth.
[0051] S2. Use the joint optimization objective function and classifier to obtain the classification results of the processed image. The classification results are as follows: Figure 4 ,The experimental results show that the overall accuracy reaches 98.10%.
[0052] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for classifying hyperspectral images, characterized in that: The following steps are involved: Obtain a hyperspectral image dataset containing multiple ground object categories, and use 3D convolutional networks and 2D convolutional networks to extract features in turn to obtain multi-scale features; The alternating direction multiplier method (ADMM) is used to construct a joint optimization objective function for hyperspectral image classification and iterate the variables as a joint optimization model. A dual-branch processing mechanism based on the state-space model Mamba is used to optimize the auxiliary variables in the joint optimization model; wherein the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes through modal decomposition, using the main branch and the context branch to extract the global features and local features of the multiple independent modes respectively, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each linear transformation has layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing, and adds attention fusion; The multi-scale features are input into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; the sparse coefficient features and dictionary features are spliced to obtain fusion features; the fusion features are input into the classifier to obtain the classification results of the hyperspectral image.
2. A method for classifying hyperspectral images as claimed in claim 1, characterized in that: The joint optimization objective function L is formulated as follows: ; in, is a multi-scale feature, is the dictionary matrix, is a sparse coefficient matrix, Z is an auxiliary variable, is an implicit prior regularization term for hyperspectral images, is the Lagrange multiplier, and These are trade-off parameters.
3. A method for classifying hyperspectral images as claimed in claim 2, characterized in that: The dual-branch processing mechanism based on the state space model Mamba is used to optimize the auxiliary variables in the joint optimization model, and the specific steps include: The state space model Mamba is used to replace the solution method of the auxiliary variable Z in ADMM; The orthogonal projection matrix is used to map the auxiliary variables along the spectral mode, spatial height mode and spatial width mode. Z Decomposition is performed to generate orthogonal multimodal feature components; each modal component is processed by the Enhanced Mamba Block, which integrates selective state parameterization and adaptive time scale adjustment; The main branch uses a linear transformation sequence with layer normalization and SiLU activation function to maintain feature consistency by adjusting the dimension of the linear layer and obtain the global features of the auxiliary variable Z; The context branch uses a small convolution kernel for spatial processing and adds attention fusion to obtain auxiliary variables Z Local features of Use layer normalization and linear projection to fuse the features obtained from the two branches to complete the auxiliary variables Z Optimization.
4. A method for classifying hyperspectral images as claimed in claim 2, characterized in that: Before obtaining the sparse coefficient feature, the method further includes: Get dictionary matrix D Transpose D T and with the dictionary matrix D Multiply to obtain the multiplication result; According to the multiplication result, the sparse coefficient matrix S in the joint optimization model is optimized by replacing the matrix inversion method with a 3×3 convolution.
5. The method for classifying a hyperspectral image according to claim 1, characterized in that: The step of obtaining multi-scale features specifically includes: The dimension of the hyperspectral image dataset is (B, C, H, W), where B is the batch size, C is the number of spectral channels, and H and W are spatial dimensions; it is converted to (B, 1, C, H, W) through dimension expansion; The dimension-converted hyperspectral image dataset is input into a 3D convolutional network for feature extraction to obtain spatial and spectral information. The 3D convolutional network uses convolution kernels of (7, 3, 3), (5, 3, 3), and (3, 3, 3), and uses a BatchNorm normalization layer and a ReLU nonlinear activation function. The number of channels changes to 8, 16, and 32 respectively. The spatial information and spectral information are enhanced using the channel attention mechanism to obtain enhanced features; The enhanced features are input into a 2D convolutional network for multi-scale spatial feature extraction to obtain spatial information. The number of channels of the 2D convolutional network is 32, 128, 256 and 512, and the maximum pooling operation is used to perform hierarchical transformation of the feature map size.
6. A method for classifying hyperspectral images as claimed in claim 1, characterized in that: The classifier adopts a two-layer fully connected network.
7. A method for classifying hyperspectral images as claimed in claim 1, characterized in that: The classifier is trained by a learning rate scheduling strategy combining warmup, a training method capable of gradually increasing the learning rate, and cosine annealing.
8. The method for classifying a hyperspectral image according to claim 1, characterized in that: The loss function of the classifier L total , the formula is: ; in, is the classification cross entropy loss function, is the dictionary coherence loss function, w 1 and w 2 are all adjustable weight parameters.
9. A classification system for hyperspectral images, characterized in that: include: The data acquisition module is used to acquire a hyperspectral image dataset containing multiple ground object categories, and sequentially use a 3D convolutional network and a 2D convolutional network to extract features and obtain multi-scale features; A joint optimization model building module is used to use the alternating direction multiplier method ADMM to build a joint optimization objective function for hyperspectral image classification for variable iterative solution as a joint optimization model; a dual-branch processing mechanism based on the state-space model Mamba is used to optimize the auxiliary variables in the joint optimization model; wherein the dual-branch processing mechanism based on the state-space model Mamba includes: decomposing the auxiliary variables into multiple independent modes by modal decomposition, using the main branch and the context branch to extract the global features and local features of the multiple independent modes respectively, and using layer normalization and linear projection to combine the global features and local features obtained by the two branches to obtain optimized auxiliary variables; the main branch uses multiple linear transformations, each linear transformation has layer normalization and SiLU activation function, and the feature consistency is maintained by adjusting the dimension of the linear layer; the context branch uses a small convolution kernel for spatial processing, and adds attention fusion; The classification result output module is used to input the multi-scale features into the joint optimization model for variable iterative solution to obtain sparse coefficient features and dictionary features; splice the sparse coefficient features with the dictionary features to obtain fusion features; input the fusion features into the classifier to obtain the classification results of the hyperspectral image.
Citation Information
Patent Citations
Hyper-spectral remote sensing image classification method based on self-adaptive hierarchical multi-scale
CN106127179A
Hyperspectral image classification method and device based on ADMM-Net
CN110363078A
Hyperspectral image multi-scale feature extraction method based on convolution sparse decomposition
CN112507962A
Explanatable multi-source remote sensing image joint classification method based on sparse representation model
CN115719431A
Multimode self-supervised mixed Mangbar hyperspectral image classification method
CN119007024A