aboutsummaryrefslogtreecommitdiff
path: root/evaluate.py
diff options
context:
space:
mode:
Diffstat (limited to 'evaluate.py')
-rwxr-xr-xevaluate.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/evaluate.py b/evaluate.py
index b178abc..a19a7a9 100755
--- a/evaluate.py
+++ b/evaluate.py
@@ -155,8 +155,11 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam
AP[i] = sum(max_level_precision[i])/11
mAP = np.mean(AP)
print('mAP:',mAP)
- return target_pred, mAP
- return target_pred
+
+ if args.mAP:
+ return target_pred, mAP
+ else:
+ return target_pred
def main():
logging.debug("Verbose mode is on")