MGBPv2: Scaling Up Multi-Grid Back-Projection Networks
Pablo Navarrete Michelini Wenbin Chen Hanwen Liu Dan Zhu







empty


[



MGBPv2: Scaling Up Multi-Grid Back-Projection Networks
    Pablo Navarrete Michelini,  Wenbin Chen,  Hanwen Liu,  Dan Zhu

BOE Technology Co., Ltd.

{pnavarre, chenwb, liuhanwen, zhudan}@boe.com.cn

    December 30, 2023
===============================================================================================================================================





    
    < g r a p h i c s >

    figure
Large upscaling factors are needed to convert standard–definition (SD) to ultra–high–definition (UHD) resolutions. In the task of Extreme Super–Resolution (zooming 16×), our proposed MGBPv2 system can achieve a good balance between high fidelity (images close to the original content) and high perceptual quality (images that look real through artificial details).
    
    


]


   Here, we describe our solution[Code available at <https://github.com/pnavarre/mgbpv2>] for the AIM–2019 Extreme Super–Resolution Challenge, where we won the 1^st place in terms of perceptual quality (MOS) similar to the ground truth and achieved the 5^th place in terms of high–fidelity (PSNR). To tackle this challenge, we introduce the second generation of MultiGrid BackProjection networks (MGBPv2) whose major modifications make the system scalable and more general than its predecessor. It combines the scalability of the multigrid algorithm and the performance of iterative backprojections. In its original form, MGBP is limited to a small number of parameters due to a strongly recursive structure. In MGBPv2, we make full use of the multigrid recursion from the beginning of the network; we allow different parameters in every module of the network; we simplify the main modules; and finally, we allow adjustments of the number of network features based on the scale of operation. For inference tasks, we introduce an overlapping patch approach to further allow processing of very large images (e.g. 8K). Our training strategies make use of a multiscale loss, combining distortion and/or perception losses on the output as well as downscaled output images. The final system can balance between high quality and high performance.





§ INTRODUCTION

Image upscaling has been studied for decades and remains an active topic of research because of constant technological advances in digital imaging. One scenario where image upscaling is now more demanding arises in digital display technologies, where new standards like BT.2020 <cit.> are introduced. The resolution of digital displays has experienced a tremendous growth over the past few decades, as shown in Figure <ref>. The transition between different formats leads to a challenging problem. On one hand, large amount of digital content still exist in popular old standards such as standard–definition (SD). On the other hand, the latest display technologies (e.g. 4K, 8K and above) are expected to show this content with reasonable quality. Standard upscaling technologies are clearly insufficient for this purpose. While a 2× upscaler maps 1 input pixel into 4 output pixels, a 16× upscaler maps 1 input pixel into 256 output pixels, which already contain small images. The problem demands advanced solutions that are capable of understanding the image content and filling in these large pieces of images with visually appealing and consistent information. In particular, large upscaling factors are needed to convert SD to ultra high–definition (UHD) resolutions. For example, to upscale from a popular width of 640 pixels (VGA) to 8,192 (8K) we need a factor greater than 12×. And from 640 pixels to 10,240 (10K), which is used by some of the most advanced modern displays <cit.>, we need a 16× factor. Thus, extreme upscaling represents a real problem in current market and it is expected to persist and become even more challenging with the rapid development of new technologies.


The challenge on Extreme Super–Resolution proposed at the 2019 ICCV workshop on Advances in Image Manipulation (AIM–2019) <cit.> was the first of its kind to tackle this problem. That is, the task of increasing the resolution of an input image with a magnification factor 16× based on a set of prior examples of low and corresponding high resolution images. The challenge provided a novel DIVerse up to 8K resolution images dataset (DIV8K) with a large diversity of content. Two targets were proposed:

    
  * Track 1: Fidelity, the aim is to obtain a solution capable to produce high resolution results with the best fidelity (PSNR) to the ground truth.
    
  * Track 2: Perceptual, the aim is to obtain a solution capable to produce high resolution results with the best perceptual quality similar to the ground truth.

These two targets are motivated by the so–called perception–distortion trade–off established by Blau and Michaeli in <cit.>. That is, both targets cannot be achieved at the same time, one must compromise perceptual quality to improve fidelity and vice versa. The trade–off motivated the Perceptual Image Restoration and Manipulation (PIRM) workshop at ECCV–2018 <cit.> that strongly confirmed and gave further insight into this fundamental principle.

In the Extreme–SR competitions, we identified two major challenges: performance scalability, due to the large size of the output images; and content scalability, due to the diverse scale of image content. Our solution was built upon the MultiGrid BackProjection (MGBP) network proposed in <cit.>, combining both the iterative backprojection and multigrid algorithms. First, the iterative backprojection algorithm provides performance. With solid ground in the classical theory of image super–resolution (SR), its deep–learning versions have succeeded in competitions. Examples include DBPN <cit.> (which won the NTIRE–2018 challenge on 8× SR and the Region–2 track of PIRM–SR 2018<cit.>) and MGBP <cit.> (which won the 2^nd place in the Region–3 track, i.e. best perception, of PIRM–SR 2018<cit.>). Second, the multigrid algorithm provides scalability. Here, it is worth noting that multigrid is one of the most popular algorithms in the field of PDE and numerical solvers<cit.>, but its name is often misinterpreted in other fields as merely meaning “multilevel”. Multigrid is one of the few known methods that can solve numerical systems of linear equations with optimal computational complexity (linear in the number of unknowns). The MGBP algorithm does not work as a linear solver, but borrows the multigrid recursion to scale the iterative backprojection algorithm. The recursion unfolds into a convenient structure, in which the computational complexity grows linearly with the image size. This is visible in the diagram of the system (see for example Figure <ref>), where the number of modules is maximum at the lowest resolution and decreases exponentially as the resolution increases.

Despite its convenient properties, the original formulation of MGBP does not scale well for extreme upscaling factors. This is due to two problems: first, the small number of parameters in MGBP limits its performance on image quality compared to large models; second, the recursive structure forces the number of network features to remain constant along scales. Our main contribution is to redesign MGBP to fix these problems. We summarize our contributions as follows:

    
  * We propose to make full use of the multigrid recursion from the beginning of the network.
    
  * We propose to simplify the main modules and allow different parameters for every instance in the network.
    
  * We propose a strategy to merge overlapping patches in inference to further allow processing of very large images.
    
  * We propose training strategies at multiple scales, combining distortion and/or perception losses on the output as well as downscaled output images.





§ SYSTEM ARCHITECTURE




    Multi–Grid Back–Projection version 2 (MGBPv2) 
    
        MGBPv2(X,W,μ,L):     BP^μ_k(u | y_1,…,y_k-1; tag_1,…,tag_k-1): 


        .45!
        .5
            
        
        

           

        .45!
        0.53
            
            
        
    




 Without loss of generality, we tackle the image enhancement problem with an input resolution equal to the output resolution. For the super–resolution task we input the low resolution image upscaled 16× using a bicubic method. This helps to make the system become more general for applications and simplifies the process of generating pairs of input/output patches during training.

We propose the MGBPv2 algorithm shown in Algorithm <ref>. In Figure <ref> we display the diagram of the algorithm unfolded for μ=2 and L=5. The Analysis and Synthesis modules covert an image into features space and vice–versa using single convolutional layers. The Upscaler and Downscaler modules are composed of single strided (transposed and conventional) convolutional layers. An important observation in Algorithm <ref> that makes a significant difference with the original MGBP is the use of a  label to differentiate each Upscaler and Downscaler module. This simple trick makes every Upscaler and Downscaler module different in terms of parameters and hyper–parameters. In particular, we now set the number of features in convolutional layers to 256, 192, 128, 92, 48 and 9 from low to high resolution levels, allowing large images to be processed at high resolutions. The system can be initialized by a dry run of Algorithm <ref> where no computation is performed and modules are defined with their correspondent  labels.

For the Perceptual track we used a single MGBPv2 system configured with filters of 3× 3. For the Fidelity track we used an ensemble solution that sums the outputs of 3 systems with identical configuration except for different filter sizes: 3× 3, 5× 5 and 7× 7.

We concatenate a single noise channel, W·𝒩(0,1), to the bicubic upscaled input. The amplitude of the noise, W∈ℝ, is set to zero in the Fidelity track and its purpose is to help in the adversarial training for the Perceptual track. Following the design of the generative MGBP algorithm in <cit.>, the noise activates and deactivates the generation of artificial details. As opposed to <cit.> we now generate a single noise channel at the highest resolution, that moves along with the input image to enter the network at different scales by using Analysis modules with different strides. In <cit.>, different i.i.d. noise channels are generated at each resolution. This change becomes necessary during inference, where we merge the output of several overlapping patches and therefore we need to use noise images that overlap in the same way as the input image.

For the discriminator in adversarial training we use the system shown in Figure <ref>. Here, we use 4–layer sequential CNNs with 3× 3 filters and stride 1 except for the last layer that uses stride 2 to downscale the features. The system resembles the design of the discriminator in <cit.> with two major differences: first, the system in Figure <ref> is not recursive (all CNNs have different parameters); and second, the system uses a single high–resolution input that is downsized using fixed bicubic downscalers to enter at different levels of the system. We use the same variance normalization and shift correlator (VN+SC) module from <cit.>.




§ TRAINING STRATEGIES


We denote Y_W=0 and Y_W=1 the outputs of the generator architecture using noise amplitudes W=0 and W=1, respectively. Let S_f represent a bicubic downscaler that reduces the resolution by a factor f. We know that the original image was downscaled with S_16. Then, our training strategies in terms of loss functions are defined follows:

Fidelity Track: We use ℒ^L1(x,y)=𝔼[|x-y|] at several resolutions to define the total loss function:

    ℒ(Y, X; θ) =     ℒ^L1(Y_W=0, X)   + 
       ℒ^L1(S_2(Y_W=0), S_2(X))   + 
       ℒ^L1(S_4(Y_W=0), S_4(X))   + 
       ℒ^L1(S_8(Y_W=0), S_8(X))   + 
       ℒ^L1(S_16(Y_W=0), S_16(X))  .

After every epoch we evaluate the current model using ℒ^L2(x,y)=𝔼[(x-y)^2] in the validation metric:

    𝒱(Y; θ) = ℒ^L2(Y_W=0, X)  .

We recorded the best models according to this metric (directly related to PSNR) during the training process and we performed further manual tests on larger images afterwards.



Perceptual Track: We follow the design of multi–scale loss from the generative MGBP in <cit.> with some simplifications to improve training performance. One significant change is in the adversarial loss. We changed the standard GAN used in <cit.> to a Relativistic GAN <cit.> following the recommendation in <cit.>. Our total loss is given by:

    ℒ(Y, X; θ) =      0.001 ·ℒ^RSGAN_G(Y_W=1)   + 
        10 ·ℒ^L1(S_16(Y_W=1), S_16(X))   + 
        0.1 ·ℒ^CX(Y_W=1, X)   + 
        10 ·ℒ^L1(Y_W=0, X)   + 
        10 ·ℒ^L1(S_16(Y_W=0), S_16(X))  .

Here, ℒ^CX is the contextual loss as defined in <cit.> using features from conv3–4 of a VGG–19 network as suggested in <cit.>. Ablation tests in <cit.> have shown the effectiveness of this loss function to improve perceptual quality while maintaining a reasonable level of distortion. Next, the Relativistic GAN loss follows the definition in <cit.>, given by:

    ℒ_D^RSGAN =     -𝔼_(R,F)[ log (sigmoid(C(R)-C(F))) ]  ,
    ℒ_G^RSGAN =     -𝔼_(R,F)[ log (sigmoid(C(F)-C(R))) ]  .

Here, C is the output of the discriminator before the sigmoid function, as shown in Figure <ref>. And R and F are the sets of real and fake inputs to the discriminator, given by:

    F =    { Y_W=1, S_2(Y_W=1), S_4(Y_W=1), S_8(Y_W=1) } ,  
    
        R =    { X, S_2(X), S_4(X), S_8(X) } .

After every epoch we evaluated the current model according to the validation metric based on the NIQE<cit.> index:

    𝒱(Y; θ) = 𝔼[     NIQE(Y_W=1) + NIQE(S_2(Y_W=1))   + 
        NIQE(S_4(Y_W=1)) ]  .

This metric works as a simple rule to help identify models that generate realistic images in the full resolution, as well as two levels of resolutions below. In other words, we want output images to look real as seen in a display device both from close and far away distances. We performed further subjective tests on larger images to select the best models.




§ INFERENCE STRATEGIES


To upscale large images we propose a patch based approach in which we average the output of overlapping patches taken from the bicubic upscaled input. First, we divide input images into overlapping patches (of same size as training patches) as shown in Figure <ref>; second, we multiply each output by a weight decreasing as the distance to the center of a patch increases (we recommend a Hamming window <cit.>); and third, we average the results. In our experiments we used overlapping patches separated by 64 and 128 pixels in vertical and horizontal directions for the Perceptual and Fidelity tracks, respectively. The weighted average helps to avoid blocking artifacts.


Another problem arise in the training process because reading several 8K images to form a minibatch becomes much slower than running the training step on the minibatch. A popular solution is to save image arrays in a binary format that is much faster to decode (e.g. EDSR <cit.>). This solution is not practical here since the amount of space required for the whole dataset exceeds reasonable storage resources. We propose a solution by pre–processing the dataset, creating folders for every image in the training set and saving overlapping patches as image files inside each folder, as shown in Figure <ref>. During training we: first, select images randomly; second, enter the directory and randomly select an image file; third, open the image file and randomly select a patch inside (having similar sizes).





§ EXPERIMENTS

Settings:
We run training tasks on Tesla V100 GPUs and testing on Titan X GPUs.  We used 100 images from the training set for validation during training. We trained using patch size 667× 667 (Fidelity Track) and 767× 767 (Perceptual Track) at high resolution. We trained our systems using a Quasi-hyperbolic Adam optimizer <cit.> with constant learning rate 10^-4, and changed to Lookahead <cit.> combined with RAdam <cit.> in later stages of development. We set the minibatch size to 16 patches. After every epoch we run the validation metrics described above on the center patch of our 100 validation images.

Performance: We report a running time of 47.11 [s] to process a standard 8K image (7689× 4320) on a Titan X (Maxwell) GPU, without using the overlapping patch approach. It takes 1.42 [s] in average to process 1000× 1000 images used in the validation stage. For our submissions we use the system in the slowest mode, which uses overlapping patches with small distances between the center of the patches (64 or 128 pixels). By using this approach it takes 4.16 [s] to process a 1000× 1000 image using 667× 667 overlapping patches with centers separated by 128 pixels (used in the Fidelity track). It takes 2.06 [s] to process a 1000× 1000 image using 767× 767 overlapping patches with centers separated by 64 pixels (used in the Perceptual track). Overall, in both the Fidelity and Perceptual tracks, it takes approximately 16 minutes to generate one 8K output image using the slowest mode. The overlapping patch approach gives marginal improvements in PSNR and also allows the network to run on devices with low memory resources. The settings used for the competition are purposely not practical for applications as they focus exclusively on image quality. Nevertheless, our empirical tests show that by using larger distances between overlapping patches and multiple GPU devices we can output an 8K image in less than 10 seconds without significant loss in quality.




Challenge Results:
The Fidelity track of the Extreme-SR AIM 2019 challenge had 70 participants, with 9 finalists submitting results for the test stage. Our results obtained the 5^th place, with an average PSNR of 26.59 dB in the full output images of the test set. This is, 0.2 dB below the top score winning this track.

The Perceptual track of the Extreme–SR AIM 2019 challenge had 52 participants, with 6 finalists submitting results for the test stage. Our results obtained the 1^st place in terms of a subjective ranking based on mean opinion scores (MOS) to measure perceptual quality. Our results obtained an average PSNR of 25.44 dB in the full output images of the test set. This is, 0.18 dB above the 2^nd place and 1.35 dB below the best PSNR value in the Fidelity track.

Figures <ref> and <ref> show examples of our best results for the Fidelity and Perceptual tracks on images used for validation during our training process. These images show the values of RMSE (measuring fidelity) as well as the Perceptual index proposed in <cit.> to objectively measure perceptual quality. Overall, the results are consistent with the perception/distortion trade–off in <cit.>. For the images  and  we observe that our results for the Perceptual track achieve a Perceptual index better than original images. In image  we attribute this result to a blurred background in the original image, that our system shows more focused and with sharper features. In image  the results seem to reflect a failure of the Perceptual index as the original image clearly displays a face that our output shows with ambiguous characteristics. This shows that our system does not go as far as to fake people's identities, but it seems to correctly identify a person by adding skin and body textures. For images ,  and , the Perceptual indexes are clearly below those of the original image. According to our subjective evaluation, we observe clear differences in the fine level features like: tree leaves and water for image ; hair, eyebrows and eyelashes in ; and textbook spines in . From a far away look these details become less perceptible, indicating that the Perceptual index correlates better with a close distance observer. This is probably caused by the resolution of example images used to adjust the Perceptual index, that are much smaller than 8K.

Figure <ref> shows the effect of continuously adding noise in the input of our model for the Perceptual track. We observe that our model has correctly interpreted the target of our loss function, aiming at high fidelity with zero noise amplitude and high perceptual quality for unit noise amplitude. The trajectory in the perception distortion plot is mostly concave, except for the high perception corner. This trajectory is not meant to be optimal as perception/distortion optimality is far from being represented in the loss function. Our loss function only considers the corner cases of zero and unit noise amplitudes. The transition from high fidelity to high perceptual quality is smoother than similar tests performed with MGBP in <cit.>. The plot for the contextual similarity, as defined in <cit.>, shows the best result in the beginning of the strong transition from high fidelity to high perceptual quality. Before this point it behaves as the perceptual index (improving as noise increases) and after this point it changes to a behavior closer to a fidelity score (worsening as noise increases). Compared to similar experiments performed in <cit.>, the contextual loss here seems to be more focused on preventing low fidelity scores.

Finally, Figure <ref> shows interpretability results obtained by using the Deep Filter Visualization (DFV) method from <cit.>. To perform this complex analysis on a large model such as MGBPv2, with more than 20 million parameters, we use the so–called Linearscope method recently introduced in <cit.>. For a given pixel in the input image (blue circles on the left side), Figure <ref> displays the impulse response for the network model with frozen activations (all ReLU's acting as if the input image did not change). This represents the equivalent to an upscaling filter that adapts to the pixel location. In flat areas (example at the bottom of Figure <ref>) the upscaling filter looks isotropic and similar to a bicubic upscaler. In other locations, the filter strongly follows edges in hair and fingers, with receptive fields that extend for several hundred pixels. Overall, this confirms that the system has learned the geometry of the content.




§ CONCLUSIONS

The second generation of Multi–Grid Back–Projection (MGBPv2) networks improves its predecessor by: making better use of the multigrid recursion; simplifying its modules; and redesigning training and inference strategies to improve scalability. MGBPv2 achieves state–of–the–art performance by winning the Perceptual track of the ICCV AIM Extreme-SR Challenge 2019.

ieee_fullname



