Skip to content

Are there some bugs in data/scripts/convert_amass_to_proto.py? #165

Description

@Ivana-H16

Is there a bug in data/scripts/convert_amass_to_proto.py?

    for folder_name in folder_names:
                if motion_key in motion_timings:
                    print(f"Found timing config for {motion_key}")
                    # Get the timing configuration
                    timing_config = motion_timings[motion_key]
                    start_time = timing_config["start"]
                    end_time = timing_config["end"]

                    # Slice the motion data
                    sliced_pose_aa, sliced_amass_trans = slice_motion_data(
                        pose_aa, amass_trans, start_time, end_time, mocap_fr
                    )

                    # Process this segment with original filename
                    process_motion_segment(
                        sliced_pose_aa,
                        sliced_amass_trans,
                        mocap_fr,
                        output_fps,
                        humanoid_type,
                        joint_names,
                        mujoco_joint_names,
                        kinematic_info,
                        device,
                        dtype,
                        outpath,
                    )

                    # Skip the normal processing since we handled the segment
                    continue
                else:
                    print(f"No timing config found for {motion_key}")
                    continue

            # Process the full motion using the same function
            process_motion_segment(
                pose_aa,
                amass_trans,
                mocap_fr,
                output_fps,
                humanoid_type,
                joint_names,
                mujoco_joint_names,
                kinematic_info,
                device,
                dtype,
                outpath,
            )

            processed_files += 1
            elapsed_time = time.time() - start_time
            avg_time_per_file = elapsed_time / processed_files
            remaining_files = total_files_to_process - processed_files
            estimated_time_remaining = avg_time_per_file * remaining_files

            print(f"\nProgress: {processed_files}/{total_files_to_process} files")
            print(f"Average time per file: {timedelta(seconds=int(avg_time_per_file))}")
            print(
                f"Estimated time remaining: {timedelta(seconds=int(estimated_time_remaining))}"
            )
            print(
                f"Estimated completion time: {time.strftime('%H:%M:%S', time.localtime(time.time() + estimated_time_remaining))}\n"
            )

Whether motion_key in or not in motion_timings, the last statement is continue, which means continue the whole for loop. Therefore, the process_motion_segment function and the following code cannot be executed forever.
My command was:

python ./data/scripts/convert_amass_to_proto.py <amass_directory/CMU> --humanoid-type smplx --output-fps 30 --motion-config data/yaml_files/amass_smplx_train.yaml

When the code entered the else branch, the console logged No timing config found for CMU/01/01_01_poses.motion. After commenting out the continue statement in an attempt to execute the process_motion_segment function, the code threw an error (ValueError: cannot reshape array of size 101136 into shape (688,52,3)) at line 189.

Besides, I cannot find AMASS dataset with smpl presentation. There are only SMPL+H and SMPL-X format in AMASS_Download.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions