ESC
开源 4 分钟阅读

anymove:从单个AI视频为任何生物进行动作捕捉,双视角DINOv2关节读取器与骨骼拟合

anymove是一款开源工具,可将单个AI视频转换为任何绑定骨骼的生物(如龙、蜘蛛、恶魔)的3D动画。它通过双摄像头视角合一帧,利用DINOv2训练关节读取器,在两个视角中识别关节并拟合骨骼,最终导出GLB格式。成本低廉(每个片段约0.26美元),适用于游戏、动画和VR领域,有望降低动作捕捉门槛。

来源:GitHub

anymove:从单个AI视频为任何生物进行动作捕捉



六个面板:龙、巨型蜘蛛、火恶魔和狼都在移动;然后一段AI视频同时从正面和侧面显示龙;每个关节在两个视角中都被找到;两个视角像墙一样立起并在3D中固定每个关节;骨骼落到这些点上;火恶魔、蜘蛛和狼以相同方式移动。

@patch_gg · 龙、巨型蜘蛛、火恶魔、狼 · 每个动作一个AI片段,每个0.26美元,读取和拟合不到一分钟。

anymove可以将一段AI视频转换为任何绑定骨骼的生物的动画,包括翅膀、尾巴和八条腿。视频模型从一个帧中的两个摄像机拍摄生物,左侧为正面,右侧为侧面。针对该生物训练的关节读取器可以在两个视角中找到每个关节。关节在两个视角中处于相同高度,因此这对视角可将其固定在3D中,然后逐帧将骨骼绑定到这些关节上,并导出为GLB格式。

该方法来自@CanItCode;MiniMax H3 LoRA步骤是@Graalitoo的创意。这个仓库是我们两者的工作版本,并带有运行所需的代理技能。

工作原理。

龙的概念图、箭头以及它变成的带纹理3D模型。1 · 3D模型。
一张图片变成真实尺寸的带纹理网格。
flux 3图片, tripo h3.1网格 · $0.40
龙像淡淡的X光,里面有白色骨骼。2 · 骨骼。
在网格视图上放置骨骼,在 Blender中进行蒙皮。
42根骨骼:腿、翅膀、尾巴
龙的每条腿和翅膀都涂有自己的颜色,右翼被标记。3 · 肢体颜色。
每条肢体都有自己的颜色,因此左右永远不会混淆。
6条肢体,6种颜色
龙的俯视图,一个摄像机在它的脸部,一个在它的右侧。4 · 两个摄像机。
一个摄像机在正面,一个在侧面,两个视角在一个帧中;视频模型根据提示同时为两者制作动画。
minimax h3 max on fal · 5秒,$0.26
龙在两个视角中的随机训练姿势,其真实关节被绘制出来。5 · 教导读取器。
视觉模型从随机姿势中学习这只龙,这些姿势的关节是已知的;其平均误差从40像素降至6像素。
dinov2 · 2,200个姿势 · 在一张GPU上20分钟
AI片段,白色骨骼覆盖在龙的两个视角上。6 · 读取每个关节。
读取器在每一帧的两个视角中找到每个关节。
50个关节 · 每个片段10秒
两个视角像墙一样立起成直角,鼻子被标记在两个视角中,两条线在3D中相遇于鼻子。7 · 两个视角,3D。
将两个视角像墙一样立起成直角:每个关节位于其两条线相遇的地方。正面给出左右方向,侧面给出前后方向。
正面给出x轴,侧面给出y轴,两者给出z轴
骨骼像X光,其骨头落在3D点上,杂散点为灰色。8 · 骨骼跟随。
骨骼将其骨头弯曲到这些点上,忽略杂散点,并为任何引擎导出。
glb,24帧/秒,无需手动编辑 · 每个片段不到一分钟

docs/PIPELINE.md有逐个文件的版本。

快速开始。

你需要一个配备CUDA的NVIDIA GPU(训练读取器需要24 GB;读取和拟合需要更少)、Python 3.11、位于PATH中的Blender 5.x(或BLENDER=/path/to/blender),以及一个fal密钥来生成新片段。

git clone https://github.com/Patch-gg/anymove && cd anymove
python3.11 -m venv .venv
.venv/bin/pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/cu128
.venv/bin/pip install -r requirements.txt
cp .env.example .env                                  # then add your FAL_KEY; git ignores .env

在CPU上拟合龙的咆哮,无需Blender或下载。仓库携带了读取器在片段中找到的关节;这会将骨骼拟合到它们(约20秒)并打印两个视角的一致性:

mkdir -p runs/dragon/clips/roar
MOCAP_CREATURE=assets/dragon .venv/bin/python -m mocap.solve examples/dragon_roar/det.npz \
  assets/dragon/rigged/rig_info.json runs/dragon/clips/roar/motion.json

整个捕捉过程,从AI片段到GLB,使用示例生物的网格、训练好的读取器和来自发布的片段(13 MB网格,355 MB读取器,4 MB片段):

tools/fetch_examples.sh dragon --readers --clips
tools/prep.sh dragon && tools/rig.sh dragon          # 真实尺寸、骨骼、蒙皮、肢体涂色、参考帧
tools/capture.sh dragon runs/dragon/videos/roar/s1/h3max.mp4 roar
# runs/dragon/clips/roar/render/animation.glb, and showcase.mp4 to compare it with the clip

为同一只龙生成一个新的动作(两个片段,约0.52美元):

.venv/bin/python tools/make_prompt.py assets/dragon "the dragon whips its tail from side to side, then stands still." prompts/dragon/tailwhip.txt
tools/film.sh dragon tailwhip h3max 1,2
tools/capture.sh dragon runs/dragon/videos/tailwhip/s1/h3max.mp4 tailwhip

