mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-10 23:08:37 +02:00
The cosine similarity calculation is guarded by: if not np.any(np.linalg.norm(velocities, axis=1)) This enters the block when ALL velocity norms are zero, then divides by those zero norms. The condition should check that all norms are non-zero before computing cosine similarity: if np.all(np.linalg.norm(velocities, axis=1)) Also fixes debug log that shows average_velocity[0] for both x and y velocity components (second should be average_velocity[1]).