megvii-research / TLC

Test-time Local Converter
Other
225 stars 10 forks source link

About using TLC in super resolution #17

Open CR7forMadrid opened 1 year ago

CR7forMadrid commented 1 year ago

Hello, I had a lot of questions when I applied your work to the super-resolution model, such as Local_Base and so on. If possible, could you give a concrete example to show us how to apply it?

CR7forMadrid commented 1 year ago

The main problem is how to set the base_size If I set the gt_size=192 for 4 times upsampling

achusky commented 1 year ago

Hi, thank you for your interest.

To set the hyper-parameters of TLC, you can choose a base size that is 1x to 2x (default is 1.5x) of the training size (the input size during training). For instance, if you use gt_size=192 for 4x SR, the training input size is 192/4=48. Then you can use train_size=(1, 3, 48, 48) and base_size=(72, 72), which means the base size is 1.5x of the training size. Furthermore, you can adjust this parameter (e.g., 1x, 1.5x, 2x) based on your own validation data.

If you want to apply TLC to your own work, you can consider the following codes: Apply TLC to HINet (w/ Instance Normalization) and MPRNet (w/ SE module) Apple TLC to Restormer (w/ transposed self-attention