A model training method and a hyperspectral image super-resolution reconstruction method
By using a three-dimensional selective scanning state space block and frequency domain gating mechanism, combined with multi-scale decomposition and adaptive loss function, the problems of static and simple low-rank representation, spatial-spectral attention separation modeling and high computational complexity in hyperspectral image super-resolution methods are solved, thus achieving efficient hyperspectral image super-resolution reconstruction.
Patent Information
- Application Number
- CN202611082217.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-11-24
AI Technical Summary
Existing hyperspectral image super-resolution methods cannot dynamically adjust low-rank basis according to local content, and cannot effectively capture joint long-range dependencies across spatial locations and spectral bands. They suffer from insufficient high-frequency detail recovery and high computational complexity.
It employs a three-dimensional selective scanning state space block and frequency domain gating mechanism, combined with multi-scale decomposition and adaptive loss function, to dynamically adjust the low-rank basis, support large-size hyperspectral image processing, explicitly process high-frequency components, and reduce computational complexity.
It improves the accuracy and reconstruction quality of spectral modeling, reduces computational complexity and memory usage, supports flexible super-resolution reconstruction at any scale, and enhances the model's versatility and training stability.
Smart Images

Figure CN123160345A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of remote sensing image processing and computer vision technology, and more specifically, to a model training method and a hyperspectral image super-resolution reconstruction method. Background Technology
[0002] Hyperspectral images (HSI) contain spectral information across tens to hundreds of consecutive narrow bands, enabling precise identification of ground features and are widely used in precision agriculture, environmental monitoring, military reconnaissance, and geological exploration. However, due to the physical limitations of imaging sensors, hyperspectral images inherently trade off spatial and spectral resolution—increasing spectral resolution typically leads to a decrease in spatial resolution. Hyperspectral super-resolution (SR) technology aims to reconstruct high-resolution (HR) images from low-resolution (LR) input and is a key method for improving the usability of hyperspectral data.
[0003] Existing hyperspectral image super-resolution methods can be mainly divided into three categories: model-driven methods, deep learning-based methods, and deep learning methods based on low-rank priors. Model-driven methods utilize handcrafted prior constraints on the solution space, such as total variation, nonlocal similarity, and low-rank properties. These methods offer strong physical interpretability but struggle to model complex spatial-spectral nonlinear relationships and suffer from high optimization complexity. Deep learning-based methods, represented by Convolutional Neural Networks (CNNs) and Transformers, learn mapping functions through data-driven approaches. CNNs have limited receptive fields, making it difficult to capture long-range dependencies; Transformers model long-range dependencies through self-attention mechanisms, but their computational complexity increases quadratically with the number of tokens and they lack the ability to recover high-frequency details. As for deep learning methods based on low-rank priors, they embed low-rank representations into neural networks. Existing methods often employ static linear low-rank assumptions, using globally shared basis matrices and linear projections, which cannot adapt to the spectral heterogeneity of different regions in hyperspectral images. Furthermore, they typically rely on explicit singular value decomposition (SVD) or tensor decomposition, increasing optimization complexity.
[0004] Based on the implementation of existing hyperspectral image super-resolution methods in specific application scenarios, the existing technology has the following drawbacks: 1. Existing methods employ a globally shared low-rank basis matrix and linear projection to impose a uniform low-rank constraint on the entire image, which cannot be dynamically adjusted based on local content. In actual hyperspectral images, the requirements for low-rank constraints are drastically different between homogeneous regions with simple ground cover and smooth spectral curves and regions with complex ground cover and strong spectral heterogeneity. A uniform static low-rank representation cannot effectively suppress noise in homogeneous regions, nor can it fully preserve fine-grained spectral details in heterogeneous regions.
[0005] 2. Existing methods typically perform attention calculations for the spatial and spectral dimensions independently, failing to capture joint long-range dependencies across spatial locations and spectral bands within a unified framework. This results in insufficient interaction of spatial and spectral features, limiting reconstruction accuracy.
[0006] 3. Existing deep models, represented by Transformer, generally suffer from low-frequency bias. They tend to prioritize learning low-frequency global information while ignoring high-frequency details such as edges and textures, resulting in over-smoothing of reconstructed images. Existing high-frequency compensation methods mostly rely on simple parallel convolutional branches, which lack deep integration with the main network and are difficult to accurately recover high-frequency details.
[0007] 4. The complexity of the Transformer's self-attention mechanism increases quadratically with the input size, leading to computational bottlenecks in processing large hyperspectral images, resulting in high memory consumption and slow inference speed. Furthermore, traditional upsampling methods only support specific magnification factors and cannot flexibly support super-resolution reconstruction at arbitrary scales, requiring the training of independent models for different scales.
[0008] Therefore, in light of the above requirements and the shortcomings of existing technologies, this application proposes a model training method and a hyperspectral image super-resolution reconstruction method. Summary of the Invention
[0009] To address the shortcomings of traditional hyperspectral image super-resolution methods, such as static and simplistic low-rank representations, spatial-spectral attention separation modeling, insufficient high-frequency information recovery capabilities, and high computational complexity, this invention provides a model training method and a hyperspectral image super-resolution reconstruction method. This method dynamically adjusts the low-rank basis based on local content and combines multi-scale decomposition to adapt to spectral heterogeneity in different regions and at different scales.
[0010] The primary objective of this invention is to solve the aforementioned technical problems. The technical solution of this invention is as follows: The first aspect of this invention provides a method for super-resolution reconstruction of hyperspectral images, the method comprising the following steps: S1. Obtain a high-resolution hyperspectral image as the ground truth image. For each ground truth image, spatial downsampling is performed using at least one downsampling factor to generate the corresponding low-resolution hyperspectral image. This constitutes a training sample set consisting of low-resolution and high-resolution image pairs.
[0011] S2. Construct a deep feature extraction network consisting of K cascaded three-dimensional selective scanning state space blocks, and extract low-resolution hyperspectral images from the training sample set. The input model is processed sequentially by the shallow feature extraction module to extract shallow features. Deep features are extracted using the deep feature extraction network. The shallow features are obtained through the upsampling module. and the deep features Based on the fusion features, decode and output super-resolution reconstructed image .
[0012] S3. Reconstruct the image based on the super-resolution image. With the truth image The difference between them is used to calculate the total loss function value, which includes at least: pixel-level loss term, spectral angle mapping loss term, and spatial gradient loss term; wherein, each loss term is adaptively weighted by its corresponding learnable uncertainty parameter.
[0013] S4. Based on the total loss function value, backpropagation is performed to update the learnable parameters of the model. Steps S3 to S5 are repeated until the preset convergence condition is met, and the trained hyperspectral image super-resolution reconstruction model is obtained.
[0014] Based on the above technical features, the present invention can dynamically adjust the low-rank basis according to the local content, and combine multi-scale decomposition to adapt to the spectral heterogeneity of different regions and scales; by replacing the Transformer with a three-dimensional state space model, the complexity of spatial-spectral attention is reduced from quadratic to linear, which can support the processing of large-size hyperspectral images, realize continuous coordinate decoding through implicit neural representation, support flexible magnification factors, and eliminate the need to train independent models for different scales.
[0015] A second aspect of this invention provides a method for super-resolution reconstruction of hyperspectral images, which uses the aforementioned model training method to construct and train a hyperspectral image super-resolution reconstruction model, comprising the following steps: S1. The low-resolution hyperspectral image to be processed Input the model and extract shallow features through a 3×3×3 three-dimensional convolutional layer. , where H, W, and B are the spatial height, spatial width, and number of spectral bands of the low-resolution image, respectively, and C is the number of feature channels.
[0016] S2, the shallow features Input by A deep feature extraction network consisting of stacked, cascaded 3D selective scanning state space blocks is used to obtain deep features. .
[0017] S3, the deep features With the shallow features The fusion yields encoded features; for each query coordinate (x, y) and each spectral band determined by an arbitrarily specified positive real magnification factor s on the target super-resolution image. The query coordinates and bands are frequency-encoded to obtain coordinate embeddings. Local feature contexts within the neighborhood of the query coordinates are aggregated from the encoded features. The coordinate embeddings and the local feature contexts are then input into a multilayer perceptron for decoding into pixel values. Finally, these are combined to obtain a super-resolution hyperspectral image. .
[0018] Based on the aforementioned technical features, this invention was experimentally validated on multiple publicly available hyperspectral datasets, comparing it with existing mainstream hyperspectral super-resolution methods, including RCAN, HSCNN+, and MST. Experimental results show that this invention significantly outperforms existing methods in both reconstruction accuracy and computational efficiency. This invention reduces the spatial-spectral attention complexity from... Down to By combining parallel scanning algorithms, the inference speed is greatly improved and the memory usage is reduced, making it possible to apply hyperspectral super-resolution to high-resolution wide-swath data in real time.
[0019] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned hyperspectral image super-resolution reconstruction method.
[0020] A fourth aspect of the present invention provides a computer device, including a processor and a memory, the memory for storing a computer program, and the processor for executing the computer program stored in the memory to cause the computer device to perform the model training method or the hyperspectral image super-resolution reconstruction method.
[0021] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: This invention provides a model training method and a hyperspectral image super-resolution reconstruction method. It employs dynamic low-rank basis combined with multi-scale fusion, enabling the model to automatically adjust its representation complexity based on local spectral characteristics. Low-rank constraints are strengthened in uniform regions, while necessary details are preserved in heterogeneous regions, improving the accuracy of spectral modeling. A frequency-domain gating mechanism is used to explicitly process high-frequency components, overcoming the low-frequency bias of the Transformer and effectively improving the reconstruction quality of details such as edges and textures, avoiding excessive smoothing of the reconstructed image. Implicit neural representation supports continuous coordinate decoding, eliminating the need to train an independent model for each magnification factor, allowing for flexible adaptation to different task requirements and improving the model's versatility. Finally, adaptive loss weights are used to automatically balance multi-task objectives, reducing the burden of manual parameter tuning and improving training stability and the final reconstruction effect. Attached Figure Description
[0022] Figure 1 This is a flowchart of a model training method according to the present invention.
[0023] Figure 2 This is a diagram of the overall network architecture of the hyperspectral image super-resolution reconstruction model proposed in one embodiment of the present invention.
[0024] Figure 3 This is a schematic diagram illustrating the link relationships between the sub-modules in one embodiment of the present invention.
[0025] Figure 4 This is a schematic diagram of the structure of a spatially adaptive dynamic low-rank representation submodule in one embodiment of the present invention.
[0026] Figure 5 This is a schematic diagram of the structure of a three-dimensional selective scanning state space submodule in one embodiment of the present invention.
[0027] Figure 6 This is a schematic diagram of the structure of a frequency-domain gated feedforward network submodule in one embodiment of the present invention.
[0028] Figure 7 This is a schematic diagram of the upsampling module structure in one embodiment of the present invention.
[0029] Figure 8 This is a flowchart of a hyperspectral image super-resolution reconstruction method according to the present invention.
[0030] Figure 9 This is a qualitative comparison of the present invention and existing methods on the CAVE dataset in one embodiment of the present invention.
[0031] Figure 10 This is a comparison chart of the computational efficiency of the present invention and existing methods in one embodiment of the present invention. Detailed Implementation
[0032] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0033] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0034] Example 1 like Figure 1 As shown, this invention provides a model training method. The model includes a shallow feature extraction module, a deep feature extraction network, and an upsampling module. This method includes the following steps: S1. Obtain a high-resolution hyperspectral image as the ground truth image. For each ground truth image, spatial downsampling is performed using at least one downsampling factor to generate the corresponding low-resolution hyperspectral image. This constitutes a training sample set consisting of low-resolution and high-resolution image pairs.
[0035] S2. Construct a deep feature extraction network consisting of K cascaded three-dimensional selective scanning state space blocks, and extract low-resolution hyperspectral images from the training sample set. The input model is processed sequentially by the shallow feature extraction module to extract shallow features. Deep features are extracted using the deep feature extraction network. The shallow features are obtained through the upsampling module. and the deep features Based on the fusion features, decode and output super-resolution reconstructed image .
[0036] S3. Reconstruct the image based on the super-resolution image. With the truth image The difference between them is used to calculate the total loss function value, which includes at least: pixel-level loss term, spectral angle mapping loss term, and spatial gradient loss term; wherein, each loss term is adaptively weighted by its corresponding learnable uncertainty parameter.
[0037] S4. Based on the total loss function value, backpropagation is performed to update the learnable parameters of the model. Steps S3 to S5 are repeated until the preset convergence condition is met, and the trained hyperspectral image super-resolution reconstruction model is obtained.
[0038] It should be noted that this invention incorporates a multi-scale low-rank decomposition and fusion mechanism, dynamically generating low-rank basis matrices based on local content to achieve adaptive low-rank modeling of heterogeneous spectral regions, such as... Figure 2 As shown, a three-dimensional selective scan state space block (3D-SSM) is used to replace the traditional Transformer. Selective state scanning is performed along the three dimensions of space and spectrum to achieve unified long-range dependency modeling of space and spectrum with linear complexity. Different frequency sub-bands are processed separately in the wavelet transform domain through an explicit high-frequency compensation network in the frequency domain to achieve accurate recovery of high-frequency details. Finally, the continuous coordinates are mapped to high-resolution spectral values through an implicit neural upsampling module to support super-resolution reconstruction at any scale.
[0039] like Figure 3 As shown, each of the three-dimensional selective scanning state space blocks in step S2 includes a spatial adaptive dynamic low-rank representation submodule, a three-dimensional selective scanning state space submodule, and a frequency domain gated feedforward network submodule connected in sequence.
[0040] For the spatially adaptive dynamic low-rank representation submodule, the low-rank basis matrix of existing methods... Global sharing cannot adapt to the spectral characteristics of different regions. Therefore, the spatially adaptive dynamic low-rank representation submodule proposed in this invention includes a dynamic basis generator:
[0041] in express The 3×3 local neighborhood of the location. Global average pooling is used to compress the spatial dimension of neighborhood features and generate a global context vector. This design allows each spatial location to have an adaptive low-rank subspace dimension. Its value range is [6,24]; a smaller rank is used for flat areas with uniform spectrum, such as large areas of vegetation and water bodies, to strengthen the low-rank constraint and compress redundancy; a larger rank is used for spectrally heterogeneous edge and texture areas, such as ground feature boundaries and small targets, to retain more detailed information.
[0042] To further capture the low-rank characteristics of the spectrum at different spatial scales, this module incorporates a multi-scale low-rank decomposition and fusion mechanism: First, the input features are decomposed into feature representations at three scales using a Gaussian pyramid. The dynamic low-rank representation is executed independently at each scale. Then, the low-rank features at each scale are adaptively fused through cross-scale attention gating, taking into account the spectral structure at different scales and improving the robustness of low-rank modeling.
[0043] like Figure 4As shown, the spatial adaptive dynamic low-rank representation submodule dynamically generates the low-rank basis matrix and adaptive rank parameter corresponding to each spatial location on the input feature map based on the degree of spectral heterogeneity in the local neighborhood of that location, and calculates the low-rank enhanced features accordingly; and performs the dynamic low-rank representation on different spatial scales through multi-scale decomposition, and adaptively fuses the results of each scale.
[0044] In this embodiment, the specific workflow is as follows: input features Channel transformation is performed using 1×1 convolution. Later reshaped into matrix form ,in These represent the spatial height and width of the input features, respectively. The channel dimension of the input feature.
[0045] For each spatial location on the feature map Extract to Local feature blocks within the k×k neighborhood of the center The local feature blocks are input into the local feature aggregator. Generate each spatial location The corresponding low-rank basis matrix ,in It is a local adaptive rank parameter with a value range of [6, 24].
[0046] Calculate the spatial position Adaptive low-rank representation The low-rank representation is then fused with the input features via residual connections to obtain low-rank enhanced features. The residual connection contains a learnable scaling factor with an initial value less than 1. In this embodiment, the initial value is 0.1.
[0047] like Figure 5 As shown, for the three-dimensional selective scanning state space submodule, the three-dimensional selective scanning state space submodule performs selective state scanning on the input features along the spatial height direction, spatial width direction and spectral band direction respectively. Each scanning path uses input-dependent selective parameters to propagate the state along the one-dimensional sequence, and the scanning results in the three directions are adaptively fused through dynamic weights.
[0048] The selective scan, the parameters of the traditional state-space model The input-independent constant is used, while the selective scanning described in this invention employs input-dependent selective parameters:
[0049]
[0050]
[0051] in For input Selection gating generated through linear projection enables the model to dynamically adjust state propagation parameters based on input content, improving modeling flexibility. The adaptive fusion of scan results from three directions using dynamic weights specifically involves: along... Selective scanning is performed in each of the three dimensions, splitting the feature map into independent one-dimensional sequences by row / column. State propagation is then performed along the sequence direction, transforming long-range dependency modeling in two-dimensional space into efficient one-dimensional sequence modeling, avoiding the high complexity of two-dimensional global attention. To improve parallelism, the model divides the input channels into two parts, performing horizontal and vertical scans in parallel, with computations in the two directions not interfering with each other. For cross-band correlations in hyperspectral images, the spectral vector at each spatial location is additionally treated as a one-dimensional sequence, and state propagation is performed along the band direction to capture long-range spectral dependencies between different bands, overcoming the limitation of traditional spatial attention in modeling long-range spectral relationships.
[0052] To further improve the computational efficiency of scanning, this invention employs a hardware-aware Bllelloch parallel prefix sum algorithm to implement state scanning. This algorithm transforms serial state propagation into parallel computation, achieving several times the speedup on parallel hardware such as GPUs, while ensuring that the computational results are completely consistent with those of serial scanning. Furthermore, for The characteristics of this, the complexity of traditional 3D self-attention is The complexity of this invention is only This significantly reduces computational overhead, making real-time processing of large-size hyperspectral images possible.
[0053] In this embodiment, the workflow of the three-dimensional selective scanning state space submodule is as follows: input features Divided into two parts along the channel dimension ,right Perform a selective horizontal stripe scan on Perform vertical stripe selective scanning, which refers to splitting the feature into a one-dimensional sequence by row / column and performing state propagation along the sequence direction. The scanning process is specifically as follows:
[0054]
[0055] in , , For the step size parameter that the input depends on, These are the state space parameters, with a state dimension of 16. In a one-dimensional sequence Input at any time It is in a hidden state.
[0056] Then along the spectral dimension Perform additional state propagation to capture cross-band spectral correlations:
[0057] The scan results from the three directions are fused using learnable weights:
[0058] in The input depends on the dynamic fusion weights, all of which have an initial value of 1 / 3.
[0059] like Figure 6 As shown, the frequency-domain gated feedforward network submodule performs discrete wavelet transform on the input features, decomposing the features into low-frequency subbands and multiple high-frequency subbands. The low-frequency subbands and high-frequency subbands are processed through different network branches, and the high-frequency components are selectively modulated through a gating mechanism. Finally, the features are reconstructed into time-domain features through inverse wavelet transform.
[0060] It should be noted that research shows Transformer-type models generally exhibit low-frequency bias, tending to prioritize learning low-frequency global information while ignoring high-frequency edge and texture details, leading to overly smooth reconstructed images. To address this issue, this invention explicitly separates and processes different frequency components in the wavelet domain to enhance high-frequency details. Therefore, this invention employs the Daubechies 2 wavelet (db2) to perform discrete wavelet transform. This wavelet has excellent local frequency domain analysis capabilities and high computational efficiency, making it suitable for image processing tasks. The wavelet transform is performed independently for each feature channel, decomposing the two-dimensional spatial features of each channel into one low-frequency subband and three high-frequency subbands, corresponding to high-frequency information in the horizontal, vertical, and diagonal directions, respectively.
[0061] In this embodiment, a differentiated processing strategy is adopted for different frequency sub-bands: the low-frequency sub-band retains the global semantic structure of the features and is processed using a lightweight 2-layer MLP to capture the global context and ensure the accuracy of global structure reconstruction; the high-frequency sub-band corresponds to the edge, texture, and other details of the image and is modulated using a depthwise separable convolution + gating mechanism to enhance the representation of high-frequency details, while channel attention automatically adjusts the contribution of different high-frequency sub-bands. Finally, the model generates adaptive gating weights based on the global context of the input features, dynamically adjusting the contribution ratio of high and low frequency components: enhancing high-frequency weights for textured images and enhancing low-frequency weights for flat regions, achieving content-adaptive frequency domain processing and effectively overcoming the low-frequency bias problem of the Transformer.
[0062] In this embodiment, the workflow of the frequency-domain gated feedforward network submodule is as follows: For input features... implement The discrete wavelet transform is used to independently decompose each channel, yielding the low-frequency subband. and multiple high-frequency subbands .
[0063] For low-frequency subband Applying a 2-layer standard feedforward network:
[0064] Gated convolution modulation is applied to each high-frequency subband:
[0065] in It is a 3×3 gated sum convolution kernel. For the Sigmoid function, The process involves element-wise multiplication; finally, the time-domain features are reconstructed using inverse wavelet transform.
[0066] like Figure 7 As shown, the upsampling module of this invention differs from traditional fixed-scale upsampling methods (such as PixelShuffle and transposed convolution), which can only support specific magnification factors and cannot flexibly adapt to different task requirements. This invention uses implicit neural representations to achieve continuous upsampling, supporting super-resolution reconstruction at any scale. For target coordinates... The upsampling module first normalizes it to the [0,1] interval to eliminate the coordinate scale differences between images of different resolutions and spectral wavelengths. Similarly, the data is normalized to the sensor's wavelength range to achieve continuous spectral interpolation. For query coordinates, a 3×3 neighborhood is first obtained on the low-resolution feature map. Neighborhood features are then aggregated using distance-weighted soft attention as context: temperature coefficient. Setting it to 0.1 controls the smoothness of attention, allowing neighboring features to receive higher weights and ensuring the effectiveness of local context. Learnable frequency encoding is used to encode the normalized coordinates. The frequency parameter is initialized to logarithmically spaced frequency values, covering different frequency ranges from low to high. This allows the model to simultaneously capture both coarse-grained and fine-grained coordinate information, ensuring reconstruction accuracy at different scales. Finally, a 4-layer fully connected MLP maps the coordinate embeddings and local context features to high-resolution pixel values, supporting arbitrary scaling factors without requiring retraining the model for different scales.
[0067] The specific workflow of the upsampling module is as follows: [The module then extracts deep features...] shallow features The encoded features are obtained by fusing and projecting using a 1×1 convolution. For any pixel coordinates on the target high-resolution image and spectral wavelength First, normalize the coordinates to the [0,1] interval and construct the coordinate embedding:
[0068] in The learnable frequency parameter is initialized to the frequency values of the logarithmic interval. Obtain the feature context of the query location through local feature aggregation:
[0069] in To query the 3×3 low-resolution neighborhood corresponding to the coordinates, Temperature coefficient; High-resolution pixel values are decoded using a 4-layer multilayer perceptron:
[0070] in This represents the pixel value corresponding to the coordinates and band.
[0071] Furthermore, the expression for the total loss function in step S3 is:
[0072] in These are pixel-level L1 loss, spectral angle mapping loss, spatial gradient loss, and perceptual loss, respectively. The uncertainty weights for each loss term are automatically learned through the network.
[0073] In this embodiment, This can be expanded into the following loss function:
[0074]
[0075]
[0076]
[0077] In other words, the entire loss function can be adjusted to the following expression:
[0078] This expression can automatically balance pixel fidelity, spectral consistency, spatial sharpness, and perceptual quality. For pre-trained VGG network feature extractors, Automatic optimization via backpropagation eliminates the need for manual parameter tuning.
[0079] In one specific embodiment, the present invention was experimentally validated on multiple publicly available spectral datasets, and compared with existing mainstream hyperspectral super-resolution methods, including RCAN, HSCNN+, and MST. Experimental results show that, as Figure 9 and Figure 10 As shown, this invention significantly outperforms existing methods in both reconstruction accuracy and computational efficiency. Specifically, on the CAVE dataset, in a 4x magnification task, the proposed invention achieves a PSNR of 43.25 dB and a SAM of 1.21, representing improvements of 0.82 dB and 0.03 respectively compared to the current best method, MST. On the Pavia Center dataset, in the same 4x magnification task, the proposed invention achieves a PSNR of 37.62 dB and a SAM of 1.85, representing improvements of 0.65 dB and 0.04 respectively compared to the current best method. Furthermore, in terms of computational efficiency, for 256×256×31 hyperspectral images, the proposed invention achieves an inference speed of 12.5 fps, a 4x improvement over the Transformer method, while reducing memory usage by 75%, enabling real-time processing of large-size hyperspectral images. It is evident that the training method proposed in this invention significantly outperforms existing hyperspectral super-resolution methods.
[0080] Based on the above technical features, the present invention has the following beneficial effects: Adaptive low-rank modeling capability: Dynamic low-rank basis combined with multi-scale fusion enables the model to automatically adjust the representation complexity according to local spectral characteristics, strengthen low-rank constraints in uniform regions, and retain necessary details in heterogeneous regions, thereby improving the accuracy of spectral modeling.
[0081] Significantly improved computational efficiency: 3D-SSM reduces the complexity of spatial-spectral attention from Down to By combining parallel scanning algorithms, the inference speed is greatly improved and the memory usage is reduced, making it possible to apply hyperspectral super-resolution to high-resolution wide-swath data in real time.
[0082] High-frequency detail accurate recovery: The frequency domain gating mechanism explicitly processes high-frequency components, overcoming the low-frequency bias of the Transformer, effectively improving the reconstruction quality of details such as edges and textures, and avoiding excessive smoothing of the reconstructed image.
[0083] Flexible reasoning at any scale: Implicit neural representations support continuous coordinate decoding, eliminating the need to train independent models for each magnification factor. This allows for flexible adaptation to different task requirements and improves the model's versatility.
[0084] Enhanced training stability: Adaptive loss weights automatically balance multi-task objectives, reducing the burden of manual parameter tuning and improving training stability and final reconstruction results.
[0085] Example 2 Based on the above embodiment 1, combined with Figure 8 This embodiment details the second aspect of the present invention: a hyperspectral image super-resolution reconstruction method, which employs a model training method as described in Embodiment 1 to construct and train a hyperspectral image super-resolution reconstruction model. Figure 3 As shown, it includes the following steps: S1. The low-resolution hyperspectral image to be processed Input the model and extract shallow features through a 3×3×3 three-dimensional convolutional layer. , where H, W, and B are the spatial height, spatial width, and number of spectral bands of the low-resolution image, respectively, and C is the number of feature channels.
[0086] S2, the shallow features Input by A deep feature extraction network consisting of stacked, cascaded 3D selective scanning state space blocks is used to obtain deep features. .
[0087] S3, the deep features With the shallow features The fusion yields encoded features; for each query coordinate (x, y) and each spectral band determined by an arbitrarily specified positive real magnification factor s on the target super-resolution image. The query coordinates and bands are frequency-encoded to obtain coordinate embeddings. Local feature contexts within the neighborhood of the query coordinates are aggregated from the encoded features. The coordinate embeddings and the local feature contexts are then input into a multilayer perceptron for decoding into pixel values. Finally, these are combined to obtain a super-resolution hyperspectral image. .
[0088] In a specific embodiment, the network hyperparameters are configured as follows: Feature Dimensions 3D-SSMBlock quantity Low-rank basis dimension Adaptive rank range Wavelet decomposition series Implicit MLP layers: 4, hidden dimension: 512; training batch size: 16; optimizer: AdamW; initial learning rate: The weight decays to 1e-5, and cosine annealing is used for scheduling.
[0089] First, execute the training process: Step 1: On public datasets such as CAVE, Pavia Center, and Chikusei, the original high-resolution images are first normalized to the [0,1] interval, and then corresponding low-resolution images are generated through bicubic downsampling to construct LR-HR training pairs. During training, random horizontal flipping, vertical flipping, and 90-degree rotation are used for data augmentation to improve the model's generalization ability. The magnification factors used for training include 2×, 4×, and 8×, covering common super-resolution task requirements. Step 2: Input the LR image into the DMLR-SSM network to obtain the SR prediction results.
[0090] Step 3: Calculate the total loss using adaptive weighted multi-task loss.
[0091] Step 4: Update network parameters using the AdamW optimizer.
[0092] Step 5: Evaluate PSNR and SAM metrics on the validation set every 10 epochs, save the best model, and stop training early when the validation set metrics do not improve for 50 consecutive epochs.
[0093] Then the reasoning process is executed: Step 1: Load the pre-trained model weights. Step 2: Input the LR-HSI to be processed into the network and obtain deep features through forward propagation. Step 3: For each pixel coordinate of the target HR image and each band It decodes pixel values through an implicit neural upsampling module, supporting any specified magnification factor. Step 4: Assemble the output SR-HSI, perform post-processing, and crop the pixel values to the effective dynamic range of [0,1] to obtain the final super-resolution hyperspectral image.
[0094] Example 3 Based on Embodiments 1 and 2, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned hyperspectral image super-resolution reconstruction method.
[0095] In this embodiment, the present invention also provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the computer device performs the model training method or the hyperspectral image super-resolution reconstruction method.
[0096] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0097] Alternatively, if the above embodiments of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0098] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. The icons depicting structural positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A model training method, characterized in that, The model includes a shallow feature extraction module, a deep feature extraction network, and an upsampling module, and includes the following steps: S1, obtaining a high-resolution hyperspectral image as a ground truth image spatially down-sampling each ground truth image with at least one down-sampling factor to generate a corresponding low-resolution hyperspectral image composing a training sample set consisting of low-resolution-high-resolution image pairs; S2. Construct a deep feature extraction network consisting of K cascaded three-dimensional selective scanning state space blocks, and extract low-resolution hyperspectral images from the training sample set. The input model is processed sequentially by the shallow feature extraction module to extract shallow features. Deep features are extracted using the deep feature extraction network. The shallow features are obtained through the upsampling module. and the deep features Based on the fusion features, decode and output super-resolution reconstructed image ; S3. Reconstruct the image based on the super-resolution image. With the truth image The difference between them is used to calculate the total loss function value, which includes at least: pixel-level loss term, spectral angle mapping loss term, and spatial gradient loss term; wherein, each loss term is adaptively weighted by its corresponding learnable uncertainty parameter; S4. Based on the total loss function value, backpropagation is performed to update the learnable parameters of the model. Steps S3 to S5 are repeated until the preset convergence condition is met, and the trained hyperspectral image super-resolution reconstruction model is obtained.
2. The model training method according to claim 1, characterized in that, Each of the three-dimensional selective scan state space blocks in step S2 includes a spatially adaptive dynamic low-rank representation submodule, a three-dimensional selective scan state space submodule, and a frequency-domain gated feedforward network submodule connected in sequence. The spatial adaptive dynamic low-rank representation submodule dynamically generates the low-rank basis matrix and adaptive rank parameter corresponding to each spatial location on the input feature map based on the degree of spectral heterogeneity in the local neighborhood of that location, and calculates the low-rank enhanced features accordingly. Furthermore, the dynamic low-rank representation is executed at different spatial scales through multi-scale decomposition, and the results at each scale are adaptively fused. The three-dimensional selective scanning state space submodule performs selective state scanning on the input features along the spatial height direction, spatial width direction, and spectral band direction, respectively. Each scanning path uses input-dependent selective parameters to propagate the state along a one-dimensional sequence, and the scanning results in the three directions are adaptively fused through dynamic weights. The frequency-domain gated feedforward network submodule performs discrete wavelet transform on the input features, decomposing the features into low-frequency subbands and multiple high-frequency subbands. The low-frequency subbands and high-frequency subbands are processed through different network branches, and the high-frequency components are selectively modulated through a gating mechanism. Finally, the features are reconstructed into time-domain features through inverse wavelet transform.
3. The model training method according to claim 2, characterized in that, The spatial adaptive dynamic low-rank representation submodule will input features Channel transformation is performed using 1×1 convolution. Later reshaped into matrix form ,in These represent the spatial height and width of the input features, respectively. The channel dimension of the input feature; For each spatial location on the feature map Extract to Local feature blocks within the k×k neighborhood of the center The local feature blocks are input into the local feature aggregator. Generate each spatial location The corresponding low-rank basis matrix ,in For local adaptive rank parameters; Calculate the spatial position Adaptive low-rank representation The low-rank representation is then fused with the input features via residual connections to obtain low-rank enhanced features. The residual connection contains a learnable scaling factor with an initial value less than 1. .
4. The model training method according to claim 2, characterized in that, The three-dimensional selective scanning state space submodule will input features Divided into two parts along the channel dimension ,right Perform a selective horizontal stripe scan on Performing vertical stripe selective scanning, whereby stripe selective scanning refers to splitting the feature into a one-dimensional sequence by rows / columns and performing state propagation along the sequence direction, the specific process of selective scanning is as follows: in , , For the step size parameter that the input depends on, These are the state space parameters, with a state dimension of 16. In a one-dimensional sequence Input at any time It is in a hidden state; Then along the spectral dimension Perform additional state propagation to capture cross-band spectral correlations: The scan results from the three directions are fused using learnable weights: in The input depends on the dynamic fusion weights, all of which have an initial value of 1 / 3.
5. The model training method according to claim 2, characterized in that, The frequency-domain gated feedforward network submodule processes the input features. implement The discrete wavelet transform is used to independently decompose each channel, yielding the low-frequency subband. and multiple high-frequency subbands ; For low-frequency subband Applying a 2-layer standard feedforward network: Gated convolution modulation is applied to each high-frequency subband: in It is a 3×3 gated sum convolution kernel. For the Sigmoid function, The process involves element-wise multiplication; finally, the time-domain features are reconstructed using inverse wavelet transform.
6. A model training method according to any one of claims 2-5, characterized in that, The forward propagation process of the upsampling module in step S2 includes: processing deep features shallow features The encoded features are obtained by fusing and projecting using a 1×1 convolution. For any pixel coordinates on the target high-resolution image and spectral wavelength First, normalize the coordinates to the [0,1] interval and construct the coordinate embedding: in The learnable frequency parameter is initialized to the frequency values of the logarithmic interval. Obtain the feature context of the query location through local feature aggregation: in To query the 3×3 low-resolution neighborhood corresponding to the coordinates, Temperature coefficient; High-resolution pixel values are decoded using a 4-layer multilayer perceptron: in This represents the pixel value corresponding to the coordinates and band.
7. The model training method according to claim 6, characterized in that, The expression for the total loss function mentioned in step S3 is: in These are pixel-level L1 loss, spectral angle mapping loss, spatial gradient loss, and perceptual loss, respectively. The uncertainty weights for each loss term are automatically learned through the network.
8. A method for super-resolution reconstruction of hyperspectral images, characterized in that, The hyperspectral image super-resolution reconstruction model, constructed and trained using a model training method as described in any one of claims 1-7, includes the following steps: S1. The low-resolution hyperspectral image to be processed Input the model and extract shallow features through a 3×3×3 three-dimensional convolutional layer. , where H, W, and B are the spatial height, spatial width, and number of spectral bands of the low-resolution image, respectively, and C is the number of feature channels; S2, the shallow features Input by A deep feature extraction network consisting of stacked, cascaded 3D selective scanning state space blocks is used to obtain deep features. ; S3, the deep features With the shallow features The fusion yields encoded features; for each query coordinate (x, y) and each spectral band determined by an arbitrarily specified positive real magnification factor s on the target super-resolution image. The query coordinates and bands are frequency-encoded to obtain coordinate embeddings. Local feature contexts within the neighborhood of the query coordinates are aggregated from the encoded features. The coordinate embeddings and the local feature contexts are then input into a multilayer perceptron for decoding into pixel values. Finally, these are combined to obtain a super-resolution hyperspectral image. .
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the hyperspectral image super-resolution reconstruction method as described in claim 8.
10. A computer device comprising a processor and a memory, characterized in that, The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to cause the computer device to perform the model training method as described in any one of claims 1-7, or to perform the hyperspectral image super-resolution reconstruction method as described in claim 8.
