From d986145b9a57b3c055e8cdea6b40cb979ebfe2e7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 7 Jun 2021 23:21:34 +0200 Subject: [PATCH] Reduce test.py results spacing (#3511) --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 113316ff0b8b..12141f71c2c1 100644 --- a/test.py +++ b/test.py @@ -95,7 +95,7 @@ def test(data, confusion_matrix = ConfusionMatrix(nc=nc) names = {k: v for k, v in enumerate(model.names if hasattr(model, 'names') else model.module.names)} coco91class = coco80_to_coco91_class() - s = ('%20s' + '%12s' * 6) % ('Class', 'Images', 'Labels', 'P', 'R', 'mAP@.5', 'mAP@.5:.95') + s = ('%20s' + '%11s' * 6) % ('Class', 'Images', 'Labels', 'P', 'R', 'mAP@.5', 'mAP@.5:.95') p, r, f1, mp, mr, map50, map, t0, t1 = 0., 0., 0., 0., 0., 0., 0., 0., 0. loss = torch.zeros(3, device=device) jdict, stats, ap, ap_class, wandb_images = [], [], [], [], [] @@ -228,7 +228,7 @@ def test(data, nt = torch.zeros(1) # Print results - pf = '%20s' + '%12i' * 2 + '%12.3g' * 4 # print format + pf = '%20s' + '%11i' * 2 + '%11.3g' * 4 # print format print(pf % ('all', seen, nt.sum(), mp, mr, map50, map)) # Print results per class