Residual aggregation lightweight image super-resolution method based on wavelet loss

Through the design of the global residual aggregation module and the composite loss function, the problems of insufficient parameters and computational complexity in the lightweight image super-resolution model are solved, efficient image reconstruction and detail restoration are achieved, and the performance and robustness of the model are improved.

CN120599283APending Publication Date: 2025-09-05CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510708377.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing lightweight image super-resolution models have room for improvement in terms of parameter and computational complexity, and lack multi-scale feature modeling and unified and efficient attention fusion strategies, resulting in limited performance in recovering complex image structures.

Method used

An efficient and lightweight image super-resolution model is designed by adopting the residual aggregation method based on wavelet loss. Through the global residual aggregation module and the composite loss function, shallow and deep feature extraction modules are combined. The global residual aggregation module and the non-local sparse attention block are used for feature aggregation, and the composite loss function of wavelet loss and L1 loss is introduced for training.

Benefits of technology

The performance and efficiency of the model are improved, the number of parameters and the amount of calculation are reduced, while the ability to restore image details is enhanced, the generation of artifacts is reduced, and efficient image reconstruction is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599283A_ABST
    Figure CN120599283A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to a wavelet loss-based residual aggregation lightweight image super-resolution method, which comprises the following steps of: acquiring an HR-LR image pair from a data set, pre-processing the image, establishing a WRA model, training the WRA model by using the pre-processed image based on a composite loss function, and obtaining a residual aggregation lightweight image super-resolution result. And reconstructing the image based on the trained WRA model to obtain a super-resolution image. According to the method, a global residual aggregation module is designed by introducing a novel grouping residual mode and a non-local sparse attention block, so that the quantity of parameters is reduced while the quantitative performance is improved. In addition, wavelet loss and L1 loss are introduced to form a composite loss function to train the model, so that convergence is accelerated, and the robustness of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of images, and in particular to a residual aggregation lightweight image super-resolution method based on wavelet loss. Background Art

[0002] Image super-resolution is a crucial task in computer vision. Its goal is to produce a clearer image by processing low-resolution images. Key factors contributing to low-resolution images include the physical limitations of the imaging device, compression losses during transmission, and complex imaging environments. Primarily due to constraints such as cost, power consumption, and size, many devices (such as drones and mobile terminals) utilize low-resolution sensors. These sensors capture limited spatial information in a single exposure, resulting in insufficient resolution in the original image from the acquisition stage.

