This commit is contained in:
Glenn Jocher 2019-11-22 14:03:46 -10:00
parent 46da9fd26c
commit 54d907d8c8
1 changed files with 8 additions and 9 deletions

View File

@ -413,25 +413,24 @@ def convert(cfg='cfg/yolov3-spp.cfg', weights='weights/yolov3-spp.weights'):
def attempt_download(weights): 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, download from https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI' msg = weights + ' missing, download from https://drive.google.com/open?id=1LezFG5g3BCW6iYaV89B2i64cqEUZD7e0'
if weights and not os.path.isfile(weights): if weights and not os.path.isfile(weights):
file = Path(weights).name file = Path(weights).name
if file == 'yolov3-spp.weights': if file == 'yolov3-spp.weights':
gdrive_download(id='1oPCHKsM2JpM-zgyepQciGli9X0MTsJCO', name=weights) gdrive_download(id='16lYS4bcIdM2HdmyJBVDOvt3Trx6N3W2R', name=weights)
elif file == 'yolov3-spp.pt': elif file == 'yolov3-spp.pt':
gdrive_download(id='1vFlbJ_dXPvtwaLLOu-twnjK4exdFiQ73', name=weights) gdrive_download(id='1f6Ovy3BSq2wYq4UfvFUpxJFNDFfrIDcR', name=weights)
elif file == 'yolov3.pt': elif file == 'yolov3.pt':
gdrive_download(id='11uy0ybbOXA2hc-NJkJbbbkDwNX1QZDlz', name=weights) gdrive_download(id='1SHNFyoe5Ni8DajDNEqgB2oVKBb_NoEad', name=weights)
elif file == 'yolov3-tiny.pt': elif file == 'yolov3-tiny.pt':
gdrive_download(id='1qKSgejNeNczgNNiCn9ZF_o55GFk1DjY_', name=weights) gdrive_download(id='10m_3MlpQwRtZetQxtksm9jqHrPTHZ6vo', name=weights)
elif file == 'darknet53.conv.74': elif file == 'darknet53.conv.74':
gdrive_download(id='18xqvs_uwAqfTXp-LJCYLYNHBOcrwbrp0', name=weights) gdrive_download(id='1WUVBid-XuoUBmvzBVUCBl_ELrzqwA8dJ', name=weights)
elif file == 'yolov3-tiny.conv.15': elif file == 'yolov3-tiny.conv.15':
gdrive_download(id='140PnSedCsGGgu3rOD6Ez4oI6cdDzerLC', name=weights) gdrive_download(id='1Bw0kCpplxUqyRYAJr9RY9SGnOJbo9nEj', name=weights)
elif file == 'ultralytics49.pt': elif file == 'ultralytics49.pt':
gdrive_download(id='1GKy8hr0h41VlVX2QqURO9re7yKXhaPK7', name=weights) gdrive_download(id='158g62Vs14E3aj7oPVPuEnNZMKFNgGyNq', name=weights)
else: else:
try: # download from pjreddie.com try: # download from pjreddie.com
url = 'https://pjreddie.com/media/files/' + file url = 'https://pjreddie.com/media/files/' + file