Closed tamal777 closed 2 years ago
I'm using Windows 10 and python 3.9
PS C:\Users\Tamal\Desktop\Anime2Sketch> python3 test.py --dataroot image --load_size 512 --output_dir results Traceback (most recent call last): File "C:\Users\Tamal\Desktop\Anime2Sketch\test.py", line 46, in save_image(aus_img, aus_path, aus_resize) File "C:\Users\Tamal\Desktop\Anime2Sketch\data.py", line 96, in save_image image_pil = image_pil.resize(output_resize, bic) File "C:\Users\Tamal\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 1957, in resize raise ValueError( ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.NEAREST (0), Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or Image.HAMMING (5) PS C:\Users\Tamal\Desktop\Anime2Sketch>
The solution is to add
bic = Image.BICUBIC
before the image_pil in data.py
omg, it works. Thank you.
dood this is still not fixed in this repo and its 2023
I'm using Windows 10 and python 3.9
PS C:\Users\Tamal\Desktop\Anime2Sketch> python3 test.py --dataroot image --load_size 512 --output_dir results Traceback (most recent call last): File "C:\Users\Tamal\Desktop\Anime2Sketch\test.py", line 46, in
save_image(aus_img, aus_path, aus_resize)
File "C:\Users\Tamal\Desktop\Anime2Sketch\data.py", line 96, in save_image
image_pil = image_pil.resize(output_resize, bic)
File "C:\Users\Tamal\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 1957, in resize
raise ValueError(
ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.NEAREST (0), Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or Image.HAMMING (5)
PS C:\Users\Tamal\Desktop\Anime2Sketch>