[0003] With the rapid development of deep learning technology, single image super-resolution methods have undergone a transformation from traditional convolutional neural network (CNN)-based methods to transformer-based methods. In 2015, Dong et al. proposed a convolutional neural network-based SRCNN method that significantly improved the performance of super-resolution (SR) tasks. It was the first end-to-end method to apply deep learning to super-resolution (see Dong C, Loy CC, He K, et al. Image super-resolution using deep convolutional networks [J]. IEEE transactions on pattern analysis and machine intelligence, 2015, 38 (2): 295-307.). Since then, CNN-based super-resolution methods have gradually replaced the early traditional interpolation methods. In recent years, with the development of the Transformer model, the super-resolution (SR) framework based on visual Transformer (ViT) has gradually emerged and has shown significant performance improvements in super-resolution tasks. Compared with the previously dominant convolutional neural network (CNN), the Transformer-based model can better capture long-range dependencies and further improve the quality of image reconstruction. Despite significant progress in single-image super-resolution methods based on deep learning, most research has focused on improving large-scale models, which typically require significant computational resources and storage space. However, these resources are limited in practical applications and can significantly reduce network efficiency. The EDSR model significantly improves super-resolution performance by removing batch normalization layers and increasing network depth. However, this performance improvement comes at the expense of higher computational and storage costs. EDSR has approximately 43M parameters and requires high GPU resources during training and inference, limiting its practical application in resource-constrained devices such as mobile terminals and embedded systems (see Lim B, Son S, Kim H, et al. Enhanced deep residual networks for single image super-resolution [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition workshops. 2017: 136-144.).Therefore, while ensuring network efficiency, how to efficiently, quickly, and accurately extract low-frequency information such as image color and edges, and high-frequency information such as texture and structure, remains a key research direction in the field of image reconstruction. However, the research on lightweight models (typically with less than 1M parameters) for this task still faces many challenges.

[0004] There is still much room for improvement in the number of parameters and computational complexity of existing lightweight models. Whether based on CNN or Transformer, there is a way to improve performance by increasing the number of network layers and feature dimensions, but this approach is obviously not suitable for lightweight super-resolution models. Bian et al. studied the Transformer model and pointed out that the widely used multi-layer multi-head self-attention mechanism has significant redundancy. A large number of attention heads produce highly similar attention distributions during pre-training and fine-tuning, and this redundancy is independent of the specific task and stage (see Bian Y, Huang J, Cai X, et al. On attention redundancy: A comprehensive study [C] / / Proceedings of the 2021 conference of the north american chapter of the association for computational linguistics: human language technologies. 2021: 930-945.). In addition, lightweight models still face problems in structural design, such as a single attention mechanism, a single scale processing, and a single network structure. In the AIM 2020 challenge, Zhang et al. summarized and evaluated various lightweight image super-resolution methods, primarily employing strategies such as feature distillation, channel compression, global feature aggregation, simplified upsampling structures, and the insertion of attention modules. These methods significantly reduced the number of parameters, FLOPs, runtime, and memory consumption while maintaining the image quality of MSRResNet. However, most of these methods still rely on hand-crafted network structures, with attention mechanisms often in a single channel or spatial form. These methods lack multi-scale feature modeling and a unified and efficient attention fusion strategy, limiting their performance in recovering complex image structures (see Zhang K, Danelljan M, Li Y, et al. AIM 2020 challenge on efficient super-resolution: Methods and results [C] / / Computer Vision - ECCV 2020 Workshops: Glasgow, UK, August 23-28, 2020, Proceedings, Part III 16. Springer International Publishing, 2020: 5-40). In order to better capture the rich high-frequency features in images, researchers have also begun to explore the application of frequency domain processing methods in super-resolution. Summary of the Invention

[0005] To address the problems of single-dimensional self-attention modeling in most current models and the same feature aggregation strategy with limited effective receptive field, this paper provides a lightweight image super-resolution method based on residual aggregation of wavelet loss, which mainly includes:

[0006] S1: Obtain HR-LR image pairs from the dataset and preprocess the images;

[0007] S2: Establish a WRA model, which includes:

[0008] The shallow feature extraction module, composed of a shallow convolutional network, is used to extract preliminary feature information from the input image, providing a basis for deep feature learning;

[0009] Deep feature extraction module, including the global residual aggregation module RAB, is used to enhance the expressiveness and reconstruction quality of features and capture the complex structure and high-level semantic information in the image;

[0010] The image reconstruction module consists of a shallow convolutional network and upsampling, which is used to restore the extracted deep features to an image with the same size, semantics, and distribution as the input image;

[0011] S3: Based on the composite loss function, the preprocessed image is used to train the WRA model. The image can be reconstructed based on the trained WRA model to obtain a super-resolution image.

[0012] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.

[0013] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above method.

[0014] A computer program product includes a computer program or instructions, which implement the steps of the above method when the program or instructions are executed by a processor.

[0015] The beneficial effects of the technical solution provided by the present invention are as follows: the present invention introduces a novel grouped residual method and non-local sparse attention block to design a highly efficient global interaction module - global residual aggregation module (RAB), which is used to achieve progressive receptive field feature aggregation with low computational complexity, so as to improve quantitative performance while reducing the number of parameters. RAB mainly consists of three parts: local aggregation block, mid-scale residual grouped aggregation block (MRGAB) and non-local sparse aggregation block (NLSAB). Among them, MRGAB decomposes the global spatial information of the feature map into local windows through block operation, thereby realizing feature interaction within the mid-scale range. Finally, the channel attention mechanism within the local window optimizes the inter-channel dependency in the feature map, further enhancing the feature interaction between channels. In the global residual aggregation module, the new linear grouping of QKV is introduced. Its core idea is to introduce grouping processing and residual connection into the self-attention mechanism, while reducing the number of parameters and computational complexity, maintaining the effectiveness of feature modeling. This mechanism is applied to the self-attention mechanism and cooperated with the global residual aggregation module to extract image features from shallow to deep and from local to global, which not only improves the performance of the model, but also reduces the number of parameters and computational complexity of the model. In addition, by introducing a composite loss function composed of wavelet loss and L1 loss, it is applied to the super-resolution network model composed of CNN and Transformer to train the model. Although wavelet transform has been used for super-resolution tasks, it is still a new attempt to introduce it into the Transformer model and other composite models. Many lightweight super-resolution networks only use a single loss function for training (such as L1 loss). However, it is often limited in effect when restoring high-frequency details, and this strategy is prone to artifacts or hallucinations. The composite loss function proposed in the present invention solves these problems, accelerates convergence and improves the robustness of the model, and enhances the model's ability to distinguish between real image details and artifacts. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0017] Figure 1 Flowchart of a lightweight image super-resolution method based on residual aggregation of wavelet loss in an embodiment of the present invention;

[0018] Figure 2 1 is an overall framework diagram of a lightweight image super-resolution method based on residual aggregation of wavelet loss in an embodiment of the present invention;

[0019] Figure 3 This is a flowchart of image preprocessing implementation in an embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of a wavelet domain loss structure in an embodiment of the present invention;

[0021] Figure 5 It is an implementation flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions, and advantages of the present invention more clear, the following will provide a clear and complete description of the technical solutions of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are only some of the embodiments of the present invention, not all of them. The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0023] Example 1

[0024] Please refer to Figure 1 , Figure 1 This is a flowchart of a lightweight image super-resolution method based on residual aggregation of wavelet loss in an embodiment of the present invention, which specifically includes:

[0025] S1: Obtain HR-LR image pairs from the dataset and preprocess the images;

[0026] S2: Establish a WRA model, which includes:

[0027] The shallow feature extraction module, composed of a shallow convolutional network, is used to extract preliminary feature information from the input image, providing a basis for deep feature learning;

[0028] Deep feature extraction module, including the global residual aggregation module RAB, is used to enhance the expressiveness and reconstruction quality of features and capture the complex structure and high-level semantic information in the image;

[0029] The image reconstruction module consists of a shallow convolutional network and upsampling, which is used to restore the extracted deep features to an image with the same size, semantics, and distribution as the input image;

[0030] S3: Based on the composite loss function, the preprocessed image is used to train the WRA model. The image can be reconstructed based on the trained WRA model to obtain a super-resolution image.

[0031] The overall framework of the residual aggregation lightweight image super-resolution method (WRA) based on wavelet loss proposed in this paper is as follows: Figure 2 The details are as follows:

[0032] (1) Image preprocessing:

[0033] The image preprocessing implementation block diagram of the present invention is as follows Figure 3As shown, first, based on the standard directory structure of the user-provided dataset, the program automatically infers the corresponding LR image path for a given HR image path. This path inference supports flexible configuration of various types and scaling factors, such as bicubic downsampling. Next, the system reads the HR-LR image pairs from the corresponding path in real time, performs a BGR to RGB color space conversion, and resizes the image dimensions to the standard PyTorch format (C×H×W). The HR-LR image pairs can come from any super-resolved dataset. Based on this, parameter settings are used to implement oversampling, generating an access sequence consisting of N×64 random indices, where N is the number of real image samples in the original data. This measure improves the model's ability to explore the data distribution without increasing actual storage capacity, effectively mitigating the risk of overfitting in small training sets. Subsequently, simultaneous geometric transformations are performed on the HR-LR image pairs, including alignment and cropping to 64×64, horizontal or vertical flipping with a 50% probability, and multi-angle rotation. Subsequently, the image pixel values ​​are linearly transformed from the original range [0, 255] to the range [-1, 1]. This measure makes the input data distribution close to zero mean, which helps accelerate the convergence process of neural network training. Subsequently, the data is asynchronously transferred to the GPU memory. Finally, the data is input into the model, and the next batch of data is preloaded simultaneously, reducing the waiting time for data loading.

