【无标题】

2023-05-16

GANimator: Neural Motion Synthesis from a Single Sequence

This repository provides a library for novel motion synthesis from a single example, as well as applications including style transfer, motion mixing, key-frame editing and conditional generation. It is based on our work GANimator: Neural Motion Synthesis from a Single Sequence that is published in SIGGRAPH 2022.

Prerequisites

This code has been tested under Ubuntu 20.04. Before starting, please configure your Anaconda environment by

conda env create -f environment.yaml
conda activate ganimator

In case you encounter a GLIBCXX-3.4.29 not found issue, please link your existing libstdc++.so file to the anaconda environment by ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 {path to anaconda}/envs/ganimator/bin/../lib/libstdc++.so.6.

Alternatively, you may install the following packages (and their dependencies) manually:

  • pytorch == 1.10
  • tensorboard >= 2.6.0
  • tqdm >= 4.62.3
  • scipy >= 1.7.3

Quick Start

We provide several pretrained models for various characters. Download the pretrained model from Google Drive. Please extract the downloaded file and put the pre-trained directory directly under the root of the ganimator directory.

Novel motion synthesis

Run demo.sh. The result for Salsa and Crab Dace will be saved in ./results/pre-trained/{name}/bvh. The result after foot contact fix will be saved as result_fixed.bvh. You may visualize the generated bvh files with Blender.

Similarly, use command python demo.py --save_path=./pre-trained/{name of pre-trained model} will generate the result for the given pretrained model.

Evaluation

A separate module for evaluation is required. Before starting with evaluation, please refer to the instruction of installation here.

Use the following command to evaluate a trained model:

python evaluate.py --save_path={path to trained model}

Particularly, python evaluate.py --save_path=./pre-trained/gangnam-style yields the quantitative result of our method with full approach reported in Table 1 and 2 of the paper.

Train from scratch

We provide instructions for retraining our model.

We include several animations under ./data directory.

Here is an example for training the crab dance animation:

python train.py --bvh_prefix=./data/Crabnew --bvh_name=Crab-dance-long --save_path={save_path}

You may specify training device by --device=cuda:0 using pytorch's device convention.

For customized bvh file, specify the joint names that should be involved during the generation and the contact name in ./bvh/skeleton_databse.py, and set corresponding bvh_prefix and bvh_name parameter for train.py.

Training a Conditional Generator

A conditional generator takes the motion of one or several given joints as constraints and generate animation complying with the constraints. Before training a conditional generator, a regular generator must be trained on the same training sequence.

Here is an example for training a conditional generator for the walk-in-circle motion:

python train.py --bvh_prefix=./data/Joe --bvh_name=Walk-In-Circle --save_path={save_path} --skeleton_aware=1 --path_to_existing=./pre-trained/walk-in-circle --conditional_generator=1

This example assumes that a pre-trained regular generator is stored in ./pre-trained/walk-in-circle, which is specified by the --path_to_existing parameter.

This repository contains the code using the motion of root joint as condition. However, it is also possible to customize the conditional joints. It can be done by modify the get_layered_mask() function in models/utils.py. It takes the --conditional_mode parameter as its first parameter and returns the corresponding channel indices in the tensor representation.

Applications

Motion Mixing

When trained with two or more sequences, our framework generates a mixed motion of the input animations.

This is an example for training on multiple sequences using --multiple_sequence=1:

python --bvh_prefix=./data/Elephant --bvh_name=list.txt --save_path={save_path} --multiple_sequence=1

The list.txt in ./data/Elephant contains the names of the sequences to be trained.

We also provide a pre-trained model for the motion mixing of the elephant motions:

python demo.py --save_path=./pre-trained/elephant

Key-frame Editing

Instead of generating the motion from random noise, we can perform key-frame editing by providing the edited key-frames in the coarsest level.

This is an example for keyframe editing:

python demo.py --save_path=./pre-trained/baseball-milling --keyframe_editing=./data/Joe/Baseball-Milling-Idle-edited-keyframes.bvh

The --keyframe_editing parameter points to the bvh file containing the edited key-frames, which should be as the same temporal resolution as the coarsest level. Note that in this specific example, the --ratio parameter for the model is set to 1/30, leading to a sparser key-frame setting that makes editing easier.

