softcat477 / SMPL-to-FBX

Load SMPL in blender
MIT License
296 stars 30 forks source link

Empy output #23

Closed olegchomp closed 1 year ago

olegchomp commented 1 year ago

i've tried in anaconda with python 3.7.16: python Convert.py --input_pkl_base H:\condawsl\SMPL-to-FBX-main\Pkls\sample.pkl --fbx_source_path H:\condawsl\SMPL-to-FBX-main\fbx\SMPL_m_unityDoubleBlends_lbs_10_scale5_207_v1.0.0.fbx --output_base H:\condawsl\SMPL-to-FBX-main\out

and get

['gBR', 'gPO', 'gLO', 'gMH', 'gLH', 'gHO', 'gWA', 'gKR', 'gJS', 'gJB'] ['sBM', 'sFM'] ['0', '1', '2', '3', '4', '5'] 0it [00:00, ?it/s]

but out folder is empty

Jedrzed commented 1 year ago

hi, I have the same error, have you already solved this problem? thx

OB1kanOB commented 1 year ago

Hi, I'm also getting the same issue. @olegchomp I would appreciate your input, if you fixed this. Thanks!

OB1kanOB commented 1 year ago

In case anyone stumbles to this issue: It's coming from SmplObject.py where the input path is passed to PathFilter.filter() [AIST comment at line 45], this function is specifically for AIST dataset. If you are using the given sample.pkl or your own custom data, comment the filter API call and read your pkl directly.

hzy-del commented 1 year ago

In case anyone stumbles to this issue: It's coming from SmplObject.py where the input path is passed to PathFilter.filter() [AIST comment at line 45], this function is specifically for AIST dataset. If you are using the given sample.pkl or your own custom data, comment the filter API call and read your pkl directly.

how to do?

hzy-del commented 1 year ago

i've tried in anaconda with python 3.7.16: python Convert.py --input_pkl_base H:\condawsl\SMPL-to-FBX-main\Pkls\sample.pkl --fbx_source_path H:\condawsl\SMPL-to-FBX-main\fbx\SMPL_m_unityDoubleBlends_lbs_10_scale5_207_v1.0.0.fbx --output_base H:\condawsl\SMPL-to-FBX-main\out

and get

['gBR', 'gPO', 'gLO', 'gMH', 'gLH', 'gHO', 'gWA', 'gKR', 'gJS', 'gJB'] ['sBM', 'sFM'] ['0', '1', '2', '3', '4', '5'] 0it [00:00, ?it/s]

but out folder is empty

did you solve the problem?

OB1kanOB commented 1 year ago

In case anyone stumbles to this issue: It's coming from SmplObject.py where the input path is passed to PathFilter.filter() [AIST comment at line 45], this function is specifically for AIST dataset. If you are using the given sample.pkl or your own custom data, comment the filter API call and read your pkl directly.

how to do?

For my usecase, I wanted to read the pickle file directly for custom data. So I commented the AIST logic in SmplObject.py line 45 (as shown below) and directly read my files instead: `

def init(self, read_path): self.files = {}

    # For AIST naming convention
    #paths = PathFilter.filter(read_path, dance_genres=["gBR"],  dance_types=["sBM"], music_IDs=["0"])
    #paths = PathFilter.filter(read_path, dance_genres=None,  dance_types=None, music_IDs=None)
    #for path in paths:
    for path in [read_path]:
        filename = path.split("/")[-1]
        with open(path, "rb") as fp:
            data = pickle.load(fp)
        self.files[filename] = {"smpl_poses":data["smpl_poses"],
                                "smpl_trans":data["smpl_trans"]}
    self.keys = [key for key in self.files.keys()]

`