updates
This commit is contained in:
parent
12a42b9ca6
commit
1239e8dca3
|
@ -31,7 +31,7 @@ def detect(
|
||||||
|
|
||||||
# Load weights
|
# Load weights
|
||||||
if weights.endswith('.pt'): # pytorch format
|
if weights.endswith('.pt'): # pytorch format
|
||||||
if weights.endswith('yolov3.pt') and not os.path.isfile(weights) and (platform == 'darwin'):
|
if weights.endswith('yolov3.pt') and not os.path.exists(weights) and (platform == 'darwin'):
|
||||||
os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights)
|
os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights)
|
||||||
model.load_state_dict(torch.load(weights, map_location='cpu')['model'])
|
model.load_state_dict(torch.load(weights, map_location='cpu')['model'])
|
||||||
else: # darknet format
|
else: # darknet format
|
||||||
|
|
Loading…
Reference in New Issue