An image super-resolution method and system based on local enhancement Transformer
By introducing local enhancement Transformer and Ghost header into the image super-resolution network, combined with the convolutional feed-forward network, the deficiencies of the image super-resolution model in local information extraction and detail recovery are solved, and a more natural and clear image reconstruction effect is achieved. .
Patent Information
- Application Number
- CN202410609646.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-16
AI Technical Summary
The image super-resolution model in the existing technology is not dense enough when extracting local information, resulting in the detailed texture of the reconstructed image being not natural and clear enough.
An image super-resolution network based on local enhanced Transformer is used, through the shallow feature extraction module, deep feature extraction module and image reconstruction module, combined with multiple local enhanced self-attention units and Ghost heads, to enhance local feature interaction and global information capture. And add local depth convolution branches in the convolutional feed-forward network to recover high-frequency information.
Long-distance dependencies and local feature interactions are effectively captured, the extracted local information is denser, and the detailed texture of the reconstructed image is more natural and clear, significantly improving the quality of image super-resolution reconstruction.
Smart Images

Figure CN118229531B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image super-resolution technology, and in particular to an image super-resolution method and system based on a local enhancement Transformer. Background Art
[0002] Image super-resolution (SR) aims to reconstruct a high-resolution (HR) image with rich details from a low-resolution (LR) image. However, since an LR image can be reconstructed into multiple different HR images, the SR task is a highly ill-posed problem. Due to the powerful feature expression ability of Transformer, many excellent Transformer-based SR models have emerged in recent years. Transformer has good global feature mapping capabilities because it can establish long-distance dependencies between pixels, which is conducive to more comprehensive restoration of edge texture details of the image. These methods can significantly improve performance by appropriately increasing the window to obtain sliding window self-attention. However, as the window size increases, the ability to learn local fine texture detail features weakens, resulting in blurred details in the reconstructed image. Therefore, enhancing the local feature extraction ability of the window-based self-attention SR model has become an important breakthrough in improving the performance of the SR model. The Chinese invention patent application with publication number CN117575915A discloses an image super-resolution reconstruction method, terminal device and storage medium, wherein the deep feature extraction module is composed of several enhanced Swin-Transformer modules. When extracting local features in the enhanced Swin-Transformer module, two shifted convolutions and RELU activation functions between the shifted convolutions are used for extraction. This method enables the model to utilize local information at different levels, but there are still shortcomings such as the extracted local information is not dense enough and the detailed texture of the reconstructed image is not natural and clear enough. Summary of the invention
[0003] The purpose of the present invention is to solve the problems in the prior art that the local information extracted from the image is not dense enough and the detail texture of the reconstructed image is not natural and clear enough.
[0004] The technical solution adopted by the present invention to solve the technical problem is: to provide an image super-resolution method based on a local enhanced Transformer, comprising the following steps:
[0005] Construct an image super-resolution network based on local enhancement Transformer;
[0006] Input a low-resolution image, and the image super-resolution network reconstructs the corresponding high-resolution image based on the low-resolution image;
[0007] The image super-resolution network includes a shallow feature extraction module, a deep feature extraction module and an image reconstruction module connected in sequence. The low-resolution image input to the image super-resolution network is input to the shallow feature extraction module, the output of the shallow feature extraction module is the input of the deep feature extraction module, the output of the deep feature extraction module is the input of the image reconstruction module, and the output of the image reconstruction module is the corresponding high-resolution image; wherein, the shallow feature extraction module uses a convolution layer to extract shallow features, and the deep feature extraction module uses multiple local enhanced self-attention units to extract deep features, each local enhanced self-attention unit includes multiple Transformer layers and a 3×3 convolution, and the image reconstruction module uses convolution to achieve reconstruction.
[0008] Preferably, the shallow feature extraction module is a 3×3 convolution that transforms the low-resolution image Convert to shallow features Among them, H, W and C represent the height, width and number of feature channels of the low-resolution image features, respectively.
[0009] Preferably, multiple local enhanced self-attention units in the deep feature extraction module are connected in sequence, and the Transformer layer of the local enhanced self-attention unit adopts Swin-Transformer or a local enhancement layer, and the local enhancement layer is an improved Swin-Transformer.
[0010] Preferably, the local enhancement layer includes neighborhood attention, a Ghost head and a convolutional feed-forward network.
[0011] Preferably, for the kth local enhanced self-attention unit, when k=1, its input is the output of the shallow feature extraction module, and when k>1, its input is the output of the k-1th local enhanced self-attention unit; the output of the kth local enhanced self-attention block is expressed as:
[0012] F k =H ELTB (F k-1 ),k=1,2,...,K;
[0013] Among them, F k-1 represents the input of the kth local enhanced self-attention unit, F k represents the output of the kth local enhanced self-attention unit, K represents the number of local enhanced self-attention units; It represents the kth local enhanced self-attention unit, which consists of M Swin-Transformer layers, L local enhanced layers and 3×3 convolutions. The specific operation of the local enhanced self-attention unit is expressed as:
[0014]
[0015] F k =H Conv (F k,m )+F k-1 ;
[0016] Among them, F k,m H represents the output of the mth Transformer layer in the kth local enhanced self-attention unit, where the Transformer layer is a Swin-Transformer layer or a local enhanced layer; Conv (·) represents a 3×3 convolutional layer, represents the mth Swin-Transformer; represents the lth local enhancement layer, and the specific operation of the local enhancement layer is expressed as:
[0017]
[0018] Among them, E i is the output value of the i-th pixel after the local enhancement layer, Θ represents the j-th pixel in the neighborhood i; G(·) represents the Ghost head mapping; N j-i represents the output feature of the i-th pixel after neighborhood attention, v j A vector representing the value of the j-th pixel.
[0019] Preferably, the specific operation of the neighborhood attention is expressed as:
[0020]
[0021] Where ⊙ refers to the Hadamard product, i represents the i-th pixel, and j represents the j-th pixel in the neighborhood.
[0022] Preferably, the Ghost header mapping G(·) is expressed as:
[0023]
[0024] in, and Respectively represent the input and output of the Ghost header, c′ represents The channel, c represents The relationship between c and c' is c' = c%n h , n hIndicates the number of Ghost headers; ji indicates relative offset, and % is a modulo operation; and are the values in O and S corresponding to the cth channel of the relative offset ji, and are two static matrices, n c represents the number of channels c, ks1 represents the height, ks2 represents the width; Pow(·) is the power operation; λ,γ are hyperparameters.
[0025] Preferably, the convolutional feed-forward network is a feed-forward network with a local depth convolution branch added between two linear layers.
[0026] Preferably, the image super-resolution network reconstructs a corresponding high-resolution image based on the low-resolution image, specifically: a low-resolution image of H×W×C dimensions is input into the image super-resolution network, and the output obtained is a high-resolution image of (H×scale)×(W×scale)×C dimensions, where scale is the magnification factor.
[0027] The present invention also provides an image super-resolution system based on a local enhanced Transformer, comprising:
[0028] Network construction module, building an image super-resolution network based on local enhancement Transformer;
[0029] The network application module inputs a low-resolution image, and the image super-resolution network reconstructs the corresponding high-resolution image based on the low-resolution image;
[0030] The image super-resolution network includes a shallow feature extraction module, a deep feature extraction module and an image reconstruction module connected in sequence. The low-resolution image input to the image super-resolution network is input to the shallow feature extraction module, the output of the shallow feature extraction module is the input of the deep feature extraction module, the output of the deep feature extraction module is the input of the image reconstruction module, and the output of the image reconstruction module is the corresponding high-resolution image; wherein, the shallow feature extraction module uses a convolution layer to extract shallow features, and the deep feature extraction module uses multiple local enhanced self-attention units to extract deep features, each local enhanced self-attention unit includes multiple Transformer layers and a 3×3 convolution, and the image reconstruction module uses convolution to achieve reconstruction.
[0031] The present invention has the following beneficial effects:
[0032] (1) The introduction of the local enhancement Transformer module can effectively capture long-distance dependencies while enhancing local feature interactions, thereby providing more instructive local and global information for super-resolution reconstruction;
[0033] (2) The design of local enhanced attention can effectively capture the long-distance dependencies of the image while enhancing the interaction of local features, providing more instructive local and global information for super-resolution reconstruction; and the convolutional feedforward network ConvFFN can significantly increase the high-frequency information and compensate for the high-frequency information of the reconstructed image; the extracted local information is denser, and the detailed texture of the reconstructed image is more natural and clear.
[0034] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments, but the present invention is not limited to the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A method step diagram of an embodiment of the present invention;
[0036] Figure 2 is a network structure diagram of an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of neighborhood attention and window-based multi-head self-attention according to an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of a Ghost header according to an embodiment of the present invention;
[0039] Figure 5 It is a local attribution graph of the embodiment of the present invention and other SR methods;
[0040] Figure 6 It is a super-resolution reconstructed image of the embodiment of the present invention and other SR methods;
[0041] Figure 7 4 is a system structure diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0042] See also Figure 1 FIG. 1 is a diagram showing steps of a method according to an embodiment of the present invention, comprising the following steps:
[0043] S101, build an image super-resolution network based on local enhancement Transformer;
[0044] S102, input a low-resolution image, and the image super-resolution network reconstructs a corresponding high-resolution image based on the low-resolution image.
[0045] For details, see Figure 2As shown, the image super-resolution network includes a shallow feature extraction module (Shallow Feature Exaction), a deep feature extraction module and an image reconstruction module (HQ Image Reconstruction) connected in sequence; wherein the shallow feature extraction module uses a convolutional layer to extract shallow features, and the deep feature extraction module uses multiple local enhanced self-attention units (ELTB) to extract deep features, and each local enhanced self-attention unit includes m Swin-Transformer layers (STL), n local enhanced Transformer layers (ELTB) and a 3×3 convolutional layer.
[0046] Specifically, the shallow feature extraction module is a 3×3 convolution, which transforms the low-resolution RGB image Convert to shallow features Among them, H, W and C represent the height, width and number of feature channels of the input features respectively.
[0047] Specifically, multiple local enhanced self-attention units in the deep feature extraction module are connected in sequence. The local enhanced self-attention unit consists of multiple Transformer layers and a 3×3 convolution. The Transformer layer adopts Swin-Transformer or local enhancement layer.
[0048] The local enhancement layer is an improved Swin-Transformer, and the improvements include the following three contents:
[0049] (1) Replace the window-based multi-head self-attention W-MSA or sliding window-based multi-head self-attention SW-MSA in Swin-Transformer with neighborhood attention, such as Figure 3 As shown;
[0050] The image space pixels are designed to have neighborhood self-attention through Hadamard operations to enhance local interactions as much as possible. Since higher-order mappings have stronger fitting capabilities, a third-order mapping module is designed but the dot product of the query and key matrices is not used. To achieve this, neighborhood self-attention is proposed, which introduces the Hadamard product between the query and the key as a second-order term. Neighborhood self-attention can be written as:
[0051]
[0052] where ⊙ is the Hadamard product. By this simple but effective modification, N j-i can become a third-order representation of the original input x. In addition to the third-order representation, neighborhood self-attention is easy to implement and can be achieved by simple element-wise multiplication of the query and key feature maps. In addition, and It is equivalent to a 1×1 convolutional layer; therefore, neighborhood self-attention can be implemented through feature multiplication and convolutional layers.
[0053] (2) Adding a Ghost head to Swin-Transformer can combine the attention map with the static matrix to increase the channel capacity and further enhance the image super-resolution network's reasoning ability for local features.
[0054] In order to further enhance the local feature extraction capability of the local Transformer, from the perspective of channel setting, it is found that LSA adopts a multi-head strategy to divide the channels into multiple groups and share the same filter in each group. This embodiment compares the impact of the number of heads on SR performance under the same hyperparameters and finds that the SR performance increases with the increase in the number of heads. Therefore, the capacity can be increased by increasing the number of self-attention heads.
[0055] Although channel setting is not the most critical factor affecting performance, the Ghost head with larger channel capacity still slightly improves the performance of SR. Since directly increasing the number of LSA heads does not bring any gain, but makes the multi-head feature maps redundant, another low-computation but effective method is proposed to enrich the channel capacity - Ghost head, which expands the original head by combining it with two static matrices. It is based on a set of intrinsic feature maps and applies a series of linear transformations at a low computational cost to generate many Ghost feature maps, which can fully reveal the information behind the intrinsic features.
[0056] How to deal with Ghost header Figure 3 As shown, it can be expressed as:
[0057]
[0058] in, and Respectively represent the input and output of the Ghost header, c′ represents The channel, c represents The relationship between c and c' is c' = c%n h , n h Indicates the number of Ghost headers; ji indicates relative offset, and % is a modulo operation; and are the values in O and S corresponding to the cth channel of the relative offset ji, and are two static matrices, n c represents the number of channels c, ks1 represents the height, ks2 represents the width; Pow(·) is the power operation; λ,γ are hyperparameters.
[0059] The Ghost header is a low-complexity module. Its overhead is only O(n c ×k s ×k s ×n p ), where n c is the number of channels, k s is the filter size (i.e. the size of the neighboring region), n p is the number of pixels. Different from adjusting attention after softmax, the Ghost head does not use reconvolution and linear mapping, but only uses two simple static matrices. The main purpose of the Ghost head is not to improve attention, but to enrich channel capacity. Compared with point multiplication, Hadamard operation (A×B in Pytorch) can effectively extract high-order information, so that the Ghost head can extract richer channel features under limited capacity.
[0060] (3) Replace the feedforward network FFN in Swin-Transformer with the convolutional feedforward network ConvFFN.
[0061] In order to better recover high-frequency information, a 3×3 convolution is usually added at the end of each group of Transformers. Unlike SwinIR, this embodiment proposes to add a local deep convolution branch between the two linear layers of the FFN block to help extract more details. The improved FFN block is named ConvFFN. This improvement hardly increases the amount of computation, but can make up for the loss of high-frequency information caused by self-attention, significantly increase high-frequency information, and thus produce better results.
[0062] Specifically, for the kth local enhanced self-attention unit, when k=1, its input is the output of the shallow feature extraction module, and when k>1, its input is the output of the k-1th local enhanced self-attention unit; the output of the kth local enhanced self-attention block is expressed as:
[0063] F k =H ELTB (F k-1 ),k=1,2,...,K;
[0064] Among them, F k-1 represents the input of the kth local enhanced self-attention unit, F k represents the output of the kth local enhanced self-attention unit, K represents the number of local enhanced self-attention units; It represents the kth local enhanced self-attention unit, which consists of M Swin-Transformer layers, L local enhanced layers and 3×3 convolutions. The specific operation of the local enhanced self-attention unit is expressed as:
[0065]
[0066] F k =H Conv (F k,m )+F k-1 ;
[0067] Among them, F k,m H represents the output of the mth Transformer layer in the kth local enhanced self-attention unit, where the Transformer layer is a Swin-Transformer layer or a local enhanced layer; Conv (·) represents a 3×3 convolutional layer, represents the mth Swin-Transformer; represents the lth local enhancement layer, and the specific operation of the local enhancement layer is expressed as:
[0068]
[0069] Among them, E i is the output value of the i-th pixel after the local enhancement layer, Θ represents the j-th pixel in the neighborhood i; G(·) represents the Ghost head mapping; N j-i represents the output feature of the i-th pixel after neighborhood attention, v j A vector representing the value of the j-th pixel.
[0070] In this embodiment, the local enhanced self-attention unit includes six Transformer layers and one terminal convolutional layer, where the third Transformer layer is a local enhancement layer and the other Transformer layers use Swin-Transformer. S It will be passed to the deep feature extraction module with a hierarchical structure, and the 3×3 convolution at the end of the deep feature extraction module produces the deep feature F D . F S and F D The summation result is input into the high-quality image reconstruction module for high-resolution image reconstruction.
[0071] Specifically, the image super-resolution network reconstructs a corresponding high-resolution image based on a low-resolution image, specifically: a low-resolution image of dimensions H×W×C is input into the image super-resolution network, and the output obtained is a high-resolution image of dimensions (H×scale)×(W×scale)×C, where scale is the magnification factor.
[0072] Ablation experiments are performed on the image super-resolution network of the embodiment of the present invention, including ablation experiments A and B. When testing the performance of a module, it is always ensured that the basic modules and network structures used in different experimental projects in the same group of experiments are the same to stabilize non-experimental variables.
[0073] Ablation Experiments A. In the ablation study of local enhanced self-attention, the effects of neighborhood self-attention and Ghost head module in local enhanced self-attention are analyzed respectively. SwinIR is selected as our base architecture, and different modifications are made to local enhanced self-attention. Table 1 shows the ablation experiment results on Set5(×4):
[0074] Table 1
[0075]
[0076] As shown in Table 1, with only neighborhood self-attention, the PSNR of SwinIR is improved by 0.1dB. By observation, the introduction of the Ghost head makes the PSNR gain 0.03dB. Combining neighborhood self-attention and the Ghost head, the PSNR is improved by 0.09dB. This shows the effectiveness of these two modules.
[0077] Ablation Experiment B. Attribution Analysis: In order to study the ability of long-distance dependency modeling methods, experiments are conducted using saliency methods. The local attribution map (LAM) is used to calculate the importance of each pixel in the LR image. Figure 5 Various state-of-the-art SR methods (SwinIR and ELAN) and LAM results of ELSR are shown. Figure 5 It can be seen that ELSR contributes to a larger range of areas in LR images with similar patterns, for example, regular stripes appearing on skyscrapers. Although the textures in these areas are severely aliased in the LR images, which may mislead the SR process, ELSR can focus on the interactions of finer local features and still reconstruct accurate textures. By comparing the LAM attribution results, we found that ELSR can indeed capture denser local information than Transformer-based methods (such as SwinIR and ELAN) while maintaining long-range modeling capabilities to help reconstruct details. Therefore, ELSR has the ability to enhance key local information and maintain the ability to capture rich global contextual information.
[0078] See also Figure 6The figure shows the super-resolution reconstructed images of the embodiment of the present invention and other SR methods, showing the reconstructed images of "img004" by different models in the ×4SR task. For the reconstruction results of the elliptical hole in "img004", the reconstructed images of other methods have blurring artifacts and severe geometric structure distortion. In contrast, ELSR can better suppress distortion and artifacts, and maintain sharp edge structures and fine texture details.
[0079] Further objective effect analysis is performed, and the quantitative indicators of different methods in ×2, ×3 and ×4 SR tasks are shown in Tables 2-4:
[0080] Table 2×2SR tasks
[0081]
[0082] Table 3×3SR tasks
[0083]
[0084] Table 4×4SR tasks
[0085]
[0086] In the table, the best indicators are marked in bold, and the suboptimal indicators are marked in underline. It can be seen that the proposed ELSR achieves better performance than other state-of-the-art methods in terms of PSNR and SSIM. Compared with SwinIR on Urban100 (×4) and Manga109 (×4), the PSNR gain of ELSR is 0.49dB and 0.42dB respectively, and the same is true for ×2 and ×3 reconstruction. This shows that ELSR can effectively maintain the ability to model global context information while enhancing local information interaction, providing more detailed information for SR reconstruction. Therefore, the proposed ELSR has strong global reasoning and detail preservation capabilities.
[0087] See also Figure 7 FIG. 1 is a system structure diagram of an embodiment of the present invention, including:
[0088] Network construction module 701, constructing an image super-resolution network based on local enhancement Transformer
[0089] The network application module 702 inputs a low-resolution image, and the image super-resolution network reconstructs a corresponding high-resolution image based on the low-resolution image.
[0090] The present invention utilizes the local enhancement Transformer to extract rich global and local features, so that the network can take into account both the global and local details of the image. Compared with the existing image super-resolution methods, the method proposed in the present invention achieves better results in both subjective visual effects and objective evaluation indicators while using fewer parameters and calculations.
[0091] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An image super-resolution method based on local enhancement Transformer, characterized in that: The following steps are involved: Construct an image super-resolution network based on local enhancement Transformer; Input a low-resolution image, and the image super-resolution network reconstructs the corresponding high-resolution image based on the low-resolution image; The image super-resolution network includes a shallow feature extraction module, a deep feature extraction module and an image reconstruction module connected in sequence. The low-resolution image input to the image super-resolution network is input to the shallow feature extraction module, the output of the shallow feature extraction module is the input of the deep feature extraction module, the output of the deep feature extraction module is the input of the image reconstruction module, and the output of the image reconstruction module is the corresponding high-resolution image; wherein the shallow feature extraction module uses a convolution layer to extract shallow features, the deep feature extraction module uses a plurality of local enhanced self-attention units to extract deep features, each local enhanced self-attention unit includes a plurality of Transformer layers and a 3×3 convolution, and the image reconstruction module uses convolution to achieve reconstruction; Multiple local enhanced self-attention units in the deep feature extraction module are connected in sequence, and the Transformer layer of the local enhanced self-attention unit adopts Swin-Transformer or a local enhanced layer, and the local enhanced layer is an improved Swin-Transformer; The local enhancement layer includes neighborhood attention, Ghost head and convolutional feedforward network; For the kth local enhanced self-attention unit, when k=1, its input is the output of the shallow feature extraction module, and when k>1, its input is the output of the k-1th local enhanced self-attention unit; the output of the kth local enhanced self-attention block is expressed as: F k =H ELTB (F k-1 ),k=1,2,...,K; Among them, F k-1 represents the input of the kth local enhanced self-attention unit, F k represents the output of the kth local enhanced self-attention unit, K represents the number of local enhanced self-attention units; H ELTBk (·) represents the kth local enhanced self-attention unit, which consists of M Swin-Transformer layers, L local enhanced layers and 3×3 convolutions. The specific operation of the local enhanced self-attention unit is expressed as: F k =H Conv (F k,m )+F k-1 ; Among them, F k,m H represents the output of the mth Transformer layer in the kth local enhanced self-attention unit, where the Transformer layer is a Swin-Transformer layer or a local enhanced layer; Conv (·) represents a 3×3 convolutional layer, represents the mth Swin-Transformer; represents the lth local enhancement layer, and the specific operation of the local enhancement layer is expressed as: Among them, E i is the output value of the i-th pixel after the local enhancement layer, Θ represents the j-th pixel in the neighborhood i; G(·) represents the Ghost head mapping; N j-i represents the output feature of the i-th pixel after neighborhood attention, v j represents the value vector of the jth pixel; The specific operation of the neighborhood attention is expressed as: Where ⊙ refers to the Hadamard product, i represents the i-th pixel, and j represents the j-th pixel in the neighborhood; The Ghost header mapping G(·) is expressed as: in, and Respectively represent the input and output of the Ghost header, c′ represents The channel, c represents The relationship between c and c' is c' = c%n h , n h Indicates the number of Ghost headers; ji indicates relative offset, and % is a modulo operation; and are the values in O and S corresponding to the cth channel of the relative offset ji, and are two static matrices, n c represents the number of channels c, ks1 represents the height, ks2 represents the width; Pow(·) is the power operation; λ,γ are hyperparameters.
2. The image super-resolution method based on local enhanced Transformer according to claim 1, characterized in that: The shallow feature extraction module is a 3×3 convolution that transforms the low-resolution image Convert to shallow features Among them, H, W and C represent the height, width and number of feature channels of the low-resolution image features, respectively.
3. The image super-resolution method based on local enhanced Transformer according to claim 1, characterized in that: The convolutional feed-forward network is a feed-forward network with a local depthwise convolution branch added between two linear layers.
4. The image super-resolution method based on local enhanced Transformer according to claim 1, characterized in that: The image super-resolution network reconstructs a corresponding high-resolution image based on a low-resolution image. Specifically, a low-resolution image of dimensions H×W×C is input into the image super-resolution network, and the output is a high-resolution image of dimensions (H×scale)×(W×scale)×C, where scale is the magnification, and H, W, and C represent the height, width, and number of feature channels of the low-resolution image features, respectively.
5. An image super-resolution system based on local enhancement Transformer, characterized in that: include: Network construction module, building an image super-resolution network based on local enhancement Transformer; The network application module inputs a low-resolution image, and the image super-resolution network reconstructs the corresponding high-resolution image based on the low-resolution image; The image super-resolution network includes a shallow feature extraction module, a deep feature extraction module and an image reconstruction module connected in sequence. The low-resolution image input to the image super-resolution network is input to the shallow feature extraction module, the output of the shallow feature extraction module is the input of the deep feature extraction module, the output of the deep feature extraction module is the input of the image reconstruction module, and the output of the image reconstruction module is the corresponding high-resolution image; wherein the shallow feature extraction module uses a convolution layer to extract shallow features, the deep feature extraction module uses a plurality of local enhanced self-attention units to extract deep features, each local enhanced self-attention unit includes a plurality of Transformer layers and a 3×3 convolution, and the image reconstruction module uses convolution to achieve reconstruction; Multiple local enhanced self-attention units in the deep feature extraction module are connected in sequence, and the Transformer layer of the local enhanced self-attention unit adopts Swin-Transformer or a local enhanced layer, and the local enhanced layer is an improved Swin-Transformer; The local enhancement layer includes neighborhood attention, Ghost head and convolutional feedforward network; For the kth local enhanced self-attention unit, when k=1, its input is the output of the shallow feature extraction module, and when k>1, its input is the output of the k-1th local enhanced self-attention unit; the output of the kth local enhanced self-attention block is expressed as: F k =H ELTB (F k-1 ),k=1,2,...,K; Among them, F k-1 represents the input of the kth local enhanced self-attention unit, F k represents the output of the kth local enhanced self-attention unit, K represents the number of local enhanced self-attention units; H ELTBk (·) represents the kth local enhanced self-attention unit, which consists of M Swin-Transformer layers, L local enhanced layers and 3×3 convolutions. The specific operation of the local enhanced self-attention unit is expressed as: F k =H Conv (F k,m )+F k-1 ; Among them, F k,m H represents the output of the mth Transformer layer in the kth local enhanced self-attention unit, where the Transformer layer is a Swin-Transformer layer or a local enhanced layer; Conv (·) represents a 3×3 convolutional layer, represents the mth Swin-Transformer; represents the lth local enhancement layer, and the specific operation of the local enhancement layer is expressed as: Among them, E i is the output value of the i-th pixel after the local enhancement layer, Θ represents the j-th pixel in the neighborhood i; G(·) represents the Ghost head mapping; N j-i represents the output feature of the i-th pixel after neighborhood attention, v j represents the value vector of the jth pixel; The specific operation of the neighborhood attention is expressed as: Where ⊙ refers to the Hadamard product, i represents the i-th pixel, and j represents the j-th pixel in the neighborhood; The Ghost header mapping G(·) is expressed as: in, and Respectively represent the input and output of the Ghost header, c′ represents The channel, c represents The relationship between c and c' is c' = c%n h , n h Indicates the number of Ghost headers; ji indicates relative offset, and % is a modulo operation; and are the values in O and S corresponding to the cth channel of the relative offset ji, and are two static matrices, n c represents the number of channels c, ks1 represents the height, ks2 represents the width; Pow(·) is the power operation; λ,γ are hyperparameters.
