CEB_ECON icon indicating copy to clipboard operation
CEB_ECON copied to clipboard

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

Open kendrick90 opened this issue 10 months ago • 0 comments

(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.

kendrick90 avatar Aug 21 '23 03:08 kendrick90