nianticlabs / manydepth

[CVPR 2021] Self-supervised depth estimation from short sequences
Other
607 stars 84 forks source link

Hi, I would like to make two small suggestions about the evaluate code #32

Open Ecalpal opened 2 years ago

Ecalpal commented 2 years ago

Thanks for your awesome work!

The first suggestion is to use transforms.InterpolationMode.LANCZOS instead of Image.ANTIALIAS to avoid the UserWarning. In the Image.py of PIL we can find LANCZOS = ANTIALIAS = 1, so the performance will not change after the replacement.

https://github.com/nianticlabs/manydepth/blob/44e2cb89a1eb1f18df1b1f563d97f98716561a66/manydepth/datasets/mono_dataset.py#L53 UserWarning: /usr/local/lib/python3.8/dist-packages/torchvision/transforms/transforms.py:280: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.

The second suggestion is about tqdm. https://github.com/nianticlabs/manydepth/blob/44e2cb89a1eb1f18df1b1f563d97f98716561a66/manydepth/evaluate_depth.py#L158 The correct way to use it is for i, data in enumerate(tqdm.tqdm(dataloader)):, and this will allow the progress bar to display correctly. :smile:

JamieWatson683 commented 2 years ago

Hi, and thanks for your interest in the project!

Oh good catches - I will make these changes to the code and push a fix.

Thanks again!

JamieWatson683 commented 2 years ago

Moving back to open until I push the fix - just so I don't forget to actually implement these suggestions!