TrackEval
TrackEval copied to clipboard
Bug in identity.py
Hi, I thought I found a bug in TrackEval/trackeval/metrics/identity.py
.
Current Version
The fn_mat[:num_gt_ids, :num_tracker_ids]
and fp_mat[:num_gt_ids, :num_tracker_ids]
entries are not right.
Currently,
fn_mat[:num_gt_ids, :num_tracker_ids] = number_of_gt_ids - potential_matches_count
fp_mat[:num_gt_ids, :num_tracker_ids] = number_of_tracker_ids - potential_matches_count
However, this is not what the original paper explains (click here). This does not handle the case when there are no potential matches.
Two regular nodes are connected with an edge e ∈ E if their trajectories overlap in time.
What I think It Should Be
There should be an if-else statement which checks whether trajectories overlap in time.
# Assume 1e10 is infinity
fn_mat[:num_gt_ids, :num_tracker_ids] = (number_of_gt_ids - potential_matches_count) if (potential_matches_count > 0) else 1e10
fp_mat[:num_gt_ids, :num_tracker_ids] = (number_of_tracker_ids - potential_matches_count) if (potential_matches_count > 0) else 1e10
I have been quite handwavy with the code notation, but hopefully it still conveys the meaning.
Is my understanding right?
Interesting question, may we kindly ask for @JonathonLuiten opnion's :)?