tbd-nets icon indicating copy to clipboard operation
tbd-nets copied to clipboard

Use PIL for image resizing

Open UPstartDeveloper opened this issue 2 years ago • 0 comments

Hello - this PR is related to #14

Notes:

  1. I decided to go with PIL for this change, since it looks like the interpolate() function from PyTorch doesn't support Lanczos interpolations yet.
  2. On the same token, the Image.resize() function from Pillow doesn't support cubic interpolations. For now, I just left out cubic as an option, but I am wondering when someone might actually want to use it in 2D image processing. What do you think?
  3. Next, I expanded the docstrings in the display_tree() and display_helper() functions (found in full-vqa-example.ipynb and visualize-output.ipynb respectively) to also allow users to pass in ‘box’ or ‘hamming’ for the interp parameter.
  4. Finally, I added a .gitignore file to the repo, mainly to avoid pushing my local copy of the clevr-reg-hres.pt binary file.

Looking forward to hear what others think of these changes!

UPstartDeveloper avatar Dec 07 '21 20:12 UPstartDeveloper