diff --git a/playground.py b/playground.py index 9ff3b69..10431c2 100644 --- a/playground.py +++ b/playground.py @@ -20,6 +20,7 @@ from copy import deepcopy as deep_copy from dataclasses import dataclass from datetime import datetime, timedelta from functools import partial, reduce +from itertools import chain from pathlib import Path from typing import ( Any, @@ -1055,10 +1056,11 @@ def calculate_camera_affinity_matrix_jax( # sub‑second detail (resolution ≈ 200 ms). Keep them in float64 until # after subtraction so we preserve Δt‑on‑the‑order‑of‑milliseconds. # --- timestamps ---------- - tracking0 = next(iter(trackings)) - detection0 = next(iter(camera_detections)) t0 = min( - tracking0.last_active_timestamp, detection0.timestamp + chain( + (trk.last_active_timestamp for trk in trackings), + (det.timestamp for det in camera_detections), + ) ).timestamp() # common origin (float) ts_trk = jnp.array( [trk.last_active_timestamp.timestamp() - t0 for trk in trackings],