MoyGcc / vid2avatar

Vid2Avatar: 3D Avatar Reconstruction from Videos in the Wild via Self-supervised Scene Decomposition (CVPR2023)
https://moygcc.github.io/vid2avatar/
MIT License
1.25k stars 105 forks source link

train.py : ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory #67

Open bring-nirachornkul opened 6 months ago

bring-nirachornkul commented 6 months ago

Torch version: 1.9.1.post3 CUDA version: 11.1 Python Version : 3.7 Pytorch3D : 0.7.6

Hardware : CPU : AMD Ryzen 9 5900X 12-Core Processor GPU : RTX 3090 RAM : 64 GBs Linux OS : Ubuntu 23.04

When I run python train.py then this error occurred :

(v2a) blinkdrive@blinkdrive-System-Product-Name:~/Documents/Projects/Summer2024/02vid2avatar/code$ python train.py
Traceback (most recent call last):
  File "train.py", line 1, in <module>
    from v2a_model import V2AModel
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/v2a_model.py", line 3, in <module>
    from lib.model.v2a import V2A
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/v2a.py", line 4, in <module>
    from .deformer import SMPLDeformer
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/deformer.py", line 4, in <module>
    from pytorch3d import ops
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/__init__.py", line 7, in <module>
    from .ball_query import ball_query
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/ball_query.py", line 10, in <module>
    from pytorch3d import _C
ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
MoyGcc commented 6 months ago

Hi,

It's an installation problem of PyTorch3D. Could you double check that you have installed it successfully (with CUDA enabled)? You can refer to https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md for detailed instructions.

bring-nirachornkul commented 6 months ago

Hi,

It's an installation problem of PyTorch3D. Could you double check that you have installed it successfully (with CUDA enabled)? You can refer to https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md for detailed instructions.

I have to these steps already. Here is the error after run train.py

(v2a) blinkdrive@blinkdrive-System-Product-Name:~/Documents/Projects/Summer2024/02vid2avatar/code$ python train.py
Traceback (most recent call last):
  File "train.py", line 1, in <module>
    from v2a_model import V2AModel
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/v2a_model.py", line 3, in <module>
    from lib.model.v2a import V2A
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/v2a.py", line 4, in <module>
    from .deformer import SMPLDeformer
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/deformer.py", line 4, in <module>
    from pytorch3d import ops
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/__init__.py", line 5, in <module>
    from .graph_conv import GraphConv
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/graph_conv.py", line 8, in <module>
    from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
MoyGcc commented 6 months ago

Could you refer to the previous comment https://github.com/MoyGcc/vid2avatar/issues/49#issuecomment-1722474663? It's basically the unsuccessful installation of PyTorch3D (with CUDA). You can feel free to change the python/torch/cuda versions to match some prebuilt wheels of PyTorch3D which should ensure a bug-free installation.