IFRNet icon indicating copy to clipboard operation
IFRNet copied to clipboard

The generated image sizes have changed

Open Heroandzhang opened this issue 3 years ago • 1 comments

Hi, when I test the middlebury dataset, the sizes of the generated images and the ground truth are different, what is the reason for this, and how should I correct it?

Heroandzhang avatar Jul 02 '22 06:07 Heroandzhang

For Middlebury dataset, we zero pad each input frame pair to spatial size of 640 x 480, and here is the key implementation code.

I0_pad = torch.zeros([1, 3, 480, 640]).to(device)
I2_pad = torch.zeros([1, 3, 480, 640]).to(device)
h, w = I0.shape[-2:]
I0_pad[:, :, :h, :w] = I0
I2_pad[:, :, :h, :w] = I2
I1_pred_pad = model.inference(I0_pad, I2_pad, embt)
I1_pred = I1_pred_pad[:, :, :h, :w]

Also, I have added the evaluation script on Middlebury Other dataset Middlebury_Other.py in this repository.

ltkong218 avatar Jul 09 '22 08:07 ltkong218