Hyperspectral remote sensing image compression method based on attention and quantization encoding optimization

By introducing an attention mechanism and a two-stage quantization coding strategy, the reconstruction quality and compression efficiency of hyperspectral remote sensing images under high compression ratio conditions are improved, solving the problems of poor reconstruction quality and high computational complexity in existing technologies, and making it suitable for resource-constrained satellite platforms.

CN120499378BActive Publication Date: 2026-07-03WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2025-05-12
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies suffer from poor reconstruction quality and high computational complexity in hyperspectral remote sensing images under high compression ratios, making it difficult to meet the needs of resource-constrained satellite platforms.

Method used

We adopt an attention-based and quantization-encoding optimization approach to enhance the model’s ability to perceive global information through the attention mechanism in deep learning, and combine it with a two-stage quantization encoding strategy to reduce storage and transmission costs.

Benefits of technology

It significantly improves the reconstruction performance of hyperspectral remote sensing images under high compression ratio conditions, reduces computational complexity, and is suitable for small satellite platforms with limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499378B_ABST
    Figure CN120499378B_ABST
Patent Text Reader

Abstract

The application provides a hyperspectral remote sensing image compression method based on attention and quantization coding optimization, and a network model training process, including processing and cropping of hyperspectral remote sensing image data, construction of a sample set for training after enhancement; a light-weighted encoder is used to extract low-dimensional feature representation of sample data, the encoder integrates a convolution layer and a spectral multi-head self-attention module; a decoder with a fusion space-spectrum attention mechanism is used to gradually reconstruct a hyperspectral remote sensing image from low-dimensional features; a combination loss function is used to optimize coding and decoding model parameters; a two-stage compression process of quantization coding is used for adaptive quantization of features, and floating-point features are mapped into discrete integers based on a logarithmic mapping strategy; the quantized features are subjected to two-stage coding compression; feature representation is restored through decoding and dequantization, and input into a trained decoder network to reconstruct a hyperspectral remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hyperspectral remote sensing image compression technology, and particularly to a technical solution for achieving high-quality reconstruction of hyperspectral remote sensing images under high compression ratio conditions. Background Technology

[0002] With the significant improvement in spectral, spatial, and temporal resolution of hyperspectral remote sensing satellites, the accuracy and real-time performance of hyperspectral remote sensing image data acquisition have been greatly enhanced. The daily data generated by global hyperspectral satellites in orbit has exceeded terabytes, posing a severe challenge to hyperspectral data storage and transmission. Simultaneously, efficient hyperspectral data compression and reconstruction methods are indispensable for building an integrated real-time service system encompassing communication, navigation, remote sensing, and computing. Therefore, there is an urgent need to develop efficient and intelligent hyperspectral compression and reconstruction technologies to improve the acquisition and processing capabilities of massive amounts of hyperspectral image data.

[0003] Traditional frequency-domain-based methods primarily rely on the Nyquist-Shannon sampling theory, focusing on bit-level lossy compression and typically employing a step-by-step "sample first, compress later" approach. This not only increases the overall compression time but also struggles to effectively compensate for the degradation in reconstruction performance under high compression ratios. In contrast, compressed sensing algorithms can perform data compression simultaneously with sampling, theoretically overcoming the limitations of traditional sampling theorems and enabling better image reconstruction even at low sampling rates. However, their high computational complexity and long reconstruction time limit their real-time application on small satellites.

[0004] In recent years, breakthroughs in deep learning technology have sparked interest in its application to high-dimensional tensor data compression. Deep learning-based methods, through end-to-end learning mechanisms, can effectively capture data features and, with the help of pre-trained models, achieve data compression and reconstruction in a relatively short time. However, under extremely high compression ratios, current deep learning-based methods have not yet fully surpassed traditional frequency domain methods. For example:

[0005] CN118524229A discloses a multi-level coding method and system for hyperspectral images based on channel attention. It extracts low-rank spectral features through a channel attention embedding module and combines this with a hierarchical variational autoencoder for multi-level coding. However, its drawback is that the decoding end relies on a spectral feature memory unit matrix to linearly map the dimensionality-reduced features to recover the original band number. This design not only introduces complex high-dimensional matrix multiplication operations but also fails to further compress the extracted low-dimensional features, thus making it difficult to achieve a higher compression ratio.

[0006] CN114422784A discloses a UAV multispectral remote sensing image compression method based on convolutional neural networks. It extracts image feature information through a convolutional autoencoder and combines multi-level quantization and Gaussian mixture entropy coding modules to remove feature redundancy. However, its drawbacks include: its simple encoding / decoding network structure makes it difficult to capture spatial global relationships and inter-band spectral dependencies in the image; and the use of Gaussian mixture entropy coding modules increases the complexity of the entire encoding end, making it unsuitable for resource-constrained satellite platforms.

[0007] CN110348487A discloses a hyperspectral image compression method and apparatus based on deep learning. It obtains feature results through an encoding network and then uses a quantization network to obtain the final compressed bitstream. However, a drawback is that the network still processes the hyperspectral image in the same way as natural images, splitting it into 3-channel image blocks. This makes it impossible to effectively mine the spectral correlations between bands and also disrupts the continuous variation trend of the actual spectral response curve, affecting the reconstruction effect of the hyperspectral remote sensing image.

