Normalized mosaic plotting bug fix (#1600)
This commit is contained in:
parent
8d236eea3c
commit
6b1fe3e9dd
@ -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)
|
conf = None if labels else image_targets[:, 6] # check for confidence presence (label vs pred)
|
||||||
|
|
||||||
if boxes.shape[1]:
|
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[[0, 2]] *= w # scale to pixels
|
||||||
boxes[[1, 3]] *= h
|
boxes[[1, 3]] *= h
|
||||||
elif scale_factor < 1: # absolute coords need scale if image scales
|
elif scale_factor < 1: # absolute coords need scale if image scales
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user