benjiebob / SMALify

This repository contains an implementation for performing 3D animal (quadruped) reconstruction from a monocular image or video. The system adapts the pose (limb positions) and shape (animal type/height/weight) parameters for the SMAL deformable quadruped model, as well as camera parameters until the projected SMAL model aligns with 2D keypoints and silhouette segmentations extracted from the input frame(s).
106 stars 18 forks source link

Issue with pkl files loads on Linux #14

Closed EAST-J closed 3 years ago

EAST-J commented 3 years ago

Dear @benjiebob , my os is Ubuntu 18.04, when I run python scripts --python smal_fitter/optimize_to_joints.py I get error:_pickle.UnpicklingError: the STRING opcode argument must be quoted, I searched and got that those pkl files belong to Windows. I wonder if I should change the pkl files or I can run on the Windows. Please help me Thanks

benjiebob commented 3 years ago

Hey! Please could you let me know which pkl files it's having trouble with?

EAST-J commented 3 years ago

my_smpl_data_00781_4_all.pkl and the same as walking_toy_symmetric_pose_prior_with_cov_35parts.pkl

When I try this soluton:https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script/19702943#19702943 It fixed, but I still get errors: self.precs = torch.from_numpy(res['pic'].r).float().to(device) Traceback (most recent call last): File "smal_fitter/optimize_to_joints.py", line 147, in main() File "smal_fitter/optimize_to_joints.py", line 89, in main model = SMALFitter(device, data, config.WINDOW_SIZE, config.SHAPE_FAMILY, use_unity_prior) File "/home/jsj/SMALify/smal_fitter/smal_fitter.py", line 101, in init self.smal_model = SMAL(device, shape_family_id=shape_family) File "/home/jsj/SMALify/smal_model/smal_torch.py", line 69, in init v_sym, self.left_inds, self.right_inds, self.center_inds = align_smal_template_to_symmetry_axis( File "/home/jsj/SMALify/smal_model/smal_basics.py", line 20, in align_smal_template_to_symmetry_axis symIdx = u.load() File "/home/jsj/anaconda3/envs/smalify/lib/python3.8/pickle.py", line 1210, in load dispatchkey[0] File "/home/jsj/anaconda3/envs/smalify/lib/python3.8/pickle.py", line 1526, in load_global klass = self.find_class(module, name) File "/home/jsj/anaconda3/envs/smalify/lib/python3.8/pickle.py", line 1577, in find_class import(module, level=0) ModuleNotFoundError: No module named 'numpy.core.multiarray\r'

I have installed numpy, I searched this error, It told me that that is because the pickle files were saved in windows, and I tried to read it in Linux , could you help me to solve this? Thanks

EAST-J commented 3 years ago

I fix this error by solution mentioned above, I change 3 pkl files: my_smpl_data_00781_4_all.pkl walking_toy_symmetric_pose_prior_with_cov_35parts.pkl symIdx.pkl

sunbin1357 commented 3 years ago

Where can we download my_smpl_data_00781_4_all.pkl?