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

ScanNet evaluation doesn't match paper #3

Open
mrharicot opened this issue Mar 9, 2022 · 6 comments
Open

ScanNet evaluation doesn't match paper #3

mrharicot opened this issue Mar 9, 2022 · 6 comments

Comments

@mrharicot
Copy link

mrharicot commented Mar 9, 2022

Hi,
Thank you for sharing your code!
I ran test on scannet following the instructions but I get much worse results.
Do you know what might be happening?

Total test num: 10434
['abs_rel', 'abs_diff', 'sq_rel', 'rms', 'log_rms', 'a1', 'a2', 'a3']
[0.26725563624661075, 0.4768538641935877, 0.18805316813831266, 0.5750360812767931, 0.3188030923313161, 0.4764993420147505, 0.8155114483545208, 0.9528344624353279]

Here's the first output for scene0707_00
image

@thuzhaowang
Copy link
Owner

Hi,

Thanks for your attention!

I checked the code and it runs well here for me. May I ask, are your testing environments the same as the those in environment.yml? We used an old Pytorch version (1.1.0) since we built the code based on NAS. It might have some inconsistency with the latest version.

@mrharicot
Copy link
Author

I am using pythorch 1.7.1 as my GPU only supports CUDA 11.0 and up.
However I have used newer versions of pytorch on older ones and never had issues.
Are the pretrained weights on google drive the correct ones?

@thuzhaowang
Copy link
Owner

I see. I have tried to use Pytorch 1.7.1 right now and it indeed produces bad results, while the original environment works well.
I will investigate where the inconsistency is, in these days. Before that, probably you could find another environment using the same environment (Pytorch 1.1.0) to run the evaluation.

@mrharicot
Copy link
Author

Thanks for your help!
I see that someone seems to have a similar issue for NAS on pytorch 1.3.1 so it's possible the backwards compatibility breaking change happened between 1.1. and 1.3.

@thuzhaowang
Copy link
Owner

Hi, I just found the change of torch.nn.functional.grid_sample is the problem. It affects the construction of feature cost volume.

"Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details."

So change the the grid sample in https://github.com/thuzhaowang/idn-solver/blob/6b5dcfd94f35cc118c5dee0f98401e4848e670e3/core/utils/inverse_warp.py#L108 and https://github.com/thuzhaowang/idn-solver/blob/6b5dcfd94f35cc118c5dee0f98401e4848e670e3/core/utils/inverse_warp_d.py#L123 with align_corners=True will solve the problem for higher version of Pytorch (1.3.0 or later).

@mrharicot
Copy link
Author

This looks a lot better, thanks!
image

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