vchoutas / smplx

SMPL-X
https://smpl-x.is.tue.mpg.de/
Other
1.89k stars 315 forks source link

Removing Chumpy objects from smplh and smpl throws error #11

Closed monajalal closed 5 years ago

monajalal commented 5 years ago

How should I fix this error?

[jalal@goku smplx]$ python tools/clean_ch.py --input-models /scratch3/3d_pose/humanpose/SMPL_models/models/smplh/*.pkl --output-folder output-folder
Traceback (most recent call last):
  File "tools/clean_ch.py", line 68, in <module>
    clean_fn(input_model, output_folder=output_folder)
  File "tools/clean_ch.py", line 34, in clean_fn
    body_data = pickle.load(body_file)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 1036: ordinal not in range(128)
[jalal@goku smplx]$ python tools/clean_ch.py --input-models /scratch3/3d_pose/humanpose/SMPL_models/models/smpl/*.pkl --output-folder output-folder
Traceback (most recent call last):
  File "tools/clean_ch.py", line 68, in <module>
    clean_fn(input_model, output_folder=output_folder)
  File "tools/clean_ch.py", line 34, in clean_fn
    body_data = pickle.load(body_file)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x81 in position 1224: ordinal not in range(128)

Also, do you remove the Chumpy objects only from smpl and smplh .pkl files or also smplx .pkl files?

monajalal commented 5 years ago

my bad, ran it Python3. Could you please verify if it is also needed for SMPL-X model? I have ran it regardless and didn't get any error.

(py2) [jalal@goku smplx]$ python tools/clean_ch.py --input-models /scratch3/3d_pose/humanpose/SMPL_models/models/smpl/*.pkl --output-folder out_dir/
(py2) [jalal@goku smplx]$ python tools/clean_ch.py --input-models /scratch3/3d_pose/humanpose/SMPL_models/models/smplh/*.pkl --output-folder out_dir/
(py2) [jalal@goku smplx]$ python tools/clean_ch.py --input-models /scratch3/3d_pose/humanpose/SMPL_models/models/smplx/*.pkl --output-folder out_dir/
(py2) [jalal@goku smplx]$ 
dimtzionas commented 5 years ago

The conversion (PKL-->NPZ) is needed for SMPL and SMPL+H, due to legacy reasons.

For SMPL-X the website provides both PKL and NPZ, so you can straight use the NPZ files without any conversion.

Kairobo commented 2 years ago

If you wanna still merge pkl, please refer to #43.