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

question about amass_parser.py #33

Open
dsdf783 opened this issue Nov 14, 2023 · 1 comment
Open

question about amass_parser.py #33

dsdf783 opened this issue Nov 14, 2023 · 1 comment

Comments

@dsdf783
Copy link

dsdf783 commented Nov 14, 2023

when I run python -m src.datasets.amass_parser --dataset_name amass, I get an error: RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 9932 but got size 52 for tensor number 1 in the list.
the details are as follows:
Loading babel labels
DONE! - Loading babel labels
args.input_dir: ./data/render
Loading Body Models
DONE! - Loading Body Models
Reading Transitions_mocap sequence...
0%| | 0/1 [00:00<?, ?it/s]/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py:166: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
frame_raw_text_labels = np.full(data['poses'].shape[0], "", dtype=np.object)
/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py:167: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
frame_proc_text_labels = np.full(data['poses'].shape[0], "", dtype=np.object)
/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py:168: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
frame_action_cat = np.full(data['poses'].shape[0], "", dtype=np.object)
rot_mats.shape: torch.Size([191, 52, 3, 3])
joints.shape: torch.Size([1, 52, 3])
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/licg/.conda/envs/motionclip/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/licg/.conda/envs/motionclip/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py", line 318, in
db = read_data(args.input_dir, # ./data/amass
File "/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py", line 115, in read_data
results_dict = read_single_sequence(split_name, dataset_name, seq_folder, seq_name, body_models, target_fps,
File "/data2/lichenguang/projects/MotionCLIP/src/datasets/amass_parser.py", line 228, in read_single_sequence
body_motion = body_model(pose_body=pose_body, pose_hand=pose_hand, root_orient=root_orient)
File "/home/licg/.conda/envs/motionclip/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/data2/lichenguang/projects/MotionCLIP/human_body_prior/body_model/body_model.py", line 247, in forward
verts, joints = lbs(betas=shape_components, pose=full_pose, v_template=v_template,
File "/home/licg/.conda/envs/motionclip/lib/python3.8/site-packages/smplx/lbs.py", line 231, in lbs
J_transformed, A = batch_rigid_transform(rot_mats, J, parents, dtype=dtype)
File "/home/licg/.conda/envs/motionclip/lib/python3.8/site-packages/smplx/lbs.py", line 394, in batch_rigid_transform
transforms_mat = transform_mat(
File "/home/licg/.conda/envs/motionclip/lib/python3.8/site-packages/smplx/lbs.py", line 349, in transform_mat
return torch.cat([F.pad(R, [0, 0, 0, 1]),
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 9932 but got size 52 for tensor number 1 in the list.

Could you telll me how can I remove this bug? I think the problem is about the AMASS dataset. The contents of directory 'data/amass' are as follows:

image

@dsdf783
Copy link
Author

dsdf783 commented Nov 14, 2023

I wonder if the dimensions of these three variables(pose_body, pose_hand, root_orient) are true.
image

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