diff --git a/src/utility.py b/src/utility.py index 1d969c0f93884fc8dacfb2f4a5b8cd090a8d458e..bdc9b9b9f4cb7f63d6092f8f47044845c3693d03 100644 --- a/src/utility.py +++ b/src/utility.py @@ -38,9 +38,10 @@ def match_tracks_to_ground_truth(tracks, ground_truth): else: N = T.shape[1] # Only compare times present in both ground truth and estimate - rmse = np.sum((T[:, t[t<N]]-x[:2, t[t<N]])**2)/N + rmse = np.sqrt(np.sum((T[:, t[t<N]]-x[:2, t[t<N]])**2)/N) if rmse < ormse: # The ground truth with the lowest to track RMSE is assumed to be correct - matches[track['identity']] = key + if rmse < 100: # If the rmse is too large, assume it is a false match + matches[track['identity']] = key ormse = rmse return matches