Algolzw / EBSR

Pytorch code for "EBSR: Feature Enhanced Burst Super-Resolution with Deformable Alignment", CVPRW 2021, 1st NTIRE (real data track).
94 stars 11 forks source link

What is the use of 'flatten_raw_image_batch' ? #12

Open wgg1999 opened 2 years ago

wgg1999 commented 2 years ago

What is the use of 'burst = flatten_raw_image_batch(burst)' before 'sr = self.model(burst, 0)' If the flatten step is reduced, will it influence the result? And after using the flatten step, the W and H of original burst is changed, When is it changed back before it is used to calculate the loss with ground truth(which has the original W and H) ?

Algolzw commented 2 years ago

Actually, the original size of the RAW image is [H/2, W/2], and the ground truth size is [4H, 4W]. Thus we flatten the RAW input to [H, W] to directly perform a 4x super-resolution.

If we take out the flatten step, we need to perform an x8 super-resolution.