Closed ananghudaya closed 8 years ago
Hi @ananghudaya - thanks for reporting. It looks like the model is failing to load. Can you make sure the checksums match?
openface(master)$ md5sum models/{dlib/*.dat,openface/*.{pkl,t7}}
73fde5e05226548677a050913eed4e04 models/dlib/shape_predictor_68_face_landmarks.dat
c0675d57dc976df601b085f4af67ecb9 models/openface/celeb-classifier.nn4.v1.pkl
a59a5ec1938370cd401b257619848960 models/openface/nn4.v1.t7
I met the same problem, md5sum is correct. silva@silva-XPS-8300:~/src/openface$ md5sum models/dlib/shape_predictor_68_face_landmarks.dat 73fde5e05226548677a050913eed4e04 models/dlib/shape_predictor_68_face_landmarks.dat silva@silva-XPS-8300:~/src/openface$ md5sum models/openface/celeb-classifier.nn4.v1.pkl c0675d57dc976df601b085f4af67ecb9 models/openface/celeb-classifier.nn4.v1.pkl silva@silva-XPS-8300:~/src/openface$ md5sum models/openface/nn4.v1.t7 a59a5ec1938370cd401b257619848960 models/openface/nn4.v1.t7
open the page first time got error: File "/home/silva/src/openface/demos/web/../../openface/init.py", line 77, in forwardImage rep = np.array(self.forwardPath(t)) File "/home/silva/src/openface/demos/web/../../openface/init.py", line 71, in forwardPath return [float(x) for x in self.p.stdout.readline().strip().split(',')] exceptions.ValueError: could not convert string to float:
But fresh the page , get error : File "/home/silva/src/openface/demos/web/../../openface/init.py", line 77, in forwardImage rep = np.array(self.forwardPath(t)) File "/home/silva/src/openface/demos/web/../../openface/init.py", line 70, in forwardPath self.p.stdin.write(imgPath + "\n") exceptions.IOError: [Errno 32] Broken pipe
I tried resize image to 96*96, as https://github.com/cmusatyalab/openface/issues/24 but no help return [float(x) for x in self.p.stdout.readline().strip().split(',')] ValueError: could not convert string to float:
Hi @northeastsquare - can you try running the comparison demo? It doesn't have as many moving parts as the web demo and might give us a better idea of what's causing the error.
./demos/compare.py images/examples/{lennon*,clapton*}.
-Brandon.
Also @ananghudaya and @northeastsquare - can you try importing the model from the Torch repl from the openface
directory?
$ th
th> import 'nn'
th> import 'dpnn'
th> net = torch.load('./models/openface/nn4.v1.t7')
th> net:size()
25
I figured it out. Here is what I did:
img[1] = image.load(imgPath, opt.imgDim)
with img[1] = image.load(imgPath, 3, byte)
on line 63 in openface/openface_server.lua fileself._output
before you resize it, for example I added line self._output = torch.Tensor()
before calling self._output:resizeAs(input)
.Hi @harshhemani - thanks for looking into this! I've corrected the usage of image.load
, and the nn.Normalize
problem looks like it was caused by a PR merged into nn's master branch 14 hours ago: https://github.com/torch/nn/pull/432
I haven't been able to look into this to know if I need to change something, or if this is a change that needs to go into nn.Normalize
.
The commit causing this was just reverted in nn's master branch, so I think this is resolved. The fix relevant here is to update nn
with luarocks
. Please re-open or file a new issue if you still see this.
Dear All, Sorry. I was away for the last 3 days. Still no luck at my side. It gives the same error, even though i have updated nn via luarocks and update the contents of Normalize.lua and openface_server.lua.
@ananghudaya - can you verify your Normalize.lua
has the following md5sum?
~$ md5sum ~/torch/install/share/lua/5.1/nn/Normalize.lua
80668e9a8bfceaed6c19913660830d07 /home/bamos/torch/install/share/lua/5.1/nn/Normalize.lua
@bamos - Yes. md5sum verified. it is similar.
I think you might be seeing a different issue, can you post the output of:
$ th
th> import 'nn'
th> import 'dpnn'
th> net = torch.load('./models/openface/nn4.v1.t7')
Thanks @bamos
It gives an error:
th> net = torch.load('./models/openface/nn4.v1.t7')
...e/ananghudaya/torch/install/share/lua/5.1/torch/File.lua:289: table index is nil
stack traceback:
...e/ananghudaya/torch/install/share/lua/5.1/torch/File.lua:289: in function 'readObject'
...e/ananghudaya/torch/install/share/lua/5.1/torch/File.lua:272: in function 'readObject'
...e/ananghudaya/torch/install/share/lua/5.1/torch/File.lua:311: in function 'load'
[string "net = torch.load('./models/openface/nn4.v1.t7')"]:1: in main chunk
[C]: in function 'xpcall'
...e/ananghudaya/torch/install/share/lua/5.1/trepl/init.lua:648: in function 'repl'
...daya/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk
[C]: at 0x0804d6d0
Hi @ananghudaya - I think this is an architecture issue, let's move this discussion to #42.
Hi, I'm having a problem to run the compare.py as prescribed in the README. it keeps showing the broken pipe error. I'm running this on Ubuntu 14.04. Here are the errors that appear on the screen.
Any advice?