These are chat archives for beniz/deepdetect

4th
Jan 2018
Yili Zhao
@panovr
Jan 04 2018 11:37

@beniz I use Python script modified from googlenet to finetune resnet50: `
host = '127.0.0.1'
sname = 'imgserv'
description = 'yub classification'
mllib = 'caffe'
dd = DD(host)
dd.set_return_format(dd.RETURN_PYTHON)

creating ML service

model = {'repository':model_repo}
parameters_input = {'connector':'image','width':width,'height':height}
parameters_mllib = {'template':'resnet_50','nclasses':nclasses,'finetuning':True,'rotate':False,'mirror':True,'weights':'ResNet-50-model.caffemodel'}`

The server error log is ERROR - 11:09:54 - service creation mllib bad param: failed to locate model template templates/caffe//resnet_50/.prototxt
Why the caffe//resnet_50 has a more / come from?
Emmanuel Benazera
@beniz
Jan 04 2018 12:19
your templates parameter at service creation if very certainly wrong.
Yili Zhao
@panovr
Jan 04 2018 12:28
there is only one related to template in the Python script:
parameters_mllib = {'template':'resnet_50','nclasses':nclasses,'finetuning':True,'rotate':False,'mirror':True,'weights':'ResNet-50-model.caffemodel'}
It seems right, so I'm a bit confused.
Emmanuel Benazera
@beniz
Jan 04 2018 12:31
Look the API documentation up at https://deepdetect.com/api/#create-a-service and the examples at https://deepdetect.com/overview/examples/, you want to look at the templates parameter in the model object.
Yili Zhao
@panovr
Jan 04 2018 12:54
@beniz thanks for API, especially the model object and templates parameter.
Emmanuel Benazera
@beniz
Jan 04 2018 12:54
np
Yili Zhao
@panovr
Jan 04 2018 12:55
Do I need to fist create the service? Because when I invoke the Python script, I got requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://127.0.0.1:5001/services/imgserv error.
Emmanuel Benazera
@beniz
Jan 04 2018 12:57
use the info call to check whether a service already exists
Yili Zhao
@panovr
Jan 04 2018 13:03
url http://localhost:5001/info and got {"status":{"code":200,"msg":"OK"},"head":{"method":"/info","version":"0.1","branch":"master","commit":"ca6622d3272607d42b303372bc1080bc9f8e8d45","services":[{"mllib":"caffe","description":"yub classification","name":"imgserv"}]}}
Yes, I think the service already exists.
Yili Zhao
@panovr
Jan 04 2018 13:46

@beniz when I run the Python script, dede log output is:INFO - 13:43:38 - Thu Jan 4 13:43:38 2018 UTC - 127.0.0.1 "POST /train" 201 0

ERROR - 13:43:39 - service imgserv training status call failed

ERROR - 13:43:39 - {"code":400,"msg":"BadRequest","dd_code":1005,"dd_msg":"Service Input Error"}

INFO - 13:43:39 - Thu Jan 4 13:43:39 2018 UTC - 127.0.0.1 "GET /train?job=1&timeout=10&service=imgserv" 200 0

INFO - 13:43:39 - Thu Jan 4 13:43:39 2018 UTC - 127.0.0.1 "DELETE /services/imgserv" 200 1

client output is {u'status': {u'msg': u'OK', u'code': 200}, u'body': {}, u'head': {u'status': u'error', u'job': 1, u'method': u'/train'}}
Emmanuel Benazera
@beniz
Jan 04 2018 13:49
service input error means you did something wrong via the API, check your inputs.
Yili Zhao
@panovr
Jan 04 2018 13:51
My script is at http://codepad.org/3nlwDsGc, may you help me to review it? Thanks!
Yili Zhao
@panovr
Jan 04 2018 13:58
@beniz my fault, and the error was raised by the incorrect dataset path. Thanks!
Emmanuel Benazera
@beniz
Jan 04 2018 13:58
^^
Yili Zhao
@panovr
Jan 04 2018 14:00
@beniz Does deepdetect support finetuning Squeeze-Excitation model?