This commit is contained in:
Glenn Jocher 2019-02-11 12:32:54 +01:00
parent 37b633d205
commit 003daea143
2 changed files with 3 additions and 2 deletions

View File

@ -23,9 +23,10 @@ def detect(
os.system('rm -rf ' + output)
os.makedirs(output, exist_ok=True)
# Load model
# Initialize model
model = Darknet(cfg, img_size)
# Load weights
if weights.endswith('.pt'): # pytorch format
if weights.endswith('weights/yolov3.pt') and not os.path.isfile(weights):
os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights)

View File

@ -24,7 +24,7 @@ def test(
nC = int(data_cfg['classes']) # number of classes (80 for COCO)
test_path = data_cfg['valid']
# Initiate model
# Initialize model
model = Darknet(cfg, img_size)
# Load weights