[0034] (2) Framework design of the WRA model:

[0035] The WRA model includes three modules: shallow feature extraction, deep feature extraction, and image reconstruction. The baseline WRA framework adopts a sequential structure.

[0036] The shallow feature extraction module is a shallow convolutional network that extracts preliminary feature information from the input image, providing a basis for subsequent deep feature learning.

[0037] The deep feature extraction module is primarily composed of a global residual aggregation block (RAB). This block enhances feature representation and reconstruction quality, capturing complex structures and high-level semantic information in the image. This design not only reduces the number of parameters and computational complexity, but also improves model performance.

[0038] The image reconstruction module consists of a shallow convolutional network and upsampling, whose purpose is to restore the extracted deep features to an image with the same size, semantics, and distribution as the input image.

[0039] Among them, the global residual aggregation block (RAB) consists of three parts: local aggregation block (LAB), meso-scale residual grouping aggregation block (MRGAB), and non-local sparse aggregation block (NLSAB).

[0040] The Local Aggregation Block (LAB) is an efficient, small convolutional architecture consisting of point-by-point convolution, depth-wise convolution, GELU aggregation, and channel-wise attention (SE). The LAB module aims to reduce computational complexity through depth-wise separable convolutions, while combining SE to improve the performance and efficiency of convolutional neural networks. It also aggregates local contextual information and enhances network trainability.

[0041] The mesoscale residual grouped aggregation block (MRGAB) consists of the residual grouped self-attention mechanism (RGSA) and the meso-channel attention mechanism, aiming to achieve mesoscale feature aggregation. The feature interaction principle is as follows: Figure 2 As shown in Figure 2, RGSA introduces a new linear residual grouping method (Grouped residuals linear, GRL) to significantly reduce the redundant calculations in the self-attention mechanism. Its structure is as follows: Figure 2 As shown in Figure 2, GRL is an alternative to linear transformations of queries, keys, and values. Its core idea is to introduce grouping and residual connections into the self-attention mechanism, which reduces the number of parameters and computations while maintaining the effectiveness of feature modeling.

[0042] Local aggregation in LAB refers to aggregating local information within a pixel neighborhood, while mesoscale aggregation in MRGAB refers to aggregating block-level information. The so-called mesoscale refers to the windowed attention between local attention and global attention, with a window value of 8 here.

[0043] The core module of the Non-local Sparse Aggregation Block (NLSAB) is non-local sparse attention, which aims to achieve global feature aggregation and establish long-distance dependencies. Non-local sparse attention mainly consists of two branches: hash bucket branch and attention calculation branch. Its structure is as follows Figure 2 shown.

[0044] (3) Loss function design:

[0045] The loss structure in the wavelet domain is as follows Figure 4As shown in the figure, the present invention introduces wavelet domain loss and combines it with the L1 loss function to form a composite loss function, thereby enhancing the model's ability to distinguish between real image details and artifacts. This loss function achieves a flexible balance between fidelity and perceptual quality of the generated super-resolution image by weighting the contribution of each subband. Specifically, the wavelet domain L1 fidelity loss of the generated image x and the HR image y is summed and averaged over a mini-batch, expressed as:

[0046] L SWT =E[∑ j λ j ||SWT(G(x)) j -SWT(y) j ||1] (1)

