XPixelGroup / HAT

CVPR2023 - Activating More Pixels in Image Super-Resolution Transformer Arxiv - HAT: Hybrid Attention Transformer for Image Restoration
Apache License 2.0
1.14k stars 134 forks source link

Inquiry on HAT Application for Same-Size Super Resolution #122

Open BitCalSaul opened 6 months ago

BitCalSaul commented 6 months ago

Hello HAT team,

Firstly, I would like to extend my gratitude for the insightful work you have done with the HAT model. It's truly inspiring to see such advancements in the field.

As someone who is new to super resolution, I have a question regarding the application of the HAT model to scenarios where the low-resolution and high-resolution figures are of the same size. I noticed in your paper, specifically in Figures 2, 6, and 7, instances that suggest this application, but I didn't find a corresponding pre-trained model in the released list. The models available seem to focus on scaling factors of x2, x3, and x4.

Could you please provide some clarification on whether the HAT model is capable of enhancing images where the low-resolution input and the high-resolution output are of equal dimensions? Any guidance on this matter would be greatly appreciated.

Thank you for your time and assistance.

BitCalSaul commented 6 months ago

In my search for answers, I came across this issue (https://github.com/XPixelGroup/HAT/issues/2), which seems to discuss related topics.

From what I have gathered, the current applications of HAT seem to be tailored towards upscaling high-quality images for super-resolution. However, my interest lies specifically in the scenario where the input and output images are of the same dimension but differ in quality.

Could you confirm if my understanding is correct, and whether the HAT model is designed exclusively for upscaling high-quality images? Or does it also cater to scenarios like mine where the objective is to restore the high-resolution details of a same-sized low-resolution image?

I would appreciate any further information you could provide on this matter.

chxy95 commented 6 months ago

@BitCalSaul We have not offer an image restoration model that caters to invariant resolution. This necessitates a retraining of the model and minor adjustments to the network structure. A convenient and feasible testing approach currently is to use the Real-HAT model for super-resolution magnification, followed by down-scaling to the original size. Alternatively, the image can be downsampled by a factor of 4, after which the Real-HAT super-resolution model for 4x magnification can be applied.

BitCalSaul commented 6 months ago

Hello @chxy95, I appreciate your feedback. I explored potential minor adjustments and discovered that I could modify the "upscale" value to 1 in the network structure like Fig 1. Additionally, I want to clarify that I'm not performing super-resolution on a single image but rather on a high-dimensional noisy matrix, which explains the need for invariant resolution. I believe this approach could be effective, but please correct me if I'm mistaken. Furthermore, my matrix has dimensions of (512, 512), and I noticed that setting a smaller value for "gt_size" shown in Fig 2, for that the DataLoader can help clip the "figure." I welcome any further insights you may have!

image image
Nan1107 commented 6 months ago

hello,May I ask how you achieve Same-Size Super Resolution? Can you provide a detailed introduction

jgoueslard commented 4 months ago

Hello @BitCalSaul, any news ? When I try to change the upscale parameter, it won't load the trained HAT_GAN_Real_Sharper model... Did you find a solution to this issue ? Have a good one 😃