From 57f2b3f6d7cf00f48d379a73a5380051fcbed08c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 22 Nov 2018 16:42:58 +0100 Subject: [PATCH] updates --- test.py | 5 +++-- utils/utils.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index d590c61b..b2c11517 100644 --- a/test.py +++ b/test.py @@ -126,12 +126,13 @@ def main(opt): print(('%11s%11s' + '%11.3g' * 3) % (len(mAPs), len(dataloader) * opt.batch_size, mean_P, mean_R, mean_mAP)) # Print mAP per class + print('%11s' * 5 % ('Image', 'Total', 'P', 'R', 'mAP') + '\n\nmAP Per Class:') + classes = load_classes(opt.class_path) # Extracts class labels from file for i, c in enumerate(classes): print('%15s: %-.4f' % (c, AP_accum[i] / AP_accum_count[i])) - # Print mAP - print('%11s' * 5 % ('Image', 'Total', 'P', 'R', 'mAP')) + # Return mAP return mean_mAP, mean_R, mean_P diff --git a/utils/utils.py b/utils/utils.py index 860b73ef..b472d4ca 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -300,7 +300,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4): # Filter out confidence scores below threshold # Get score and class with highest confidence - # cross-class NMS + # cross-class NMS (experimental) cross_class_nms = False if cross_class_nms: # thresh = 0.85