isl-org / ZoeDepth

Metric depth estimation from a single image
MIT License
2.36k stars 216 forks source link

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' #87

Open fdy61 opened 1 year ago

fdy61 commented 1 year ago

When I execute the order 'python sanity.py',it throw an error called 'AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' from line 91,sanity.py, pred = pred.resize(orig_size, Image.ANTIALIAS),how could it be solced? image

CDalezyb commented 11 months ago

Hi! I met with the same problem, and i changed it to LANZOS and solved it .

zhihaohaoran commented 9 months ago

it depends on the version of pillow, you can change the version into 9.5.0

drbilal216 commented 6 months ago

@fdy61 downgrade to pip install Pillow==9.5.0 or replace : pred = pred.resize(orig_size, Image.ANTIALIAS) with : pred = pred.resize(orig_size, Image.LANCZOS)