你自己的生物。

复制assets/中最接近的示例(狼:四条腿;龙:四条腿和翅膀;蜘蛛:八条腿;恶魔:两条腿、两条手臂、翅膀和尾巴),将你的网格放在assets/<name>/model.glb,然后执行:

tools/prep.sh <name>              # 在creature.json中设置"prep":真实尺寸、朝向-Y
# 将关节放在assets/<name>/rig.json的网格视图中;检查:tools/rig.sh <name> preview
tools/rig.sh <name>               # 构建、蒙皮、涂色、参考帧
tools/dataset.sh <name>           # 2,200个随机姿势,约25分钟
tools/train.sh <name>            # 关节读取器,约20分钟
tools/film.sh <name> <move>       # 在tools/make_prompt.py写出prompts/<name>/<move>.txt之后
tools/capture.sh <name> runs/<name>/videos/<move>/s1/h3max.mp4 <move>

以下技能可引导代理(或你)完成每一步,并带有区分好坏捕捉的检查。

代理技能。

anymove是Claude Code的一个插件,也有自己的市场:

/plugin marketplace add Patch-gg/anymove
/plugin install anymove@anymove
技能用途
anymove方法、设置、下一步是什么、成本
anymove-rig网格、朝向和比例,在rig.json中放置关节,构建和涂色骨骼,取景
anymove-film写出提示,在fal上生成片段,在捕捉前检查它们
anymove-reader渲染数据集,训练读取器,以厘米为单位的考试
anymove-capture读取、拟合、质量门槛,修复不好的拟合,展示渲染
anymove-lora在fal上训练和测试MiniMax H3 LoRA

它们是普通的Agent Skills(skills/<name>/SKILL.md),因此其他代理也可以从该文件夹加载它们。

结果。

生物骨骼读取器误差,正面/侧面(像素)视角一致性(1 = 相同脚落地)
狼,1.6米30根骨头,36个关节6.9 / 3.8小跑0.94 · 考试:平均3D关节误差0.94厘米
龙,3米42根骨头,50个关节,翅膀6.2 / 5.5起飞1.00,咆哮0.93,猛击0.85,行走0.81
巨型蜘蛛,2.4米跨度28根骨头,40个关节,8条腿2.9 / 3.6后仰0.99,咬0.96,扑0.89
火恶魔,3.6米38根骨头,46个关节,翅膀,尾巴8.4 / 9.4翅膀拍打0.99,猛撞0.84,咆哮0.73(脚掌着地)

读取器误差是在720行帧上的保留均值;恶魔站立时高412像素,因此其8.4像素约为高度的2%。表格中的每个片段都是MiniMax H3 Max。考试用已知关节渲染一段虚构动作,并在同一工作室中读取回来。

成本。

网格,Tripo H3.1带高清纹理$0.40
一个5秒双摄像机片段,MiniMax H3 Max约$0.26(H3:$0.30)
训练渲染,2,200个姿势 x 2个视角在一张RTX 4090上约25分钟
关节读取器,20个周期17-20分钟,12 GB
读取片段 / 拟合10秒 / 不到一分钟(龙的咆哮在CPU上20秒)
H3 LoRA,在fal上1,200步约$12,约2小时

fal上的价格截至2026年10月。

限制。

  • **八条腿

egged walking doesn’t fit.** The two views disagree about which legs are up (0.36-0.49). Big single gestures work best: rearing, roaring, slamming, taking off, pouncing.

  • Lying down doesn’t fit. The reader learns from random poses inside the joint limits, which don’t include lying on a side; the wolf’s death and lie-down clips failed.
  • Skeletons are placed by hand on grid views (tools/prep.sh, tools/rig.sh preview). UniRig could do it; its install pulls prebuilt flash-attn wheels.
  • Video models drift. Plain MiniMax H3 swapped the limb colours on 2 of 5 wolf clips; with the LoRA, 0 of 5 (one seed per move: a first read, not a benchmark). Seedance 2.5 played the views out of step on a trot.
  • The LoRA’s data is AI-derived. Its training clips re-render motions solved from AI clips, so the halves are in sync by construction but the motion itself is AI-made. Real dog mocap exists (AI4Animation) under a non-commercial licence.
  • Ground contact is wolf- and dragon-shaped. The solver’s ground term knows paw names fpaw, ftoe, hpaw, htoe; other creatures fit without it.
  • Fur and cloth need extra bones: springs (apply_motion.py --springs) or tracked tips (the wolf’s tracked fur read 7-28° swings from the video).

licence.

Apache-2.0, see LICENSE. The Patch name, mark, wordmark and Patch Pixel belong to Patch and aren’t covered by it. Other companies’ marks in this README belong to their owners and are shown only to credit their tools (icons from lobe-icons, MIT, and Simple Icons, CC0). MiniMax H3’s open weights carry a community licence and hosted use on fal goes through fal’s terms: check both before shipping what you make with them. The wolf LoRA in the release (lora-wolf-twocam-h3.safetensors) is a LoRA on MiniMax H3, so MiniMax H3’s community licence applies to it, not Apache-2.0.

credits.

  • The two-camera method is @CanItCode’s, and the H3 LoRA step is @Graalitoo’s.
  • DINOv2 by Meta (with registers, Apache-2.0) is the reader’s backbone.
  • Tripo H3.1 made the meshes, from concept pictures by Black Forest Labs’ FLUX 3.
  • MiniMax H3 and H3 Max made the clips, all run on fal.
  • Blender rigs, renders and exports everything.
  • Made by Patch (@patch_gg).

patch.gg. Mashups, mods and browser games.