github地址
代码地址:https://github.com/Garfield-kh/PoseTriplet
推理地址:https://github.com/Garfield-kh/PoseTriplet/tree/main/estimator_inference
环境安装
安装numpy
pip install numpy
pytorch=gpu版本
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
安装moviepy
pip install moviepy
安装scipy
pip install scipy
安装matplotlib
pip install matplotlib
请将您的视频放入./wild_eval/source_video文件夹中
运行videopose-j16-wild-eval_run.py。然后您将在文件夹中找到渲染的输出视频./wild_eval
报错解决
ImportError: cannot import name 'int_classes' from 'torch._six' (C:\anaconda\envs\PoseTriplet-main\lib\site-packages\torch\_six.py)
解决
fn.py中from torch._six import string_classes, int_classes改为from
torch._six import string_classes,并加入import collections.abc as
int_classes
下载缺失模型
进入:https://github.com/zh-plus/video-to-pose3D
报错解决
出现RuntimeError: Requested MovieWriter (ffmpeg) not available
解决:
这个错误通常是由于缺少相关的依赖库或软件导致的。要解决这个问题,你可以尝试以下几种方法:
确保你已经安装了ffmpeg。你可以通过包管理器安装,比如使用以下命令:
sudo apt-get install ffmpeg
如果你使用的是conda环境,你可以尝试使用conda来安装ffmpeg:conda install -c conda-forge ffmpeg
如果你使用的是Jupyter
Notebook,你也可以尝试使用不同的视频编解码器,比如html5:python plt.rcParams[‘animation.ffmpeg_path’] = ‘/usr/bin/ffmpeg’ #
设置ffmpeg路径 ani.save(‘animation.mp4’, writer=‘ffmpeg’)
在文件estimator_inference/wild_eval/source_video/bilibili-clip中传入原始视频
生成结果:
之后上传3D转bvh细节