[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Boese0601--MagicDance":3,"tool-Boese0601--MagicDance":62},[4,18,26,35,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,2,"2026-04-10T11:39:34",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[43,13,15,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[52,15,13,14],"语言模型",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":79,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":118,"forks":119,"last_commit_at":120,"license":121,"difficulty_score":122,"env_os":123,"env_gpu":124,"env_ram":125,"env_deps":126,"category_tags":132,"github_topics":133,"view_count":32,"oss_zip_url":142,"oss_zip_packed_at":142,"status":17,"created_at":143,"updated_at":144,"faqs":145,"releases":146},7557,"Boese0601\u002FMagicDance","MagicDance","[ICML 2024] MagicPose(also known as MagicDance): Realistic Human Poses and Facial Expressions Retargeting with Identity-aware Diffusion ","MagicDance（又名 MagicPose）是一款基于扩散模型的开源 AI 工具，专注于实现高保真的人体姿态与面部表情迁移。它能够将源视频中人物的动作和表情自然地“移植”到目标人物身上，同时完美保留目标人物的身份特征，生成逼真且连贯的视频内容。\n\n传统视频重定向技术常面临身份丢失、背景扭曲或无法处理复杂视角（如背部姿态）等难题，而 MagicDance 通过引入“身份感知扩散”机制，有效解决了这些痛点。即使在野外复杂场景下，它也能精准还原人体背面细节，并生成丰富多样的面部微表情，效果显著优于同类方案如 MagicAnimate 或 Animate Anyone。\n\n该工具特别适合计算机视觉研究人员、AI 开发者以及数字内容创作者使用。研究人员可基于其开放的训练与推理代码探索扩散模型在时序生成中的新应用；开发者能将其集成至虚拟主播、影视特效或游戏动画管线中；设计师则可利用它快速制作高质量的动态素材。作为发表于 ICML 2024 的前沿成果，MagicDance 不仅提供了详尽的技术文档，还支持多 GPU 训练及自定义数据集微调，是连接学术创新与产业应用的有力桥梁。","\n\n\u003Cp align=\"center\">\n\n  \u003Ch2 align=\"center\">MagicPose: Realistic Human Poses \u003Cbr> and Facial Expressions Retargeting with Identity-aware Diffusion\u003C\u002Fh2>\n  \u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fboese0601.github.io\u002F\">\u003Cstrong>Di Chang\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·  \n    \u003Ca href=\"https:\u002F\u002Fseasonsh.github.io\u002F\">\u003Cstrong>Yichun Shi\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fzerg-overmind.github.io\u002F\">\u003Cstrong>Quankai Gao\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fhongyixu37.github.io\u002Fhomepage\u002F\">\u003Cstrong>Hongyi Xu\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjessica-fu-60a504254\u002F\">\u003Cstrong>Jessica Fu\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Cbr>\u003Ca href=\"https:\u002F\u002Fguoxiansong.github.io\u002Fhomepage\u002Findex.html\">\u003Cstrong>Guoxian Song\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·  \n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=0TIYjPAAAAAJ&hl=en\">\u003Cstrong>Qing Yan\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=hPXUR0cAAAAJ&hl=en\">\u003Cstrong>Yizhe Zhu\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=_MAKSLkAAAAJ&hl=en\">\u003Cstrong>Xiao Yang\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwww.ihp-lab.org\u002F\">\u003Cstrong>Mohammad Soleymani\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Cbr>\n    \u003Csup>1\u003C\u002Fsup>University of Southern California &nbsp;&nbsp;&nbsp; \u003Csup>2\u003C\u002Fsup>ByteDance Inc.\n    \u003Cbr>\n    \u003C\u002Fbr>\n        \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.12052\">\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-MagicPose-green' alt='Paper PDF'>\n        \u003C\u002Fa>\n        \u003Ca href='https:\u002F\u002Fboese0601.github.io\u002Fmagicdance\u002F'>\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-MagicPose-blue' alt='Project Page'>\u003C\u002Fa>\n        \u003Ca href='https:\u002F\u002Fyoutu.be\u002FVPJe6TyrT-Y'>\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-MagicPose-rgb(255, 0, 0)' alt='Youtube'>\u003C\u002Fa>\n     \u003C\u002Fbr>\n    \u003Ctable align=\"center\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_889050898621.gif\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_d3812b9d3051.gif\">\n               &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  GT    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Pose   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TPS   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Disco   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; MagicDance\n    \u003C\u002Ftable>\n\u003C\u002Fp>\n\n## News\n* **[2024.04.03]** Update comparisons to concurrent works. \n* **[2024.02.21]** Update multi-gpu training, dataloader, and instructions for training on your own data. \n* **[2024.02.15]** Release training and inference code. \n* **[2024.02.02]** Release updated paper - MagicPose. The method and data are exactly the same.\n* **[2023.11.18]** Release MagicDance paper and project page.\n\n\n## Related Open-Source Works\n\n* [Disco](https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.00040), from Microsoft\n* [MagicAnimate](https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16498), from ByteDance - Singapore\n\n## Comparison to Concurrent Works\n### Comparison to Animate Anyone\n\u003Cp align=\"center\">\n    \u003Ctable align=\"center\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_5861f646c4cd.gif\">\n    \u003C\u002Ftable>\n\u003C\u002Fp>\n\n### Comparison to MagicAnimate\nComparison of MagicPose to MagicAnimate on Facial Expression Editing. MagicAnimate fails to generate diverse facial expressions, while MagicPose is able to.\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_db6a8705185f.png\" alt=\"MagicDance: Realistic Human Dance Video Generation with Motions & Facial Expressions Transfer\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\nComparison of MagicPose to MagicAnimate on in-the-wild pose retargeting. MagicAnimate fails to generate the back of the human subject, while MagicPose is able to.\n\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_43fa52f0e3a0.png\" alt=\"MagicDance: Realistic Human Dance Video Generation with Motions & Facial Expressions Transfer\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n## Getting Started \nFor inference on TikTok dataset or your own image and poses, download our MagicDance [checkpoint](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1Ny5zkgo3aLVekCJTAga-D_XlMGpR1cj2?usp=sharing).\n\nFor appearance control pretraining, please download the pretrained model for [StableDiffusion V1.5](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_sd15_ini.ckpt).\n\nFor appearance-disentangled Pose Control, please download pretrained [Appearance Control Model](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1oGIxynPhluSjs2rycwQdK4sCx2W_81xE\u002Fview?usp=sharing) and pretrained [ControlNet OpenPose](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_v11p_sd15_openpose.pth).\n\nThe pre-processed TikTok dataset can be downloaded from [here](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jEK0YJ5AfZZuFNqGGqOtUPFx--TIebT9\u002Fview?usp=sharing). OpenPose may fail to detect human pose skeletons for some images, so we will filter those failure cases and train our model on clean data.\n\nPlace the pretrained weights and dataset as following:\n```bash\nMagicDance\n|----TikTok-v4\n|----pretrained_weights\n  |----control_v11p_sd15_openpose.pth\n  |----control_sd15_ini.ckpt\n  |----model_state-110000.th\n  |----model_state-10000.th  \n|----...\n```\n\n## Environment\nThe environment from my machine is `python==3.9`, `pytorch==1.13.1`, `CUDA==11.7`. You may use other version of these prerequisites according to your local environment.\n```bash\nconda env create -f environment.yaml\nconda activate magicpose\n```\n### Inference with your own image and pose sequence:\n```bash\nbash scripts\u002Finference_any_image_pose.sh\n```\nWe offer some images and poses in \"example_data\", you can easily inference with your own image or pose sequence by replacing the arguments \"local_cond_image_path\" and \"local_pose_path\" in inference_any_image_pose.sh. Some interesting outputs from out-of-domain images are shown below:\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_d5c32d31fc8d.png\" alt=\"MagicDance: Realistic Human Dance Video Generation with Motions & Facial Expressions Transfer\">\n\u003C\u002Fdiv>\nOur model is also able to retarget the pose of generated image from T2I model.\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_c81b901147ae.png\" alt=\"MagicDance: Realistic Human Dance Video Generation with Motions & Facial Expressions Transfer\">\n\u003C\u002Fdiv>\n\n\n## Inference \n### Inference on the test set:\n```bash\nbash scripts\u002Finference_tiktok_dataset.sh\n```\nWe use exactly same code from [DisCo](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo) for metrics evaluation. Some example outputs from our model are shown below:\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_ec8c69ea3fb6.png\" alt=\"MagicDance: Realistic Human Dance Video Generation with Motions & Facial Expressions Transfer\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n\n## Training\nAppearance Control Pretraining:\n```bash\nbash scripts\u002Fappearance_control_pretraining.sh\n```\n\nAppearance-Disentangled Pose Control:\n```bash\nbash scripts\u002Fappearance_disentangle_pose_control.sh\n```\n\n\n### Multi-GPU training:\nWe have already implemented DistributedDataParallel in the python training script. If you want to use multi gpu instead of the first gpu on your machine for traning, see the following script for an example:\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 torchrun --master_port 10000 --nproc_per_node 8 train_tiktok.py \\\n```\nThis will use 8 GPUs and run 8 processes(nproc_per_node=8) for training.\n\n## Using your own video data for training \nFor training on your own dataset, you first need to run [openpose](https:\u002F\u002Fgithub.com\u002FCMU-Perceptual-Computing-Lab\u002Fopenpose) for your input images\u002Fvideos and save the visualized pose map. Then, organize them as the format shown in the TikTok dataset. You can also refer to [DisCo-OpenPose Preprocessing](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo\u002Fblob\u002Fmain\u002FPREPRO.md#openpose) or [ControlNet-OpenPose](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FControlNet-v1-1-nightly?tab=readme-ov-file#controlnet-11-openpose), we use exactly the same Pose ControlNet in our pipeline.\nThen set the path to your data in [dataset\u002Ftiktok_video_arnold_copy.py](https:\u002F\u002Fgithub.com\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fdataset\u002Ftiktok_video_arnold_copy.py#L287)\n\n```bash\nYour Dataset\n|----train_set\n  |----video_000\n    |----000.jpg\n    |----001.jpg\n    |----002.jpg\n    ...\n  |----video_001\n  |----video_002\n  ...\n|----pose_map_train_set\n  |----video_000\n    |----000.jpg\n    |----001.jpg\n    |----002.jpg\n    ...\n  |----video_001\n  |----video_002\n  ...\n|----val_set\n|----pose_map_val_set\n|----test_set\n|----pose_map_test_set\n|----...\n```\n\n\n## Some tips\n### The task\nFrom our experiences with this project, this motion retargeting task is a data-hungry task. Generation result highly depends on the training data, e.g. the quality of pose tracker, the amount of video sequences and frames per video in your training data. You may consider adopt [DensePose](https:\u002F\u002Farxiv.org\u002Fabs\u002F1802.00434) as in [MagicAnimate](https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16498), [DWPose](https:\u002F\u002Fgithub.com\u002FIDEA-Research\u002FDWPose) as in [Animate Anyone](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2311.17117.pdf) or any other geometry control for better generation quality. We have tried [MMPose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose) as well, which produced slightly better pose detection results. Introduce extra training data will yield better performance, consider using any other real-human dataset half-body\u002Ffull-body dataset, e.g. [TaiChi](https:\u002F\u002Fgithub.com\u002FAliaksandrSiarohin\u002Ffirst-order-model)\u002F[DeepFashion](https:\u002F\u002Fmmlab.ie.cuhk.edu.hk\u002Fprojects\u002FDeepFashion.html), for further finetuning.\n\n### The code\nMost of the arguments are self-explanatory in the codes. Several key arguments are explained below.\n\n* `model_config` A relative or absolute folder path to the config file of your model architecture.\n* `img_bin_limit` The maximum step for randomly selecting source and target image during training. During inference, the value is set to be \"all\".\n* `control_mode` This argument controls the Image-CFG during inference. \"controlnet_important\" denotes Image-CFG is used and \"balance\" means not.\n* `wonoise` The reference image is fed into the appearance control model without adding noise.\n* `with_text` When \"with_text\" is given, text is **not** used for training. (I know it's a bit confusing, lol)\n* `finetune_control` Finetune Appearance Control Model (and Pose ControlNet).\n* `output_dir` A relative or absolute folder for writing checkpoints.\n* `local_image_dir` A relative or absolute folder  for writing image outputs.\n* `image_pretrain_dir` A relative or absolute folder for loading appearance control model checkpoint.\n* `pose_pretrain_dir` A relative or absolute path to pose controlnet.\n\n## Citing\nIf you find our work useful, please consider citing:\n```BibTeX\n@article{chang2023magicdance,\n  title={MagicDance: Realistic Human Dance Video Generation with Motions \\& Facial Expressions Transfer},\n  author={Chang, Di and Shi, Yichun and Gao, Quankai and Fu, Jessica and Xu, Hongyi and Song, Guoxian and Yan, Qing and Yang, Xiao and Soleymani, Mohammad},\n  journal={arXiv preprint arXiv:2311.12052},\n  year={2023}\n}\n```\n\n## License\n\nOur code is distributed under the USC research license. See `LICENSE.txt` file for more information.\n\n\n## Acknowledgments\nThis work was sponsored by the Army Research Office and was accomplished under Cooperative Agreement Number W911NF-20-2-0053. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Office or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.\n      \nOur code follows several excellent repositories. We appreciate them for making their codes available to the public. We also appreciate the help from [Tan Wang](https:\u002F\u002Fgithub.com\u002FWangt-CN), who offered assistance to our baselines comparison experiment.\n\n* [DisCo](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo)\n* [AnimateDiff](https:\u002F\u002Fgithub.com\u002Fguoyww\u002FAnimateDiff)\n* [ControlNet](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FControlNet)\n\n","\u003Cp align=\"center\">\n\n  \u003Ch2 align=\"center\">MagicPose：具有身份感知扩散的逼真人体姿态与面部表情重定向\u003C\u002Fh2>\n  \u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fboese0601.github.io\u002F\">\u003Cstrong>常迪\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·  \n    \u003Ca href=\"https:\u002F\u002Fseasonsh.github.io\u002F\">\u003Cstrong>施一春\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fzerg-overmind.github.io\u002F\">\u003Cstrong>高权凯\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fhongyixu37.github.io\u002Fhomepage\u002F\">\u003Cstrong>徐洪毅\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fjessica-fu-60a504254\u002F\">\u003Cstrong>傅洁西卡\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Cbr>\u003Ca href=\"https:\u002F\u002Fguoxiansong.github.io\u002Fhomepage\u002Findex.html\">\u003Cstrong>宋国贤\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·  \n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=0TIYjPAAAAAJ&hl=en\">\u003Cstrong>严青\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=hPXUR0cAAAAJ&hl=en\">\u003Cstrong>朱义哲\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=_MAKSLkAAAAJ&hl=en\">\u003Cstrong>杨晓\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>2\u003C\u002Fsup>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwww.ihp-lab.org\u002F\">\u003Cstrong>穆罕默德·索莱曼尼\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup>1\u003C\u002Fsup>\n    ·\n    \u003Cbr>\n    \u003Csup>1\u003C\u002Fsup>南加州大学 &nbsp;&nbsp;&nbsp; \u003Csup>2\u003C\u002Fsup>字节跳动公司\n    \u003Cbr>\n    \u003C\u002Fbr>\n        \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.12052\">\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-MagicPose-green' alt='论文PDF'>\n        \u003C\u002Fa>\n        \u003Ca href='https:\u002F\u002Fboese0601.github.io\u002Fmagicdance\u002F'>\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F项目页面-MagicPose-blue' alt='项目页面'>\u003C\u002Fa>\n        \u003Ca href='https:\u002F\u002Fyoutu.be\u002FVPJe6TyrT-Y'>\n        \u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-MagicPose-rgb(255, 0, 0)' alt='Youtube'>\u003C\u002Fa>\n     \u003C\u002Fbr>\n    \u003Ctable align=\"center\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_889050898621.gif\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_d3812b9d3051.gif\">\n               &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 真实图像    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  姿态输入   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TPS方法   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Disco方法   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  MagicDance方法\n    \u003C\u002Ftable>\n\u003C\u002Fp>\n\n## 新闻\n* **[2024.04.03]** 更新与同期工作的对比结果。 \n* **[2024.02.21]** 更新多GPU训练、数据加载器以及使用自有数据进行训练的说明。 \n* **[2024.02.15]** 发布训练与推理代码。 \n* **[2024.02.02]** 发布更新后的论文——MagicPose。方法和数据完全一致。\n* **[2023.11.18]** 发布MagicDance论文及项目页面。\n\n\n## 相关开源工作\n\n* [Disco](https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.00040)，来自微软\n* [MagicAnimate](https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16498)，来自字节跳动新加坡团队\n\n## 与同期工作的对比\n### 与Animate Anyone的对比\n\u003Cp align=\"center\">\n    \u003Ctable align=\"center\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_5861f646c4cd.gif\">\n    \u003C\u002Ftable>\n\u003C\u002Fp>\n\n### 与MagicAnimate的对比\nMagicPose与MagicAnimate在面部表情编辑上的对比。MagicAnimate无法生成多样化的面部表情，而MagicPose则可以。\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_db6a8705185f.png\" alt=\"MagicDance：通过动作与面部表情迁移实现逼真的人体舞蹈视频生成\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\nMagicPose与MagicAnimate在野外场景下姿态重定向任务上的对比。MagicAnimate无法生成人物背面的姿态，而MagicPose则能够做到。\n\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_43fa52f0e3a0.png\" alt=\"MagicDance：通过动作与面部表情迁移实现逼真的人体舞蹈视频生成\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n## 快速上手 \n若需对TikTok数据集或您自己的图像与姿态序列进行推理，请下载我们的MagicDance [检查点](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1Ny5zkgo3aLVekCJTAga-D_XlMGpR1cj2?usp=sharing)。\n\n如需进行外观控制预训练，请下载适用于[StableDiffusion V1.5](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_sd15_ini.ckpt)的预训练模型。\n\n对于外观解耦的姿态控制任务，请下载预训练的[外观控制模型](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1oGIxynPhluSjs2rycwQdK4sCx2W_81xE\u002Fview?usp=sharing)和预训练的[ControlNet OpenPose](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_v11p_sd15_openpose.pth)。\n\n预处理后的TikTok数据集可从[这里](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jEK0YJ5AfZZuFNqGGqOtUPFx--TIebT9\u002Fview?usp=sharing)下载。由于OpenPose可能无法检测某些图像中的人体姿态骨架，我们将过滤掉这些失败案例，并在干净的数据上训练我们的模型。\n\n请按以下方式放置预训练权重和数据集：\n```bash\nMagicDance\n|----TikTok-v4\n|----pretrained_weights\n  |----control_v11p_sd15_openpose.pth\n  |----control_sd15_ini.ckpt\n  |----model_state-110000.th\n  |----model_state-10000.th  \n|----...\n```\n\n## 运行环境\n我使用的机器环境为`python==3.9`、`pytorch==1.13.1`、`CUDA==11.7`。您可以根据本地环境选择其他版本的依赖项。\n```bash\nconda env create -f environment.yaml\nconda activate magicpose\n```\n### 使用您自己的图像和姿态序列进行推理：\n```bash\nbash scripts\u002Finference_any_image_pose.sh\n```\n我们在“example_data”中提供了一些示例图像和姿态，您只需替换inference_any_image_pose.sh脚本中的“local_cond_image_path”和“local_pose_path”参数，即可轻松地使用自己的图像或姿态序列进行推理。以下展示了一些来自域外图像的有趣输出：\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_d5c32d31fc8d.png\" alt=\"MagicDance：通过动作与面部表情迁移实现逼真的人体舞蹈视频生成\">\n\u003C\u002Fdiv>\n我们的模型还能够将T2I模型生成的图像姿态进行重定向。\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_c81b901147ae.png\" alt=\"MagicDance：通过动作与面部表情迁移实现逼真的人体舞蹈视频生成\">\n\u003C\u002Fdiv>\n\n\n## 推理 \n### 在测试集上进行推理：\n```bash\nbash scripts\u002Finference_tiktok_dataset.sh\n```\n我们使用与[DisCo](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo)完全相同的代码来进行指标评估。以下展示了一些由我们的模型生成的示例输出：\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_readme_ec8c69ea3fb6.png\" alt=\"MagicDance：通过动作与面部表情迁移实现逼真的人体舞蹈视频生成\">\n\u003C\u002Fdiv>\n\u003Cbr>\n\n\n\n## 训练\n外观控制预训练：\n```bash\nbash scripts\u002Fappearance_control_pretraining.sh\n```\n\n外观解耦的姿态控制：\n```bash\nbash scripts\u002Fappearance_disentangle_pose_control.sh\n```\n\n### 多GPU训练：\n我们已经在Python训练脚本中实现了DistributedDataParallel。如果您希望使用多块GPU而不是您机器上的第一块GPU进行训练，请参阅以下示例脚本：\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 torchrun --master_port 10000 --nproc_per_node 8 train_tiktok.py \\\n```\n这将使用8块GPU，并启动8个进程（nproc_per_node=8）来进行训练。\n\n## 使用您自己的视频数据进行训练\n要使用您自己的数据集进行训练，首先需要对输入的图像或视频运行[openpose](https:\u002F\u002Fgithub.com\u002FCMU-Perceptual-Computing-Lab\u002Fopenpose)，并保存可视化的人体姿态图。然后，按照TikTok数据集中的格式组织这些数据。您也可以参考[DisCo-OpenPose预处理](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo\u002Fblob\u002Fmain\u002FPREPRO.md#openpose)或[ControlNet-OpenPose](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FControlNet-v1-1-nightly?tab=readme-ov-file#controlnet-11-openpose)，我们在管道中使用的正是相同的姿态ControlNet。\n接下来，在[dataset\u002Ftiktok_video_arnold_copy.py](https:\u002F\u002Fgithub.com\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fdataset\u002Ftiktok_video_arnold_copy.py#L287)中设置您的数据路径。\n\n```bash\n您的数据集\n|----train_set\n  |----video_000\n    |----000.jpg\n    |----001.jpg\n    |----002.jpg\n    ...\n  |----video_001\n  |----video_002\n  ...\n|----pose_map_train_set\n  |----video_000\n    |----000.jpg\n    |----001.jpg\n    |----002.jpg\n    ...\n  |----video_001\n  |----video_002\n  ...\n|----val_set\n|----pose_map_val_set\n|----test_set\n|----pose_map_test_set\n|----...\n```\n\n\n## 一些提示\n### 关于任务\n根据我们在该项目中的经验，动作重定向任务是一个非常依赖数据的任务。生成结果高度依赖于训练数据，例如姿态跟踪器的质量、视频序列的数量以及每段视频中的帧数。您可以考虑采用像[MagicAnimate](https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16498)中使用的[DensePose](https:\u002F\u002Farxiv.org\u002Fabs\u002F1802.00434)、[Animate Anyone](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2311.17117.pdf)中使用的[DWPose](https:\u002F\u002Fgithub.com\u002FIDEA-Research\u002FDWPose)或其他几何控制方法，以获得更好的生成质量。我们也尝试过[MMPose](https:\u002F\u002Fgithub.com\u002Fopen-mmlab\u002Fmmpose)，它在姿态检测方面表现稍好一些。引入额外的训练数据会带来更好的性能，可以考虑使用其他真人半身或全身数据集，例如[TaiChi](https:\u002F\u002Fgithub.com\u002FAliaksandrSiarohin\u002Ffirst-order-model)\u002F[DeepFashion](https:\u002F\u002Fmmlab.ie.cuhk.edu.hk\u002Fprojects\u002FDeepFashion.html)，来进行进一步的微调。\n\n### 关于代码\n代码中的大多数参数都比较直观易懂。以下是一些关键参数的说明：\n\n* `model_config` 模型架构配置文件的相对或绝对路径。\n* `img_bin_limit` 训练过程中随机选择源图像和目标图像的最大步长。在推理阶段，该值被设置为“all”。\n* `control_mode` 此参数控制推理过程中的Image-CFG。“controlnet_important”表示使用Image-CFG，“balance”则表示不使用。\n* `wonoise` 参考图像在输入到外观控制模型时不会添加噪声。\n* `with_text` 当设置为“with_text”时，文本**不会**用于训练。（我知道这有点让人困惑，哈哈）\n* `finetune_control` 对外观控制模型（以及姿态ControlNet）进行微调。\n* `output_dir` 用于保存检查点的相对或绝对路径。\n* `local_image_dir` 用于保存图像输出的相对或绝对路径。\n* `image_pretrain_dir` 用于加载外观控制模型检查点的相对或绝对路径。\n* `pose_pretrain_dir` 姿态ControlNet的相对或绝对路径。\n\n## 引用\n如果您觉得我们的工作有用，请考虑引用：\n```BibTeX\n@article{chang2023magicdance,\n  title={MagicDance: Realistic Human Dance Video Generation with Motions \\& Facial Expressions Transfer},\n  author={Chang, Di and Shi, Yichun and Gao, Quankai and Fu, Jessica and Xu, Hongyi and Song, Guoxian and Yan, Qing and Yang, Xiao and Soleymani, Mohammad},\n  journal={arXiv preprint arXiv:2311.12052},\n  year={2023}\n}\n```\n\n## 许可证\n\n我们的代码遵循USC研究许可证进行分发。更多信息请参阅`LICENSE.txt`文件。\n\n## 致谢\n本研究得到了美国陆军研究办公室的资助，合作协议编号为W911NF-20-2-0053。本文所表达的观点和结论属于作者个人，不应被视为代表美国陆军研究办公室或美国政府的官方政策，无论是明示还是暗示。美国政府有权在不考虑本文任何版权标注的情况下，为政府目的复制和分发本文的副本。\n      \n我们的代码参考了多个优秀的开源项目。感谢这些项目将他们的代码公开分享。同时，我们也感谢[Tan Wang](https:\u002F\u002Fgithub.com\u002FWangt-CN)在基线对比实验中提供的帮助。\n\n* [DisCo](https:\u002F\u002Fgithub.com\u002FWangt-CN\u002FDisCo)\n* [AnimateDiff](https:\u002F\u002Fgithub.com\u002Fguoyww\u002FAnimateDiff)\n* [ControlNet](https:\u002F\u002Fgithub.com\u002Flllyasviel\u002FControlNet)","# MagicDance 快速上手指南\n\nMagicDance（论文中称为 MagicPose）是一个基于身份感知扩散模型的工具，能够实现逼真的人体姿态迁移和面部表情重定向。本指南帮助开发者快速完成环境配置并运行推理。\n\n## 环境准备\n\n### 系统要求\n*   **操作系统**: Linux (推荐)\n*   **Python**: 3.9\n*   **PyTorch**: 1.13.1\n*   **CUDA**: 11.7 (可根据本地环境调整版本)\n*   **显存**: 建议 16GB 及以上以流畅运行推理\n\n### 前置依赖\n确保已安装 `conda` 或 `mamba` 包管理器。\n\n## 安装步骤\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FBoese0601\u002FMagicDance.git\ncd MagicDance\n```\n\n### 2. 创建虚拟环境\n使用项目提供的配置文件创建环境：\n```bash\nconda env create -f environment.yaml\nconda activate magicpose\n```\n> **提示**：如果 `environment.yaml` 下载依赖较慢，可手动创建环境后，使用国内镜像源（如清华源）安装 `requirements.txt` 中的依赖。\n\n### 3. 下载预训练模型与数据\n请创建以下目录结构，并将下载的权重文件放入对应位置：\n\n```bash\nMagicDance\n|----TikTok-v4              # 存放数据集（可选，仅测试集推理需要）\n|----pretrained_weights     # 存放所有预训练权重\n  |----control_v11p_sd15_openpose.pth\n  |----control_sd15_ini.ckpt\n  |----model_state-110000.th\n  |----model_state-10000.th  \n|----...\n```\n\n**所需文件下载链接：**\n1.  **主模型检查点**: [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1Ny5zkgo3aLVekCJTAga-D_XlMGpR1cj2?usp=sharing) (包含 `model_state-*.th`)\n2.  **StableDiffusion V1.5 外观控制预训练模型**: [HuggingFace](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_sd15_ini.ckpt)\n3.  **外观控制模型**: [Google Drive](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1oGIxynPhluSjs2rycwQdK4sCx2W_81xE\u002Fview?usp=sharing)\n4.  **ControlNet OpenPose**: [HuggingFace](https:\u002F\u002Fhuggingface.co\u002FBoese0601\u002FMagicDance\u002Fblob\u002Fmain\u002Fcontrol_v11p_sd15_openpose.pth)\n\n*(注：若需运行完整测试集评估，可下载预处理后的 TikTok 数据集，链接见原文 README)*\n\n## 基本使用\n\n### 自定义图片与姿态序列推理\n这是最常用的功能，将指定的人物图片驱动为指定的姿态视频。\n\n1.  准备一张人物参考图（`reference.jpg`）和一个姿态序列文件夹（包含按顺序命名的姿态图，如 `000.jpg`, `001.jpg`...）。\n2.  修改脚本 `scripts\u002Finference_any_image_pose.sh` 中的路径参数：\n    *   `local_cond_image_path`: 指向你的参考图片路径。\n    *   `local_pose_path`: 指向你的姿态序列文件夹路径。\n3.  运行推理脚本：\n\n```bash\nbash scripts\u002Finference_any_image_pose.sh\n```\n\n生成的输出图像将保存在配置的输出目录中。\n\n### 示例数据测试\n项目自带了示例数据位于 `example_data` 目录。若未修改脚本参数，直接运行上述命令即可使用默认示例数据进行测试，验证环境是否配置成功。\n\n### 多 GPU 推理（可选）\n如需加速或在多卡机器上运行，可参考训练部分的 `torchrun` 命令格式调整推理脚本，通常单卡即可满足推理需求。","某短视频特效团队需要为虚拟偶像制作一段高难度舞蹈视频，要求角色在大幅度转身和复杂肢体动作中，依然保持面部表情生动且人物身份特征不丢失。\n\n### 没有 MagicDance 时\n- **表情僵硬失真**：传统重定向技术在处理大幅度的舞蹈动作时，往往无法同步迁移细腻的面部微表情，导致虚拟偶像看起来像“面具人”，缺乏感染力。\n- **身份特征丢失**：当角色做出背身、侧身等大角度姿态时，生成模型容易混淆人物特征，导致衣服纹理错乱或脸部五官变形，甚至无法生成背部细节。\n- **后期修复成本高昂**：为了修正动作与表情的不协调，动画师需要逐帧手动调整骨骼绑定和表情参数，制作一条 15 秒的视频可能需要数天时间。\n- **多视角一致性差**：尝试复用现有动作库时，不同镜头下的角色外观会出现闪烁或跳变，难以保证视频整体的视觉连贯性。\n\n### 使用 MagicDance 后\n- **表情自然同步**：MagicDance 利用身份感知扩散模型，能精准将参考视频中丰富的面部表情（如眨眼、微笑）迁移到目标角色上，即使在大动作下表情依然生动自然。\n- **完美保留身份特征**：无论角色如何旋转或做出高难度姿势，MagicDance 都能稳定保持人物的服饰细节和五官特征，成功生成清晰的背部画面，杜绝了“换脸”般的违和感。\n- **自动化高效产出**：团队只需提供一张角色参考图和一段动作视频，MagicDance 即可自动完成高质量的重定向，将原本数天的制作周期缩短至几分钟。\n- **极佳的时空一致性**：生成的视频在连续帧之间过渡平滑，彻底消除了画面闪烁问题，直接达到成品级输出标准，无需额外修图。\n\nMagicDance 通过身份感知的扩散技术，彻底解决了虚拟人生成中动作与表情难以兼得的痛点，让高保真数字人视频创作变得像编辑文档一样简单高效。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FBoese0601_MagicDance_db6a8705.png","Boese0601","Di Chang","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FBoese0601_f5806c94.jpg","PhD@USC CS | Visiting PhD@Stanford\r\n21' Camaro ZL1 1LE | Cars, Racing, Life","University of Southern California | Stanford | Meta","Palo Alto, CA, USA","dichang@usc.edu","DiChang10","https:\u002F\u002Fboese0601.github.io\u002F","https:\u002F\u002Fgithub.com\u002FBoese0601",[84,88,92,96,100,103,107,111,115],{"name":85,"color":86,"percentage":87},"Python","#3572A5",94.1,{"name":89,"color":90,"percentage":91},"Java","#b07219",3.3,{"name":93,"color":94,"percentage":95},"Swift","#F05138",1.7,{"name":97,"color":98,"percentage":99},"Shell","#89e051",0.3,{"name":101,"color":102,"percentage":99},"C++","#f34b7d",{"name":104,"color":105,"percentage":106},"CMake","#DA3434",0.2,{"name":108,"color":109,"percentage":110},"Thrift","#D12127",0.1,{"name":112,"color":113,"percentage":114},"Dockerfile","#384d54",0,{"name":116,"color":117,"percentage":114},"Ruby","#701516",778,65,"2026-04-13T07:37:17","NOASSERTION",4,"Linux","必需 NVIDIA GPU，支持多卡训练 (DistributedDataParallel)，示例命令使用 8 张显卡，需 CUDA 11.7","未说明",{"notes":127,"python":128,"dependencies":129},"官方环境基于 Linux 测试 (提及 CUDA_VISIBLE_DEVICES 变量)。需预先下载 StableDiffusion V1.5、ControlNet OpenPose 及作者提供的预训练权重。训练数据需自行使用 OpenPose 预处理生成姿态图。建议使用 conda 创建环境 (environment.yaml)。","3.9",[130,131],"pytorch==1.13.1","CUDA==11.7",[15,61],[134,135,136,137,138,139,140,141],"cartoon-animation","diffusion-models","generative-model","image-editing","video-editing","behavior-generation","generative-ai","video-generation",null,"2026-03-27T02:49:30.150509","2026-04-15T07:11:24.087373",[],[]]