[0008] CN115511983A discloses a remote sensing image compression algorithm based on deep attention networks and scene awareness. It improves the performance of the encoding / decoding network through an attention feature extraction module and optimizes compression performance in specific scenarios by combining scene-aware transfer learning. However, its drawbacks are: the spatial attention and channel attention modules of the network are computed independently without collaborative fusion, failing to effectively mine the complementary information between them; and the algorithm relies on transfer fine-tuning for different scenarios, resulting in high model redundancy and making it difficult to meet the deployment requirements of spaceborne platforms.

[0009] It is evident that existing technologies have not yet solved the problems of poor reconstruction quality and high computational complexity under high compression ratios.

[0010] This invention proposes a hyperspectral remote sensing image compression method based on attention and quantization coding optimization, which achieves significant improvement in reconstruction performance under high compression ratio conditions. On the one hand, the attention mechanism in deep learning enhances the model's ability to perceive global information, thereby improving the image reconstruction accuracy; on the other hand, a two-stage quantization coding strategy significantly improves compression efficiency, thereby effectively reducing storage and transmission costs. Summary of the Invention

[0011] This invention addresses the shortcomings of existing technologies in the compression and reconstruction of hyperspectral remote sensing images under high compression ratio conditions by proposing a hyperspectral remote sensing image compression method based on attention and quantization coding optimization.

[0012] The technical solution adopted in this invention is a hyperspectral remote sensing image compression method based on attention and quantization coding optimization, which involves the following process:

[0013] The network model training process includes:

[0014] The hyperspectral remote sensing image data is normalized and striped according to the pushbroom imager, and then enhanced to construct a sample set for training.

[0015] A lightweight encoder is used to extract low-dimensional feature representations of sample data. The encoder integrates convolutional layers and a spectral multi-head self-attention module to capture long-range dependencies in the spectral dimension.

[0016] A decoder employing a fusion spatial-spectral attention mechanism reconstructs hyperspectral remote sensing images step by step from low-dimensional features. The decoder includes cascaded hybrid attention modules that combine spatial attention and spectral attention weighted features.

[0017] Optimize the parameters of the encoding / decoding model by combining loss functions;

[0018] The two-stage compression process of quantization encoding includes:

[0019] The image to be compressed is input into the trained encoder network to extract low-dimensional feature representations.

[0020] Adaptive quantization of features is performed, mapping floating-point features to discrete integers based on a logarithmic mapping strategy;

[0021] The quantized features are then subjected to two-stage encoding compression.

[0022] The hyperspectral remote sensing image is reconstructed by decoding and dequantizing the feature representation and inputting it into a trained decoder network.

[0023] Furthermore, the spatial-spectral attention mechanism is implemented as follows:

[0024] Global average pooling and max pooling are performed on the input features to generate spectral attention weights and spatial attention weights, respectively.

[0025] The integrated attention weights are generated through fusion.

[0026] Furthermore, the adaptive quantization is implemented as follows:

[0027] Based on the preset quantization level, the feature data is normalized and logarithmically mapped;

[0028] Choose the storage format based on the quantization level.

[0029] Furthermore, a parallel branching module is added after one convolutional layer in the encoder, including...

[0030] Convolutional branches are used to extract local spatial feature information through convolution;

[0031] The Transformer branch sets up a spectral multi-head attention module and a multilayer perceptron based on Transformer, used to model the dependencies between spectral channels.

[0032] Furthermore, the hybrid attention module of the decoder includes:

[0033] The input features are evenly divided along the channels and then input into the convolutional branch and the Transformer branch respectively.

[0034] The convolutional branch outputs a spatially-spectral attention-weighted value.

[0035] The Transformer branch sets up a spectral multi-head self-attention module and multi-scale convolution based on Transformer to extract multi-scale features.

[0036] Moreover, the combined loss function includes absolute error loss L1 and spectral angle mapping loss SAM. The absolute error loss L1 constrains the pixel-level reconstruction fineness, while the spectral angle mapping loss SAM constrains the directional consistency of the reconstructed data in the spectral space.

[0037] Furthermore, when performing two-stage encoding compression on the quantized features, the integer features obtained by adaptive quantization are first converted into a byte stream, and then the Brotli lossless compression algorithm is used for two-stage compression.

[0038] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hyperspectral remote sensing image compression method based on attention and quantization coding optimization as described above.

[0039] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the hyperspectral remote sensing image compression method based on attention and quantization coding optimization as described above.

[0040] On the other hand, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the hyperspectral remote sensing image compression method based on attention and quantization coding optimization as described above.

[0041] This invention constructs a hyperspectral remote sensing image compression and reconstruction framework based on attention and quantization coding optimization, effectively improving image reconstruction quality under high compression ratio conditions. This scheme overcomes the limitations of previous deep convolutional networks in capturing global dependencies in hyperspectral data by introducing a spatial-spectral attention mechanism; it further ensures the consistency of the reconstructed image in the spectral space by employing a combined strategy of absolute error and spectral angle mapping loss; simultaneously, it fully exploits redundancy in feature representation using a two-stage quantization coding strategy, significantly improving compression efficiency. Furthermore, the method's coding module adopts a lightweight structural design, suitable for resource-constrained small satellite platforms, and has good practical application value.

[0042] Compared with existing technologies such as CN118524229A, the advantages of the hyperspectral remote sensing image compression method based on attention and quantization coding optimization proposed in this invention are as follows:

[0043] First, the spatial-spectral attention mechanism effectively uncovers the overall dependencies between the space and bands of hyperspectral images, enhancing feature representation capabilities rather than relying on single-channel attention.

[0044] Meanwhile, the feature redundancy is effectively released through the quantization encoding module, and the quantization accuracy can be flexibly adjusted according to actual needs based on the adaptive quantization strategy, avoiding repeated training.

[0045] During the network training phase, spectral angle mapping loss was incorporated, which effectively improved the spectral semantic consistency of the reconstructed images. Attached Figure Description

[0046] Figure 1 This is a flowchart of the hyperspectral remote sensing image compression and reconstruction method according to an embodiment of the present invention;

[0047] Figure 2 This is a schematic diagram of the overall encoding / decoding network structure according to an embodiment of the present invention;

[0048] Figure 3 This is a schematic diagram of the encoder network structure according to an embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram of the network structure of a single hybrid attention module in the decoder of an embodiment of the present invention;

[0050] Figure 5 This is a schematic diagram of the spatial-spectral attention mechanism in an embodiment of the present invention;

[0051] Figure 6 This is a flowchart of the two-stage compression part of the quantization encoding in an embodiment of the present invention;

[0052] Figure 7This is a schematic diagram comparing the rate-distortion curves of an embodiment of the present invention with those of four baseline algorithms on the test set;

[0053] Figure 8 This is a schematic diagram illustrating the image reconstruction results of the present invention and four baseline algorithms under similar compression bitrate conditions; Detailed Implementation

[0054] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0055] like Figure 1 As shown, the hyperspectral remote sensing image compression method based on attention and quantization coding optimization provided by this embodiment of the invention comprises two parts:

[0056] The network model training part includes: training data preprocessing and augmentation; extracting feature representations using the encoder; reconstructing data using the decoder; iteratively training and optimizing the encoder-decoder model; and saving the hyperspectral compressed reconstruction model after the evaluation accuracy reaches a predetermined threshold.

[0057] The two-stage compression part of quantization encoding includes: inputting the hyperspectral remote sensing image to be compressed and performing block processing; extracting feature representations using a trained encoder; adaptively quantizing the features according to a preset quantization level, and further compressing the discretized feature results using the Brotli lossless compression method to obtain the final compressed bitstream; sequentially performing Brotli decoding and dequantization operations to restore the original feature representations; and reconstructing the hyperspectral remote sensing image data using a trained decoder.

[0058] The specific steps for training the network model in this example are as follows:

[0059] Step 1.1: Training data preprocessing and augmentation: This includes normalizing the hyperspectral remote sensing image data, cropping it into strip data according to the pushbroom imager, and performing random vertical and horizontal flipping operations on the cropped sample data to construct a sample set for training.

[0060] In this embodiment, the collected hyperspectral data is automatically normalized and cropped into strips using a pushbroom imager. Simultaneously, random vertical and horizontal flipping operations are performed on the cropped sample data to enhance the data diversity of the training set. In this embodiment, the main experimental data comes from the AVIRIS hyperspectral dataset, from which multiple strips of various sizes are cropped. The sample data, in which low-quality bands were removed from the original 224-band data, resulted in an experimental dataset containing 3016 samples. The size of the cropped strip data was set to... This ensures that the data meets the input requirements of the encoder network module.

[0061] Step 1.2: Feature extraction: Use a lightweight encoder model to learn features from the preprocessed sample data and extract compact and representative feature representations;

[0062] In this embodiment, the encoder network is a three-layer convolutional neural network, whose structural units include, but are not limited to, convolution operations, batch normalization operations, and nonlinear mappings. A spectral multi-head self-attention module is integrated after the second-layer convolutional network module. This module is mainly used to establish long-range dependencies across channels in the spectral dimension. Then, a nonlinear transformation is introduced through a multilayer perceptron (MLP) to enable the encoder model to learn more complex feature representations. This attention module does not change the feature dimension.

[0063] Preferably, the spectral multi-head self-attention module can be implemented with reference to the multi-head self-attention mechanism in existing Transformer technology.

[0064] As a preferred embodiment, with a sampling rate of 0.5%, the convolutional network structure and parameter configuration of the encoder are shown in Table 1 below. The second-to-last column, "Input Size," and the last column, "Output Size," represent the feature map sizes (excluding batch processing dimensions) of each network layer's input and output, respectively, expressed in triplet form. It means that, among them Indicates the number of feature channels. and These represent the feature map height and width, respectively. Similarly, the kernel size, stride, and edge padding in Table 1 are represented by binary tuples. It means that, among them Indicates the vertical dimension. Indicates the horizontal dimension.

[0065] Table 1

[0066]

[0067] Following the second convolutional module in the encoder body, a parallel branch module is added, and its structure and parameter optimization suggestions are shown in Table 2 below. Specifically, the features output by the second convolutional layer are first divided into two parts in the channel dimension: one part is input into the convolutional branch to extract local features; the other part is input into the Transformer branch to model long-range dependencies in the spectral dimension. In this branch, the Transformer spectral multi-head self-attention module and the multilayer perceptron are input sequentially.

[0068] Table 2

[0069]

[0070] The encoder network structure provided in the embodiment is as follows: Figure 2 The specific settings are shown on the left side:

[0071] With a sampling rate of 0.5%, the encoder network consists of four main layers. Layers 1, 2, and 4 are the main convolutional layers, and layer 3 is a parallel branch module. The structure of each layer is as follows:

[0072] The first layer is a convolutional layer 1+LeakyReLU, which includes a convolutional layer with 128 kernels, a kernel size of 3×2, a stride of 2×2, and edge padding of 1×0, as well as a LeakyReLU activation function layer with a negative slope of 0.01.

[0073] The second layer is a convolutional layer 2+LeakyReLU, which includes a convolutional layer with 64 kernels, a kernel size of 3×1, a stride of 1×1 and edge padding of 1×0, and a LeakyReLU activation function layer with a negative slope of 0.01.

[0074] The third layer is the parallel branch module, which divides the output feature map of the second layer into two parts according to the channel dimension, and inputs them into the convolution branch and the Transformer branch respectively.

[0075] The convolutional branch includes a convolutional layer with 32 kernels, a kernel size of 1×1, a stride of 1×1, and 0×0 edge padding, as well as a LeakyReLU activation function layer with a negative slope of 0.01. This branch uses a residual connection mechanism, which adds the convolutional output to the original input features.

[0076] In this embodiment, the Transformer branch consists of a Transformer spectral multi-head self-attention module and a multilayer perceptron (MLP). To keep the encoder lightweight and reduce computational and memory usage, the attention module uses only two heads, each with a dimension of 16. First, it projects the input features as query (Q), key (K), and value (V) through a linear mapping. Then, it uses a scaled dot product attention mechanism to calculate the global correlation between features. Finally, it normalizes the attention weights using the Softmax function. This is followed by an MLP structure consisting of two fully connected layers: the first linear layer expands the channel dimension from 32 to 128 with the GELU activation function; the second linear layer restores the dimension to 32.

[0077] This invention further proposes equipping both the attention module and the MLP with residual connections and layer normalization operations to enhance model stability and expressive power. The preferred encoder network structure used in the embodiment is as follows: Figure 3As shown, the main framework employs a three-layer convolutional neural network structure, with a dual-branch parallel processing structure added after the second convolutional layer. The upper layer is a convolutional branch, effectively extracting local spatial feature information through convolutional layers and activation functions; the lower layer is a Transformer branch, containing a spectral multi-head attention module and an MLP, used to establish dependencies between spectral channels. Both branches are equipped with residual connection operations to enhance model training stability and feature representation capabilities.

[0078] The fourth layer is a 3+LeakyReLU convolutional layer, which includes a convolutional layer with 14 kernels, a kernel size of 3×1, a stride of 2×2 and edge padding of 1×0, and a LeakyReLU activation function layer with a negative slope of 0.01.

[0079] Step 1.3: Hyperspectral remote sensing image reconstruction: The compressed feature representation extracted by the encoder is input into the decoder model that integrates the spatial-spectral attention mechanism. Through layer-by-layer feature enhancement and upsampling operations, the corresponding hyperspectral remote sensing image data is gradually restored.

[0080] In this embodiment, the decoder network can be divided into five main functional modules: convolutional layer 1, hybrid attention module, convolutional layer 2, upsampling layer 1, and upsampling layer 2. Its structural units include, but are not limited to, transposed convolution operations, batch normalization operations, nonlinear mapping, pooling operations, and upsampling operations. The first three modules mainly perform feature enhancement, while the latter two modules perform spatial-spectral dimension enhancement and reconstruction. The second module is the core component of the decoder network, consisting of 16 identical hybrid attention structures. The network structure of a single hybrid attention module is as follows: Figure 4 As shown, the structural schematic diagram of the spatial-spectral attention mechanism is as follows: Figure 5 As shown.

[0081] As a preferred embodiment, with a sampling rate of 0.5%, the network structure and parameter configuration of the five main functional modules of the decoder are shown in Table 3 below. The second-to-last column, "Input Size," and the last column, "Output Size," represent the feature map sizes (excluding batch processing dimensions) of the input and output of each network layer, respectively, expressed in triplet form. It means that, among them Indicates the number of feature channels. and These represent the feature map height and width, respectively. Similarly, the kernel size, stride, and padding size in the table are represented by binary tuples. It means that, among them Indicates the vertical dimension. Indicates the horizontal dimension.

[0082] Table 3

[0083]

[0084] In the decoder network, considering both the reconstruction quality and computational cost of hyperspectral images, multiple hybrid attention modules can be configured. In this embodiment, 16 cascaded hybrid attention modules are preferred as the core of feature enhancement. The structure of a single hybrid attention module is similar to the parallel branch module of the encoder described in step 1.2, and its network structure is as follows: Figure 4 As shown: First, the input features are evenly divided along the channel dimension, resulting in two... The network consists of two sub-features. One sub-feature is input to the convolution branch, where it undergoes a spatial-spectral attention mechanism to calculate hybrid attention weights. These weights are then applied to the convolution output and finally connected to the residual of the input. The other sub-feature is input to the Transformer branch, which comprises a spectral multi-head self-attention module and a multi-scale feature extraction module. Similar to the Transformer branch in an encoder, it also employs a spectral multi-head self-attention module implemented using Transformer. The network structure and parameters of a single hybrid attention module are shown in Table 4 below.

