Skip to content

Commit

Permalink
Mosaic plots bug fix (ultralytics#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Nov 26, 2020
1 parent 12499f1 commit 2c3efa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2c3efa4

Please sign in to comment.