smplx icon indicating copy to clipboard operation
smplx copied to clipboard

Issue with body_models.py

Open vas0206 opened this issue 1 year ago • 5 comments

I am running into the error below when calling body_models.py. What is the issue?

    left_hand_components = data_struct.hands_componentsl[:num_pca_comps]
AttributeError: 'Struct' object has no attribute 'hands_componentsl'

vas0206 avatar Sep 11 '24 14:09 vas0206

I'm having the same issue. please let me know how you solve it.

meongeun avatar Sep 23 '24 13:09 meongeun

Me too

wangfusehng avatar Sep 30 '24 10:09 wangfusehng

In the https://eth-ait.github.io/aitviewer/frontend.html, it tells us to follow the smplx data structure:

Image

and in the smplx git the also shows us the structure

Image

But the smplh folder need to be merged with Mona file so you need to follow this instruction for that https://github.com/vchoutas/smplx/blob/main/tools/README.md Once you done, you will get the SMPLH_FEMALE.pkl and SMPLH_MALE.pkl for the folder smplh. Which solve the problem

pogopo789 avatar Feb 22 '25 13:02 pogopo789

hi @pogopo789 when run python write_obj.py --model-folder ../models/ --motion-file ..\transfer_data\support_data\npz_data\00001_0.npz --output-folder ../transfer_data/meshes/amass_sample/ to process my own npz file(SMPL-X NEUTRAL),I meet this error WARNING: You are using a SMPL+H model, with only 16 shape coefficients. num_betas=1, shapedirs.shape=(6890, 3, 16), self.SHAPE_SPACE_DIM=300 Traceback (most recent call last): File "E:\smplx2smplh\smplx\transfer_model\write_obj.py", line 199, in main( File "E:\smplx2smplh\smplx\transfer_model\write_obj.py", line 59, in main model = smplx.create( ^^^^^^^^^^^^^ File "E:\smplx2smplh\smplx\transfer_model\smplx\body_models.py", line 2419, in create return SMPLH(model_path, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\smplx2smplh\smplx\transfer_model\smplx\body_models.py", line 612, in init left_hand_components = data_struct.hands_componentsl[:num_pca_comps] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Struct' object has no attribute 'hands_componentsl' I already get all the pkl and npz files of SMPL

Image

soddday avatar Aug 29 '25 14:08 soddday

hi @vas0206 @pogopo789 @wangfusehng @meongeun did you slove this problem?

soddday avatar Aug 30 '25 07:08 soddday