[0085] Table 4

[0086]

[0087] In the convolutional branch of the hybrid attention module, features are enhanced by fusing spatial-spectral attention mechanisms. See also Figure 5 The spatial-spectral attention mechanism is defined as follows:

[0088] In the Spectral Attention Module (SPE), the input features are first aggregated along the spatial dimension using global average pooling and global max pooling to generate a global descriptive vector. These two vectors are then passed through a multilayer perceptron (MLP) and fused using convolutional operations to generate the final spectral attention weights.

[0089] Let the input features be ,in For batch size, For the number of channels, and Let the height and width of the feature space be respectively. Then, the calculation process of spectral attention is as follows:

[0090]

[0091] in, For average pooling operation, For max pooling operation, For multilayer sensor operation, For connection operations, This represents the sigmoid activation function. For convolution operations, This represents the feature representation obtained by inputting it into a multilayer perceptron after global average pooling. This represents the feature representation obtained by inputting it into a multilayer perceptron after global max pooling. This is the concatenation of two eigenvectors. The obtained spectral attention weights.

[0092] Spatial Attention Module (SPA) and Spectral Attention Module (SPE) have similar structures, but their main difference lies in the dimensional direction of feature extraction. SPA performs average pooling and max pooling along the channel dimension of the input features to extract the saliency information of spatial location. The calculation process of spatial attention weights is as follows:

[0093]

[0094] in, This is an average pooling operation along the channel dimension. This is a max pooling operation along the channel dimension. For connection operations, This represents the sigmoid activation function. For convolution operations, This represents the average value across the channel dimension. This represents the maximum value in the channel dimension. This is the concatenation of two eigenvectors. To obtain spatial attention weights.

[0095] The final integrated attention weights calculated using the spatial-spectral attention mechanism (SSFA) can be expressed as:

[0096]

[0097] in, This represents the attention coefficient for each channel and each spatial location.

[0098] The specific settings for the decoder network are as follows:

[0099] With a sampling rate of 0.5%, the decoder network consists of 5 main layers. Layers 1 to 3 are feature enhancement modules, and layers 4 and 5 are spatial-spectral enhancement modules, mainly used to gradually restore the spatial and spectral resolution of the hyperspectral remote sensing image. The structure of each layer is as follows:

[0100] First layer: Convolutional layer 1, which includes a convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1×1, and edge padding of 1×1.

[0101] The second layer consists of 16 hybrid attention units, which are cascaded together. Each module first divides the input features into two parts along the channel dimension, and inputs them into the convolution branch and the Transformer branch respectively. Finally, the parts are concatenated and fused along the channel dimension, and the size of the fused output features is consistent with that of the input.

[0102] The convolutional branch consists of a convolutional layer with 32 kernels, a kernel size of 1×1, a stride of 1×1, and zero edge padding, as well as a LeakyReLU activation function layer with a negative slope of 0.01. Then, a hybrid attention weight is obtained through a spatial-spectral attention mechanism, and this weight is multiplied element-wise by the convolutional activation output. Finally, the weighted and enhanced output is added to the original input of the convolutional branch through a residual connection.

[0103] Transformer branch structure reference Figure 4 It includes a spectral multi-head self-attention module consistent with the encoder, with 2 heads and a single head dimension of 16; it also includes a multi-scale feature extraction module, which first uses a convolutional layer with 128 kernels, a kernel size of 1×1, a stride of 1 and padding of 0 to expand the channel dimension from 32 to 128. Then, it divides the channels into four groups (32 channels per group) and passes them through depthwise separable convolutions of 1×1 (padding of 0), 3×3 (padding of 1), 5×5 (padding of 2), and 7×7 (padding of 3), respectively. After the multi-scale output structure is concatenated to 128 channels in the channel dimension, it uses a convolutional layer with 32 kernels, a kernel size of 1×1, a stride of 1 and padding of 0 to restore the number of channels to 32.

[0104] The third layer: Convolutional layer 2, which includes a convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1×1, and edge padding of 1×1.

[0105] Fourth layer: Upsampling 1. First, pixel rearrangement (PixelShuffle, scale=2) is used to rearrange the 64-channel feature map output from the previous layer into 16 channels and double the spatial resolution (64×32×1→16×64×2). Second, the number of channels is expanded to 64 through a convolutional layer with 64 kernels, a kernel size of 1×1, a stride of 1 and edge padding of 0, and a LeakyReLU activation function layer with a negative slope of 0.2. Then, the number of channels is further expanded to 128 through a convolutional layer with 64 kernels, a kernel size of 3×3, a stride of 1 and edge padding of 1, and a LeakyReLU activation function layer with a negative slope of 0.2.

[0106] Fifth layer: Upsampling 2. First, pixel shuffle (scale=2) is used to rearrange the 128-channel feature map output from the previous layer into 32 channels and double the spatial resolution (128×64×2→32×128×4). Second, a convolutional layer with 96 kernels, a kernel size of 3×3, a stride of 1, and edge padding of 1, and a LeakyReLU activation function layer with a negative slope of 0.2 are used to expand the number of channels to 96. Then, a convolutional layer with 172 kernels, a kernel size of 3×3, a stride of 1, and edge padding of 1, and a LeakyReLU activation function layer with a negative slope of 0.2 are used to restore the feature channel dimension to the original number of bands 172 of the hyperspectral remote sensing image.