[0047] Where E[·] represents the total loss in the wavelet domain, G(·) represents the proposed SR model, and λ j Refers to the scaling factor used to control the generated high-frequency details, that is, the high-frequency details in the generated image are controlled by appropriate weights. The high-frequency details refer to the details such as image edges and textures. SWT(·) represents the frequency subband of the target image. The λ value of each subband can be determined by experience. In this embodiment, it is set to: λ ll =0.05,λ lh =λ hl =0.025,λ hh =0.02.

[0048] The total loss of training is:

[0049] L G =L RGB +L SWT (2)

[0050] Among them, L RGB represents the L1 fidelity loss calculated on the RGB domain, measuring the pixel-level error in the image space. SWT represents the loss in the wavelet domain.

[0051] In this example, the DIV2K dataset was selected as the training set, and the Set5, Set14, B100, Urban, and Manga109 datasets were used as validation sets. The DIV2K dataset contains 800 training images and 100 test images. The experimental results were evaluated using two objective criteria: peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM), both of which are calculated on the Y channel of the YCbCr space. This example provides a lightweight image super-resolution method based on residual aggregation of wavelet loss. For a specific flowchart, see Figure 5 , including the following steps:

[0052] 1. Get DIV2K dataset images

[0053] 2. Model input image preprocessing;

[0054] 3. Input image size adaptation and recording;

[0055] 4. Shallow feature extraction;

[0056] 5. Deep feature extraction;

[0057] 6. Skip connection: This refers to a network design structure that adds the output of the shallow feature extraction module to the output of the deep feature extraction module through a skip connection. This is described in step 5 below.

[0058] 7. Image reconstruction;

[0059] 8. Output the reconstructed image;

[0060] The details of each step are as follows:

[0061] Step 1: Preprocessing of model input images. First, the system automatically derives the paths of high- and low-resolution image pairs based on the directory structure. Then, by constructing a repeated sampling index, it achieves efficient reuse of limited image samples and improves data utilization in the training phase. Then, spatial enhancement operations such as cropping, flipping, and rotation are simultaneously applied to the high- and low-resolution image pairs to ensure geometric consistency while enhancing the structural robustness of the model. Pixel normalization is then performed to linearly map the image values ​​to the [-1,1] interval to accelerate network convergence. Finally, with the help of an asynchronous data prefetching mechanism, the image batches are loaded into the GPU memory in advance, and then the data is input into the model, and the next batch of data is preloaded at the same time.

[0062] Step 2: Input image size adaptation and recording. First, obtain the width and height of the input image. This allows for recording the original image size during subsequent processing, facilitating restoration to the correct size at network output. Next, pad the input image's height and width to integer multiples of window_size: 8. This ensures that the subsequent window attention mechanism will not fail due to input sizes that do not divide the window size. Finally, use the padded image as input for shallow feature extraction.

[0063] Step 3: The shallow feature extraction module extracts features from the input image tensor. This module has a very simple structure, with its core implemented as a 3×3 two-dimensional convolutional layer. Its primary function is to extract low-level features from the input image, providing a basic feature representation for the subsequent deep feature extraction module. Through convolution, this module maps the input image's channels into a higher-dimensional feature space, thereby enhancing the network's expressive power.

[0064] Step 4: The deep feature extraction module further processes the output from the shallow feature extraction module.

[0065] The specific ideas are:

[0066] (1) The input of this module is first processed by the local aggregation block (LAB). For a given input image (C in Represents the input channel), LAB can extract its local features and map the image from the spatial domain to a high-dimensional feature space. The calculation formula is:

[0067] X SF =H SF (I LR ) (3)

[0068] where X SF represents the extracted local features, H SF Indicates LAB module, I LR Represents the module input.

[0069] (2) The output X of the LAB module SF , as the input of the mid-scale residual group aggregation block (MRGSB). In the MRGSB module, the input feature X is firstly transformed into SF Divide into non-overlapping blocks of size P×P, and convert the feature map spatial dimensions (H, W) into Through this blocking operation, the global spatial information of the feature map is decomposed into local windows.

