Last active
September 16, 2016 10:09
-
-
Save alkamid/c56e590292a634fd4b89d3a0aada7ea6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dd_client import DD | |
dd = DD('localhost') | |
dd.set_return_format(dd.RETURN_PYTHON) | |
description = 'image classification service' | |
mllib = 'caffe' | |
model = {'repository':'/home/ubuntu/deepdetect/models/1609152_resnet50'} | |
parameters_input = {'connector':'image', 'width':224,'height':224} | |
parameters_mllib = {'weights':'model_iter_200.caffemodel','nclasses':2} | |
parameters_output = {} | |
dd.put_service('imageserv',model,description,mllib, | |
parameters_input,parameters_mllib,parameters_output) | |
data = ['1.png', '2.png', '3.png'] | |
parameters_mllib = {'gpu':True} | |
parameters_output = {'best':2} | |
dd.post_predict('imageserv',data,parameters_input,parameters_mllib,parameters_output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment