From f1a94abafac94fa05f76b6fc6fde711964083a8e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 21 Nov 2018 18:25:52 +0100 Subject: [PATCH] updates --- detect.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/detect.py b/detect.py index b20859b3..3c412915 100755 --- a/detect.py +++ b/detect.py @@ -36,6 +36,9 @@ def detect(opt): if weights_path.endswith('.weights'): # saved in darknet format load_weights(model, weights_path) else: # endswith('.pt'), saved in pytorch format + if weights_path == 'weights/yolov3.pt' and not os.path.isfile(weights_path): + os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -P weights') + checkpoint = torch.load(weights_path, map_location='cpu') model.load_state_dict(checkpoint['model']) del checkpoint