Transform deformation-based multi-scale hyperspectral and multispectral image fusion method and system
Through the multi-scale image fusion method based on Transformer architecture, combined with linear interpolation, convolution operation and attention mechanism, the problem of insufficient versatility and representation ability of hyperspectral and multispectral image fusion methods in the existing technology is solved, and efficient The fusion of spectral information and spatial information improves the resolution and feature representation capabilities of images.
Patent Information
- Application Number
- CN202410596472.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing hyperspectral and multispectral image fusion methods rely on artificially designed rules, lack versatility, are time-consuming and have limited representation capabilities. CNN has shortcomings in the small receptive field and the utilization of spatial position information, and cannot effectively capture global features, which limits the Fusion performance.
Using a multi-scale image fusion method based on Transformer architecture, through multi-scale shallow feature extraction module, deep feature extraction module and feature fusion reconstruction module, combined with linear interpolation, convolution operation, attention mechanism and ResNet, low-resolution hyperspectral is achieved The spectral information and spatial information of the image and the high-resolution multispectral image are fully integrated to obtain the high-resolution hyperspectral image.
It achieves deep-level interactive fusion of global features and local features, improves the spatial resolution and spectral resolution of the image, and obtains higher fusion performance and richer feature representation capabilities.
Smart Images

Figure CN118537233A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image fusion, and in particular relates to a multi-scale hyperspectral and multi-spectral image fusion method and system based on Transformer deformation. Background Art
[0002] Fusion of low spatial resolution hyperspectral images with high spatial resolution multispectral images is one of the effective ways to obtain high spatial resolution hyperspectral images. Many hyperspectral and multispectral image (MSI) fusion methods have emerged in the past few decades. These methods can be roughly divided into two categories, traditional methods and deep learning-based methods. Traditional methods can be divided into Bayesian-based methods, matrix decomposition-based methods, and tensor decomposition-based methods. However, these methods are too dependent on manually designed fusion rules, lack universality, are very time-consuming, and have limited representation capabilities. With the rapid development of deep learning, convolutional neural network (CNN) technology has shown impressive performance. However, CNNs have a small receptive field and lack effective use of spatial location information, which makes them unable to effectively capture global features, which to some extent limits the fusion performance of CNN-based methods. Inspired by the success of Transformer in the field of NLP, some researchers have tried to apply Transformer to hyperspectral and multispectral image fusion tasks. Summary of the invention
[0003] The purpose of the present invention is to provide a network based on the Transformer architecture for extracting multi-scale input features of two modalities for fusing MSI and HSI to obtain high spatial resolution HSI. The feature maps of the same scale are applied to an improved multi-level Transformer to capture their global context information and realize the interaction of spectral information and spatial information of the two modalities.
[0004] The technical solution of the present invention is as follows:
[0005] A multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation, the method comprising:
[0006] S1 acquires low-resolution hyperspectral images and high-resolution multispectral images;
[0007] S2 inputs the low-resolution hyperspectral image and the high-resolution multispectral image into the improved Transformer model to fully fuse the spectral information and spatial information to obtain the high-resolution hyperspectral image.
[0008] Furthermore, it is characterized in that the improved Transformer model consists of three parts: a multi-scale shallow feature extraction module, a deep feature extraction module and a feature fusion reconstruction module.
[0009] Furthermore, it is characterized in that the S2 is specifically:
[0010] Firstly, the spatial information of multispectral images of different scales and the spectral information of hyperspectral images are extracted from low-resolution hyperspectral images and high-resolution multispectral images in the multi-scale shallow feature extraction module. Then, the feature maps of the same scale are input into the deep feature extraction module for deep feature extraction. The global features and local features are explored, and the information interaction and fusion of feature maps of the same scale are performed. Finally, in the feature fusion and reconstruction module, the results of the deep feature extraction module are fused with the shallow feature results of the same scale, and the features of different scales are combined together. The attention mechanism is used to repeatedly stack upsampling layers and convolution operations to obtain a high-resolution hyperspectral image.
[0011] Furthermore, the spatial information of multispectral images of different scales is extracted from the low-resolution hyperspectral image in the multi-scale shallow feature extraction module as follows:
[0012] The low-resolution hyperspectral images are upsampled by linear interpolation and convolution operations to extract the spatial information of multispectral images of different scales.
[0013] Furthermore, the spectral information of the high-resolution multispectral image is extracted in the multi-scale shallow feature extraction module as follows:
[0014] The high-resolution multispectral image is downsampled by linear interpolation and convolution operations to extract the spectral information of the hyperspectral image.
[0015] Furthermore, MSE is used as the loss function when extracting spatial information of multispectral images of different scales and spectral information of hyperspectral images in a multi-scale shallow feature extraction module through low-resolution hyperspectral images and high-resolution multispectral images.
[0016] Furthermore, in the deep feature extraction module:
[0017] Spectral multi-head self-attention to mine spectral information of low-resolution hyperspectral images;
[0018] ResNet-based FFN extracts local information of high-resolution multispectral images.
[0019] The present invention also provides a multi-scale hyperspectral and multi-spectral image fusion system based on Transformer deformation, the system comprising:
[0020] An acquisition module, used for acquiring low-resolution hyperspectral images and high-resolution multispectral images;
[0021] The fusion module is used to input the low-resolution hyperspectral image and the high-resolution multispectral image into the improved Transformer model to fully fuse the spectral information and spatial information to obtain the high-resolution hyperspectral image.
[0022] Technical effects of the present invention:
[0023] The multi-scale shallow feature extraction module designed in the present invention performs up-sampling and down-sampling on the two modal inputs LR-HSI and HR-MSI through linear interpolation and convolution operations respectively, thereby fully extracting the spatial information of MSI of different scales and the spectral information of HSI.
[0024] The deep feature extraction module designed by the present invention deeply models the dependency of global feature representation and interacts and fuses the feature information of two different input modalities. The spectral multi-head self-attention can fully mine the spectral information of LR-HSI, and the ResNet-based FFN can fully extract the local information of HR-MSI.
[0025] The feature aggregation reconstruction module designed in the present invention can effectively fuse feature maps of different scales and gradually restore spatial detail information through operations such as convolution, attention mechanism and cascade upsampling. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the description and claims, serve to illustrate the embodiments of the invention. Where appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
[0027] Figure 1 A schematic diagram of the network framework of the present invention is shown;
[0028] Figure 2 The schematic diagram of the structure of the improved Transformer of the present invention is shown;
[0029] Figure 3 Schematic diagrams of the spectral self-attention model structure of the present invention are shown: (a) spectral multi-head self-attention, and (b) FFN based on ResNet. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] The embodiment of the present invention provides a multi-scale hyperspectral and multispectral image fusion method based on Transformer deformation, including:
[0032] S1 acquires low-resolution hyperspectral images and high-resolution multispectral images;
[0033] S2 inputs the low-resolution hyperspectral image and the high-resolution multispectral image into the improved Transformer model to fully fuse the spectral information and spatial information to obtain the high-resolution hyperspectral image.
[0034] Specifically, first, the spatial information of multispectral images of different scales and the spectral information of hyperspectral images are extracted from low-resolution hyperspectral images and high-resolution multispectral images in the multi-scale shallow feature extraction module, and then the feature maps of the same scale are input into the deep feature extraction module for deep feature extraction, exploring global features and local features, and performing information interaction and fusion of feature maps of the same scale. Finally, in the feature fusion and reconstruction module, the results of the deep feature extraction module are fused with the shallow feature results of the same scale, and features of different scales are combined together. Using the attention mechanism, upsampling layers and convolution operations are repeatedly stacked to obtain a high-resolution hyperspectral image.
[0035] The network architecture of the present invention consists of three parts: a multi-scale shallow feature extraction module, a deep feature extraction module, and a feature fusion reconstruction module. It aims to achieve the full fusion of spectral information and spatial information to obtain accurate high-resolution HSI based on the idea of HSI and MSI fusion through an improved Transformer architecture. The input low spatial resolution HSI and high spatial resolution MSI are represented as and WH and wh represent Y m and Y h The object of the present invention is to estimate a fused image, It contains high spatial resolution and high spectral resolution. There is a high correlation between Z and the input image. Z has a similarity to the input MSI Y m Same spatial resolution and same as input HSI Y h Same spectral resolution.
[0036] Multi-scale shallow feature extraction module: Different features can usually be observed at different scales to complete different tasks. Due to the large-scale range of remote sensing images, the outlines of buildings covering a large area in their feature maps can be fully extracted, but the texture and details of local remote sensing targets contained in small-scale feature maps are equally important for reconstructing fused images. In order to fully extract the spectral and spatial information in the input, we perform feature extraction at different scales and modalities through upsampling and downsampling. Considering the trade-off between performance and processing speed, we use bilinear interpolation to upsample LR-HSI and downsample HR-MSI. For the input image First, for Y h Perform ×4 upsampling to obtain spatial resolution and Y m Same Y h0 Then, we use convolution with a kernel size of 3 and a stride of 2 for downsampling, and perform two convolution operations to downsample the feature map by four times each time, so as to gradually obtain low-resolution high-level features of the input image. m Downsample to get the same value as Y h With the same scale Then, we m1 and Y h Perform the same downsampling operation to obtain a pair of feature maps of the same scale, and By analogy, we can get N pairs of feature maps of the same size. The feature map after the Nth downsampling can be expressed as and In the process of gradual downsampling, the shallow feature extraction module extracts rich local spatial information and then mn and Y hN The input is sent to the deep feature extraction module to further model the long-range dependencies and spatial relationships in the image, and to perform information interaction and fusion. In order to reduce the network burden, the commonly used MSE is used as the loss function.
[0037] Deep feature extraction module: In order to interact and fuse the feature information of two different input modalities and deeply model the dependency of global feature representation, a multi-layer spectral Transformer is designed, which includes a linear projection layer, a feed-forward network layer (FFN), a layer norm and a feature mapping layer, see Figure 2 The feature maps on different branches contain different semantic information. In order to model the overall image dependency on two feature maps, a spectral self-attention is designed. Figure 3As shown in (a), the correlation between spectra is obtained by calculating the self-attention on the spectral dimension. A set of input feature maps of the same scale are linearly projected, and then their respective global dependencies are modeled, and the deep exploration of spatial and spectral features is achieved through the multi-head attention mechanism. After obtaining the results of the multi-head self-attention, they are input into the ResNet-based FFN for further feature transformation. Applying layer normalization (LN) before each block and applying the residual connection method after each block can make the semantic information in the feature map more comprehensive. We can connect multiple improved Transformers to the network to make the feature information extraction more sufficient, and finally generate feature maps with rich spectral information and rich spatial information.
[0038] Spectral multi-head self-attention: Assume that the local feature map of the input improved Transformer is MSPET takes the sequence as input, first uses a linear projection layer to compress the channel dimension, performs a dimensionality reduction operation on the input feature map, then encodes the position information of the feature map through a learnable position embedding, and fuses it with the reduced dimensionality feature map, and finally performs a layer normalization operation on the features. The above process can be described as follows:
[0039]
[0040] Where LP represents the linear projection operation, PE represents the position embedding, and x1, x2 represent the feature embedding. LN represents layer normalization. In order to model the overall dependency in the feature map, the correlation between spectra is obtained by calculating the self-attention on the spectral dimension. The proposed spectral multi-head self-attention architecture is shown in Figure 3 As shown in (a). Given an input feature Z, a linear layer is first used to embed the feature into the query Q key K and value.
[0041] Q=P Q (Z),K=P K (Z),V=P V (Z) (2)
[0042] Where P Q , P K and P V is the projection weight in the linear layer. The original Transformer also uses a multi-head attention mechanism to split Q, K, and V in the spectral dimension. However, our method is to split them into h heads in the spatial domain. The function formula of the spectral multi-head self-attention is:
[0043]
[0044]
[0045]
[0046] Spectral dimension and represents the weights in different projections of the i-th head, is the scaling factor, Concate represents the concatenation operation, and W F represents the weights of the final linear layer, which is a projection matrix with learnable parameters.
[0047] FFN based on ResNet: Traditional Transformer uses MLP as a feedforward module, which is designed for natural language processing and is characterized by vectors and weak local information. In remote sensing image processing, pixels in an image always present ground targets, and neighboring targets are more correlated with each other, which shows that local information in the image is also important. To this end, after calculating multi-head self-attention, ResNet with 2D convolution is used to explore local information, which can fully extract 3D spatial spectral features in remote sensing images, such as Figure 3 (b) In addition, layer normalization is used to maintain the stability of feature distribution, thereby speeding up training. With the help of spectral multi-head self-attention, layer normalization and ResNet, the ResNet-based feedforward network layer designed for remote sensing images can be expressed as:
[0048]
[0049]
[0050] F out =z1+z2 (8)
[0051] Where LN is layer normalization, FM represents feature mapping, and ResNet is a feedforward network. In the proposed improved Transformer, multi-head self-attention learns the global relationship between long-range interactions, and the ResNet feedforward network layer explores the detailed features of the local range, which not only fully extracts the spatial information reflected by the low-level detail features but also explores the semantic information reflected by the high-level detail features. After the feature map has undergone layer normalization and the feedforward network, the dimension of the feature map cannot adapt to the next network structure. Therefore, the present invention uses a feature mapping module to convert the output sequence of the spectral multi-head self-attention back to a standard 3D feature map of size H×W×d. Then, the number of channels of the feature map is reduced by a convolution operation to obtain the feature map It has the same dimension as feature maps F1 and F2. Finally, the two feature maps are added together to obtain feature map F out , in order to achieve better information fusion.
[0053] Feature aggregation and reconstruction module: A set of same-scale inputs extracted to shallow features are passed through the improved Transformer to obtain an output that fully integrates spectral information and spatial information. In order to effectively enhance spatial details, jump connections are established between the input and output features of the improved Transformer at the same level. In order to effectively fuse feature maps of different scales, spatial detail information is gradually restored through operations such as convolution, attention mechanism and cascade upsampling to reconstruct HR-HSI. The global pooling method is usually used for global encoding of spatial information in channel attention encoding, but it is difficult to preserve position information because it compresses global spatial information into channel descriptors. In order to enable the attention module to capture long-range spatial interactions with precise position information, the present invention applies the Coordinate Attention (CA) attention mechanism. In general, F is input into the convolution path of horizontal coordinates and vertical coordinates after 1×1 convolution, and features are aggregated along two spatial directions to obtain a pair of direction-aware feature maps, and then upsampling operations and 1×1 convolutions are performed to obtain the final output of the convolution block. The CA attention module can capture long-term dependencies along one spatial direction and preserve precise position information along another spatial direction, which helps the network to more accurately locate the target of interest. Finally, we adopt a cascade upsampling strategy for the fused image. In the cascade upsampling process, the spatial detail information of the downsampling layer is fused with the input information of the upsampling layer. This can make full use of the semantic features of the image and retain the spatial details of each band to gradually reconstruct HR-HSI. Therefore, the image after the Nth layer fusion is defined as follows:
[0054] FUS N =CB[Concat(MSPET(HR N ,LR N ),HR N ,LR N )] (9)
[0055] Among them, Concat is the connection operation, CB is the convolution block, and MSPET stands for improved Transformer.
[0056] Experimental verification on three publicly accessible hyperspectral imaging datasets shows that the present invention can achieve fusion performance that is superior to or comparable to that of current superior methods. The experimental datasets include Pavia Center, Pavia University, and Botswana datasets.
[0057] The Pavia Center and Pavia University data are acquired by the ROSIS sensor and are often used for hyperspectral image classification. The sensor has a total of 115 bands. After processing, the Pavia University data has 103 bands; the Pavia Center data has 102 bands. Both images have 9 ground object categories, and the categories of the two images are not completely consistent. Among them, the size of Pavia University is 610×340, and the size of Pavia Center is 1096×715. The Botswana dataset is derived from a series of data acquired by NASA's EO-1 satellite in the Okavango Delta, Botswana from 2001 to 2004. The image size is 1476×256. The sensor on EO-1 obtained data with a 30-meter pixel resolution in 242 bands, covering a band of 400-2500nm and with an interval of 10nm. Of the 242 bands, the noise bands (1-9, 56-81, 98-101, 120-133, 165-186) were removed, and the actual number of bands used for training was 145. The data included data from 14 identified categories.
[0058] RMSE, PSNR, ERGAS and SAM are selected as evaluation indicators. The comparison of evaluation indicators of the three HSI datasets is shown in Tables 1, 2 and 3, and the best indicators are marked in bold.
[0059] Table 1: Comparison of evaluation metrics on the Pavia Center dataset
[0060]
[0061]
[0062] Table 2: Comparison of evaluation metrics on the Pavia University dataset
[0063]
[0064] Table 3: Comparison of evaluation metrics on the Botswana dataset
[0065]
[0066]
[0067] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A multi-scale hyperspectral and multispectral image fusion method based on Transformer deformation, characterized in that: The method comprises: S1 acquires low-resolution hyperspectral images and high-resolution multispectral images; S2 inputs the low-resolution hyperspectral image and the high-resolution multispectral image into the improved Transformer model to fully fuse the spectral information and spatial information to obtain the high-resolution hyperspectral image.
2. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 1 is characterized in that: The improved Transformer model consists of three parts: a multi-scale shallow feature extraction module, a deep feature extraction module and a feature fusion reconstruction module.
3. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 1, characterized in that: The S2 is specifically: Firstly, the spatial information of multispectral images of different scales and the spectral information of hyperspectral images are extracted from low-resolution hyperspectral images and high-resolution multispectral images in the multi-scale shallow feature extraction module. Then, the feature maps of the same scale are input into the deep feature extraction module for deep feature extraction. The global features and local features are explored, and the information interaction and fusion of feature maps of the same scale are performed. Finally, in the feature fusion and reconstruction module, the results of the deep feature extraction module are fused with the shallow feature results of the same scale, and the features of different scales are combined together. The attention mechanism is used to repeatedly stack upsampling layers and convolution operations to obtain a high-resolution hyperspectral image.
4. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 3 is characterized in that: The spatial information of multispectral images of different scales extracted from low-resolution hyperspectral images in the multi-scale shallow feature extraction module is specifically as follows: The low-resolution hyperspectral images are upsampled by linear interpolation and convolution operations to extract the spatial information of multispectral images of different scales.
5. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 3 is characterized in that: The spectral information of high-resolution multispectral images is extracted in the multi-scale shallow feature extraction module as follows: The high-resolution multispectral image is downsampled by linear interpolation and convolution operations to extract the spectral information of the hyperspectral image.
6. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 2, characterized in that: MSE is used as the loss function when extracting the spatial information of multispectral images of different scales and the spectral information of hyperspectral images in the multi-scale shallow feature extraction module through low-resolution hyperspectral images and high-resolution multispectral images.
7. The multi-scale hyperspectral and multi-spectral image fusion method based on Transformer deformation according to claim 2, characterized in that: In the deep feature extraction module: Spectral multi-head self-attention to mine spectral information of low-resolution hyperspectral images; ResNet-based FFN extracts local information of high-resolution multispectral images.
8. A multi-scale hyperspectral and multispectral image fusion system based on Transformer deformation, characterized by: The system comprises: An acquisition module, used for acquiring low-resolution hyperspectral images and high-resolution multispectral images; The fusion module is used to input the low-resolution hyperspectral image and the high-resolution multispectral image into the improved Transformer model to fully fuse the spectral information and spatial information to obtain the high-resolution hyperspectral image.
Citation Information
Patent Citations
Hyperspectral and multispectral image rapid fusion method
CN108460749A
Multi-scale feature fusion method, system and device for hyperspectral and multispectral images
CN117409280A
Hyperspectral and multispectral image fusion method based on attention mechanism
CN117474781A
Anode Collector
KR102604971B1
Cited By
Building attribute extraction method based on high-resolution hyperspectral remote sensing image
CN119295943A
Gradual hyperspectral image super-resolution method based on grouping strategy
CN119477704A
Multi-scale multi-attention hyperspectral image fusion method
CN119831866A
Hyperspectral and multispectral image fusion method based on adaptive multi-scale features
CN120047326A
Hyperspectral image fusion method and system based on non-uniform features and dynamic convolution
CN120198302A
