执行pip install -r requirement.txt安装所需要依赖
模型配置文件见configs/base.yaml; 对denoiser, diffusion, dataset等进行配置
首先需要对数据集进行预处理:
python preprocess.py --smpl_dir=/path/to/smpl --source_dir=/path/to/dataset --target_dir=/path/to/save --dataset=beat2
注: 可能需要对数据预处理代码进行修改, 当前版本没有对translation进行归一化, 且表示格式比较简单粗暴
然后执行以下命令训练模型
python train.py --config=/path/to/config.yaml
模型训练中执行得到随机采样结果, 保存在sample.npz中(可以直接加载进blender)
python inference.py --config=/path/to/config.yaml
Checkpoint位置由save_dir: /path/to/checkpoint指定
首先需要运行SMPLer-X得到初始人体姿态估计:
cd到SMPLer-X目录, 再cd main- 执行
sh detech.sh ${path_to_video} ${fps} ${checkpoint_name}, 执行结果保存到对应video名称下`smplx.npz'文件中 cd到本项目目录下, 执行python lift.py --config=/path/to/config --input=/path/to/smplx.npz --inference_step=1000
由于SMPLer-X存在比较严重的depth ambiguity, 所以使用diffusion进行refine的过程需要先对depth进行inpaint, 然后再使用DDIM inversion结合smooth score进行优化, 这个流程参考了以下两篇文章:
- Score-Guided Diffusion for 3D Human Recovery (CVPR 2024)
- COIN: Control-Inpainting Diffusion Prior for Human and Camera Motion Estimation (ECCV 2024)