Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kendrick90 opened this issue Aug 21, 2023 · 0 comments
Open

Comments

@kendrick90
Copy link

kendrick90 commented Aug 21, 2023

(ECON_38_env) C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON>python -m apps.infer -cfg ./configs/econ.yaml -in_dir ./examples -out_dir ./results Resume Normal Estimator from ./data/ckpt/normal.ckpt Resume IF-Net+ from ./data/ckpt/ifnet.ckpt Complete with IF-Nets+ (Implicit) SMPL-X estimate with PIXIE Dataset Size: 1 0%| | 0/1 [00:00<?, ?it/s]INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Body Fitting -- normal: 0.015 | silhouette: 0.042 | joint: 0.056 | Total: 0.113| loose:0, occluded:0: 98%|▉| 49/50 [0 examples\PXL_20201106_052006014: 0%| | 0/1 [00:39<?, ?it/s] Traceback (most recent call last): File "runpy.py", line 194, in _run_module_as_main File "runpy.py", line 87, in _run_code File "C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\apps\infer.py", line 343, in <module> get_optim_grid_image(per_loop_lst, None, nrow=N_body * 2, type="smpl") File "C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\lib\dataset\mesh_util.py", line 668, in get_optim_grid_image grid_img = grid_img.resize((grid_img.size[0], grid_img.size[1]), Image.ANTIALIAS) AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' Cannot read from OBJ file:'C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\results\econ\obj\PXL_20201106_052006014_0_full.obj'. OBJ import of 'PXL_20201106_052006014_0_full.obj' took 0.2 ms

Looks like pillow changed at version 1.0.0 so we can either downgrade pillow or update the "CEB_ECON-main\ECON\lib\dataset\mesh_util.py" to use the new syntax.

pip install Pillow==9.5.0

or

line 668 in "CEB_ECON-main\ECON\lib\dataset\mesh_util.py"

grid_img = grid_img.resize((grid_img.size[0], grid_img.size[1]), Image.LANCZOS)

I just tested this second method and can confirm that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant