Skip to content
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))