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

SMPL-(H/X) model loading crash #75

Open
Era-Dorta opened this issue Jan 8, 2025 · 0 comments
Open

SMPL-(H/X) model loading crash #75

Era-Dorta opened this issue Jan 8, 2025 · 0 comments

Comments

@Era-Dorta
Copy link

I want to load a custom SMPL-X sequence, this is the code that I have so far:

   smplx_layer = SMPLLayer(model_type="smplx", device=C.device)

    smpl_seq = SMPLSequence.from_npz(
        file="data.npz",
        smpl_layer=smplx_layer,
        poses_left_hand=data["poses_body"][:, poses_left_start:poses_left_end],
        poses_right_hand=data["poses_body"][:, poses_right_start:],
    )

when I run it, I get an error

Traceback (most recent call last):
  File "aitviewer/examples/load_smplx.py", line 32, in <module>
    smpl_seq = SMPLSequence.from_npz(
  File "aitviewer/aitviewer/renderables/smpl.py", line 327, in from_npz
    return cls(
  File "aitviewer/aitviewer/renderables/smpl.py", line 161, in __init__
    global_oris = local_to_global(
  File "aitviewer/aitviewer/utils/utils.py", line 342, in local_to_global
    if parents[j] < 0:
  IndexError: index 22 is out of bounds for axis 0 with size 22

While debugging it I tried the example/missing_frames.py, this very simple t_pose

    smplx_male = SMPLSequence.t_pose(
        SMPLLayer(model_type="smpl", gender="male", device=C.device),
        name="SMPL",
        position=np.array((-1.5, 0, 0)),
    )

For either, I get a

  File "/home/era/code/aitviewer/aitviewer/renderables/smpl.py", line 162, in __init__
    torch.cat([self.poses_root, self.poses_body, self.poses_left_hand, self.poses_right_hand], dim=-1),
TypeError: expected Tensor as element 2 in argument 0, but got NoneType

because the poses_left and poses_right hands are None, which is why I had to add them in my example above.

I also tried load_AMASS example and I get the same index 22 is out of bounds for axis 0 with size 22 error.

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