Compressed imaging method and system based on Swin Transformer network

Through the compression imaging method based on Swin Transformer network, the end-to-end mapping learning of CC Hadamma matrix and neural network is used to solve the problems of insufficient reconstruction quality and blocky artifacts in the prior art, and high-quality image reconstruction at low sampling rate is achieved.

CN119417918BActive Publication Date: 2025-04-08CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510026982.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-08
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The existing deep learning block compression imaging method based on convolutional neural networks has problems with insufficient reconstruction quality and block artifacts, making it difficult to achieve high-quality image reconstruction at low sampling rates.

Method used

The compression imaging method based on the Swin Transformer network is adopted, and the images are recoded using the CC Hadamma matrix, and end-to-end mapping learning is performed through the neural network, combining the parallel multi-head self-attention mechanism and sliding window for deep feature extraction to eliminate artifacts and improve image quality.

Benefits of technology

High-quality image reconstruction is achieved at a lower sampling rate, eliminating block artifacts and improving the effect of image reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417918B_ABST
    Figure CN119417918B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a compression imaging method and system based on a Swin Transformer network. First, the training data is sampled and processed using a CC Hadamard matrix to obtain a coded image, and then the coded image is used to train a neural network based on the Swin Transformer to obtain an optimal compression reconstruction model; in the system, the optimal compression reconstruction model is loaded into a processing center, and multiple low-resolution images collected by a detector are preprocessed to obtain a coded image, and then the optimal compression reconstruction model is used to obtain a reconstructed image. Compared with the commonly used sampling matrix, the system and method provided by the present invention have a better reconstruction effect after CC Hadamard matrix sampling, and effectively improve the reconstruction quality of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a compression imaging method and system based on a Swin Transformer network. Background Art

[0002] The theory of compressed sensing (CS) can sample the original signal at a much lower sampling rate than the Nyquist rate and accurately restore the original signal under the condition that the original signal meets the sparsity requirement, effectively reducing the amount of data at the acquisition end and transferring the computational load to the back end. This theory can reconstruct high-quality signals from low-quality original signals detected without upgrading the hardware equipment, and is therefore widely used in image super-resolution processing, i.e., compressed imaging. However, if the image is directly reconstructed by CS, a huge amount of computation is required, which is not conducive to the real-time application of compressed imaging.

[0003] Initially, researchers processed images in blocks for compressed imaging, which is called block compressed imaging (BCI), which can effectively reduce the amount of calculation, but at the same time, block artifacts are often easy to appear in the reconstructed image. In recent years, with the development of deep learning (DL), a variety of deep neural network models have been applied to the field of image processing and have achieved outstanding results. DL-based methods have gradually penetrated into BCI. In 2016, Kulkarni et al. applied the CNN network to BCI to achieve fast imaging. In 2022, Ke Jun et al. from Beijing Institute of Technology proposed Joinput-CiNet based on the SRMD network to achieve fast BCI imaging. The current DL-BCI reconstruction quality still has a lot of room for improvement, and there are block artifacts. Therefore, a DL-BCI method for real-time application that can improve the reconstruction quality and solve block artifacts is needed.

[0004] Most of the existing DL-BCI methods are based on CNN networks or GAN networks. CNN is difficult to capture global features because the small convolution kernel size limits the receptive field. GAN is a network based on probability distribution and its training is not stable. The above reasons limit the quality of the reconstructed image. In addition, block processing will cause block artifacts. Therefore, designing a deep learning reconstruction algorithm that can break through the limitations of existing neural networks, improve imaging quality and eliminate block artifacts is a demand in the field of block compression imaging. Summary of the invention

[0005] In view of this, the present invention aims to provide a compression imaging method and system based on the Swin Transformer network, which first re-encodes the training data using the CC (Cake-Cutting) Hadamard matrix to obtain a coded image; then uses a neural network to restore and reconstruct the coded image to obtain a corresponding reconstructed image, which can learn the mapping relationship between the coded image and the reconstructed image end-to-end, and can obtain better reconstruction results at a lower sampling rate.

[0006] To achieve the above object, the technical solution created by the present invention is implemented as follows:

[0007] A compression imaging method based on a Swin Transformer network comprises the following steps:

[0008] S1: Obtain a data set, and use the CC Hadamard matrix to re-encode the original images in the data set to obtain encoded images; perform data enhancement on the encoded images and their corresponding original images to obtain training sets and test sets;

[0009] S2: Building a neural network; in the neural network, the input image is sequentially extracted by the shallow feature extraction module and the deep feature extraction module, and then passes through the residual feature reconstruction module to obtain a reconstructed image;

[0010] S3: input the training set obtained in step S1 into the neural network in step S2 for training to obtain a compressed reconstruction model;

[0011] S4: input the test set obtained in step S1 into the compression reconstruction model of step S3 for testing, adjust the hyperparameters in the training process of step S3 according to the test results, and repeat step S3 until the optimal compression reconstruction model is obtained;

[0012] S5: Input the image to be reconstructed into the optimal compression reconstruction model obtained in step S4 to obtain a corresponding reconstructed image.

[0013] Further, step S1 includes the following steps:

[0014] S11: Generate a size B 2 ×B 2 The original Hadamard matrix is ​​rearranged into a B×B Hadamard submatrix with each row of the original Hadamard matrix; a region with the same elements in the Hadamard submatrix is ​​regarded as a block, and the number of blocks in the Hadamard submatrix corresponding to each row in the original Hadamard matrix is ​​counted;

[0015] S12: Arrange all the Hadamard sub-matrices in step S11 in ascending order of the number of blocks, select the first M Hadamard sub-matrices from the re-arranged Hadamard matrix, and replace the -1 elements in the M Hadamard sub-matrices with 0; expand and arrange the replaced M Hadamard sub-matrices row by row to obtain a CC Hadamard matrix;

[0016] S13: Divide the original image of size H×W into blocks of size B×B, and obtain N=HW / B 2 image blocks;

[0017] S14: multiply all the image blocks in step S13 by the corresponding elements of the j-th Hadamard submatrix in step S11, and then add the multiplication results to obtain the corresponding pixel values, where , and then obtain a low-resolution image of size H / W×W / B; arrange the low-resolution image in a zigzag pattern to obtain a vector of size 1×N;

[0018] S15: Repeat step S14 M times to obtain M 1×N vectors; form a compressed signal matrix of M×N size with the M 1×N vectors, multiply the compressed signal matrix with the pseudo-inverse matrix of the CC Hadamard matrix obtained in step S13 to obtain a coding matrix, restore each column of the coding matrix to an image block of B×B size, thus obtaining N image blocks, and then arrange the N image blocks in a zigzag shape to obtain a coded image.

[0019] Furthermore, the shallow feature extraction module in step S2 includes a 3×3 convolution layer, that is, the input image is subjected to a 3×3 convolution operation of the shallow feature extraction module to obtain shallow features.

[0020] Furthermore, in the deep feature extraction module in step S2, the shallow features are passed through the block embedding layer to obtain block embedded features; the block embedded features are passed through no less than 2 residual extraction layers to obtain residual features; the residual features are passed through a 3×3 convolution layer to obtain deep features; in the block embedding layer, each feature map in the shallow features is divided into blocks to obtain feature map blocks, and then the feature map blocks are sorted in a zigzag order from top to bottom according to the column direction of the feature map, and then each feature map block is expanded and combined by column to obtain block embedded features.

[0021] Furthermore, in the residual extraction layer, the input features pass through no less than 2 ST layers and 3×3 convolutional layers in sequence, and the features output by the 3×3 convolutional layer are added to the corresponding elements of the block embedding features to obtain the output features; in the ST layer, the input features pass through the normalization layer and enter the parallel MSA layer; the output features of the parallel MSA layer are added to the corresponding elements of the block embedding features to obtain the first feature; the first feature passes through the normalization layer and enters the multilayer perceptron; the features output by the multilayer perceptron are added to the corresponding elements of the first feature to obtain the output feature.

[0022] Furthermore, in the parallel MSA layer, the MSA operation is performed on the input features simultaneously using windows in different GPU nodes.

[0023] Furthermore, the residual feature reconstruction module in step S2 includes a 3×3 convolution layer, that is, after the deep features undergo a 3×3 convolution operation of the residual feature reconstruction module, the features obtained by the 3×3 convolution operation are added to the corresponding elements of the input image to obtain a reconstructed image.

