updates
This commit is contained in:
parent
37b633d205
commit
003daea143
|
@ -23,9 +23,10 @@ def detect(
|
||||||
os.system('rm -rf ' + output)
|
os.system('rm -rf ' + output)
|
||||||
os.makedirs(output, exist_ok=True)
|
os.makedirs(output, exist_ok=True)
|
||||||
|
|
||||||
# Load model
|
# Initialize model
|
||||||
model = Darknet(cfg, img_size)
|
model = Darknet(cfg, img_size)
|
||||||
|
|
||||||
|
# Load weights
|
||||||
if weights.endswith('.pt'): # pytorch format
|
if weights.endswith('.pt'): # pytorch format
|
||||||
if weights.endswith('weights/yolov3.pt') and not os.path.isfile(weights):
|
if weights.endswith('weights/yolov3.pt') and not os.path.isfile(weights):
|
||||||
os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights)
|
os.system('wget https://storage.googleapis.com/ultralytics/yolov3.pt -O ' + weights)
|
||||||
|
|
2
test.py
2
test.py
|
@ -24,7 +24,7 @@ def test(
|
||||||
nC = int(data_cfg['classes']) # number of classes (80 for COCO)
|
nC = int(data_cfg['classes']) # number of classes (80 for COCO)
|
||||||
test_path = data_cfg['valid']
|
test_path = data_cfg['valid']
|
||||||
|
|
||||||
# Initiate model
|
# Initialize model
|
||||||
model = Darknet(cfg, img_size)
|
model = Darknet(cfg, img_size)
|
||||||
|
|
||||||
# Load weights
|
# Load weights
|
||||||
|
|
Loading…
Reference in New Issue