glenn-jocher
commited on
Commit
•
84f9bb5
1
Parent(s):
86f4247
Normalized mosaic plotting bug fix (#1647)
Browse files- utils/plots.py +1 -1
utils/plots.py
CHANGED
@@ -141,7 +141,7 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max
|
|
141 |
conf = None if labels else image_targets[:, 6] # check for confidence presence (label vs pred)
|
142 |
|
143 |
if boxes.shape[1]:
|
144 |
-
if boxes.max() <= 1: # if normalized
|
145 |
boxes[[0, 2]] *= w # scale to pixels
|
146 |
boxes[[1, 3]] *= h
|
147 |
elif scale_factor < 1: # absolute coords need scale if image scales
|
|
|
141 |
conf = None if labels else image_targets[:, 6] # check for confidence presence (label vs pred)
|
142 |
|
143 |
if boxes.shape[1]:
|
144 |
+
if boxes.max() <= 1.01: # if normalized with tolerance 0.01
|
145 |
boxes[[0, 2]] *= w # scale to pixels
|
146 |
boxes[[1, 3]] *= h
|
147 |
elif scale_factor < 1: # absolute coords need scale if image scales
|