Skip to content

Instantly share code, notes, and snippets.

@fcakyon
Last active December 8, 2022 16:04
Show Gist options
  • Save fcakyon/661fd3e9aa4c87f3e01ffab813e46500 to your computer and use it in GitHub Desktop.
Save fcakyon/661fd3e9aa4c87f3e01ffab813e46500 to your computer and use it in GitHub Desktop.
model = YOLO()
for input_path in args.files:
video = Video(input_path=input_path)
tracker = Tracker(
distance_function=euclidean_distance,
distance_threshold=max_distance_between_points,
)
for frame in video:
yolo_detections = model(frame)
detections = yolo_detections_to_norfair_detections(yolo_detections)
tracked_objects = tracker.update(detections=detections)
norfair.draw_points(frame, detections)
norfair.draw_tracked_objects(frame, tracked_objects)
video.write(frame)
@fcakyon
Copy link
Author

fcakyon commented May 27, 2021

@kontgerilla
Copy link

kontgerilla commented Dec 6, 2022

404 Not found. The Page Has been deleted

@fcakyon
Copy link
Author

fcakyon commented Dec 7, 2022

404 Not found. The Page Had been deleted

Fixed 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment