Skip to content

Commit

Permalink
Normalized mosaic plotting bug fix (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Dec 9, 2020
1 parent 86f4247 commit 84f9bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max
conf = None if labels else image_targets[:, 6] # check for confidence presence (label vs pred)

if boxes.shape[1]:
if boxes.max() <= 1: # if normalized
if boxes.max() <= 1.01: # if normalized with tolerance 0.01
boxes[[0, 2]] *= w # scale to pixels
boxes[[1, 3]] *= h
elif scale_factor < 1: # absolute coords need scale if image scales
Expand Down

0 comments on commit 84f9bb5

Please sign in to comment.