FollowYourPose

FollowYourPose

基于姿态和文本的自动视频生成技术

FollowYourPose项目提出了一种新方法,可以通过姿态和文本生成视频。该方法采用两阶段训练方案,利用易获取的数据集和预训练的文本到图像模型,生成可编辑且姿态可控的角色视频。第一阶段通过关键点图像对进行文本到图像的生成,第二阶段利用姿态自由视频数据集微调网络,成功生成连续的姿态可控角色视频,同时保留预训练模型的编辑和概念组合能力。

Follow-Your-Pose文本生成视频姿态控制AI生成AAAI 2024Github开源项目
<div align="center"> <h2><font color="red"> 🕺🕺🕺 Follow-Your-Pose 💃💃💃 </font></center> <br> <center>使用无姿态视频的姿态引导文本到视频生成(AAAI 2024)</h2> [马悦*](https://mayuelala.github.io/), [何迎青*](https://github.com/YingqingHe), [覃小东](http://vinthony.github.io/), [王信涛](https://xinntao.github.io/), [陈思然](https://github.com/Sranc3), [单莹](https://scholar.google.com/citations?hl=zh-CN&user=4oXBp9UAAAAJ), [李秀](https://scholar.google.com/citations?user=Xrh1OIUAAAAJ&hl=zh-CN), 和 [陈祺峰](https://cqf.io) <a href='https://arxiv.org/abs/2304.01186'><img src='https://yellow-cdn.veclightyear.com/35dd4d3f/d5acd9b5-114c-4379-96a5-7a9754e7984e.01186-red'></a> <a href='https://follow-your-pose.github.io/'><img src='https://yellow-cdn.veclightyear.com/35dd4d3f/eff904cd-a2f3-4817-88af-f16197991608.png'></a> [![Open In Colab](https://yellow-cdn.veclightyear.com/35dd4d3f/46fc8230-ba24-4207-a87c-d6d9b976a820.svg)](https://colab.research.google.com/github/mayuelala/FollowYourPose/blob/main/quick_demo.ipynb) [![Hugging Face Spaces](https://yellow-cdn.veclightyear.com/35dd4d3f/9c545cc4-2432-4c27-9fc7-82754bb67abf.png)](https://huggingface.co/spaces/YueMafighting/FollowYourPose) [![Open in OpenXLab](https://yellow-cdn.veclightyear.com/35dd4d3f/a46a8a1b-c545-4aff-a7e5-21bb977ec92e.svg)](https://openxlab.org.cn/apps/detail/houshaowei/FollowYourPose) ![visitors](https://yellow-cdn.veclightyear.com/35dd4d3f/7974ae41-59f2-4ade-a4a7-96d0d776557b.FollowYourPose&left_color=green&right_color=red) [![GitHub](https://yellow-cdn.veclightyear.com/35dd4d3f/33f93814-be53-4148-b102-d6538ca7cbab.png)](https://github.com/mayuelala/FollowYourPose) </div> <!-- ![fatezero_demo](https://raw.githubusercontent.com/mayuelala/FollowYourPose/main/docs/teaser.png) --> <table class="center"> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/d1203ce6-b94f-427b-a1d0-a1b9f2a35493.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/9608c69f-e496-4ff2-b41e-ff509f4b82c1.gif"></td> <tr> <td width=25% style="text-align:center;">"男人坐在公园的椅子上"</td> <td width=25% style="text-align:center;">"钢铁侠在街头"</td> </tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/d82eb45c-cc70-4abb-af64-ed2df73af985.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/256e4517-dea6-4a4b-83fc-31de556e6cce.gif"></td> <tr> <td width=25% style="text-align:center;">"风暴兵在健身房"</td> <td width=25% style="text-align:center;">"宇航员,地球背景,卡通风格"</td> </tr> </table > ## 💃💃💃 演示视频 https://github.com/mayuelala/FollowYourPose/assets/38033523/e021bce6-b9bd-474d-a35a-7ddff4ab8e75 ## 💃💃💃 摘要 <b>简述:我们调整了文本到图像生成模型(例如稳定扩散)以从姿态和文本描述生成人物视频。</b> <details><summary>点击查看完整摘要</summary> > 生成文本可编辑和姿态可控的人物视频在创建各种数字人类时有着迫切的需求。然而,这项任务受限于缺乏包含视频-姿态字幕对和视频生成先验模型的综合数据集。在本研究中,我们设计了一种新颖的两阶段训练方案,可以利用容易获得的数据集(例如图像-姿态对和无姿态视频)和预训练的文本到图像(T2I)模型来获取姿态可控的人物视频。具体来说,在第一阶段中,仅使用关键点-图像对进行可控的文本到图像生成。我们学习了一个零初始化的卷积编码器来编码姿态信息。在第二阶段,通过添加可学习的时间自注意力和改良的跨帧自注意力模块,我们通过无姿态视频数据集来微调上述网络的运动。通过我们的新设计,我们的方法成功生成了连续可姿态控的人物视频,同时保持了预训练的T2I模型的编辑和概念组合能力。代码和模型将公开发布。 </details> ## 🕺🕺🕺 更新日志 - **[2024.03.15]** 🔥 🔥 🔥 我们发布了第二版跟随者 [Follow-Your-Click](https://follow-your-click.github.io/),这是第一个实现区域图像动画的框架。现在就试试吧!请给我们一个星星!⭐️⭐️⭐️ 😄 - **[2023.12.09]** 🔥 论文被AAAI 2024录取! - **[2023.08.30]** 🔥 发布一些新结果! - **[2023.07.06]** 🔥 发布了`浦源内容平台 demo`新版本 [![浦源内容平台 Spaces](https://yellow-cdn.veclightyear.com/35dd4d3f/ffbf9f79-5ebe-4258-b527-3bfc5b1978be.png)](https://openxlab.org.cn/apps/detail/houshaowei/FollowYourPose)! 感谢上海AI实验室的支持! - **[2023.04.12]** 🔥 发布本地gradio演示,您可以在本地运行它,只需A100/3090显卡即可。 - **[2023.04.11]** 🔥 发布`huggingface demo`中的一些案例。 - **[2023.04.10]** 🔥 发布`huggingface demo`新版本 [![Hugging Face Spaces](https://yellow-cdn.veclightyear.com/35dd4d3f/9c545cc4-2432-4c27-9fc7-82754bb67abf.png)](https://huggingface.co/spaces/YueMafighting/FollowYourPose),支持`原始视频`和`骨架视频`作为输入。享受它吧! - **[2023.04.07]** 发布`huggingface demo`的第一个版本。享受跟随您姿态的乐趣吧!您需要下载[skeleton video](https://github.com/mayuelala/FollowYourPose/tree/main/pose_example)或通过[mmpose](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#hrnet-cvpr-2019)制作自己的骨架视频。另外,以`视频格式`为输入的第二版即将发布。 - **[2023.04.07]** 发布`colab notebook` [![Open In Colab](https://yellow-cdn.veclightyear.com/35dd4d3f/46fc8230-ba24-4207-a87c-d6d9b976a820.svg)](https://colab.research.google.com/github/mayuelala/FollowYourPose/blob/main/quick_demo.ipynb) 并更新安装`requirements`! - **[2023.04.06]** 发布`代码`,`配置`和`检查点`! - **[2023.04.03]** 发布论文和项目页面! ## 💃💃💃 HuggingFace 演示 <table class="center"> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/98e377e7-90ad-4f3f-9c83-a9d8120900f0.png"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/adb66a97-bb37-4c06-af40-ef5a7eb61f32.png'></td> </tr> </table> ## 🎤🎤🎤 待办事项 - [X] 发布代码、配置和检查点 - [X] Colab - [X] Hugging face gradio 示例 - [ ] 发布更多应用 ## 🍻🍻🍻 设置环境 我们的方法使用cuda11、accelerator和xformers在8个A100上训练。

conda create -n fupose python=3.8 conda activate fupose

pip install -r requirements.txt


`xformers` 推荐用于A100 GPU以节省内存和运行时间。

<details><summary>点击查看 xformers 安装 </summary>

我们发现其安装不太稳定。您可以尝试以下轮子:

```bash
wget https://github.com/ShivamShrirao/xformers-wheels/releases/download/4c06c79/xformers-0.0.15.dev0+4c06c79.d20221201-cp38-cp38-linux_x86_64.whl
pip install xformers-0.0.15.dev0+4c06c79.d20221201-cp38-cp38-linux_x86_64.whl
</details>

我们的环境类似于Tune-A-video(官方 , 非官方)。您可以参阅他们以获取更多细节。

## 💃💃💃 训练
我们修复了 Tune-a-video 中的错误,并在 8 台 A100 上微调 stable diffusion-1.4。
要为文本到视频生成微调文本到图像的扩散模型,请运行以下命令:

```bash
TORCH_DISTRIBUTED_DEBUG=DETAIL accelerate launch \
    --multi_gpu --num_processes=8 --gpu_ids '0,1,2,3,4,5,6,7' \
    train_followyourpose.py \
    --config="configs/pose_train.yaml" 

🕺🕺🕺 推理

一旦训练完成,运行推理:

TORCH_DISTRIBUTED_DEBUG=DETAIL accelerate launch \ --gpu_ids '0' \ txt2video.py \ --config="configs/pose_sample.yaml" \ --skeleton_path="./pose_example/vis_ikun_pose2.mov"

你可以使用 mmpose 制作姿态视频,我们通过 HRNet 检测骨架。你只需要运行视频演示以获得姿态视频。记得将背景替换为黑色。

💃💃💃 本地 Gradio 演示

你可以在本地运行 Gradio 演示,所需设备为 A100/3090

python app.py

然后演示将在本地 URL http://0.0.0.0:Port 上运行。

🕺🕺🕺 权重

[Stable Diffusion] Stable Diffusion 是一种潜在的文本到图像扩散模型,能够根据任何文本输入生成逼真的图像。预训练的 Stable Diffusion 模型可以从 Hugging Face 下载(例如,Stable Diffusion v1-4)。

[FollowYourPose] 我们还提供了我们的预训练检查点在 Huggingface。你可以下载它们并放入 checkpoints 文件夹中,以通过我们的模型进行推理。

FollowYourPose ├── checkpoints │ ├── followyourpose_checkpoint-1000 │ │ ├──... │ ├── stable-diffusion-v1-4 │ │ ├──... │ └── pose_encoder.pth

💃💃💃 结果

我们展示了与各种姿态序列和文本提示相关的结果。

注意:该 Github 页面上的 mp4 和 gif 文件已压缩。请查看我们的 项目页面 以获取原始视频结果的 mp4 文件。

<table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/2435f063-8be1-4d21-be4b-3691ba0eada0.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/f3fb221a-495f-44cf-92c0-742316982ef9.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/b6dd5359-1a29-4d1f-9a10-d7bb905db635.gif"></td> </tr> <tr> <td width=25% style="text-align:center;">"特朗普,在山上"</td> <td width=25% style="text-align:center;">"男人,在山上"</td> <td width=25% style="text-align:center;">"宇航员,在山上"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/0f896aa9-a6af-4ce7-a7f2-c134160866bb.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/0f162b9c-5bc4-4af9-b8d7-f7d113f0a2d3.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/97c8e6d5-a2f4-4943-9bb0-59cc464df1cb.gif"></td> </tr> <tr> <td width=25% style="text-align:center;">"女孩,简单背景"</td> <td width=25% style="text-align:center;">"钢铁侠,在沙滩上"</td> <td width=25% style="text-align:center;">"绿巨人,在山上"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/ad8c68aa-264d-423e-9be7-28df5de906d2.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/06aa599b-9f1e-4d44-aa2f-cd9afdde6bbb.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/c98ff36e-ec82-4632-8852-0f62143d063a.gif"></td> </tr> <tr> <td width=25% style="text-align:center;">"警察,在街上"</td> <td width=25% style="text-align:center;">"女孩,在森林里"</td> <td width=25% style="text-align:center;">"钢铁侠,在街上"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/de52f05e-b1c3-48b9-917c-4a2a7f2bd4cb.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/84067dbb-ebd6-4778-a35f-fd7d63c84126.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/2b070cf1-3a0a-40f9-91e7-9bfea271a521.gif"></td> </tr> <tr> <td width=25% style="text-align:center;">"机器人,在撒哈拉沙漠"</td> <td width=25% style="text-align:center;">"钢铁侠,在沙滩上"</td> <td width=25% style="text-align:center;">"熊猫,在海上"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/64234877-260d-4582-b326-384b40316ffb.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/16a5e5c3-1fce-41c3-a451-f2c7a12a9a5e.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/cc585bee-72c4-4e3b-b3f5-a44f9985ebef.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">"一个男子在公园中,梵高风格"</td> <td width=25% style="text-align:center;">"消防员在沙滩上"</td> <td width=25% style="text-align:center;">"蝙蝠侠,棕色背景"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/c0d098aa-b819-490e-84c5-832f80457262.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/5a1e3f2f-4f08-40fa-be0e-e8f92ae54cb4.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/8540183b-c3b5-4d0a-b2e2-c7b4dd3513ea.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">"绿巨人,在海上"</td> <td width=25% style="text-align:center;">"超人,在森林里"</td> <td width=25% style="text-align:center;">"钢铁侠,在雪地里"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/1897864a-b9cc-4b27-a029-dd53f2e40367.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/064c6868-e6c1-420a-97c6-1f0868ad522f.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/b4273c6d-4bdb-4ac0-8aad-e976830ff838.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">"一个男子在森林里,Minecraft 造型"</td> <td width=25% style="text-align:center;">"一个男子在海上,日落时分"</td> <td width=25% style="text-align:center;">"詹姆斯·邦德,灰色简单背景"</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/ff229a42-e87f-40b9-94a3-f6cc595971c7.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/05378bcd-3f65-479a-a784-3afe7af94528.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/a9efb5a0-aaef-474f-b0cb-2986663cdb93.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在海上的熊猫。”</td> <td width=25% style="text-align:center;">“在海上的暴风兵。”</td> <td width=25% style="text-align:center;">“在月球上的宇航员。”</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/9730f167-9064-450d-923b-bee4a74d58a3.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/70a337d9-8a61-41d2-95c4-0b5cbf135961.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/b417dfd2-1d42-400e-a0fe-de4994a57f1e.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在月球上的宇航员。”</td> <td width=25% style="text-align:center;">“在南极洲的机器人。”</td> <td width=25% style="text-align:center;">“在海滩上的钢铁侠。”</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/492c063c-cb7c-427a-a5f1-f428b8efee2e.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/88b24fac-3bf8-4870-a44d-b4e6d5894fb0.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/9e0a2fb5-facb-42d7-860a-f7efe9562aeb.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在沙漠中的奥巴马”</td> <td width=25% style="text-align:center;">“在海滩上的宇航员。”</td> <td width=25% style="text-align:center;">“在雪地上的钢铁侠。”</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/4f4213c2-5b80-4f8d-8acd-dc4a58f2b5f1.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/768bef7e-f5f1-4bf2-ac0c-434b0a52abde.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/0a3aa698-b9f1-435e-88ae-a555bc10706b.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在海上的暴风兵。”</td> <td width=25% style="text-align:center;">“在海滩上的钢铁侠。”</td> <td width=25% style="text-align:center;">“在月球上的宇航员。”</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/f45376f9-ca7a-41f9-8426-e9e3782dee79.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/91775196-c988-4c06-b3f8-87a937acf448.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/32b23a96-15b1-48e0-a62f-f477c5ec5c87.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在海滩上的宇航员。”</td> <td width=25% style="text-align:center;">“在森林中的超人。”</td> <td width=25% style="text-align:center;">“在海滩上的钢铁侠。”</td> </tr> </table> <!--#########################################################--> <table class="center"> <tr> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/80f1c1cd-199c-4f98-ab4b-d63d05d1615d.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/a7d58410-267f-4d60-b7d0-b1629eeeeb47.gif"></td> <td><img src="https://yellow-cdn.veclightyear.com/35dd4d3f/7885eff6-94b1-4425-b892-d0f6a5d3e883.gif"></td> </tr> <tr> </tr> <tr> <td width=25% style="text-align:center;">“在海滩上的宇航员。”</td> <td width=25% style="text-align:center;">“在南极洲的机器人。”</td> <td width=25% style="text-align:center;">“在海滩上的暴风兵。”</td> </tr> </table>

编辑推荐精选

Vora

Vora

免费创建高清无水印Sora视频

Vora是一个免费创建高清无水印Sora视频的AI工具

Refly.AI

Refly.AI

最适合小白的AI自动化工作流平台

无需编码,轻松生成可复用、可变现的AI自动化工作流

酷表ChatExcel

酷表ChatExcel

大模型驱动的Excel数据处理工具

基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。

AI工具酷表ChatExcelAI智能客服AI营销产品使用教程
TRAE编程

TRAE编程

AI辅助编程,代码自动修复

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
AIWritePaper论文写作

AIWritePaper论文写作

AI论文写作指导平台

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

AI辅助写作AI工具AI论文工具论文写作智能生成大纲数据安全AI助手热门
博思AIPPT

博思AIPPT

AI一键生成PPT,就用博思AIPPT!

博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。

AI办公办公工具AI工具博思AIPPTAI生成PPT智能排版海量精品模板AI创作热门
潮际好麦

潮际好麦

AI赋能电商视觉革命,一站式智能商拍平台

潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。

iTerms

iTerms

企业专属的AI法律顾问

iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。

SimilarWeb流量提升

SimilarWeb流量提升

稳定高效的流量提升解决方案,助力品牌曝光

稳定高效的流量提升解决方案,助力品牌曝光

Sora2视频免费生成

Sora2视频免费生成

最新版Sora2模型免费使用,一键生成无水印视频

最新版Sora2模型免费使用,一键生成无水印视频

下拉加载更多