williamljb / HumanMultiView

45 stars 16 forks source link

You need to specify `load_path` to load a pretrained model #7

Closed farazBhatti closed 3 years ago

farazBhatti commented 3 years ago

Giving command python -m demo --img_paths testImages/test.png

I was getting the above mentioned error in the title. So I changed command to
python -m demo --img_paths testImages/test.png --load_path models/model.ckpt-55124

but now i am getting the following error : UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte.

Any ideas?

farazBhatti commented 3 years ago

after some searching online, ive updated the following codes in line 33 and 76 of HumanMultiView/src_ortho/tf_smpl/batch_smpl.py file

with open(pkl_path, 'r') as f:
      dd = pickle.load(f)

to

with open(pkl_path, 'rb') as f:
      dd = pickle.load(f,encoding='latin1')

but now i am, getting the following error

dd['cocoplus_regressor'].T.todense(),
KeyError: 'cocoplus_regressor'
farazBhatti commented 3 years ago

got it. python -m demo --img_paths testImages/test.png --load_path models/model.ckpt-55124 --smpl_model_path models/neutral_smpl_with_cocoplus_reg.pkl

this solved the above problem