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 745 forks source link

Error in matlab.graphics.internal.getframeWithDecorations #100

Closed camjac251 closed 6 years ago

camjac251 commented 6 years ago

Are these errors safe to ignore? It outputs .raw files, although I haven't checked them yet. I am on the Quadro P4000 gpu (running driver version 390) using Ubuntu 16.04.5 and Matlab R2015a. I had installed Cuda 8 and CuDNN 5.1. I followed a combination of the README CentOS instructions and Docker script to install Torch and its LUA dependencies.

I replaced the code that was needed from issue #59 but I am unsure of whether it is all that is needed or not https://github.com/AaronJackson/vrn/issues/59#issuecomment-375893771 is the comment I followed. Also that issue seems to be locked to only you two, nobody else can comment on it.

I tried running it three times below, first and third were with both changes to both files made vrn/face-alignment/utils.lua and vrn/face-alignment/facedetection_dlib.lua while the second try was with only the vrn/face-alignment/facedetection_dlib.lua change made to see if that did anything.

Is it a problem with my Matlab version or the drivers I'm using?

This is the output I got

Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-134-generic x86_64)
root@hostname:~# cd vrn
root@hostname:~/vrn# LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab -nodisplay -nosplash

                                                           < M A T L A B (R) >
                                                 Copyright 1984-2015 The MathWorks, Inc.
                                                  R2015a (8.5.0.197613) 64-bit (glnxa64)
                                                            February 12, 2015

To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.

>> run

device =

gpu

Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Landmarks extracted successfully.
Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Processed AFLW_image00046.
Processed AFLW_image00656.
Processed AFLW_image00095.
Processed asj.
Processed AFLW_image00190.
Attempt to reference field of non-structure array.

Error in matlab.graphics.internal.getframeWithDecorations (line 49)

Error in alternateGetframe (line 21)

Error in getframe (line 92)
         x = alternateGetframe(parentFig, h, offsetRect, withinClientRect);

Error in rendervol (line 34)
cap = getframe;

Error in run (line 83)
    rendervol([input_folder '/scaled/' fname '.jpg'], ...

>> run

device =

gpu

Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Landmarks extracted successfully.
Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Processed AFLW_image00046.
Processed AFLW_image00656.
Processed AFLW_image00095.
Processed asj.
Processed AFLW_image00190.
Attempt to reference field of non-structure array.

Error in matlab.graphics.internal.getframeWithDecorations (line 49)

Error in alternateGetframe (line 21)

Error in getframe (line 92)
         x = alternateGetframe(parentFig, h, offsetRect, withinClientRect);

Error in rendervol (line 34)
cap = getframe;

Error in run (line 83)
    rendervol([input_folder '/scaled/' fname '.jpg'], ...

>> run

device =

gpu

Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Landmarks extracted successfully.
Found Environment variable CUDNN_PATH = /usr/local/cuda/lib64/libcudnn.so.5Processed AFLW_image00046.
Processed AFLW_image00656.
Processed AFLW_image00095.
Processed asj.
Processed AFLW_image00190.
Attempt to reference field of non-structure array.

Error in matlab.graphics.internal.getframeWithDecorations (line 49)

Error in alternateGetframe (line 21)

Error in getframe (line 92)
         x = alternateGetframe(parentFig, h, offsetRect, withinClientRect);

Error in rendervol (line 34)
cap = getframe;

Error in run (line 83)
    rendervol([input_folder '/scaled/' fname '.jpg'], ...

>> 

And here is my .bash_profile

export PATH=$PATH:/usr/local/MATLAB/R2015a/bin/
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

. /usr/local/torch/install/bin/torch-activate
AaronJackson commented 6 years ago

You are starting matlab with the nodisplay option, and it itrying to display a figure. You should use -nodesktop instead, so that it can still render things. I think this should fix it.

camjac251 commented 6 years ago

It looks like with the error, the .raw file still converted to an obj with the color info intact. Not sure if these errors could also be missing dependencies for face-alignment, I believe I'm missing a few there.

Running it without -nosoftwareopengl causes it to not launch so I ran it like this LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab -nodesktop -nosoftwareopengl

It started to work on the alignment part (Processed messages in console) but then crashed apparently image

Might be an X server issue or something. I think Nvidia has their own X server that I probably don't have installed.