Mukosame / Anime2Sketch

A sketch extractor for anime/illustration.
MIT License
1.96k stars 163 forks source link

ValueError: Unknown resampling filter error #15

Closed tamal777 closed 2 years ago

tamal777 commented 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>

78Alpha commented 2 years ago

The solution is to add

bic = Image.BICUBIC

before the image_pil in data.py

fix

tamal777 commented 2 years ago

omg, it works. Thank you.

2blackbar commented 1 year ago

dood this is still not fixed in this repo and its 2023