tbd-nets
tbd-nets copied to clipboard
Use PIL for image resizing
Hello - this PR is related to #14
Notes:
- I decided to go with
PIL
for this change, since it looks like theinterpolate()
function from PyTorch doesn't support Lanczos interpolations yet. - On the same token, the
Image.resize()
function from Pillow doesn't support cubic interpolations. For now, I just left outcubic
as an option, but I am wondering when someone might actually want to use it in 2D image processing. What do you think? - Next, I expanded the docstrings in the
display_tree()
anddisplay_helper()
functions (found infull-vqa-example.ipynb
andvisualize-output.ipynb
respectively) to also allow users to pass in‘box’
or‘hamming’
for theinterp
parameter. - Finally, I added a
.gitignore
file to the repo, mainly to avoid pushing my local copy of theclevr-reg-hres.pt
binary file.
Looking forward to hear what others think of these changes!