From 0dbb20a5b49c44902a51d17e8b383cff6e6fe783 Mon Sep 17 00:00:00 2001 From: Arthur Teodoro Date: Tue, 20 Sep 2016 07:53:45 -0300 Subject: [PATCH] =?UTF-8?q?importa=C3=A7=C3=A3o=20da=20fun=C3=A7=C3=A3o=20?= =?UTF-8?q?print=20de=20=5F=5Ffuture=5F=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classifier.py | 2 ++ extractFeatures.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/classifier.py b/classifier.py index d04bf40..a6848be 100644 --- a/classifier.py +++ b/classifier.py @@ -10,6 +10,8 @@ from sklearn import preprocessing import pickle import os +#Python 2 and 3 +from __future__ import print_function project_root = '/home/laranjeira/projects/peixe-babel/simple-recognition/' features_dir = 'features/' diff --git a/extractFeatures.py b/extractFeatures.py index 2f23351..308db00 100644 --- a/extractFeatures.py +++ b/extractFeatures.py @@ -9,6 +9,8 @@ import caffe import matplotlib.pyplot as plt import os +#Python 2 and 3 +from __future__ import print_function project_root = '/home/laranjeira/projects/peixe-babel/simple-recognition/' features_dir = project_root + 'features/' @@ -80,7 +82,7 @@ def saveNewClass(class_name, label): saveNewClass(str(class_dir), k) image_files = sorted(os.listdir(os.path.join(dataset_root, images_dir, class_dir))) createLabelsFile(len(image_files), str(class_dir), k) - print str(class_dir) # Status feedback on screen + print(str(class_dir)) # Status feedback on screen for image in image_files: features = extractFeatures( str( os.path.abspath(os.path.join(dataset_root, images_dir, class_dir, image)) )) storeFeatures(features, str(class_dir))