Style Transfer

Similarly, when the model is trained on style input and the coarsest level is given by the content input, our model can achieve style transfer.

This is an example for style transfer:

python demo.py --save_path=./pre-trained/proud-walk --style_transfer=./data/Xia/normal.bvh

Note the content of content input is required to be similar to the content of style input, in order to generate high-quality results as discussed in the paper.

Conditional Generation

When a pre-defined motion of part of the skeleton (e.g., root trajectory) is given, a conditional generation model can produce animation complying with given constraints.

This is an example for conditional generation:

python demo.py --save_path=./pre-trained/conditional-walk --conditional_generation=./data/Joe/traj-example.bvh

This pre-trained model takes the position and orientation of root joint from traj-example.bvh. If the conditional source file is not specified, the script will sample a trajectory from a pre-traiend regular generator as the condition.

Additionally, --interactive=1 option will generate the animation with interactive mode. In this mode, the condition information will be fed into the generator gradually. It is conceptually an interactive generation, but not an interactive demo that can be controlled with a keyboard or gamepad.

For more details about specifying conditional joints, please refer to Training a Conditional Generator.

Acknowledgements

The code in models/skeleton.py is adapted from deep-motion-editing by @kfiraberman, @PeizhuoLi and @HalfSummer11.

Part of the code in bvh is adapted from the work of Daniel Holden.

Part of the training examples is taken from Mixamo and Truebones.

Citation

If you use this code for your research, please cite our paper:

