From 8c5b6220f5576b2296e6ca18b041598b3edcad68 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 25 Jun 2020 19:26:23 -0700 Subject: [PATCH] Update detect.py --- detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 07631dd..69a37de 100644 --- a/detect.py +++ b/detect.py @@ -80,7 +80,7 @@ def detect(save_img=False): p, s, im0 = path, '', im0s save_path = str(Path(out) / Path(p).name) - txt_path = save_path[:save_path.rfind('.')] + ('_%g' % dataset.frame if dataset.mode == 'video' else '') + txt_path = str(Path(out) / Path(p).stem) + ('_%g' % dataset.frame if dataset.mode == 'video' else '') s += '%gx%g ' % img.shape[2:] # print string gn = torch.tensor(im0.shape)[[1, 0, 1, 0]] #  normalization gain whwh if det is not None and len(det):