OpenFace: `openface_server.lua` subprocess has died.

924 views
Skip to first unread message

pankaj sharma

unread,
Dec 26, 2016, 7:00:30 AM12/26/16
to CMU-OpenFace
Hello I am getting the following error while trying to run openface.


Traceback (most recent call last):

  File "<ipython-input-19-7144d840eb8a>", line 1, in <module>
    runfile('/Users/sysadmin/Documents/pankaj.py', wdir='/Users/sysadmin/Documents')

  File "/Users/sysadmin/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)

  File "/Users/sysadmin/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
    builtins.execfile(filename, *where)

  File "/Users/sysadmin/Documents/pankaj.py", line 147, in <module>
    face_recognition()

  File "/Users/sysadmin/Documents/pankaj.py", line 112, in face_recognition
    rep = get_representations(alignedFace)

  File "/Users/sysadmin/Documents/pankaj.py", line 65, in get_representations
    rep = net.forward(alignedFace)

  File "/Users/sysadmin/anaconda/lib/python2.7/site-packages/openface/torch_neural_net.py", line 171, in forward
    rep = self.forwardPath(t)

  File "/Users/sysadmin/anaconda/lib/python2.7/site-packages/openface/torch_neural_net.py", line 128, in forwardPath
    """.format(self.cmd, self.p.stdout.read()))

Exception: 


OpenFace: `openface_server.lua` subprocess has died.

+ Is the Torch command `th` on your PATH? Check with `which th`.

+ If `th` is on your PATH, try running `./util/profile-network.lua`
  to see if Torch can correctly load and run the network.

  + If this gives illegal instruction errors, see the section on

  + In Docker, use a Bash login shell or source
     /root/torch/install/bin/torch-activate for the Torch environment.

+ See this GitHub issue if you are running on a non-64-bit machine:

+ Advanced Users: If you think this problem is caused by
running Lua as a subprocess, Vitalius Parubochyi has created
a version of this that uses https://github.com/imodpasteur/lutorpy.
This file is available at <openface>/openface/torch_neural_net.lutorpy.py
and our mailing list discussion on this can be found at:

+ Please post further issues to our mailing list at

Diagnostic information:

cmd: ['/usr/bin/env', 'th', '/Users/sysadmin/anaconda/lib/python2.7/site-packages/openface/openface_server.lua', '-model', '/Users/sysadmin/Documents/openface/models/openface/nn4.small2.v1.ascii.t7', '-imgDim', '96']

============

stdout: 



Is this error which torch ? I tried running th command in shell which shows th is properly installed.

Bill Tugger

unread,
Dec 27, 2016, 3:02:52 PM12/27/16
to CMU-OpenFace
Try running ./util/profile-network.lua as the message suggests.  I recall having this problem and the issue (If I remember correctly) was that th wasn't in the path for the program I was running.

m.mu...@refund-suisse.ch

unread,
Jan 18, 2017, 7:45:04 AM1/18/17
to CMU-OpenFace
I have the same problem!
In my case, OpenFace is called from apache through WSGI.
[...] torch_neural_net.py", line 161, in forwardPath
Exception:
OpenFace: `openface_server.lua` subprocess has died.
[...]

I checked the usual suspects:
- th is on PATH
- able to run ./util/profile-network.lua without issues.
- runs on a 64-bit machine

What can I do to fix this? Any idea?

m.mu...@refund-suisse.ch

unread,
Jan 18, 2017, 8:42:40 AM1/18/17
to CMU-OpenFace
fixed the issue by using torch_neural_net.lutorpy.py
In my python virtual environment i had to replace torch_neural_net.py with the above mentioned file.
Then remove torch_neural_net.pyc and pip install lutorpy 

Pradyoth S P

unread,
Apr 24, 2020, 2:00:39 PM4/24/20
to CMU-OpenFace
Please tell me how to check "th is in path"
Reply all
Reply to author
Forward
0 new messages