[0070] Then, residual grouping self-attention is implemented in the local window. Linear residual grouping (GRL) first divides the input features into two independent subgroups along the channel dimension, and each subgroup is processed by a dedicated linear residual transformation branch. Given an input tensor x∈R B×N×D (where B is the batch size, N is the sequence length, and D is the feature dimension), GRL first splits x1,x2∈R B×N×D / 2 . Then, each subgroup generates local features through independent linear transformation and performs residual connection with the original input subgroup. Finally, the outputs of the two subgroups are spliced ​​along the channel dimension to obtain the complete query Q, key K and value V. The process can be expressed as:

[0071]

[0072] Among them, x i is the i-th (i∈{1,2}) subgroup of the input tensor, with dimension R B×N×D / 2 . The linear transformation matrices of Q, K and V of the i-th subgroup are respectively, with dimension R B×N×D / 2. are Q, K and V of the i-th subgroup after residual connection.

[0073] Finally, the dimensions of each small block are stacked back to the spatial dimension to form a new feature map And through the channel attention mechanism, it is used as the output of the MRGSB module.

[0074] (3) The output of the MRGSB module is used as the input of the non-local sparse aggregation block (NLSAB), and bucket clustering is performed through the local sensitive hashing feature map to generate sparse hash codes, and the local non-local attention score is calculated within each hash bucket. Subsequently, the corresponding feature values ​​are weighted and aggregated according to the attention weights, and the final output is the fusion of multiple rounds of sparse attention results. Specifically as follows: First, the module input is similarity calculated to obtain the intermediate feature code z, which serves as the basis for the query vector and hash code in the attention mechanism. Subsequently, z is projected onto the unit hypersphere using random projection and normalized, which can be expressed as:

[0075]

[0076] in (L=H×W) is the normalized vector. Then, through a random rotation matrix A∈R c ×k Perform random rotation on the normalized vector to get z ' The rotated vector z ' It will be assigned to k hash buckets. For each position i∈{1,....,L}, the index of the maximum value is selected as the hash code, so that similar vectors (i.e. vectors with similar directions) are more likely to be assigned to the same hash bucket after rotation. The hash code is expressed as:

[0077] h(z)=argmax(z′) (8)

[0078] where h(z) is the hash code. In this way, similar vectors have a higher probability of being assigned to the same hash bucket after random projection, thereby sorting the feature vectors by hash code.

[0079] After bucketing, for each query vector, the attention weight between it and the feature vector in the bucket is calculated. This branch performs weighted calculations on the features within the bucket and aggregates the corresponding feature values ​​according to the attention weights to output a weighted result. This output is then passed through global channel attention to obtain the output of the module.

[0080] Step 5: Perform a residual connection between the local detail information output by the shallow feature extraction module and the global representation output by the deep feature extraction module.

[0081] Step 6: Obtain the output of the model through the image reconstruction module.

