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

added BVH generation #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion runners/generate.py
Original file line number Diff line number Diff line change
@@ -17,6 +17,10 @@
import json
from diffusion.diffusion_wrappers import DiffusionWrapper_FlowMDM as DiffusionWrapper

from visualization.joints2bvh import Joint2BVHConvertor

converter = Joint2BVHConvertor()

datasets_fps = {
"humanml": 20,
"babel": 30
@@ -188,6 +192,9 @@ def main():
save_file = sample_file_template.format(rep_i)
print(sample_print_template.format(rep_i, save_file))
animation_save_path = os.path.join(animation_out_path, save_file)
# saving motion as BVH
bvh_path = os.path.join(animation_out_path, "motion.bvh")
_, _ = converter.convert(motion, filename=bvh_path, iterations=1000, foot_ik=False)
lengths_list = model_kwargs['y']['lengths']
captions_list = []
for c, l in zip(caption.split(" /// "), lengths_list):
@@ -252,4 +259,4 @@ def load_dataset(args, split):


if __name__ == "__main__":
main()
main()
Binary file added visualization/.DS_Store
Binary file not shown.
864 changes: 864 additions & 0 deletions visualization/.bvh

Large diffs are not rendered by default.

Loading