0

从 lib.colab_util 导入 generate_video_from_obj,set_renderer,视频

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 安静视频(video_display_path)

() 中的 ImportError Traceback (最近一次调用最后一次) ----> 1 from lib.colab_util import generate_video_from_obj, set_renderer, video 2 3 renderer = set_renderer() 4 generate_video_from_obj(obj_path, out_img_path, video_path, renderer) 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:未定义符号:_ZNK2at6Tensor7is_cudaEv


4

1 回答 1

0

用户正在运行,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'
于 2022-01-07T13:08:38.780 回答