This commit is contained in:
Glenn Jocher 2019-07-08 12:43:15 +02:00
parent 7a2d356297
commit 68b50f5cb6
2 changed files with 7 additions and 3 deletions

View File

@ -251,7 +251,12 @@ def load_darknet_weights(self, weights, cutoff=-1):
# Try to download weights if not available locally # Try to download weights if not available locally
if not os.path.isfile(weights): if not os.path.isfile(weights):
try: 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: except IOError:
print(weights + ' not found.\nTry https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI') print(weights + ' not found.\nTry https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI')

View File

@ -11,8 +11,7 @@ from PIL import Image
from tqdm import tqdm from tqdm import tqdm
from pathlib import Path from pathlib import Path
from . import torch_utils from . import torch_utils # , google_utils
from . import google_utils
matplotlib.rc('font', **{'size': 11}) matplotlib.rc('font', **{'size': 11})