[0024] A compression imaging system based on a Swin Transformer network comprises a lens, a spatial light modulator, a relay lens, a detector and a processing center; wherein the spatial light modulator is arranged on the image focal plane of the lens, and the target scene is located within the object distance of the lens; the image of the target scene is modulated by the spatial light modulator in blocks, and then imaged onto the detector through the relay lens to obtain a low-resolution image; the processing center controls the rotation of the spatial light modulator to collect and obtain no less than two low-resolution images; an optimal compression reconstruction model obtained by the compression imaging method based on the Swin Transformer network provided by the present invention is arranged in the processing center; all low-resolution images are pre-processed and input into the optimal compression reconstruction model to obtain a reconstructed image.

[0025] Furthermore, the preprocessing includes: expanding no less than 2 low-resolution images into vectors by columns, combining them according to the acquisition order of the spatial light modulator to obtain a compressed signal matrix, multiplying the compressed signal matrix with the pseudo-inverse matrix of the CC Hadamard matrix, and inputting the obtained image into the optimal compression reconstruction model.

[0026] Compared with the prior art, the invention can achieve the following beneficial effects:

[0027] (1) In the compression imaging method and system based on the Swin Transformer network created by the present invention, the CC Hadamard matrix is ​​firstly adopted. The matrix generation method is simple and can sample and restore the information of the original image from low frequency to high frequency in sequence, which is convenient for input into the neural network for processing; in addition, the neural network is used to train the existing data set to obtain prior information, and the mapping relationship between the measured signal and the reconstructed image can be learned end-to-end, and better reconstruction results can be obtained at a lower sampling rate;

[0028] (2) The present invention creates a compression imaging method and system based on the Swin Transformer network, which utilizes the Swin Transformer architecture, introduces a parallel multi-head self-attention mechanism and a sliding window to perform deep feature extraction and establish connections between adjacent blocks, thereby achieving rich restoration of details and elimination of artifacts, thereby improving image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings constituting part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation on the present invention. In the drawings:

[0030] Figure 1 A schematic diagram of a flow chart of a compression imaging method based on a Swin Transformer network according to an embodiment of the present invention;

[0031] Figure 2 A schematic diagram of the network structure of a neural network according to an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of the structure of a compression imaging system based on a Swin Transformer network according to an embodiment of the present invention.

[0033] Description of reference numerals:

[0034] 1. Lens; 2. Spatial light modulator; 3. Relay lens; 4. Detector; 5. Processing center; 6. Target scene. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the invention more clear, the invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and do not constitute a limitation of the invention.

[0036] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0037] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0038] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.

[0039] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.

[0040] like Figure 1 As shown, the compression imaging method based on the Swin Transformer network described in the embodiment of the present invention comprises the following steps:

[0041] S1: Obtain a data set, and use the CC Hadamard matrix to re-encode the original images in the data set to obtain encoded images; perform data augmentation on the encoded images and their corresponding original images to obtain training sets and test sets.

[0042] In the embodiment of the present invention, the original images of the training set are from the DIV2k dataset, and the original images of the test set are from other datasets such as BSDS100, Set5 or Set14. Step S1 includes the following steps:

[0043] S11: Generate a size B 2 ×B 2 The original Hadamard matrix is ​​rearranged into a B×B Hadamard submatrix with each row of the original Hadamard matrix; a region with the same elements (all 1 or -1) in the Hadamard submatrix is ​​regarded as a block, and the number of blocks in the Hadamard submatrix corresponding to each row in the original Hadamard matrix is ​​counted;

[0044] S12: Arrange all the Hadamard submatrices in step S11 in ascending order of the number of blocks, select the first M Hadamard submatrices from the reordered Hadamard matrix, and replace the -1 elements in the M Hadamard submatrices with 0; expand and arrange the replaced M Hadamard submatrices row by row to obtain the CC Hadamard matrix ,Right now .

[0045] S13: Divide the original image of size H×W into blocks of size B×B, and obtain N=HW / B 2 image blocks;

[0046] S14: multiply all the image blocks in step S13 by the corresponding elements of the j-th Hadamard submatrix in step S11, and then add the multiplication results to obtain the corresponding pixel values, where , and then obtain a low-resolution image of size H / W×W / B; arrange the low-resolution image in a zigzag pattern to obtain a vector of size 1×N;

[0047] S15: Repeat step S14 M times to obtain M 1×N vectors; combine the M 1×N vectors into a M×N compressed signal matrix y, that is, ; Compress the compressed signal matrix y and the CC Hadamard matrix obtained in step S13 The pseudo-inverse matrix Multiply to get the encoding matrix ,Right now , the encoding matrix Each column of is restored to a B×B image block, so that N image blocks are obtained, and then the N image blocks are arranged in a zigzag shape to obtain the encoded image .

[0048] After completing the above steps to obtain the encoded image, the encoded image and its corresponding original image are subjected to data enhancement operations such as rotation, translation, and folding, and then the data-enhanced image is randomly cropped to a certain size (such as 128×128) to obtain the training set and the test set.

[0049] S2: Build a neural network based on Swin Transformer. Figure 2 As shown, in the neural network, the input image is sequentially subjected to feature extraction by the shallow feature extraction module and the deep feature extraction module, and then is subjected to the residual feature reconstruction module to obtain a reconstructed image.

[0050] Among them, the shallow feature extraction module includes a 3×3 convolution layer, that is, the input image obtains the shallow feature after the 3×3 convolution operation of the shallow feature extraction module.

