From 8646db7c19353c88af78ad0758dc908d83552859 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 17 Feb 2019 17:34:45 +0100 Subject: [PATCH] updates --- detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/detect.py b/detect.py index 611c05a5..90dbe717 100644 --- a/detect.py +++ b/detect.py @@ -31,8 +31,9 @@ def detect( # Load weights if weights.endswith('.pt'): # pytorch format - if weights.endswith('yolov3.pt') and not os.path.exists(weights) and (platform == 'darwin'): - os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights) + if weights.endswith('yolov3.pt') and not os.path.exists(weights): + if (platform == 'darwin') or (platform == 'linux'): + os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights) model.load_state_dict(torch.load(weights, map_location='cpu')['model']) else: # darknet format load_darknet_weights(model, weights)