Skip to content

Commit 17b0334

Browse files
committed
First try
1 parent 4a42a09 commit 17b0334

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/mod_photos/controllers.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ def timestamp():
2525
return str(time.time()).split(".")[0]
2626

2727
def execute_tiny_cnn(filepath):
28-
#TODO add code tiny cpp example
29-
output=check_output(["echo", "caca1:resultado1\ncaca2:resultado2\ncaca3:resultado3\ncaca4:resultado4\ncaca5:resultado5"])
30-
values = output.split("\n")[:-1]
28+
#TODO add code tiny cpp examplei
29+
# ~/caffenet/deploy.prototxt ~/caffenet/bvlc_alexnet.caffemodel ~/caffenet/imagenet_mean.binaryproto ~/caffenet/synset_words.txt ~/caffenet/cat.jpg
30+
output=check_output(["example_caffe_converter","deploy.prototxt bvlc_alexnet.caffemodel imagenet_mean.binaryproto synset_words.txt "+str(filepath)])
31+
#output=check_output(["echo", "caca1:resultado1\ncaca2:resultado2\ncaca3:resultado3\ncaca4:resultado4\ncaca5:resultado5"])
32+
app.logger.debug("output="+str(output))
33+
values = output.split("\n")[:-1][-5:]
34+
app.logger.debug("values="+str(values))
3135
return values
3236

3337
@mod_photos.route('/photos',methods=['POST'])

0 commit comments

Comments
 (0)