AaronJackson / vrn

:man: Code for "Large Pose 3D Face Reconstruction from a Single Image via Direct Volumetric CNN Regression"
http://aaronsplace.co.uk/papers/jackson2017recon/
MIT License
4.52k stars 747 forks source link

./run.sh using UBUNTU 18.04 failed. How can I solve this? Is there any thing wrong with the directory? #147

Closed Jackiekkz97 closed 4 years ago

Jackiekkz97 commented 4 years ago

Fatal Python error: GC object already tracked ./run.sh: line 30: 8703 Segmentation fault (core dumped) th main.lua -model 2D-FAN-300W.t7 -input ../$INPUT/ -detectFaces true -mode generate -output ../$INPUT/ -device gpu -outputFormat txt ls: cannot access '*.txt': No such file or directory /home/jackie/torch/install/bin/luajit: /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: /home/jackie/torch/install/share/lua/5.1/cudnn/ffi.lua:1603: 'libcudnn (R5) not found in library path. Please install CuDNN from https://developer.nvidia.com/cuDNN Then make sure files named as libcudnn.so.5 or libcudnn.5.dylib are placed in your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)

Alternatively, set the path to libcudnn.so.5 or libcudnn.5.dylib to the environment variable CUDNN_PATH and rerun torch. For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

stack traceback: [C]: in function 'error' /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' process.lua:17: in main chunk [C]: in function 'dofile' ...ckie/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x5647fcdad570 ls: cannot access '*.raw': No such file or directory

I installed Torch,Cuda and Cudann.

AaronJackson commented 4 years ago

Did you do what it said though?

For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

Did you install the correct version of cudnn?

Jackiekkz97 commented 4 years ago

Did you do what it said though?

For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

Did you install the correct version of cudnn?

I am new to linux and Ubuntu.It seems like there are errors when I downloaded the cudnn the user used in the Ubuntu 18.04 guide. I am not sure is it not compatible with my gpu (gtx1050). And when I used nvidia-smi it shows that i am running cuda version 10.2 so I downloaded cudnn and nccl that is compatible with cuda 10.2. However, when I check nvcc —version, it shows a version of 9.1. Did it automatically download cuda itself when I download the linux nvidia display driver? I am really confused here. Thanks for you reply!

Jackiekkz97 commented 4 years ago

When I try using matlab R2020a to run it shows the error after i change the cudnn path. And the terminal to open Matlab shows :Failed to load module "canberra-gtk-module"

device =

'gpu'

/bin/bash: line 1: 3853 Segmentation fault (core dumped) CUDA_VISIBLE_DEVICES=0 th main.lua -model 2D-FAN-300W.t7 -input ../examples/ -detectFaces true -mode generate -output ../examples/ -device gpu -outputFormat txt 2>&1 > /dev/null cd face-alignment;CUDA_VISIBLE_DEVICES=0 th main.lua -model 2D-FAN-300W.t7 -input ../examples/ -detectFaces true -mode generate -output ../examples/ -device gpu -outputFormat txt 2>&1 > /dev/null;: Segmentation fault Error using run (line 38) Failed to run Torch7 script.

Jackiekkz97 commented 4 years ago

After I removed the line the user said in the guide. The error in matlab came out as the same as the one when I run in terminal.

device =

'gpu'

/home/jackie/torch/install/bin/luajit: /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: /home/jackie/torch/install/share/lua/5.1/cudnn/ffi.lua:1603: 'libcudnn (R5) not found in library path. Please install CuDNN from https://developer.nvidia.com/cuDNN Then make sure files named as libcudnn.so.5 or libcudnn.5.dylib are placed in your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)

Alternatively, set the path to libcudnn.so.5 or libcudnn.5.dylib to the environment variable CUDNN_PATH and rerun torch. For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

stack traceback: [C]: in function 'error' /home/jackie/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' main.lua:13: in main chunk [C]: in function 'dofile' ...ckie/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x5573040b2570 Error using run (line 38) Failed to run Torch7 script.

Jackiekkz97 commented 4 years ago

I tried to run through the cudnnn installation using the command below: sudo dpkg -i libcudnn7_7.6.5.32-1+cuda10.1_amd64.deb sudo dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.1_amd64.deb sudo dpkg -i libcudnn7-doc_7.6.5.32-1+cuda10.1_amd64.deb sudo dpkg -i nccl-repo-ubuntu1804-2.5.6-ga-cuda10.1_1-1_amd64.deb sudo apt-get update sudo apt-get install cuda

And I got the error below: jackie@jackie-GL753VD:~/Downloads$ sudo apt-get install cuda Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package cuda

What is the problem here?

Jackiekkz97 commented 4 years ago

When I type sudo apt update it give me this jackie@jackie-GL753VD:~/Downloads$ sudo apt update Get:1 file:/var/nccl-repo-2.5.6-ga-cuda10.1 InRelease Ign:1 file:/var/nccl-repo-2.5.6-ga-cuda10.1 InRelease Get:2 file:/var/nccl-repo-2.7.3-ga-cuda10.2 InRelease Ign:2 file:/var/nccl-repo-2.7.3-ga-cuda10.2 InRelease Get:3 file:/var/nccl-repo-2.5.6-ga-cuda10.1 Release [574 B] Get:4 file:/var/nccl-repo-2.7.3-ga-cuda10.2 Release [574 B]
Get:3 file:/var/nccl-repo-2.5.6-ga-cuda10.1 Release [574 B]
Get:4 file:/var/nccl-repo-2.7.3-ga-cuda10.2 Release [574 B]
Hit:6 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:10 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:11 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done 83 packages can be upgraded. Run 'apt list --upgradable' to see them.

does this mean that i have both nccl pakage installed for cuda 10.1 and 10.2? What should I do in this?

Jackiekkz97 commented 4 years ago

Well, I realised there is an error when I am installing cuda Errors were encountered while processing: /tmp/apt-dpkg-install-Pb2sJs/30-libcublas-dev_10.2.1.243-1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

and there are two warnings: WARNING: Your driver installation has been altered since it was initially installed; this may happen, for example, if you have since installed the NVIDIA driver through a mechanism other than nvidia-installer (such as your distribution's native package management system). nvidia-installer will attempt to uninstall as best it can. Please see the file '/var/log/nvidia-uninstall.log' for details.

WARNING: Failed to delete some directories. See /var/log/nvidia-uninstall.log for details.

Then after this I typed nvidia-smi. IT occurs Failed to initialize NVML: Driver/library version mismatch.

AaronJackson commented 4 years ago

Your problems are with nvidia drivers and software, not with the 3d face software

Jackiekkz97 commented 4 years ago

that's why I am here looking for solutions... If you dont know the solutions then its fine.

Jackiekkz97 commented 4 years ago

I just want to know that the cuda version in nvidia-smi. Is it preinstalled or else?