From 12a42b9ca6a4d5e123b5b7064ed6b0b8b19eaf9f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 17 Feb 2019 17:30:16 +0100 Subject: [PATCH] updates --- detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/detect.py b/detect.py index d5db8fe2..4a955253 100644 --- a/detect.py +++ b/detect.py @@ -13,7 +13,7 @@ def detect( cfg, weights, images, - output='output', + output='output', # output folder img_size=416, conf_thres=0.3, nms_thres=0.45, @@ -22,7 +22,8 @@ def detect( webcam=False ): device = torch_utils.select_device() - shutil.rmtree(output) # delete output folder + if os.path.exists(output): + shutil.rmtree(output) # delete output folder os.makedirs(output) # make new output folder # Initialize model