[0082] The present invention adopts peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) as evaluation indicators. In this example, 12 methods are selected for comparison with the proposed method, namely EDSR-baseline (see paper: Enhanced Deep Residual Networks for Single Image Super-Resolution), LatticeNet (see paper: LatticeNet: Towards Lightweight Image Super-resolution with Lattice Block), ShuffleMixer (see paper: ShuffleMixer: An Efficient ConvNet for Image Super-Resolution), ESRT (see paper: Transformer for Single Image Super-Resolution), MFCC (see paper: Multi-FusNet of Cross Channel Network for Image Super-Resolution), AFAN (see paper: Image Super-Resolution via Lightweight Attention-Directed Feature Aggregation Network), FDSCSR (see paper: Lightweight Feature De-redundancy and Self-calibration Network for Efficient Image Super-resolution), SPAN (see paper: Swift Parameter-free Attention Network for Efficient Super-Resolution), and PCRN (see paper: Partial convolutional reparameterization network for lightweight image super resolution), EFRDN (see paper: An efficient feature reuse distillation network for lightweight image super-resolution), and the method proposed by MWDIN et al. (see paper: Efficient image super resolution via Mixed WindowThe test results of the lightweight methods (Residual Trio Feature Network for Efficient Super-Resolution and Dimension Interaction) on the Set5, Set14, B100, Urban, and Manga109 datasets are shown in Table 1. Ours represents the method of our invention. The comprehensive performance and model complexity comparison of different lightweight methods on the five benchmark test sets are shown in Table 1:

[0083] Table 1 Quantitative comparison results

[0084]

[0085] Experimental results show that the WRA method proposed in this invention shows significant advantages in tasks with magnification factors of 2×, 3× and 4×, and its PSNR and SSIM indicators are comparable to or even better than the current optimal model performance in most test scenarios. In the 4× task, for five benchmark data sets, the method proposed in this invention achieved the best PSNR performance while showing superior visual effects. In the 4x super-resolution task, compared with the baseline model, the number of parameters of this method was reduced by 14.3% and the computational complexity was reduced by 15.4%. The overall performance of WRA is better than that of the advanced lightweight SR model, especially on the Manga109 data set, where its PSNR indicator achieved a gain of 0.22dB and SSIM was also improved by 0.0015.

[0086] Example 2

[0087] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.

[0088] Example 3

[0089] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above method.

[0090] Example 4

[0091] A computer program product includes a computer program or instructions, which implement the steps of the above method when the program or instructions are executed by a processor.

[0092] The above description is only a preferred embodiment of the present invention and is 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 scope of protection of the present invention.

Claims

1. A lightweight image super-resolution method based on residual aggregation of wavelet loss, characterized by: include: S1: Obtain HR-LR image pairs from the dataset and preprocess the images; S2: Establish a WRA model, which includes: The shallow feature extraction module, composed of a shallow convolutional network, is used to extract preliminary feature information from the input image, providing a basis for deep feature learning; Deep feature extraction module, including the global residual aggregation module RAB, is used to enhance the expressiveness and reconstruction quality of features and capture the complex structure and high-level semantic information in the image; The image reconstruction module consists of a shallow convolutional network and upsampling, which is used to restore the extracted deep features to an image with the same size, semantics, and distribution as the input image; S3: Based on the composite loss function, the preprocessed image is used to train the WRA model. The image can be reconstructed based on the trained WRA model to obtain a super-resolution image.

2. The method for lightweight image super-resolution based on residual aggregation using wavelet loss according to claim 1, wherein: In S1, preprocessing includes color space conversion from BGR to RGB, adjusting the image dimension to the PyTorch standard format, generating access sequences, aligning and cropping images, horizontal or vertical flipping and multi-angle rotation of images, and linearly transforming the image pixel values ​​from the original range [0, 255] to the interval [-1, 1].

3. The method for lightweight image super-resolution based on residual aggregation using wavelet loss according to claim 1, wherein: In S2, RAB includes: Local Aggregation Block (LAB) is used to reduce computational complexity through depthwise separable convolution to reduce computational effort. It is combined with the channel attention mechanism (SE) to improve the performance and efficiency of convolutional neural networks while aggregating local contextual information to enhance the trainability of the network. The mesoscale residual grouping aggregation block MRGAB, which consists of the residual grouping self-attention mechanism RGSA and the meso-channel attention mechanism, is used to achieve mesoscale feature aggregation; Non-local sparse aggregation block NLSAB is used to achieve global feature aggregation and establish long-distance dependencies.

4. The method for lightweight image super-resolution based on residual aggregation using wavelet loss according to claim 3, wherein: The LAB module is composed of point-by-point convolution, depth-wise convolution, GELU set function and SE. The calculation formula is: X SF =H SF (I LR ) Among them, X SF represents the extracted local features, H SF Indicates LAB module, I LR Represents the input image.

5. The lightweight image super-resolution method based on residual aggregation of wavelet loss according to claim 3, characterized in that: A new linear residual grouping method GRL is introduced in the RGSA of the MRGSB module to significantly reduce the redundant calculations in the self-attention mechanism; the working principle of the MRGSB module is as follows: (1) Input feature X is transformed by pixel rearrangement SF Divide into non-overlapping blocks of size P×P, and convert the feature map spatial dimensions (H, W) into Through this blocking operation, the global spatial information of the feature map is decomposed into local windows; (2) Residual grouping self-attention is implemented in the local window, and the input features are divided into two independent subgroups along the channel dimension. Each subgroup generates local features through independent linear transformation and performs residual connection with the original input subgroup. The outputs of the two subgroups are spliced ​​along the channel dimension to obtain the complete query Q, key K and value V; this process is expressed as: Among them, x i is the i-th subgroup of the input tensor, i∈{1,2}, with dimension R B×N×D / 2 ; The linear transformation matrices of Q, K and V of the i-th subgroup are respectively, with dimension R B×N×D / 2 ; are Q, K and V of the i-th subgroup after residual connection; (3) Stack the dimensions of each small block back to the spatial dimension to form a new feature map And through the channel attention mechanism, it is used as the output of the MRGSB module.

6. The lightweight image super-resolution method based on residual aggregation of wavelet loss according to claim 1, characterized in that: The working process of the NLSAB module is: (1) First, similarity is calculated on x to obtain the intermediate feature code z, which serves as the basis for the query vector and hash code in the attention mechanism; (2) Use random projection to project z onto the unit hypersphere and perform normalization, which is expressed as: in, is the normalized vector, L = H × W; (3) Through a random rotation matrix A∈R c×k Perform random rotation on the normalized vector to get z ' , the rotated vector z ' is assigned to k hash buckets; for each position i∈{1,....,L}, the index of the maximum value is selected as the hash code, so that similar vectors are more likely to be assigned to the same hash bucket after rotation; the hash code is expressed as: h(z)=argmax(z′) Where h(z) is the hash code; In this way, similar vectors have a higher probability of being assigned to the same hash bucket after random projection, thereby sorting the feature vectors by hash code; (4) After completing the bucketing, for each query vector, the attention weight between it and the feature vector in the bucket is calculated; this branch performs weighted calculation on the features in the bucket, and performs weighted aggregation output on the corresponding feature values ​​according to the attention weight; then the output is passed through the global channel attention, and finally the output of the module is obtained.

7. The method for lightweight image super-resolution based on residual aggregation using wavelet loss according to claim 1, wherein: In S3, the composite loss function is composed of wavelet domain loss and L1 loss function. By weighting the contribution of each subband, the generated super-resolution image achieves a balance between fidelity and perceptual quality, enhancing the model's ability to distinguish between real image details and artifacts. The formula of the composite loss function is: L G =L RGB +L SWT Among them, L RGB represents the L1 fidelity loss calculated on the RGB domain, L SWT represents the loss in the wavelet domain, E[·] represents the total loss in the wavelet domain, G(·) represents the proposed SR model, and λ j It refers to the scaling factor used to control the generated high-frequency details, and SWT(·) represents the frequency subband of the target image.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the residual aggregation lightweight image super-resolution method based on wavelet loss according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that A computer program is stored, and when the program is executed by a processor, the steps of the residual aggregation lightweight image super-resolution method based on wavelet loss according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The invention comprises a computer program or an instruction, which, when executed by a processor, implements the steps of the residual aggregation lightweight image super-resolution method based on wavelet loss according to any one of claims 1 to 7.

Citation Information

Cited By

  • Blind compression image super-resolution reconstruction method and system based on artifact perception Transform

    CN121788673A

  • Blind compressed image super-resolution reconstruction method and system based on artifact-aware transformer

    CN121788673B