updates
This commit is contained in:
parent
d26df074a6
commit
671747318d
|
@ -15,7 +15,6 @@ def detect(save_txt=False, save_img=False, stream_img=False):
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
device = torch_utils.select_device(force_cpu=ONNX_EXPORT)
|
device = torch_utils.select_device(force_cpu=ONNX_EXPORT)
|
||||||
torch.backends.cudnn.benchmark = False # set True to speed up constant image size inference
|
|
||||||
if os.path.exists(out):
|
if os.path.exists(out):
|
||||||
shutil.rmtree(out) # delete output folder
|
shutil.rmtree(out) # delete output folder
|
||||||
os.makedirs(out) # make new output folder
|
os.makedirs(out) # make new output folder
|
||||||
|
@ -49,6 +48,7 @@ def detect(save_txt=False, save_img=False, stream_img=False):
|
||||||
# Set Dataloader
|
# Set Dataloader
|
||||||
vid_path, vid_writer = None, None
|
vid_path, vid_writer = None, None
|
||||||
if streams:
|
if streams:
|
||||||
|
torch.backends.cudnn.benchmark = True # set True to speed up constant image size inference
|
||||||
dataset = LoadStreams(source, img_size=img_size, half=half)
|
dataset = LoadStreams(source, img_size=img_size, half=half)
|
||||||
elif webcam:
|
elif webcam:
|
||||||
stream_img = True
|
stream_img = True
|
||||||
|
|
Loading…
Reference in New Issue