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.51k stars 744 forks source link

Failed to run on Ubuntu 16.06 #8

Closed kaiwangntu closed 6 years ago

kaiwangntu commented 6 years ago

Hi, I tried to follow the steps in the instructions to configure it on Ubuntu 16.06.

  1. In matlab 2014, when I ran 'run.m', there is an error 'usr/local/MATLAB/R2014a/sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.8' not found', I tried to update gcc or add options when starting matlab, the same error still occurs.
  2. So I tried to run the face alignment code directly from the terminal, by using the command 'th main.lua -model 2D-FAN-300W.t7 -input ../scaled -detectFaces true -mode generate -output ../scaled -device gpu -outputFormat txt 2>&1 > /dev/null;' Unfortunately, it reports one of the three errors each time I run it: (1) Segmentation fault (2) Fatal Python error: GC object already tracked Aborted (3) Fatal Python error: ceval: tstate mix-up Aborted

Has anyone successfully run it on Ubuntu 16.06 pls? How to make the face alignment part work?

AaronJackson commented 6 years ago

There is not an Ubuntu 16.06 as far as I know, so are you using Ubuntu 16.04 or 16.10? Can you please show me the output of the th main .... command you included in your previous message, but remove the 2>&1 > /dev/null part.

kaiwangntu commented 6 years ago

Hi Aaron, Sorry for the typo, it's 16.04. I tried the command 'th main.lua -model 2D-FAN-300W.t7 -input ../scaled -detectFaces true -mode generate -output ../scaled -device gpu -outputFormat txt;' , one of the following errors occurs randomly:

  1. Segmentation fault
  2. Fatal Python error: ceval: tstate mix-up Aborted
  3. Fatal Python error: PyEval_SaveThread: NULL tstate Aborted Most of the time, it is error 1.
AaronJackson commented 6 years ago

Hey, so you don't get any crash information before that? It seems very strange. I mean, your current issue with the face alignment code, and Adrian, the author of that code, is using 16.04 on his machine. I have a feeling you have an unusual python configuration. What happens if you run th on its own? If that doesn't crash immediately, what happens when you run require pytorch from the torch shell? What do you get when you run which python? Which version of Python are you using? You can check with python -V Thanks, hopefully we can figure out the problem.

kaiwangntu commented 6 years ago

Hi Aaron, 'th' and 'require pytorch' run normally. I checked my python version, and it is Python 3.6.1. So does it have to be Python 2.7 pls?

AaronJackson commented 6 years ago

Sorry, I should have said require 'fb.python' not pytorch. Requiring pytorch should actually have given you an error since this is not a Torch library but a python library.

kaiwangntu commented 6 years ago

I tried fb.python and got the following log: th> require 'fb.python' { unicode : function: 0x4183b540 reval : function: 0x4183b3d8 eval_none : function: 0x4183b438 lreval : function: 0x4183fda0 list : function: 0x4183b588 dict : function: 0x4183b7f8 float : function: 0x4183b488 None : None leval : function: 0x4183fd38 lexec : function: 0x4183fcd0 long : function: 0x4183b5e0 bytes : function: 0x4183b608 int : function: 0x4183b4b0 get_vars : function: 0x4183fc28 str : function: 0x4183b518 ref : function: 0x4183b4f0 _check_no_refs : function: 0x4183b868 args : userdata: 0x7f7e833868b1 tuple : function: 0x4183b5b0 import : function: 0x4183b840 exec : function: 0x4183b3b0 kwargs : userdata: 0x7f7e833868b2 eval : function: 0x4183b410 }

It seems correct. So is it due to the python version problem? (Mine is Python 3.6.1 but the instruction said python 2.7)

AaronJackson commented 6 years ago

Hmm, yes this is probably the issue. Can you install it? There should be no conflict between major python versions (i.e. 2.7, 3.4 and 3.6)

1adrianb commented 6 years ago

@kyewong fb.python supports only 2.7.x There are also some known problems with some newer version of some packages. To see an example of configuration where python and lua have a happy relation :) please check the Docker image available here: https://github.com/1adrianb/2D-and-3D-face-alignment Hope it helps

AaronJackson commented 6 years ago

Thanks for confirming this Adrian! :1st_place_medal:

kaiwangntu commented 6 years ago

Hi Aaron and adrian, I installed python 2.7 and the above mentioned problems have been solved. What drives me crazy is that a lot more problems came. The current two seem related to the 'matio' module of luarocks and dlib of python, the error log is as follows:

...g/tools/local/torch/install/share/lua/5.1/trepl/init.lua:389: module 'matio' not found:No LuaRocks module found for matio no field package.preload['matio'] ... ... ...g/tools/local/torch/install/share/lua/5.1/trepl/init.lua:389: module 'npy4th' not found:No LuaRocks module found for npy4th ... ... ImportError: libiomp5.so: cannot open shared object file: No such file or directory

What is worse, when I tried to install matio by luarocks install matio, the system told me 'unable to connect to github.com', while obviously I can visit github.com and git clone other projects on my computer.

Any idea on solving these problems?

AaronJackson commented 6 years ago

You don't need matio for running the code. Adrian will know more, but as far as I know these are just warnings and the script should run fine without them.

1adrianb commented 6 years ago

@AaronJackson Aaron is right, just ignore the warning if you have issues with this two packages

sallymmx commented 6 years ago

I'm using Ubuntu16.04, python 2.7.6, but I'm still facing with this problem:

Fatal Python error: ceval: tstate mix-up /bin/bash: line 1: 20492 Aborted (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;: Aborted Error using run (line 38) Failed to run Torch7 script.

sallymmx commented 6 years ago

I have installed fb.python correctly. wmm@105a:/usr/local/MATLAB/MATLAB_ProductionServer/R2015a/bin$ th __ __ | Torch7 / / ____/ / | Scientific computing for Lua. / / / \/ / / \ | Type ? for help /_/ __// _///_/ | https://github.com/torch | http://torch.ch

th> [0.0000s] th> require fb.python ..> require 'fb.python' ..>

sallymmx commented 6 years ago

when I run with terminal: wmm@105a:~/vrn$ ./run.sh ./run.sh: line 30: 15896 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 ls: cannot access .raw: No such file or directory

sallymmx commented 6 years ago

Also, I have tried 'th main.lua -model 2D-FAN-300W.t7 -input ../scaled -detectFaces true -mode generate -output ../scaled -device gpu -outputFormat txt': wmm@105a:~/vrn/face-alignment$ th main.lua -model 2D-FAN-300W.t7 -input ../scaled -detectFaces true -mode generate -output ../scaled -device gpu -outputFormat txt Fatal Python error: ceval: tstate mix-up Segmentation fault (core dumped)

Kshitij08 commented 5 years ago

@sallymmx Did you find any solution to your problem??