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 <husheng_7@163.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
2 people authored and Smfun12 committed Mar 24, 2023
1 parent f9823df commit aff7e42
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 aff7e42

Please sign in to comment.