Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The generated image sizes have changed #8

Open
Heroandzhang opened this issue Jul 2, 2022 · 1 comment
Open

The generated image sizes have changed #8

Heroandzhang opened this issue Jul 2, 2022 · 1 comment

Comments

@Heroandzhang
Copy link

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?

@ltkong218
Copy link
Owner

ltkong218 commented Jul 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants