These are chat archives for beniz/deepdetect

3rd
Jan 2018
Yili Zhao
@panovr
Jan 03 2018 01:14
Hi, I use this command: 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":"../templates/caffe/",
"repository":"../../models/imgnet"
}
}'
to create the service, but the response is: {"status":{"code":400,"msg":"BadRequest","dd_code":1006,"dd_msg":"Service Bad Request Error"}}
The log is error reading or listing caffe models in repository ../../models/imgnet
I have bvlc_googlenet.caffemodel file in deepdetect/models/imgnet, any suggestion?
Yili Zhao
@panovr
Jan 03 2018 02:57
It seems that if I change ../templates/caffe/ from relative path to absolute path, then I can create the service.
Emmanuel Benazera
@beniz
Jan 03 2018 05:20
@panovr use an absolute path, otherwise it is relative to where the server is started from, e.g. deepdetect/build/main
Yili Zhao
@panovr
Jan 03 2018 11:22
@beniz thanks! I am still a bit confused, if the server started from deepdetect/build/main, then ../ means one level up, and there is indeed a templates directory exist, and ../../ means two levels up, and there is also the models directory exist. Why dede can't find them?
Emmanuel Benazera
@beniz
Jan 03 2018 11:43
Certainly because you have started it somehow differently than with ./dede from build/main. However it's a good practice to use absolute paths.
Yili Zhao
@panovr
Jan 03 2018 12:13
You're right, I started dede as ./main/dede, not ./dede. This is the problem. Thanks!
Yili Zhao
@panovr
Jan 03 2018 12:33
@beniz How can I run from dd_client import DD successfully? Do I need to configure PYTHONPATH environment variable?
Emmanuel Benazera
@beniz
Jan 03 2018 12:33
you can copy dd_client in your python directory or point PYTHONPATH to the directory that holds it.
Yili Zhao
@panovr
Jan 03 2018 12:41
@beniz get it, and import DD successfully. Does use the python script in deepdetect example Finetuning GoogleNet is the correct way and best practice to finetuning a pre-trained model?
Emmanuel Benazera
@beniz
Jan 03 2018 12:50
it should be a good baseline to start from
Yili Zhao
@panovr
Jan 03 2018 13:19
OK. I have organize my data as data/class1, data/class2, ..., data/class200. Is it all the need to finetuning? do I need to prepare the corresponding file like ImageNet classification example use or dede will create it automatically?