[0107] Step 1.4: Encoding and Decoding Model Training and Parameter Optimization: Compare the differences between the original hyperspectral remote sensing image and the reconstructed data using the loss function, adjust the model parameters based on the error feedback, and save the model when the model evaluation accuracy reaches the preset standard or the training reaches the predetermined number of iterations; otherwise, continue to the next iteration of training.

[0108] This invention employs a combined strategy of absolute error loss (L1) and spectral angle mapping loss (SAM) to impose dual constraints on the network training process. The L1 loss constraint ensures pixel-level reconstruction precision, while the SAM loss ensures the directional consistency of the reconstructed data in the spectral space. This combined loss function strategy effectively improves the quality and fidelity of hyperspectral remote sensing image reconstruction.

[0109] The combined loss function in this embodiment is set as follows:

[0110] Let the first part of the original hyperspectral remote sensing image be... The spectral vector of each pixel is The first reconstructed image The spectral vector of each pixel is , Let be the total number of pixels in the image, then the combined loss function is... Defined as:

[0111]

[0112] in, express Norm, Indicates the inner product. express Norm, To avoid decimals that are divided by zero; This represents the absolute error loss between the original image and the reconstructed image; This represents the spectral angle mapping loss between the original image and the reconstructed image; This is a weighting factor used to balance the contributions of the two losses to model training; in this embodiment, it is preferably set to 0.05.

[0113] The quantization encoding two-stage compression process is as follows: Figure 6 As shown, its specific implementation includes the following sub-steps:

[0114] Step 2.1: Input the hyperspectral remote sensing image data to be compressed into the trained encoder network and extract the corresponding low-dimensional feature representations;

[0115] In this embodiment, the input hyperspectral remote sensing image data to be compressed is first processed by segmenting the image into blocks, cropping the entire image into fixed-size strip-shaped image blocks according to the input requirements of the encoder network. Then, the cropped image blocks are sequentially input into the trained encoder network to extract the corresponding low-dimensional feature representations.

[0116] Step 2.2: Adaptive quantization: Adaptively quantize the extracted feature representation according to the preset quantization level, mapping the floating-point features to discrete integer representations;

[0117] In this embodiment, the floating-point feature representation output by the encoder is adaptively quantized according to a preset quantization level, mapping it to the corresponding discrete integer form. To further optimize storage efficiency, differentiated storage strategies are set for different quantization levels: when the quantization level is less than or equal to 256, it is stored in uint8 format; when the quantization level is greater than 256, it is stored in int16 format. This strategy not only effectively saves storage space but is also suitable for fast compression scenarios that do not require subsequent lossless encoding.

[0118] In this invention, adaptive quantization employs a logarithmic mapping strategy, which effectively reduces the loss of low dynamic range feature information during the quantization process. The core of this strategy lies in utilizing the nonlinear properties of the logarithmic function: within a lower numerical (absolute value) range, small changes are amplified, thereby making the detailed information in the low-value portion more apparent.

[0119] The adaptive quantization process in this embodiment is as follows:

[0120] Let the input feature data be Its maximum and minimum values ​​are denoted as , ... and The quantization operation is defined as follows:

[0121]

[0122] in, This is the result after normalization to the [0,1] interval; The result after logarithmic mapping, parameters Controlling the degree of nonlinearity in the logarithmic mapping, It is a symbolic function; This is the result after discretization. For the set quantitative level, This is the floor function. In the embodiment, the parameter... Set to 0.1, quantification level Set it to 256.

[0123] Step 2.3: Perform two-stage compression on the quantized features: First, convert the integer features obtained by adaptive quantization in Step 2.2 into a byte stream, and then use the Brotli lossless compression algorithm to perform two-stage compression to obtain the final compressed result.

[0124] The Brotli lossless compression algorithm can be implemented using existing technologies, which will not be elaborated upon in this invention. In this embodiment, to achieve the optimal compression ratio, the quality parameter of the Brotli lossless compression algorithm is preferably set to the highest level (quality=11).

[0125] Step 2.4: Decoding and Dequantization: Perform the inverse operations of steps 2.3 and 2.2 respectively, that is, first decompress using the Brotli algorithm, and then recover the feature representation through dequantization.

[0126] In this embodiment, the binary compressed data generated in step 2.3 is first decompressed using Brotli, and then, combined with the metadata information from the previous quantization (including maximum and minimum values, quantization mapping parameters, quantization level, and original feature data size), the decompressed data is dequantized to restore the original continuous feature representation.

[0127] Step 2.5: Reconstruct the hyperspectral remote sensing image: Input the recovered feature representation into the trained decoder network to obtain the reconstructed hyperspectral remote sensing image data.

[0128] In this embodiment, the recovered feature representation is input into the trained decoder network, and the reconstructed data is sequentially stitched together according to the index order of the cropping and segmentation operation in step 2.1 to output complete hyperspectral remote sensing image data.

[0129] In practice, the above process can be automated using computer software technology.

[0130] Based on the above process, this invention addresses the problem of poor reconstruction performance of existing deep learning-based techniques under high compression ratios by proposing a hyperspectral remote sensing image compression method based on attention and quantization coding optimization. This method utilizes a two-stage quantization coding strategy to further deredundate the low-dimensional feature representations extracted by the encoder, while simultaneously improving reconstruction accuracy through an attention mechanism at the decoder end, thus maintaining good reconstruction performance even under high compression ratios. Its key features include:

[0131] 1) An attention mechanism, especially the spatial-spectral attention mechanism in the decoder, is introduced into the end-to-end encoding and decoding network model to enhance the reconstructed features with weights. A combined loss function combining absolute error and spectral angle mapping is designed to balance pixel-level reconstruction accuracy and spectral consistency, thereby improving the hyperspectral reconstruction effect.

[0132] 2) A two-stage compression method using quantization coding is proposed to effectively improve the compression efficiency of hyperspectral remote sensing images, and an adaptive quantization method using a logarithmic mapping strategy is designed. Through the two-stage compression strategy using quantization coding, compression performance can be improved by more than 5 times while maintaining reconstruction quality.

[0133] To verify the effectiveness of the method of this invention, four representative hyperspectral remote sensing image compression benchmark algorithms were selected as comparison methods and tested on the hyperspectral dataset constructed in this experiment. The four hyperspectral remote sensing image compression algorithms for comparison are:

[0134] Method 1: The method proposed by Du et al., see reference "Du Q, Fowler J E. Hyperspectral image compression using JPEG2000 and principal component analysis[J]. IEEE Geoscience and Remote sensing letters, 2007, 4(2): 201-205."

[0135] Method 2: The method proposed by Hsu et al., see reference "Hsu CC, Lin CH, Kao CH, et al. DCSN: Deep compressed sensing network for efficient hyperspectral datatransmission of miniaturized satellite[J]. IEEE Transactions on Geoscience and Remote Sensing, 2020, 59(9): 7773-7789."

[0136] Method 3: The method proposed by Zhou et al., see reference "Zhou X, Zou X, Shen X, et al. BTC-Net: Efficient bit-level tensor data compression network for hyperspectralimage[J]. IEEE Transactions on Geoscience and Remote Sensing, 2023."

[0137] Method 4: The method proposed by Zhang et al., see reference "Zhang L, Zhang L, Song C, et al. Hyperspectral Image Compression Sensing Network with CNN-Transformer Mixture Architectures[J]. IEEE Geoscience and Remote Sensing Letters, 2024."

[0138] Method 1 is a frequency domain-based method, reproduced in MATLAB according to the principles outlined in the literature, using the JPEG2000 codec provided by Kakadu. Methods 2, 3, and 4 are learning-based methods, with code provided by the original authors and using default parameter settings. The quantization level in the quantization encoding module of this invention is set to 256. To present a fairer comparison, both the learning-based algorithms and the algorithm of this invention are trained on the same training and validation sets, resulting in compression models at different bitrates ranging from 0.0 to 3.2.

[0139] The comparative experiment is as follows:

[0140] Image compression was performed on the test set using methods 1, 2, 3, 4, and the method of the present invention, respectively. Figure 7 Rate-distortion curves for five algorithms are presented. Table 5 below shows the comparison results of the average spectral angle mapping (SAM), root mean square error (RMSE), and peak signal-to-noise ratio (PSNR) for each of the five methods at different bitrates (compression ratios). Since some comparison methods only support discrete or fixed bitrate settings and cannot cover all bitrates in the range of 0.0 to 3.2, this experiment only selects typical bitrate models available for each algorithm within this range for comparative analysis. The bitrate index is expressed as bits per pixel per band (bpppb), and the compression ratio (CR) is approximately calculated as the ratio of the original data (int16) to bpppb (usually taken as the nearest multiple of 5). In addition, for visual comparison, under the condition of roughly the same bitrate (Method 1: CR=75; Method 2: CR=50; Method 3: CR=70; Method 4: CR=50; Method of this invention: CR=70), Figure 8 The image presents a single original hyperspectral image selected from the test set and the reconstruction results of each method.

[0141] Table 5

[0142]

[0143] from Figure 7 As shown in the rate-distortion curves, the method of this invention maintains good reconstruction performance even at high compression ratios (i.e., extremely low bit rates), surpassing frequency-domain-based algorithms (Method 1); and the method of this invention is significantly better overall than previous deep learning-based algorithms (Methods 2, 3, and 4). Figure 8 The visualization results shown under high compression ratio conditions demonstrate that the learning-based algorithms outperform the frequency domain-based algorithms (Method 1), which exhibit a significant ringing effect. Among the learning-based algorithms, the method of this invention has the least blocky effect and presents a better visual effect.

[0144] To further verify the effectiveness of the quantization coding module proposed in this invention, and especially to highlight the flexibility and feasibility of the adaptive quantization method, Table 6 below shows the changes in reconstruction performance metrics (SAM, RMSE, PSNR) and corresponding bit rates (bpppb) at different quantization levels, where the parameters of the logarithmic mapping of the quantization part are... All parameters were set to 0.1. The feature extraction stage followed the network model parameter configuration of the previous invention under the condition of a compression ratio of 320.

[0145] Table 6

[0146]

