diff options
Diffstat (limited to 'opt.py')
-rwxr-xr-x | opt.py | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -99,18 +99,14 @@ def eval(camId, filelist, labels, gallery_idx, train_idx, feature_vectors, args) train_data=pca.transform(train_data) test_data=pca.transform(test_data) - accuracy = np.zeros((2, args.multrank)) - test_table = np.arange(1, args.multrank+1) - for q in range(args.comparison+1): - if args.mAP: - return test_model(train_data, test_data, train_label, test_label, train_cam, test_cam, showfiles_train, showfiles_test, train_model, args) - + if args.mAP: + target_pred, mAP = test_model(train_data, test_data, train_label, test_label, train_cam, test_cam, showfiles_train, showfiles_test, train_model, args) + return mAP + else: target_pred = test_model(train_data, test_data, train_label, test_label, train_cam, test_cam, showfiles_train, showfiles_test, train_model, args) - for i in range(args.multrank): - return draw_results(test_label, target_pred[i]) - args.rerank = True - args.neighbors = 1 + target_pred = target_pred.reshape(target_pred.shape[1]) + return draw_results(test_label, target_pred) def kopt(camId, filelist, labels, gallery_idx, train_idx, feature_vectors, args): axis = 0 |