updates
This commit is contained in:
parent
c702916495
commit
3bd00360bc
|
@ -438,7 +438,6 @@ def attempt_download(weights):
|
||||||
# Attempt to download pretrained weights if not found locally
|
# Attempt to download pretrained weights if not found locally
|
||||||
msg = weights + ' missing, try downloading from https://drive.google.com/open?id=1LezFG5g3BCW6iYaV89B2i64cqEUZD7e0'
|
msg = weights + ' missing, try downloading from https://drive.google.com/open?id=1LezFG5g3BCW6iYaV89B2i64cqEUZD7e0'
|
||||||
|
|
||||||
r = 1 # error value
|
|
||||||
if weights and not os.path.isfile(weights):
|
if weights and not os.path.isfile(weights):
|
||||||
d = {'yolov3-spp.weights': '16lYS4bcIdM2HdmyJBVDOvt3Trx6N3W2R',
|
d = {'yolov3-spp.weights': '16lYS4bcIdM2HdmyJBVDOvt3Trx6N3W2R',
|
||||||
'yolov3.weights': '1uTlyDWlnaqXcsKOktP5aH_zRDbfcDp-y',
|
'yolov3.weights': '1uTlyDWlnaqXcsKOktP5aH_zRDbfcDp-y',
|
||||||
|
@ -459,7 +458,7 @@ def attempt_download(weights):
|
||||||
print('Downloading ' + url)
|
print('Downloading ' + url)
|
||||||
r = os.system('curl -f ' + url + ' -o ' + weights)
|
r = os.system('curl -f ' + url + ' -o ' + weights)
|
||||||
|
|
||||||
# Error check
|
# Error check
|
||||||
if not (r == 0 and os.path.exists(weights) and os.path.getsize(weights) > 1E6): # weights exist and > 1MB
|
if not (r == 0 and os.path.exists(weights) and os.path.getsize(weights) > 1E6): # weights exist and > 1MB
|
||||||
os.system('rm ' + weights) # remove partial downloads
|
os.system('rm ' + weights) # remove partial downloads
|
||||||
raise Exception(msg)
|
raise Exception(msg)
|
||||||
|
|
Loading…
Reference in New Issue