From 68b50f5cb6949366f5642eb0d7e84373b5564c6d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 8 Jul 2019 12:43:15 +0200 Subject: [PATCH] updates --- models.py | 7 ++++++- utils/utils.py | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/models.py b/models.py index b1717d99..52c8cb37 100755 --- a/models.py +++ b/models.py @@ -251,7 +251,12 @@ def load_darknet_weights(self, weights, cutoff=-1): # Try to download weights if not available locally if not os.path.isfile(weights): try: - os.system('wget https://pjreddie.com/media/files/' + weights_file + ' -O ' + weights) + url = 'https://pjreddie.com/media/files/' + weights_file + print('Downloading ' + url + ' to ' + weights) + os.system('curl ' + url + ' -o ' + weights) + import requests + r = requests.get(url) + except IOError: print(weights + ' not found.\nTry https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI') diff --git a/utils/utils.py b/utils/utils.py index bb857ed4..91b81f16 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -11,8 +11,7 @@ from PIL import Image from tqdm import tqdm from pathlib import Path -from . import torch_utils -from . import google_utils +from . import torch_utils # , google_utils matplotlib.rc('font', **{'size': 11})