[0147] As shown in the table above, through the second-stage quantization encoding compression, this invention significantly reduces storage volume while effectively preserving reconstruction accuracy without requiring repeated model training. Furthermore, it allows for flexible adjustment of the quantization level to achieve different compression ratios. The adaptive quantization strategy proposed in this invention effectively preserves reconstruction accuracy, ensuring that the PSNR loss at any quantization level in the table is controlled within 1 dB. For example, using Brotli encoding with a quantization level of 1024, the compressed bpppb is only 1 / 4 of the original, while the PSNR loss is only 0.016 dB, with almost no impact on reconstruction performance. Therefore, this invention significantly improves compression efficiency through a two-stage compression design and optimizes image reconstruction using a spatial-spectral attention mechanism, effectively reducing artifacts during image reconstruction at low bit rates. This provides a practical solution for the efficient storage and transmission of hyperspectral remote sensing image data.

[0148] In specific implementation, the method proposed in the technical solution of this invention can be automatically executed by those skilled in the art using computer software technology. System devices for implementing the method, such as computer-readable storage media storing the corresponding computer program of the technical solution of this invention and computer equipment including the computer program running the corresponding computer program, should also be within the protection scope of this invention.

[0149] The following embodiments describe the electronic device for establishing the hyperspectral remote sensing image compression method based on attention and quantization coding optimization provided by the present invention. The electronic device for establishing the hyperspectral remote sensing image compression method based on attention and quantization coding optimization described below can be referred to in correspondence with the hyperspectral remote sensing image compression method based on attention and quantization coding optimization described above.

[0150] The electronic device may include a processor, a communications interface, memory, and a communication bus, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor can call logical instructions in the memory to execute a hyperspectral remote sensing image compression method based on attention and quantization coding optimization, which mainly includes the software processing part mentioned above.

[0151] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, 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 (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps 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 USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] On the other hand, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute the software processing portion of the hyperspectral remote sensing image compression method based on attention and quantization coding optimization provided by the above methods.

[0153] In another aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the software processing portion of the attention- and quantization-encoded optimized hyperspectral remote sensing image compression method provided by the above methods.

[0154] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0156] It should be understood that any parts not described in detail in this specification belong to the prior art.

[0157] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art can make substitutions or modifications under the guidance of this invention without departing from the protection of the claims of this invention, and all such substitutions or modifications fall within the protection scope of this invention. The scope of protection of this invention should be determined by the appended claims.

Claims

1. A hyperspectral remote sensing image compression method based on attention and quantization encoding optimization, characterized in that, Perform the following procedures: The network model training process includes: The hyperspectral remote sensing image data is normalized and striped according to the pushbroom imager, and then enhanced to construct a sample set for training. A lightweight encoder is used to extract low-dimensional feature representations of sample data. The encoder integrates convolutional layers and a spectral multi-head self-attention module to capture long-range dependencies in the spectral dimension. A decoder employing a fusion spatial-spectral attention mechanism reconstructs hyperspectral remote sensing images step by step from low-dimensional features. The decoder includes cascaded hybrid attention modules that combine spatial attention and spectral attention weighted features. Optimize the parameters of the encoding / decoding model by combining loss functions; The two-stage compression process of quantization encoding includes: The image to be compressed is input into the trained encoder network to extract low-dimensional feature representations. Adaptive quantization of features is performed, mapping floating-point features to discrete integers based on a logarithmic mapping strategy; The quantized features are then subjected to two-stage encoding compression. The hyperspectral remote sensing image is reconstructed by decoding and dequantizing the feature representation and inputting it into a trained decoder network.

2. The method of claim 1, wherein: The spatial-spectral attention mechanism is implemented as follows. Global average pooling and max pooling are performed on the input features to generate spectral attention weights and spatial attention weights, respectively. The integrated attention weights are generated through fusion.

3. The method of claim 1, wherein: The adaptive quantization is implemented as follows. Based on the preset quantization level, the feature data is normalized and logarithmically mapped; Choose the storage format based on the quantization level.

4. The method of claim 1, wherein: A parallel branching module is added after a convolutional layer in the encoder, including... Convolutional branches are used to extract local spatial feature information through convolution; The Transformer branch sets up a spectral multi-head self-attention module and a multilayer perceptron based on Transformer, used to model the dependencies between spectral channels.

5. The method of claim 1, wherein: The hybrid attention module of the decoder includes: The input features are evenly divided along the channels and then input into the convolutional branch and the Transformer branch respectively. The convolutional branch outputs a spatially-spectral attention-weighted value. The Transformer branch sets up a spectral multi-head self-attention module and multi-scale convolution based on Transformer to extract multi-scale features.

6. The method of claim 1, wherein: The combined loss function includes absolute error loss L1 and spectral angle mapping loss SAM. The absolute error loss L1 constrains the pixel-level reconstruction fineness, while the spectral angle mapping loss SAM constrains the directional consistency of the reconstructed data in the spectral space.

7. The method of claim 1, wherein: When performing two-stage encoding compression on the quantized features, the integer features obtained by adaptive quantization are first converted into a byte stream, and then the Brotli lossless compression algorithm is used for two-stage compression.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the hyperspectral remote sensing image compression method based on attention and quantization coding optimization as described in any one of claims 1 to 7. 9.A non-transitory computer-readable storage medium having stored thereon a computer program. When the computer program is executed by the processor, it implements the hyperspectral remote sensing image compression method based on attention and quantization coding optimization as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that: The computer program is executed by a processor to realize the attention-based and quantization coding optimized hyperspectral remote sensing image compression method according to any one of claims 1 to 7.