gpt4 book ai didi

ffmpeg - 使用 Pytorch3d 在视频中渲染结果

转载 作者:行者123 更新时间:2023-12-04 23:19:12 25 4
gpt4 key购买 nike

从 lib.colab_util 导入 generate_video_from_obj,set_renderer,视频
渲染器 = set_renderer()
generate_video_from_obj(obj_path,out_img_path,video_path,渲染器)
我们无法播放 cv2 生成的 mp4 视频
!ffmpeg -i $video_path -vcodec libx264 $video_display_path -y -loglevel quiet
视频(video_display_path)
ImportError Traceback(最近一次调用最后一次)
在 ()
----> 1 from lib.colab_util import generate_video_from_obj, set_renderer, video
2
3 渲染器 = set_renderer()
4 generate_video_from_obj(obj_path, out_img_path, video_path, 渲染器)
5
4帧
/usr/local/lib/python3.7/dist-packages/pytorch3d/renderer/blending.py in ()
7
8 # pyre-fixme[21]: 找不到名称 _Cpytorch3d .
----> 9 从 pytorch3d 导入 _C
10
11
ImportError:/usr/local/lib/python3.7/dist-packages/pytorch3d/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol :_ZNK2at6Tensor7is_cudaEv

最佳答案

用户正在运行,PIFuHD 协作。
试试 https://colab.research.google.com/drive/11z58bl3meSzo6kFqkahMa35G5jmh2Wgt?usp=sharing 提供的解决方法

# If you get an error in the next cell, you can instead try the following command (don't forget to comment out the one above!).
# Note that this error is caused by inconsistent cuda version for the pytorch3d package and pytorch in Colab environment.
# Thus, this issue may persist unless pytorch3d in the pip package is updated with the cuda version consistent with pytorch in Colab.
# Also please be aware that the following command is much slower as it builds pytorch3d from scratch.

# !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'

# You can try another solution below as well. This is also slow and requires you to restart the runtime.

# !pip install 'torch==1.6.0+cu101' -f https://download.pytorch.org/whl/torch_stable.html
# !pip install 'torchvision==0.7.0+cu101' -f https://download.pytorch.org/whl/torch_stable.html
# !pip install 'pytorch3d==0.2.5'

关于ffmpeg - 使用 Pytorch3d 在视频中渲染结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70299391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com