Skip to content

Converter script, "convert_smpl_to_star.py", doesn't work properly #26

@suminmin

Description

@suminmin

Thank you for sharing your great work.

I'm trying to convert from SMPL to STAR format with AMASS dataset.
However, your converter script doesn't work properly.
https://github.com/ahmedosman/STAR/blob/master/convertors/convert_smpl_to_star.py

I got an error as follows.

ValueError                                Traceback (most recent call last)
<ipython-input-44-c9f32fe20734> in <module>
----> 1 np_poses , np_betas , np_trans , star_verts = convert_smpl_2_star(smpl,**opt_parms)
      2 results = {'poses':np_poses,'betas':np_betas,'trans':np_trans,'star_verts':star_verts}

C:\workspace/local/STAR/star/convertors\losses.py in convert_smpl_2_star(smpl, MAX_ITER_EDGES, MAX_ITER_VERTS, NUM_BETAS, GENDER)
     78             'The Default optimization parameters (MAX_ITER_EDGES,MAX_ITER_VERTS) were tested on batch size 32 or smaller batches')
     79 
---> 80     star = STAR(gender=GENDER)
     81     global_pose = torch.cuda.FloatTensor(np.zeros((batch_size, 3)))
     82     global_pose = Variable(global_pose, requires_grad=True)

C:\workspace/local/STAR/star\pytorch\star.py in __init__(self, gender, num_betas)
     64         self.register_buffer('weights', torch.cuda.FloatTensor(star_model['weights']))
     65         # Model pose corrective blend shapes
---> 66         self.register_buffer('posedirs', torch.cuda.FloatTensor(star_model['posedirs'].reshape((-1,93))))
     67         # Mean Shape
     68         self.register_buffer('v_template', torch.cuda.FloatTensor(star_model['v_template']))

ValueError: cannot reshape array of size 9487530 into shape (93)

According to the result, the shape of star_model["posedirs"] doesn't fit into 93.

In addition, I checked that the shape of the model which was the latest version (1.1) of the STAR model downloaded from your project page.

star_model = np.load(path_female_star, allow_pickle=True)
print(star_model['posedirs'].shape)

(6890, 3, 459)

I think that your converter script doesn't work properly with the latest model (1.1).
Did you change the number of pose blend shapes from 93 to 459?

Could you please tell me how to convert from SMPL to STAR format with AMASS dataset?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions