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})