Transform-based cross-modal fusion hyperspectral image super-resolution reconstruction method
By employing a transformer-based cross-modal fusion method, utilizing a visual transformer encoder and a Qusai-Recurrent convolutional unit, efficient super-resolution reconstruction of hyperspectral images is achieved. This solves the problem of insufficient information utilization in hyperspectral image reconstruction and improves the utilization of spatial resolution and global spectral cross-correlation information.
Patent Information
- Application Number
- CN202410803466.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-20
AI Technical Summary
Existing technologies struggle to effectively utilize global spectral cross-correlation information in hyperspectral image super-resolution reconstruction, and they also have strict requirements for spatiotemporal registration between RGB and hyperspectral images, leading to difficulties in data acquisition.
A transformer-based cross-modal fusion method is adopted, which performs non-overlapping slice stitching and adds position encoding through the embedding layer, uses a visual transformer encoder for feature extraction, combines a self-attention mechanism to achieve self-enhancement of single-modal data and cross-modal information interaction, and performs image reconstruction through Qusai-Recurrent convolutional units.
It improves the spatial resolution of hyperspectral images, reduces the spatiotemporal registration requirements of RGB and hyperspectral data, and can better utilize global spectral cross-correlation information, thereby improving the reconstruction effect of hyperspectral images.
Smart Images

