diff --git a/utils/utils.py b/utils/utils.py index 74abd999..93a9ada8 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -848,6 +848,8 @@ def plot_wh_methods(): # from utils.utils import *; plot_wh_methods() def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max_size=640, max_subplots=16): tl = 3 # line thickness tf = max(tl - 1, 1) # font thickness + if os.path.isfile(fname): # do not overwrite + return None if isinstance(images, torch.Tensor): images = images.cpu().numpy()