These are chat archives for beniz/deepdetect

26th
Jan 2016
Ozéias Sant'ana
@ozeias
Jan 26 2016 21:46
hey guys! I'm having problems to make this work: http://www.deepdetect.com/tutorials/imagenet-classifier/
i'm getting this: "ERROR - service imageserv mllib bad param: no deploy file in /data/apps/models/imgnet for initializing the net"
all files are there, seems all fine
also tried with our model
and got the same error
any ideia?
cc/ @beniz
Emmanuel Benazera
@beniz
Jan 26 2016 22:15
hi @ozeias sounds like a file missing in the model repository
@ozeias the deploy.prototxt file is automatically created by dd if you are using one of the built-in templates
the file is mandatory with any existing model as it describes the one net that is used at prediction time
when following http://www.deepdetect.com/tutorials/train-imagenet/ the initial PUT call must create the googlenet.prototxt and deploy.txt files
in doubt, just copy&paste your exact calls here, along with the listed content of /data/apps/models/imgnet
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:28
@beniz should be .txt or .prototxt ?
Emmanuel Benazera
@beniz
Jan 26 2016 23:29
.prototxt
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:29
deploy@ip-172-30-1-69:/data/apps/models/imgnet$ ls -la
total 52400
drwxrwxr-x 2 deploy deploy 152 Jan 26 23:28 .
drwxr-xr-x 6 deploy deploy 72 Jan 26 21:57 ..
-rw-r--r-- 1 deploy deploy 53533754 Jan 26 17:24 bvlc_googlenet.caffemodel
-rw-rw-r-- 1 deploy deploy 35565 Jan 26 18:06 corresp.txt
-rw-rw-r-- 1 deploy deploy 35885 Jan 26 21:06 deploy.prototxt
-rw-rw-r-- 1 deploy deploy 40774 Jan 26 21:06 googlenet.prototxt
-rw-rw-r-- 1 deploy deploy 295 Jan 26 21:06 googlenet_solver.prototxt
-rw-rw-r-- 1 deploy deploy 570 Jan 26 21:06 model.json
those files are there
/code {"mllib":"caffe","description":"image classification service","type":"supervised","parameters":{"input":{"connector":"image"},"mllib":{"template":"googlenet","nclasses":1000}},"model":{"templates":"/data/apps/deepdetect/repo/templates/caffe/","repository":"/data/apps/models/imgnet"}}
this is the content of the model.json
Emmanuel Benazera
@beniz
Jan 26 2016 23:32
these files seem to be correct
now, the templates parameter is weird. What do you have exactly in /data/apps/deepdetect/repo/templates/caffe/ ?
actually, you can remove the 'templates' parameter from the PUT call
since you already have all the .prototxt files
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:33
repo/templates/caffe$ ls
alexnet cifar convnet googlenet googlenet_bn lregression mlp nin
I only need to use the predict
Emmanuel Benazera
@beniz
Jan 26 2016 23:35
yep, I have a script that runs it, and your files appear to be fine (size is the exact same I have), something is off elsewhere.
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:35
:/
Emmanuel Benazera
@beniz
Jan 26 2016 23:35
are you on a recent version ?
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:35
i'm using master
Emmanuel Benazera
@beniz
Jan 26 2016 23:36
can you share your predict call ?
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:36
yep
curl -X POST "http://localhost:8080/predict" -d "{\"service\":\"imageserv\",\"parameters\":{\"input\":{\"width\":224,\"height\":224},\"output\":{\"best\":3}},\"data\":[\"http://www.deepdetect.com/img/ambulance.jpg\"]}"
I tried also if local file and another url
with*
Emmanuel Benazera
@beniz
Jan 26 2016 23:37
works for me, so let's see...
can you confirm that the PUT call yields a {"status":{"code":201,"msg":"Created"}}
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:38
yep
that is fine
Emmanuel Benazera
@beniz
Jan 26 2016 23:39
ok, can you check on the reading rights maybe ? that is, the dede server should be able to read from the model repo
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:40
yep
let me run the service as sudo and also give access to all users
$ curl -X PUT "http://localhost:8080/services/imageserv" -d '{"mllib":"caffe","description":"image classification service","type":"supervised","parameters":{"input":{"connector":"image"},"mllib":{"template":"googlenet","nclasses":1000}},"model":{"templates":"/data/apps/deepdetect/repo/templates/caffe/","repository":"/data/apps/models/imgnet"}}' {"status":{"code":201,"msg":"Created"}}

```instantiating model template googlenet

INFO - source=/data/apps/deepdetect/repo/templates/caffe/googlenet/

INFO - dest=/data/apps/models/imgnet/googlenet.prototxt```

$ curl -X POST "http://localhost:8080/predict" -d "{\"service\":\"imageserv\",\"parameters\":{\"input\":{\"width\":224,\"height\":224},\"output\":{\"best\":3}},\"data\":[\"http://www.deepdetect.com/img/ambulance.jpg\"]}" {"status":{"code":400,"msg":"BadRequest","dd_code":1006,"dd_msg":"Service Bad Request Error"}}
ERROR - service imageserv mllib bad param: no deploy file in /data/apps/models/imgnet for initializing the net
Emmanuel Benazera
@beniz
Jan 26 2016 23:44
what user are you running dede with ?
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:44
now root
Emmanuel Benazera
@beniz
Jan 26 2016 23:47
mmmm. what if you simplify the PUT call for a start, to
curl -XPUT 'http://localhost:8080/services/imageserv' -d '{"mllib":"caffe","description":"image classification service","type":"supervised","parameters":{"input":{"connector":"image"},"mllib":{"nclasses":1000}},"model":{"repository":"/data/apps/models/imgnet/"}}'
Ozéias Sant'ana
@ozeias
Jan 26 2016 23:48
k
same thing
this is what I've for my model
curl -X PUT "http://localhost:8080/services/brands" -d '{"mllib":"caffe","description":"brands classification","type":"supervised","parameters":{"input":{"connector":"image","height":227,"width":227},"mllib":{"nclasses":11}},"model":{"repository":"/data/apps/models/releases/brands"}}'
and same error
Emmanuel Benazera
@beniz
Jan 26 2016 23:52
somehow the server cannot read the deploy.prototxt file...
the way it works is that it scans the model repository and lists the files in it