Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kostyaev committed Sep 7, 2017
1 parent cb9beba commit 51dd5d6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions categorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def get_features(paths):
if __name__ == '__main__':
model = ResNet50(weights='imagenet', include_top=False)
negative_features = np.load('data/neg_f_1000.npy')

raw_data_paths = glob.glob((args.target_data + '/*.jpg').replace('//', '/'))
if len(raw_data_paths) == 0:
print 'No data found to categorize in path: %s' % args.target_data
Expand All @@ -117,8 +116,6 @@ def get_features(paths):
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
print 'Training finished. Accuracy score: %f' % accuracy_score(y_test, y_pred)
print 'Processing target images'
target_features = get_features(pos_paths)
print 'Categorizing target images'
classify(raw_data_paths, args.save_to)
print 'Done!'
Expand Down

0 comments on commit 51dd5d6

Please sign in to comment.