From 6ff1a4e77a53a6e65e0a6c3e6b10732aa145d317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Castro?= Date: Fri, 23 Feb 2024 09:36:45 -0300 Subject: [PATCH] Always use euclidean distance in camera_motion demo --- demos/camera_motion/src/demo.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/demos/camera_motion/src/demo.py b/demos/camera_motion/src/demo.py index 42673dd0..9e951f3a 100644 --- a/demos/camera_motion/src/demo.py +++ b/demos/camera_motion/src/demo.py @@ -224,20 +224,18 @@ def run(): else partial(video.show, downsample_ratio=args.downsample_ratio) ) - distance_threshold = args.distance_threshold + if args.distance_threshold is None: + distance_threshold = video.input_height / 10 + else: + distance_threshold = args.distance_threshold + if args.track_boxes: drawing_function = draw_boxes - distance_function = "iou" - if args.distance_threshold is None: - distance_threshold = 0.5 else: drawing_function = draw_points - distance_function = "euclidean" - if args.distance_threshold is None: - distance_threshold = video.input_height / 10 tracker = Tracker( - distance_function=distance_function, + distance_function="euclidean", detection_threshold=args.confidence_threshold, distance_threshold=distance_threshold, initialization_delay=args.initialization_delay, @@ -279,6 +277,7 @@ def run(): text_thickness=None if args.id_size is None else int(args.id_size * 2), + draw_ids=True, ) if args.absolute_grid: