From 79111cb18f35f37cd46330fe5b3f380f8e34d946 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 1 Aug 2019 21:58:43 +0200 Subject: [PATCH] updates --- models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 24c53969..c1182345 100755 --- a/models.py +++ b/models.py @@ -265,13 +265,15 @@ def load_darknet_weights(self, weights, cutoff=-1): file = Path(weights).name # Try to download weights if not available locally + msg = weights + ' missing, download from https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI' if not os.path.isfile(weights): try: url = 'https://pjreddie.com/media/files/' + file print('Downloading ' + url) - os.system('curl ' + url + ' -o ' + weights) + os.system('curl -f ' + url + ' -o ' + weights) except IOError: - print(weights + ' not found.\nTry https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI') + print(msg) + assert os.path.exists(weights), msg # download missing weights from Google Drive # Establish cutoffs if file == 'darknet53.conv.74':