Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use euclidean distance in camera_motion demo #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions demos/camera_motion/src/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
Loading