ranahanocka / point2mesh

Reconstruct Watertight Meshes from Point Clouds [SIGGRAPH 2020]
MIT License
1.04k stars 121 forks source link

ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory #4

Open hhf-hd opened 4 years ago

hhf-hd commented 4 years ago

I have encountered such a mistake:

Traceback (most recent call last): File "main.py", line 6, in from models.losses import chamfer_distance File "/home/lab505/gpu_point2mesh/models/losses.py", line 3, in from pytorch3d.structures.pointclouds import Pointclouds File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/structures/init.py", line 4, in from .pointclouds import Pointclouds File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/structures/pointclouds.py", line 5, in from .. import ops File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/ops/init.py", line 5, in from .graph_conv import GraphConv File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/ops/graph_conv.py", line 6, in from pytorch3d import _C ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

here is my configure: cudatoolkit 10.1.243 pytorch 1.4.0 py3.8_cuda10.1.243_cudnn7.6.3_0
pytorch3d 0.2.0

but after i use another configure : pytorch 1.5.0 py3.8_cpu_0 [cpuonly]
pytorch3d 0.2.0 pypi_0
it works,but it's too slow ,so i wonder if your code are running on GPU? look forword to your help,thanks !

ranahanocka commented 4 years ago

Hi @hhf-hd ,

It seems that the environment was not properly installed for some reason. Yes, this code uses GPU by default (if it exists).

Did you install the environment via conda env create -f environment.yml ? If not, please try using this method first.

If the above still did not work, try running these commands: python -c "import torch; print(torch.cuda.is_available())" python -c "import torch; print(torch.version.cuda)"

and let me know what is the output. Cuda should be available, and use version 10.1 .

-Rana

ZhiboRao commented 4 years ago

Hello, I have run this code too. if It uses CPU, it can work. However, if I use GPU, it can't work. I install the cuda 10.1. And I found that if my pytorch.cuda.is_available() is Ture, I can't import pytorch3D. If I reinstall pytorch3D, my pytorch.cuda.is_available() is False.
image image image

ZhiboRao commented 4 years ago

image

ranahanocka commented 4 years ago

Hi @RaoHaocheng ,

So it seems the issue is with the pytorch3D installation (there is no cuda...). Are you using a windows machine? Maybe you can try the steps listed here: https://github.com/facebookresearch/pytorch3d/issues/172#issuecomment-620855810

ranahanocka commented 4 years ago

@RaoHaocheng Also, you might want to try with PyTorch 1.4 instead of 1.5 (it seems that 1.5 might require cuda 10.2?). Did you try installation from the conda env like written in the README?

ZhiboRao commented 4 years ago

@ranahanocka, Thanks for you. I have run it successfully on GPUs. I found that the problem caused by CUDA on the system. My CUDA on the system is 9.2. However, my CUDA on the Conda is 10.1, which causes pytorch3d can't run. So I change the CUDA on the Conda to 9.2. And I install Pytorch3d of CUDA 9.2, which can be found in https://anaconda.org/pytorch3d/pytorch3d/files. So my config is image ![Uploading image.png…]() Screenshot of successful running: image

ZhiboRao commented 4 years ago

image

image

image

hhf-hd commented 4 years ago

thanks for you reply! this is a impressive work~ i wonder if your had compared your method with other method such as Poisson reconstruction on a ideal pointcloud set,and what's your maximum resolutions of mesh and the maximum number of pointcloud that your have dealt with ,since when i set max-faces as 100000,it will run out of GPU memory with a 1080Ti when faces is about 30000 look forword to your reply!

ranahanocka commented 4 years ago

Hi @hhf-hd ,

Yes, we did compare to Poisson reconstruction (you can see the details in the paper). In general, Poisson reconstruction is probably the most common technique for surface reconstruction, which incorporates some type of smoothness prior. Where as here we use a "self-prior".

In theory, a large number of faces is possible, but will require splitting the mesh into more than 8 parts. I think the largest we tried was 80k faces. If you are running out of memory, you can increase the # of parts here https://github.com/ranahanocka/point2mesh/blob/c56d89b993efc625c6e8c74040f974bdfe0d5127/options.py#L70

xufengfan96 commented 4 years ago

Hi,@ranahanocka. Your work is great and I try to make it. But I meet the same problem about the gpu memory.I want to know the parameters about your GPU.And one more thing I noticed that in the chapter 5.You compared the model with noisy ,inaccurate normals and low density completion in poisson and yours.It really work well in real scan.But how about using a pointcloud set with accuracate normals and uniform x,y,z coordinate?