@article{li2022ganimator,
  author = {Li, Peizhuo and Aberman, Kfir and Zhang, Zihan and Hanocka, Rana and Sorkine-Hornung, Olga },
  title = {GANimator: Neural Motion Synthesis from a Single Sequence},
  journal = {ACM Transactions on Graphics (TOG)},
  volume = {41},
  number = {4},
  pages = {138},
  year = {2022},
  publisher = {ACM}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【无标题】 的相关文章

  • 我的 2021 年终总结

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 原文链接 xff1a 我的 2021 年终总结 大家好 xff0c 我是杰哥 眨眼间到了 2022 年 xff0c 按照 2020 年的安排其实是要如期进行关于自
  • 11 款可替代 top 命令的工具

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 11 款可替代
  • 7 款可替代 top 命令的工具

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 7 款可替代
  • 14 款命令行常用工具的替代品

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 14 款命令行
  • 再见 Xshell,这个开源的终端工具更酷炫。

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 再见 Xshe
  • 太强了,这款开源终端工具可查询 IP 信息 ...

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 太强了 xff
  • python排序算法——归并排序(附代码)

    python排序算法 归并排序 文章目录 python排序算法 归并排序一 前言二 算法描述三 代码实现总结 一 前言 相关知识来自 python算法设计与分析 初级排序算法是指几种较为基础且容易理解的排序算法 初级排序算法包括插入排序 选
  • 一次服务器非法重启后导致的故障排查记录

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文地址 xff1a 一次服务器非法
  • 写了个自动巡检多个接口地址的脚本!

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 转载请联系授权 xff08 微信ID xff1a Hc220088 xff09 原文链接 xff1a 写了个自动巡检
  • 写了个监控 ElasticSearch 进程异常的脚本!

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 链接 xff1a 写了个监控 ElasticSearch 进程异常的脚本 xff01 服务器配置免密钥环境准备 xf
  • 太强了!这款命令行工具可以在 Linux 文件目录快速自动跳转

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 链接 xff1a 太强了 xff01 这款命令行工具可以在 Linux 文件目录快速自动跳转 在 Linux 终端下
  • 又一个基于 GPT-4 编写、解释代码的工具,诞生了!

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 链接 xff1a 又一个基于 GPT 4 编写 解释代码的工具 xff0c 诞生了 xff01 上周 xff0c O
  • 这款文件传输工具的替代品,牛逼了!

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 链接 xff1a 这款文件传输工具的替代品 xff0c 牛逼了 xff01 某种场景下 xff0c 考虑到 LapT
  • 这款轻量级可视化路由追踪的神器,太强了!

    作者 xff1a JackTian 来源 xff1a 公众号 杰哥的IT之旅 ID xff1a Jake Internet 链接 xff1a 这款轻量级可视化路由追踪的神器 xff0c 太强了 xff01 在 Linux 环境下 xff0c
  • 【原创】树莓派4B + VSCode + MAVSDK-Python + PX4环境搭建

    一 前言 为了在树莓派下开发机载计算机相关功能 xff0c 通过MAVSDK与PX4进行通讯需要搭建相关环境 以往都是东拼西凑最后成功编译运行 xff0c 但过一段时间就得重新来过 xff0c 年龄大了不能老这么折腾 xff0c 这次记录一
  • 【Yolo】YoloV5训练自定义模型

    Yolo Jetson Orin Nano下部署 YoloV5 上一篇博文主要记录了在Jetson Orin Nano下部署YoloV5环境 xff0c 并运行了yoloV5n pt模型 xff0c 本篇在上一篇的基础上 xff0c 进一步
  • ModSim基本使用(Modbus模拟器)

    ModSim下载地址 打开软件 1 模拟modbus tcp 创建Modbus TCP连接 设置连接端口 xff0c 默认502 xff0c 点击 OK 就自动创建 新建 新建界面如下 xff08 可新建多个界面 xff0c 同时模拟500
  • [java]final关键字的几种用法

    在java的关键字中 xff0c static和final是两个我们必须掌握的关键字 不同于其他关键字 xff0c 他们都有多种用法 xff0c 而且在一定环境下使用 xff0c 可以提高程序的运行性能 xff0c 优化程序的结构 下面我们
  • Ubuntu系统安装分区设置

    1 创建主分区 xff1a 主分区 xff0c 用于存放系统 20G 主分区 空间起始位置 Ext4日志文件系统 2 创建swap分区 xff1a 逻辑分区 大小设置为电脑内存大小 xff0c 2G xff1b 2048MB 逻辑分区 空间
  • 重装Win+Ubuntu双系统中的Ubuntu

    重装双系统中的Ubuntu 想把玩Linux xff0c 又想保留Windows xff0c 有几种途径 1 使用虚拟机软件如 Vmware Virtual Box等 2 再装一个Ubuntu系统成为Win 43 Ubuntu双系统 专业原

随机推荐

  • ROS打不开gazebo的问题

    前段时间 xff0c 将师兄的Ros工程搬到我的电脑上运行 xff0c 但是一直打不开gazebo xff0c gazebo一直卡在了黑屏的页面 同样的工程 xff0c 在师兄电脑上是可以跑的 xff0c 并不是ros工程的问题 于是我让其
  • 02 四旋翼无人机的组成与拼装(上)

    02 四旋翼无人机的组成与拼装 xff08 上 xff09 目录1 总体介绍2 布局设计2 1 机身布局2 1 1 交叉形2 1 2 环形 比较少2 1 3 可折叠交叉形 2 2 旋翼安装2 2 1 常规布局 VS 共轴双桨2 2 2 力矩
  • 03 四旋翼无人机的组成与拼装(下)

    03 四旋翼无人机的组成与拼装 xff08 下 xff09 目录1 螺旋桨1 1 作用1 2 参数1 型号2 弦长3 转动惯量 重要 4 力效5 桨叶数6 安全转速7 静平衡与动平衡 2 电机2 1 作用2 2 工作原理2 2 1 相位切换
  • 05 无人机动态模型

    05 无人机动态模型 目录1 无人机动态模型简介1 1 无人机动态模型2 刚体运动与姿态表示2 1 如何描述一个刚体2 2 地球坐标系与机体坐标系2 3 坐标系旋转与向量旋转的区别2 4 旋转轴与旋转角2 5 欧拉角 xff08 1 xff
  • 06 飞行控制器

    06 飞行控制器 目录1 XTDrone动态模型代码讲解2 自动控制初步2 1 自动控制概述多旋翼飞行器控制实例 2 2 控制性能2 3 传递函数与状态方程示例 3 PID控制器3 1 PID控制器3 2 比例项调节3 3 积分项调节积分饱
  • Django-注册用户时候保存密码加密问题

    1 导入django内置模块 注册用户时候保存密码加密问题 from django contrib auth hashers import make password 2 获取post参数并创建用户并对密码加密 email 61 reque
  • FrankMocap

    FrankMocap 摘要介绍相关工作3D参数化人体模型单图像3D人体姿势估计单图像3D手姿势估计身体和手的联合3D姿势估计 方法SMPL X模型概述3D手估计模块手模块结构训练方法数据集预处理训练数据增强 3D身体估计模块整个身体集成模块
  • TortoiseGit间接处理linux目录下的仓库,用到window映射linux目录方案

    原始需求 习惯用TortoiseGit查看git仓库信息和历史日志 xff0c 但这个工具只支持window xff0c 我希望linux也能用虽然有其他linux的GUI的git工具 xff0c 但我用到的linux基本都是无界面版本 x
  • 关于C中的Int类型到底是几个字节。

    C语言标准是这样规定的 xff1a int最少16位 xff08 2字节 xff09 xff0c long不能比int短 xff0c short不能比int长 xff0c 具体位长由编译器开发商根据各种情况自己决定 在32位x86处理器上
  • Jetson TX2开启高功耗模式

    Jetson TX2 工作模式及相应的CPU和GPU频率 xff1a 上电的时候 xff0c 默认最低功耗模式1 xff0c 风扇不转 1 直接运行home下的jetson clocks sh xff0c 开启最大频率 sudo jetso
  • 在失望中重找希望——我的2013年工作总结

    时间过的真的是快 来广州已整整工作了一年啦 从2012年长沙工作离职后 为了我的女朋友 我毅然踏上了南下广州的征途 来到羊城后 很快 xff0c 一个礼拜就找到了现在工作的这家公司 现在回想一下 真觉得当初没有好好斟酌一下 2013年里 x
  • 【100%有效】解决AndroidStudio 控制台编译输出中文乱码,亲测解决!

    背景 在AndroidStudio中新建了一个Java Module xff0c 但是点击 Run app 之后 xff0c Build Output 控制台输出的中文都是乱码 xff0c 都是问号一样的字符 google了很多方法 xff
  • 图传数传模块

    文章中写了关于如何调摄像头的程序 https blog csdn net JanKin BY article details 103929781 如何将摄像头获取的视频发送到远端实现图传数传 xff0c 按RJ45的网口线路排布 xff0c
  • TX2系统烧录jetpack4.6 ubuntu18.04

    sdk版本与系统版本相关 xff0c 下载的4 6为ubuntu 18 04 1 烧录下jeston nvidia官方网站上下载sdk manager Jetson 下载中心 NVIDIA Developer sudo apt instal
  • 如何把UCF101数据集分成训练集和测试集

    34 After extracting the RAR we run this to move all the files into the appropriate train test folders Should only run th
  • 强国的语言与语言强国

    强国的语言与语言强国 作者 xff1a 教育部语言文字信息管理司司长 教育部语言文字应用研究所所长 中国社会科学院研究生 李宇明 理论上语言是一律平等的 xff0c 现实中语言是有强有弱的 语言的强弱与语言所属社团的强弱盛衰呈正相关 古罗马
  • 基于时间序列的异常检测算法小结

    最近在学习基于时间序列的异常检测算法 xff0c 看到一篇好文 xff0c 原文博客地址 xff1a http blog rexking6 top 2018 11 05 基于时间序列的异常检测 以下是相应的知识 xff1a 简介 搜罗了网上
  • Python函数

    定义函数 def def是定义define definition 的缩写 Python中使用def来定义函数 xff0c 函数的命名规则和变量的命名规则相同 函数名后的 xff08 xff09 用于传入参数 xff0c 函数体以冒号 xff
  • JDK和SDK的区别

    JDK和SDK的区别如下 xff1a 1 SDK是Software Development Kit的缩写 xff0c 中文意思是 软件开发工具包 这是一个覆盖面相当广泛的名词 xff0c 可以这么说 xff1a 辅助开发某一类软件的相关文档
  • 【无标题】

    GANimator Neural Motion Synthesis from a Single Sequence This repository provides a library for novel motion synthesis f