Skip to content

importação da função print de __future__ #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
4 changes: 3 additions & 1 deletion extractFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down Expand Up @@ -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))