From fdfc4a5e63dd697acbe06a003d96c1f427a97e4b Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 19 Sep 2019 18:54:16 +0200 Subject: [PATCH] updates --- detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/detect.py b/detect.py index 4013c4ab..826785ce 100644 --- a/detect.py +++ b/detect.py @@ -6,9 +6,9 @@ from utils.datasets import * from utils.utils import * -def detect(save_txt=False, save_img=False, view_img=False): +def detect(save_txt=False, save_img=False): img_size = (320, 192) if ONNX_EXPORT else opt.img_size # (320, 192) or (416, 256) or (608, 352) for (height, width) - out, source, weights, half = opt.output, opt.source, opt.weights, opt.half + out, source, weights, half, view_img = opt.output, opt.source, opt.weights, opt.half, opt.view_img webcam = source == '0' or source.startswith('rtsp') or source.startswith('http') or source.endswith('.txt') # Initialize @@ -139,6 +139,7 @@ if __name__ == '__main__': parser.add_argument('--fourcc', type=str, default='mp4v', help='output video codec (verify ffmpeg support)') parser.add_argument('--half', action='store_true', help='half precision FP16 inference') parser.add_argument('--device', default='', help='device id (i.e. 0 or 0,1) or cpu') + parser.add_argument('--view-img', action='store_true', help='display results') opt = parser.parse_args() print(opt)