Skip to content

Commit 4c904ac

Browse files
zhixuweiglenn-jocherUltralyticsAssistant
authored
Fix possible image drawing issues (#13426)
* Update plots.py Fixed non-meaningful labels in the top right (row 1, column 4) plots when batch size is larger than max_subplots. Signed-off-by: zzzer <[email protected]> * Update plots.py Signed-off-by: Glenn Jocher <[email protected]> * Auto-format by https://ultralytics.com/actions * Simple loop conditions Simple loop conditions Signed-off-by: zzzer <[email protected]> --------- Signed-off-by: zzzer <[email protected]> Signed-off-by: Glenn Jocher <[email protected]> Co-authored-by: Glenn Jocher <[email protected]> Co-authored-by: UltralyticsAssistant <[email protected]>
1 parent 81ac034 commit 4c904ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/plots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def plot_images(images, targets, paths=None, fname="images.jpg", names=None):
183183
# Annotate
184184
fs = int((h + w) * ns * 0.01) # font size
185185
annotator = Annotator(mosaic, line_width=round(fs / 10), font_size=fs, pil=True, example=names)
186-
for i in range(min(bs, i + 1)):
186+
for i in range(bs):
187187
x, y = int(w * (i // ns)), int(h * (i % ns)) # block origin
188188
annotator.rectangle([x, y, x + w, y + h], None, (255, 255, 255), width=2) # borders
189189
if paths:

0 commit comments

Comments
 (0)