This commit is contained in:
Glenn Jocher 2020-04-30 15:03:32 -07:00
parent 0ffbf5534e
commit b0629d622c
1 changed files with 1 additions and 1 deletions

View File

@ -938,7 +938,7 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max
img = cv2.resize(img, (w, h)) img = cv2.resize(img, (w, h))
mosaic[block_y:block_y + h, block_x:block_x + w, :] = img 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] image_targets = targets[targets[:, 0] == i]
boxes = xywh2xyxy(image_targets[:, 2:6]).T boxes = xywh2xyxy(image_targets[:, 2:6]).T
classes = image_targets[:, 1].astype('int') classes = image_targets[:, 1].astype('int')