Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
suminmin opened this issue Oct 4, 2021 · 0 comments
Open

Comments

@suminmin
Copy link

suminmin commented Oct 4, 2021

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?

@suminmin suminmin changed the title STAR model convert_smpl_to_star.py doesn't work properly Oct 4, 2021
@suminmin suminmin changed the title convert_smpl_to_star.py doesn't work properly Converter script, "convert_smpl_to_star.py", doesn't work properly Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant