From b0629d622cf546fa60bd24b951857bb9b447cc35 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 30 Apr 2020 15:03:32 -0700 Subject: [PATCH] bug fix on #1114 --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 642ebdba..a317b6ee 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -938,7 +938,7 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max img = cv2.resize(img, (w, h)) mosaic[block_y:block_y + h, block_x:block_x + w, :] = img - if targets is not None: + if len(targets) > 0: image_targets = targets[targets[:, 0] == i] boxes = xywh2xyxy(image_targets[:, 2:6]).T classes = image_targets[:, 1].astype('int')