Skip to content

Commit

Permalink
Fix a visualization bug (ultralytics#11134)
Browse files Browse the repository at this point in the history
Fix a visualization bug reported here: ultralytics#11133

Signed-off-by: Sheng Hu <[email protected]>
Co-authored-by: Glenn Jocher <[email protected]>
  • Loading branch information
husheng12345 and glenn-jocher authored Mar 9, 2023
1 parent ea05d5c commit 5543b89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/segment/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def plot_images_and_masks(images, targets, masks, paths=None, fname='images.jpg'
x, y = int(w * (i // ns)), int(h * (i % ns)) # block origin
annotator.rectangle([x, y, x + w, y + h], None, (255, 255, 255), width=2) # borders
if paths:
annotator.text((x + 5, y + 5 + h), text=Path(paths[i]).name[:40], txt_color=(220, 220, 220)) # filenames
annotator.text((x + 5, y + 5), text=Path(paths[i]).name[:40], txt_color=(220, 220, 220)) # filenames
if len(targets) > 0:
idx = targets[:, 0] == i
ti = targets[idx] # image targets
Expand Down

0 comments on commit 5543b89

Please sign in to comment.