Qiulin-W / SAFA

Official Pytorch Implementation of 3DV2021 paper: SAFA: Structure Aware Face Animation.
Other
177 stars 29 forks source link

animation_demo.py error #13

Open jinholeetopology opened 2 years ago

jinholeetopology commented 2 years ago

When I execute the following code, I had the bellow error. How we execute the "animation_demo.py" without error?

! python animation_demo.py --config config/end2end.yaml --checkpoint path/to/checkpoint --source_image_pth path/to/source_image --driving_video_pth path/to/driving_video --relative --adapt_scale --find_best_frame

Traceback (most recent call last): File "animation_demo.py", line 18, in from modules.tdmm_estimator import TDMMEstimator File "/content/SAFA/modules/tdmm_estimator.py", line 7, in from pytorch3d.io import load_obj File "/usr/local/lib/python3.7/dist-packages/pytorch3d/io/init.py", line 4, in from .obj_io import load_obj, load_objs_as_meshes, save_obj File "/usr/local/lib/python3.7/dist-packages/pytorch3d/io/obj_io.py", line 14, in from pytorch3d.renderer import TexturesAtlas, TexturesUV File "/usr/local/lib/python3.7/dist-packages/pytorch3d/renderer/init.py", line 3, in from .blending import ( File "/usr/local/lib/python3.7/dist-packages/pytorch3d/renderer/blending.py", line 9, in from pytorch3d import _C ImportError: /usr/local/lib/python3.7/dist-packages/pytorch3d/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl23ExcludeDispatchKeyGuardC1ENS_11DispatchKeyE

rlaboiss commented 1 year ago

You must have a version of PyTorch3D that is build against the same version of the installed pytorch and CUDA.

I got it working for fairly recent versions with the following:

pip install torch==1.11.0 torchvision==0.12.0 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip install git+https://github.com/facebookresearch/pytorch3d.git@v0.7.0