bharat-b7 / MultiGarmentNetwork

Repo for "Multi-Garment Net: Learning to Dress 3D People from Images, ICCV'19"
282 stars 65 forks source link

TypeError on running visualize_garments.py #43

Closed lafith closed 3 years ago

lafith commented 3 years ago

On running visualize_garments.py I am getting following error:

Traceback (most recent call last):
  File "visualize_garments.py", line 61, in <module>
    vt, ft = dp.get_vt_ft_hres()
  File "/home/..../mgn/code/utils/smpl_paths.py", line 80, in get_vt_ft_hres
    vt, ft = SmplPaths.get_vt_ft()
  File "/home/..../mgn/code/utils/smpl_paths.py", line 75, in get_vt_ft
    vt, ft = pkl.load(open(smpl_vt_ft_path,'r'))
TypeError: a bytes-like object is required, not 'str'
lafith commented 3 years ago

Ok, solved it. It was an error in reading python2 pickle object using python3. Rectified by using the following:

file=open(smpl_vt_ft_path,'rb')
vt, ft = pkl.load(file,encoding='bytes')
lafith commented 3 years ago

Modification maybe required in few other places also.

f=open(join(path, 'registration.pkl'),'rb')
dat = pkl.load(f,encoding='latin1')