Skip to content

Commit

Permalink
fix val len(plot_masks)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Aug 24, 2022
1 parent 26fbf08 commit be5a244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segment/val.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def run(
align_corners=False,
).squeeze(0)
plot_images_and_masks(im, targets, masks, paths, save_dir / f'val_batch{batch_i}_labels.jpg', names)
if any(plot_masks):
if len(plot_masks):
plot_masks = torch.cat(plot_masks, dim=0)
plot_images_and_masks(im, output_to_target(out, max_det=15), plot_masks, paths,
save_dir / f'val_batch{batch_i}_pred.jpg', names) # pred
Expand Down

0 comments on commit be5a244

Please sign in to comment.