From a1fdfc22573099d3bd1f54ae80ff42a761ab75d1 Mon Sep 17 00:00:00 2001 From: Dmytro Filatov Date: Thu, 29 Jun 2017 15:51:50 -0700 Subject: [PATCH] Update run_scene.py --- run_scene.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run_scene.py b/run_scene.py index 2036a3b..529a226 100644 --- a/run_scene.py +++ b/run_scene.py @@ -50,5 +50,9 @@ def classify_scene(fpath_design, fpath_weights, fpath_labels, fpath_mean, image) test_image = caffe.io.load_image(sys.argv[1]) predictions = classify_scene(MODEL_TYPE, WEIGHTS, LABELS, MEAN, test_image) + + with open(LABELS, 'rb') as f: + labels = pickle.load(f) + for i, k in enumerate(predictions): - print i, labels[k] \ No newline at end of file + print i, labels[k]