This commit is contained in:
Glenn Jocher 2019-02-10 21:07:26 +01:00
parent 97909df1a6
commit 51eb173416
1 changed files with 20 additions and 3 deletions

23
test.py
View File

@ -7,7 +7,16 @@ from utils.utils import *
from utils import torch_utils
def test(cfg, data_cfg, weights, batch_size=16, img_size=416, iou_thres=0.5, conf_thres=0.3, nms_thres=0.45):
def test(
cfg,
data_cfg,
weights,
batch_size=16,
img_size=416,
iou_thres=0.5,
conf_thres=0.3,
nms_thres=0.45
):
device = torch_utils.select_device()
# Configure run
@ -125,5 +134,13 @@ if __name__ == '__main__':
opt = parser.parse_args()
print(opt, end='\n\n')
mAP = test(opt.cfg, opt.data_cfg, opt.weights, opt.batch_size, opt.img_size, opt.iou_thres, opt.conf_thres,
opt.nms_thres)
mAP = test(
opt.cfg,
opt.data_cfg,
opt.weights,
opt.batch_size,
opt.img_size,
opt.iou_thres,
opt.conf_thres,
opt.nms_thres
)