Figure CN118628357A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cross-modal data fusion and remote sensing image data enhancement, and in particular to a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method. Background Art
[0002] Deep learning methods based on convolutional neural networks have been widely used in remote sensing image vision tasks, such as target tracking, target detection, and target segmentation based on hyperspectral images. However, since such technologies rely heavily on the spatial features of images, and the spatial resolution of hyperspectral images is usually low, it is difficult for deep learning algorithms to obtain sufficient information. There are some existing methods that use RGB images and hyperspectral images to improve the spatial resolution of hyperspectral images, which usually have strict spatiotemporal registration requirements for the two modal data, and such data acquisition is very difficult. Summary of the invention
[0003] In order to solve the technical problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method, in which the data of the two modalities are sliced and spliced without overlapping and position encoding is added through an embedding layer, and the spliced sequence is feature extracted through a visual transformer encoder. The self-enhancement of the single modality data of the features and the information interaction between the cross-modalities are realized through a self-attention mechanism. The hyperspectral image is reconstructed through three layers of Qusai-Recurrent convolutional units and one layer of bidirectional Qusai-Recurrent convolutional units, which is more suitable for hyperspectral multi-band data and can better utilize the global spectral correlation information.
[0004] To achieve the above-mentioned object of the invention, the present invention provides a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method, comprising the following steps:
[0005] Step S1, obtaining a fused token sequence based on the scene matching RGB image and hyperspectral image;
[0006] Step S2: jointly train the encoder and decoder of the visual transformer using a random mask mechanism to complete feature reconstruction;
[0007] Step S3, constructing a loss function based on the similarity between the image reconstructed by the decoder and the true value image, and optimizing the encoder and decoder of the visual transformer;
[0008] Step S4: Use the image reconstruction module to super-reconstruct the features extracted by the encoder of the optimized visual transformer.
[0009] According to a technical solution of the present invention, the step S1 specifically includes:
[0010] Step S11: input the scene-matched RGB image and the hyperspectral image, pre-process the RGB image and the hyperspectral image respectively, and obtain image block sequences corresponding to the two modalities, including an RGB modality image block sequence and a hyperspectral modality image block sequence.
[0011] The preprocessing process at least includes non-overlapping segmentation and block cutting and adding position coding;
[0012] Step S12: linearly map and embed the RGB modality image block sequence and the hyperspectral modality image block sequence to obtain token vectors, and then concatenate the token vectors of the two modalities to obtain a fused token sequence.
[0013] According to a technical solution of the present invention, the step S2 specifically includes:
[0014] Step S21, in the training stage, the fused block sequence is randomly masked using a preset parameter k as the mask rate, the visible blocks are embedded using linear mapping, and the mask part uses a learnable mask token;
[0015] Step S22: input the unmasked token sequence into the encoder of the visual transformer for feature extraction;
[0016] Step S23, input the mask part and the enhanced features obtained by the visual transformer encoder into the visual transformer decoder, obtain the relative position of the mask according to the position encoding, and use the visual transformer decoder to reconstruct the features extracted in step S22.
[0017] According to a technical solution of the present invention, step S3 specifically includes:
[0018] In the training phase, the reconstruction error is calculated using the L1 function to optimize the decoder and encoder simultaneously, and the loss function is constructed as:
[0019] L HSI =||F d (F e (unmasked(I fuse ))+masked(I fuse ))-I RGB ||1
[0020] L RGB =||F d (F e(unmasked(I fuse ))+masked(I fuse ))-I RGB ||1
[0021] Among them, LHSI represents the loss function of the decoder to reconstruct the hyperspectral features generated by the encoder, LRGB represents the loss function of the decoder to reconstruct the visual features generated by the encoder, Ifuse represents the concatenated hyperspectral-RGB fusion token sequence, Fe(·) represents the encoder function, and Fd(·) represents the decoder function.
[0022] According to a technical solution of the present invention, in step S4, the image reconstruction module is composed of 3 layers of Qusai-Recurrent convolution units and 1 layer of bidirectional Qusai-Recurrent convolution units, including:
[0023] In each Qusai-Recurrent convolution unit, firstly W z and W f The two 3D convolution kernels perform two 3D convolutions and then use different activation functions to obtain two sets of feature maps Z and F, then:
[0024] Z = tanh(W z *I), F = sigmoid(W f *I)
[0025] Split the feature map Z and feature map F according to the spectral direction to obtain z i and f i sequence, input it into the Qusai-Recurrent pooling layer to obtain the fusion feature h i , the fused features are reconstructed by rejoining them according to the spectrum, where the operation in the Qusai-Recurrent pooling layer can be expressed as:
[0026] h i =f i ·h i-1 +(1-f i )·z i
[0027] In the last layer of bidirectional Qusai-Recurrent convolutional units, for all sequences split according to the spectrum, Qusai-Recurrent pooling is performed in an alternating forward and backward manner to complete the propagation of global information.
[0028] According to a technical solution of the present invention, the step S4 specifically includes:
[0029] In the inference stage, the masking process in step S21 is not performed, and the fused token sequence is directly input into the encoder of the trained visual transformer for feature extraction;
[0030] The image reconstruction module is then used to super-reconstruct the features extracted by the encoder.
[0031] According to a technical solution of the present invention, in step S22, the encoder of the visual transformer is provided with a total of 4 feature encoding layers, including:
[0032] In any feature encoding layer, the fused feature vector is first normalized and used as the query, key, and value matrices for multi-head attention calculation.
[0033] Inside the multi-head attention mechanism, in each head, the fused features are transposed and then matrix multiplied with themselves, and the attention map is obtained through softmax:
[0034]
[0035] Among them, β i,j Indicates whether the i-th position should be associated with the j-th position. Each head learns a mapping method h by itself. n (·), then the complete output of the attention mechanism of N heads is:
[0036]
[0037] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device performs a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of the above technical solutions.
[0038] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of the above technical solutions is implemented.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The present invention proposes a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method, in which the data of two modalities are sliced and spliced without overlapping and position encoding is added through an embedding layer, and features of the spliced sequence are extracted through a visual transformer encoder. The self-attention mechanism is used to realize self-enhancement of feature single modality data and information interaction between cross-modalities. The hyperspectral image is reconstructed through three layers of Qusai-Recurrent convolutional units and one layer of bidirectional Qusai-Recurrent convolutional units, which is more suitable for hyperspectral multi-band data and can better utilize global spectral cross-correlation information.
[0041] The encoder based on visual transformer is adopted, and the global receptive field advantage of the attention mechanism is utilized to reduce the strong spatiotemporal registration requirements for RGB data and hyperspectral data, so that the network can adaptively fuse and enhance cross-modal data. The random mask training mechanism is adopted in the training stage, so that the network can learn the key features in the image faster and better, while reducing the computational cost.
[0042] By adopting a deep learning image reconstruction module designed based on the Qusai-Recurrent convolution unit, the fusion features are reconstructed to obtain a hyperspectral image with high spatial resolution. The Qusai-Recurrent convolution unit uses 3D convolution, which is more suitable for hyperspectral multi-band data than ordinary convolution. The Qusai-Recurrent pooling operation can better utilize the global spectral mutual correlation information. The additional bidirectional Qusai-Recurrent convolution unit can use less computing power to achieve synchronous information propagation for the previous and next time series. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A flowchart schematically shows a training phase of a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to an embodiment of the present invention;
[0045] Figure 2 A flowchart schematically shows the reasoning phase of a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to an embodiment of the present invention;
[0046] Figure 3 A schematic diagram schematically shows the working principle of a visual transformer encoder according to an embodiment of the present invention;
[0047] Figure 4 A schematic diagram showing a structure of an image reconstruction module according to an embodiment of the present invention;
[0048] Figure 5 The overall flow chart of a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to one embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0049] The description of the embodiments of this specification should be combined with the corresponding drawings, which should be considered as part of the complete specification. In the drawings, the shape or thickness of the embodiments may be enlarged and indicated for simplification or convenience. Furthermore, the parts of each structure in the drawings will be described separately. It is worth noting that the elements not shown in the drawings or not described in words are in a form known to ordinary technicians in the relevant technical field.
[0050] The description of the embodiments herein and any reference to directions and orientations are only for the convenience of description and are not to be construed as any limitation on the scope of protection of the present invention. The following description of the preferred embodiments may involve combinations of features, which may exist independently or in combination, and the present invention is not particularly limited to the preferred embodiments. The scope of the present invention is defined by the claims.
[0051] like Figure 1 , Figure 2 and Figure 5 As shown, a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method of the present invention comprises the following steps:
[0052] Step S1: Based on the scene-matched RGB image and the hyperspectral image, a fused token sequence is obtained, which specifically includes:
[0053] Step S11, inputting a scene-matched RGB image and a hyperspectral image, wherein the RGB image is a visible light three-band image with a high spatial resolution, and the hyperspectral image contains a wide spectral band range, has a high resolution in the spectral dimension, but a low resolution in the spatial dimension, and performs preprocessing operations such as slicing and adding position coding on the two images at the same time to obtain image block sequences corresponding to the two modalities;
[0054] Step S111, the RGB data is divided into non-overlapping blocks, the size of each block is p*p, the number of channels remains unchanged, and position coding is added;
[0055] Step S112, the hyperspectral data is segmented and cut into non-overlapping blocks, the size of each block is p*p, the number of channels remains unchanged, and position coding is added;
[0056] Step S12: linear mapping and embedding operations are performed on the RGB modality image block sequence and the hyperspectral modality image block sequence in different ways, wherein the number of channels of the RGB modality data after mapping remains unchanged, and the number of channels of the hyperspectral modality data after mapping is kept the same as that of the RGB modality data for the next step of splicing operation, and the obtained two-modality token vectors are spliced according to the channel dimension to obtain a fused token sequence;
[0057] Step S2: Use a random mask mechanism to jointly train the encoder and decoder of the visual transformer to complete feature reconstruction, specifically including:
[0058] Step S21, using a random mask mechanism to train the visual transformer in the network. In the training stage, a preset parameter k is used as the mask rate to randomly mask the fusion block sequence. It can be seen that the block uses the linear mapping mentioned in step S12 to embed different modal data respectively. The mask part directly uses a learnable mask token, and the unmasked token vector is spliced according to the channel dimension.
[0059] Step S22: input the unmasked token sequence into the encoder of the visual transformer for feature extraction. The self-attention mechanism in the encoder realizes the information interaction between the two modalities at the same time. Therefore, only a single pipeline working mechanism is needed to realize the fusion of cross-modal features, without the need for parallel feature extraction and then additional fusion processing.
[0060] Build as Figure 3 The attention-based feature encoder shown uses ViT pre-trained weights, with a total of 4 feature encoding layers.
[0061] In each layer, the fused feature vector is first normalized and used as the query, key, and value matrices for multi-head attention calculation, thereby realizing self-attention operation and realizing cross-modal feature interaction in self-attention.
[0062] Inside the multi-head attention mechanism, in each head, the fused features are transposed and then matrix multiplied with themselves, and the attention map is obtained through softmax:
[0063]
[0064] Among them, β i,jIndicates whether the i-th position should be associated with the j-th position. Each head can learn a mapping method h by itself. n (·), the complete output of the attention mechanism of N heads is:
[0065]
[0066] Step S23, inputting the mask part and the enhanced features obtained by the encoder of the visual transformer into the decoder of the visual transformer together. The structure of the decoder is similar to that of the encoder. The relative position of the mask is obtained according to the position coding, and the features extracted in the step S22 are reconstructed by using the decoder of the visual transformer.
[0067] Step S3: In the training phase, a loss function based on the similarity between the image reconstructed by the decoder and the true image is constructed, and the input image is used as the true image of each modality to optimize the encoder and decoder of the visual transformer in steps S22 and S23, specifically including:
[0068] In the training phase, the reconstruction error is calculated using the L1 function to optimize the decoder and encoder simultaneously, and the loss function is constructed as:
[0069] L HSI =||F d (F e (unmasked(I fuse ))+masked(I fuse ))-I RGB ||1
[0070] L RGB =||F d (F e (unmasked(I fuse ))+masked(I fuse ))-I RGB ||1
[0071] Among them, LHSI represents the loss function of the decoder to reconstruct the hyperspectral features generated by the encoder, LRGB represents the loss function of the decoder to reconstruct the visual features generated by the encoder, Ifuse represents the concatenated hyperspectral-RGB fusion token sequence, Fe(·) represents the encoder function, and Fd(·) represents the decoder function;
[0072] Step S4: using the image reconstruction module to super-reconstruct the features extracted by the encoder of the optimized visual transformer, specifically including:
[0073] In the inference stage, the masking process in step S21 is not performed, and the fused token sequence is directly input into the encoder of the trained visual transformer for feature extraction;
[0074] The image reconstruction module is then used to super-reconstruct the features extracted by the encoder.
[0075] In the training phase, we construct a structure such as Figure 4 The image reconstruction module shown uses pre-trained weights, and the module consists of 3 layers of Qusai-Recurrent convolutional units and 1 layer of bidirectional Qusai-Recurrent convolutional units;
[0076] In the inference phase, in each Qusai-Recurrent convolution unit, firstly W z and W f The two 3D convolution kernels perform two 3D convolutions and then use different activation functions to obtain two sets of feature maps Z and F, then:
[0077] Z = tanh(W z *I), F = sigmoid(W f *I)
[0078] Split the feature map Z and feature map F according to the spectral direction to obtain z i and f i sequence, input it into the Qusai-Recurrent pooling layer to obtain the fusion feature h i , the fused features are reconstructed by rejoining them according to the spectrum, where the operation in the Qusai-Recurrent pooling layer can be expressed as:
[0079] h i =f i ·h i -1+(1-f i )·z i
[0080] In the last layer of bidirectional Qusai-Recurrent convolutional units, for all sequences split according to the spectrum, Qusai-Recurrent pooling is performed in an alternating forward and backward manner to complete the propagation of global information.
[0081] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device performs a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of the above technical solutions.
[0082] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of the above technical solutions is implemented.
[0083] Computer-readable storage media may include any medium capable of storing or transmitting information. Examples of computer-readable storage media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments may be downloaded via computer networks such as the Internet, intranets, etc.
[0084] The present invention discloses a transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method, which is oriented to scene-paired high spatial resolution RGB and low spatial resolution hyperspectral image pairs. Based on the encoder of the visual transformer, a single pipeline working mechanism is adopted to realize feature extraction and fusion of RGB and hyperspectral image pairs. In the training stage, a random mask mechanism is adopted to jointly train the encoder and decoder. In the reasoning stage, a deep learning image reconstruction module designed based on the Qusai-Recurrent convolution unit is adopted to reconstruct the fusion features extracted by the transformer. The attention mechanism in the transformer is used to enable the network to adaptively learn high-resolution spatial features from visible light modal data, and the spatial resolution of the hyperspectral data is improved without considering the strict registration of the two modal data, which solves the problem that the application of hyperspectral data in the remote sensing field is limited due to the lack of spatial information, and can improve the performance of downstream task algorithm reasoning such as classification. The method mainly includes the following parts: (1) feature extraction and fusion based on the transformer encoder; (2) random mask training mechanism is used to optimize the encoder; (3) image reconstruction of fusion features.
[0085] The present invention reduces the requirement for strong data registration in the super-resolution reconstruction of hyperspectral images, expands the application scenarios of the technology, and at the same time, the hyperspectral data with improved spatial resolution is conducive to optimizing the performance of downstream task algorithms, reducing the difficulty of model design from the perspective of enhanced data, and enabling hyperspectral data to be adapted to more remote sensing tasks. In the training phase, a training method of masking the embedded template with a certain probability is adopted so that the model can better learn the features that match the cross-modal data. In the reasoning process, a single-pipeline computing architecture is adopted, and the attention mechanism in the transformer is used to realize the bidirectional flow and adaptive fusion of feature information in two modalities. The deep learning image reconstruction module designed based on the Qusai-Recurrent convolution unit is more suitable for hyperspectral multi-band data, and can better utilize the global spectral correlation information.
[0086] In addition, it should be noted that the present invention can be provided as a method, an apparatus or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0087] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0088] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0089] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0090] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for those skilled in the art, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.
Claims
1. A transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method, characterized in that: The following steps are involved: Step S1, obtaining a fused token sequence based on the scene matching RGB image and hyperspectral image; Step S2: jointly train the encoder and decoder of the visual transformer using a random mask mechanism to complete feature reconstruction; Step S3, constructing a loss function based on the similarity between the image reconstructed by the decoder and the true value image, and optimizing the encoder and decoder of the visual transformer; Step S4: Use the image reconstruction module to super-reconstruct the features extracted by the encoder of the optimized visual transformer.
2. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 1, characterized in that: The step S1 specifically includes: Step S11: input the scene-matched RGB image and the hyperspectral image, pre-process the RGB image and the hyperspectral image respectively, and obtain image block sequences corresponding to the two modalities, including an RGB modality image block sequence and a hyperspectral modality image block sequence. The preprocessing process at least includes non-overlapping segmentation and block cutting and adding position coding; Step S12: linearly map and embed the RGB modality image block sequence and the hyperspectral modality image block sequence to obtain token vectors, and then concatenate the token vectors of the two modalities to obtain a fused token sequence.
3. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 1, characterized in that: The step S2 specifically includes: Step S21, in the training stage, the fused block sequence is randomly masked using a preset parameter k as the mask rate, the visible blocks are embedded using linear mapping, and the mask part uses a learnable mask token; Step S22: input the unmasked token sequence into the encoder of the visual transformer for feature extraction; Step S23, input the mask part and the enhanced features obtained by the visual transformer encoder into the visual transformer decoder, obtain the relative position of the mask according to the position encoding, and use the visual transformer decoder to reconstruct the features extracted in step S22.
4. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 3 is characterized in that: The step S3 specifically includes: In the training phase, the reconstruction error is calculated using the L1 function to optimize the decoder and encoder simultaneously, and the loss function is constructed as: L HSI =||F d (F e (unmasked(I fuse ))+masked(I fuse ))-I RGB ||1 L RGB =||F d (F e (unmasked(I fuse ))+masked(I fuse ))-I RGB ||1 Among them, LHSI represents the loss function of the decoder to reconstruct the hyperspectral features generated by the encoder, LRGB represents the loss function of the decoder to reconstruct the visual features generated by the encoder, Ifuse represents the concatenated hyperspectral-RGB fusion token sequence, Fe(·) represents the encoder function, and Fd(·) represents the decoder function.
5. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 4 is characterized in that: In step S4, the image reconstruction module is composed of three layers of Qusai-Recurrent convolution units and one layer of bidirectional Qusai-Recurrent convolution units, including: In each Qusai-Recurrent convolution unit, firstly W z and W f The two 3D convolution kernels perform two 3D convolutions and then use different activation functions to obtain two sets of feature maps Z and F, then: Z=tanh(W z 8I),F=sigmoid(W f 8I) Split the feature map Z and feature map F according to the spectral direction to obtain z i and f i sequence, input it into the Qusai-Recurrent pooling layer to obtain the fusion feature h i , the fused features are reconstructed by rejoining them according to the spectrum, where the operation in the Qusai-Recurrent pooling layer can be expressed as: h i =f i ·h i-1 +(1-f i )·z i In the last layer of bidirectional Qusai-Recurrent convolutional units, for all sequences split according to the spectrum, Qusai-Recurrent pooling is performed in an alternating forward and backward manner to complete the propagation of global information.
6. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 5, characterized in that: The step S4 specifically includes: In the inference stage, the masking process in step S21 is not performed, and the fused token sequence is directly input into the encoder of the trained visual transformer for feature extraction; The image reconstruction module is then used to super-reconstruct the features extracted by the encoder.
7. The transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method according to claim 3, characterized in that: In step S22, the encoder of the visual transformer is configured with a total of 4 feature encoding layers, including: In any feature encoding layer, the fused feature vector is first normalized and used as the query, key, and value matrices for multi-head attention calculation. Inside the multi-head attention mechanism, in each head, the fused features are transposed and then matrix multiplied with themselves, and the attention map is obtained through softmax: whereI fuseij =I fuse T I fuse Among them, β i,j Indicates whether the i-th position should be associated with the j-th position. Each head learns a mapping method h by itself. n (·), then the complete output of the attention mechanism of N heads is: O=(O1,O2,...,o n ,...,THE N ), 8. An electronic device, characterized in that: include: One or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device performs the transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, implement the transformer-based cross-modal fusion hyperspectral image super-resolution reconstruction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Hyperspectral reconstruction method based on self-attention and deep convolution parallelism
CN116665063A
Multi-modal MR image super-resolution method based on gradient attention enhancement
CN116823613A
Cross-modal super-resolution reconstruction method, terminal equipment and readable storage medium
CN117611445A
Global interaction hyperspectral multispectral cross-modal fusion method with spectral fidelity
CN117911830A
Hyperspectral reconstruction method and system based on CASSI optical system
CN118052897A
Cited By
Image generation method and device based on spatio-temporal data interaction and electronic equipment
CN119295581A
Unsupervised spectrum super-resolution reconstruction method and device
CN119624778A
An unsupervised spectral super-resolution reconstruction method and apparatus
CN119624778B
Method and system for detecting maturity of tomatoes
CN120219858A
A method and system for detecting tomato maturity
CN120219858B
