From 9cc5ddd776585cb525a536d35cbc48f4019e7593 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 12 Feb 2019 17:29:13 +0100 Subject: [PATCH] updates --- detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/detect.py b/detect.py index ede33bf4..65d8ffa5 100644 --- a/detect.py +++ b/detect.py @@ -1,3 +1,4 @@ +import shutil import argparse import time from sys import platform @@ -20,8 +21,8 @@ def detect( webcam=False ): device = torch_utils.select_device() - os.system('rm -rf ' + output) - os.makedirs(output, exist_ok=True) + shutil.rmtree(output) # delete output folder + os.makedirs(output) # make new output folder # Initialize model model = Darknet(cfg, img_size)