Algolzw / BSRT

Pytorch code for "BSRT: Improving Burst Super-Resolution with Swin Transformer and Flow-Guided Deformable Alignment", CVPRW, 1st place in NTIRE 2022 BurstSR Challenge (real-world track).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get flow between frames ref and other

qtct opened this issue · comments

commented

flows_list = [flow.view(b, n, 2, h // (2 ** (i)), w // (2 ** (i))) for flow, i in zip(flows, range(3))]
RuntimeError: shape '[4, 7, 2, 64, 64]' is invalid for input of size 8192

In the get_ref_flows function of bsrt.py,I had such a problem without any modification,what's wrong,thanks for your response.

Hi,
Does this problem happen during training or testing?
Can also you print the flow sizes and x_ref's size?

commented

Aha. If your first flow size is [28, 2, 64, 64], it should be well reshaped to [4, 7, 2, 64, 64]. But where do you get the input size of 8192?

Here I use self.center_frame_idx:self.center_frame_idx +1 to keep the dim to perform the following repeat operation.

commented

Sure, you can refer to this repo to install DCNv2 for CUDA 11: #9 (comment)