[0051] In the deep feature extraction module, the shallow features are processed by the block embedding layer to obtain the block embedding features. The block embedding features are processed by at least two cascaded residual extraction layers (i.e. Figure 2 The residual features are obtained after the RSTB layer in the deep layer; the residual features are obtained after the 3×3 convolution layer; in the block embedding layer, each feature map in the shallow feature is divided into blocks to obtain feature map blocks, and then the feature map blocks are sorted in a zigzag order from top to bottom according to the column direction of the feature map, and then each feature map block is expanded and combined by column to obtain the block embedding feature.

[0052] In the residual extraction layer, the input features are sequentially passed through no less than 2 ST (Swin Transformer) layers and 3×3 convolutional layers, and the features output by the 3×3 convolutional layer are added to the corresponding elements of the block embedding features to obtain the output features. In an embodiment of the present invention, the deep feature extraction module includes 6 cascaded residual extraction layers, that is, the output of the previous residual extraction layer is directly used as the input of the next residual extraction layer.

[0053] In the ST layer, the input features pass through the normalization layer and then enter the parallel MSA (i.e., multi-head self-attention) layer; the output features of the parallel MSA layer are added to the corresponding elements of the block embedding features to obtain the first feature; the first feature passes through the normalization layer and enters the multilayer perceptron (published at the 2021 NeurIPS (Neural Information Processing Systems Conference)); the features output by the multilayer perceptron are added to the corresponding elements of the first feature to obtain the output feature. In an embodiment of the present invention, the residual extraction layer includes 6 cascaded ST layers, that is, the output of the previous ST layer is directly used as the input of the next ST layer.

[0054] In the parallel MSA layer, the windows are used to perform MSA operations on the input features in different GPU nodes to obtain the output features. By introducing the MSA operation, the effective features are strengthened while the amount of calculation is effectively reduced. In addition, the sliding window mechanism is used to connect adjacent blocks to facilitate the elimination of artifacts.

[0055] The residual feature reconstruction module includes a 3×3 convolution layer, that is, after the deep features undergo the 3×3 convolution operation of the residual feature reconstruction module, the features obtained by the 3×3 convolution operation are added to the corresponding elements of the input image to obtain the reconstructed image.

[0056] S3: Input the training set obtained in step S1 into the neural network of step S2 for training to obtain a compressed reconstruction model. In the embodiment of the present invention, the Adam optimizer is used in the training process, and the loss function is the MSE loss function or the L1 loss function. The hyperparameters in the training process are set as follows: the learning rate is 0.0001, the epoch is set to 150, and the batch size is set to 1.

[0057] S4: Input the test set obtained in step S1 into the compression reconstruction model of step S3 for testing, adjust the hyperparameters in the training process of step S3 according to the test results, and repeat step S3 until the optimal compression reconstruction model is obtained. The test result is to compare the difference between the reconstructed image and the corresponding original image. When the difference between the two is the smallest, the current compression reconstruction model is the optimal compression reconstruction model. In the embodiment of the present invention, the difference between the reconstructed image and the corresponding original image is evaluated by the peak signal-to-noise ratio (PSNR) and the structural similarity (SSIM). Among them, the peak signal-to-noise ratio is the most common and widely used image objective evaluation index, which is used to measure the quality of the compressed image. The unit is usually expressed in decibels (dB). The higher the index, the better the image quality; structural similarity is a full-reference image quality evaluation index, which measures image similarity from three aspects: brightness, contrast, and structure. Its value range is [0,1]. The larger the index value, the smaller the degree of image distortion, indicating that the image quality is better.

[0058] S5: Input the image to be reconstructed into the optimal compression reconstruction model obtained in step S4 to obtain a corresponding reconstructed image.

[0059] The embodiment of the present invention also provides a compression imaging system based on the Swin Transformer network, such as Figure 3 As shown, it includes a lens 1, a spatial light modulator 2, a relay lens 3, a detector 4 and a processing center 5. Among them, the spatial light modulator 2 is set on the image focal plane of the lens 1, and the target scene 6 is located within the object distance of the lens 1. After the image of the target scene 6 is modulated by the spatial light modulator 2 in blocks, it is imaged onto the detector 4 through the relay lens 3 to obtain a low-resolution image. The processing center 5 controls the rotation of the spatial light modulator 2 to collect and obtain no less than 2 low-resolution images. The processing center 5 is loaded with an optimal compression reconstruction model obtained by the compression imaging method based on the Swin Transformer network provided in the embodiment of the present invention. All low-resolution images are input into the optimal compression reconstruction model after preprocessing to obtain a reconstructed image. In the embodiment of the present invention, the spatial light modulator 2 uses a digital micromirror device (DMD), the resolution of the spatial light modulator 2 is higher than the resolution of the detector 4, and the image on an area on the spatial light modulator 2 is mapped to a pixel of the detector. The mapping process is the process of step S1 described in the embodiment of the present invention. The low-resolution images collected by multiple frames are preprocessed to obtain coded images, and the coded images are input into the optimal compression reconstruction model to obtain reconstructed images.

[0060] The preprocessing includes: expanding at least two low-resolution images into vectors by columns, combining them according to the acquisition order of the spatial light modulator 2 to obtain a compressed signal matrix, multiplying the compressed signal matrix with the pseudo-inverse matrix of the CC Hadamard matrix, and inputting the obtained image into the optimal compression reconstruction model.

[0061] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the disclosure of the present invention can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0062] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A compression imaging method based on a Swin Transformer network, characterized in that: The following steps are involved: S1: Obtain a data set, and use the CC Hadamard matrix to re-encode the original image in the data set to obtain an encoded image; Performing data enhancement on the encoded image and its corresponding original image to obtain a training set and a test set; step S1 includes the following steps: S11: Generate a size B 2 ×B 2 The original Hadamard matrix is ​​rearranged into a Hadamard submatrix of size B×B by rearranging each row of the original Hadamard matrix; a region with the same elements in the Hadamard submatrix is ​​regarded as a block, and the number of blocks in the Hadamard submatrix corresponding to each row in the original Hadamard matrix is ​​counted; S12: Arrange all the Hadamard sub-matrices in step S11 in ascending order of the number of blocks, select the first M Hadamard sub-matrices from the re-arranged Hadamard matrix, and replace the -1 elements in the M Hadamard sub-matrices with 0; expand and arrange the replaced M Hadamard sub-matrices row by row to obtain the CC Hadamard matrix; S13: Divide the original image of size H×W into blocks of size B×B, and obtain N=HW / B 2 image blocks; S14: multiply all the image blocks in step S13 by the corresponding elements of the j-th Hadamard submatrix in step S11, and then add the multiplication results to obtain the corresponding pixel values, where , and then obtain a low-resolution image of size H / W×W / B; arrange the low-resolution image in a zigzag shape to obtain a vector of size 1×N; S15: repeat step S14 M times to obtain M vectors of size 1×N; form a compressed signal matrix of size M×N by the M vectors of size 1×N, multiply the compressed signal matrix by the pseudo-inverse matrix of the CC Hadamard matrix obtained in step S13 to obtain a coding matrix, restore each column of the coding matrix to an image block of size B×B, thus obtaining N image blocks, and then arrange the N image blocks in a zigzag pattern to obtain the coded image; S2: Building a neural network; in the neural network, the input image is sequentially subjected to feature extraction by a shallow feature extraction module and a deep feature extraction module, and then subjected to a residual feature reconstruction module to obtain a reconstructed image; the shallow feature extraction module includes a 3×3 convolution layer, that is, the input image is subjected to a 3×3 convolution operation by the shallow feature extraction module to obtain shallow features; in the deep feature extraction module, the shallow features are subjected to a block embedding layer to obtain block embedding features; the block embedding features are subjected to no less than 2 residual extraction layers to obtain residual features; the residual features are subjected to a 3×3 convolution layer to obtain deep features; In the block embedding layer, each feature map in the shallow feature is divided into blocks to obtain feature map blocks, and then the feature map blocks are sorted in a zigzag order from top to bottom according to the column direction of the feature map, and then each feature map block is expanded and combined by column to obtain the block embedding feature; S3: input the training set obtained in step S1 into the neural network in step S2 for training to obtain a compressed reconstruction model; S4: input the test set obtained in step S1 into the compression reconstruction model of step S3 for testing, adjust the hyperparameters in the training process of step S3 according to the test results, and repeat step S3 until the optimal compression reconstruction model is obtained; S5: Input the image to be reconstructed into the optimal compression reconstruction model obtained in step S4 to obtain a corresponding reconstructed image.

2. The compression imaging method based on the Swin Transformer network according to claim 1, characterized in that: In the residual extraction layer, after the input feature passes through no less than 2 ST layers and 3×3 convolution layers in sequence, the feature output by the 3×3 convolution layer is added to the corresponding element of the block embedding feature to obtain the output feature; In the ST layer, the input feature passes through the normalization layer and then enters the parallel MSA layer; the output feature of the parallel MSA layer is added to the corresponding element of the block embedding feature to obtain the first feature; the first feature passes through the normalization layer and enters the multilayer perceptron; the feature output by the multilayer perceptron is added to the corresponding element of the first feature to obtain the output feature.

3. The compression imaging method based on the Swin Transformer network according to claim 2, characterized in that: In the parallel MSA layer, MSA operations are performed on input features simultaneously using windows in different GPU nodes to obtain output features.

4. The compression imaging method based on the Swin Transformer network according to claim 2, characterized in that: The residual feature reconstruction module in step S2 includes a 3×3 convolution layer, that is, after the deep features are subjected to the 3×3 convolution operation of the residual feature reconstruction module, the features obtained by the 3×3 convolution operation are added to the corresponding elements of the input image to obtain the reconstructed image.

5. A compression imaging system based on a Swin Transformer network, characterized in that: The invention comprises a lens, a spatial light modulator, a relay lens, a detector and a processing center; wherein the spatial light modulator is arranged on the image focal plane of the lens, and the target scene is located within the object distance of the lens; after the image of the target scene is modulated by the spatial light modulator in blocks, it is imaged onto the detector through the relay lens to obtain a low-resolution image; the processing center controls the rotation of the spatial light modulator to collect and obtain no less than 2 low-resolution images; The processing center is provided with an optimal compression reconstruction model obtained by the compression imaging method based on the Swin Transformer network as described in any one of claims 1 to 4; all low-resolution images are input into the optimal compression reconstruction model after preprocessing to obtain a reconstructed image.

6. The compressive imaging system based on the Swin Transformer network according to claim 5, characterized in that: The preprocessing includes: expanding no less than 2 low-resolution images into vectors by columns, and then combining them according to the acquisition order of the spatial light modulator to obtain a compressed signal matrix, multiplying the compressed signal matrix with the pseudo-inverse matrix of the CC Hadamard matrix, and inputting the obtained image into the optimal compression reconstruction model.

Citation Information

Patent Citations

  • Rapid spectral imaging system and method based on sub-sampling

    CN113899453A

  • Terahertz continuous wave compressed sensing imaging method

    CN118657848A