From 2c3efa430b6fb5b0d73e7999405410ea89ba68f2 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 26 Nov 2020 14:02:22 +0100 Subject: [PATCH] Mosaic plots bug fix (#1526) --- utils/plots.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/plots.py b/utils/plots.py index c49d106..e836fa8 100644 --- a/utils/plots.py +++ b/utils/plots.py @@ -140,6 +140,9 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max labels = image_targets.shape[1] == 6 # labels if no conf column conf = None if labels else image_targets[:, 6] # check for confidence presence (label vs pred) + if boxes.max() <= 1: # if normalized + boxes[[0, 2]] *= w # scale to pixels + boxes[[1, 3]] *= h boxes[[0, 2]] += block_x boxes[[1, 3]] += block_y for j, box in enumerate(boxes.T):