Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems about the "Sanity checks" assertion code in tracking evaluation #700

Closed
huangyangyi opened this issue Dec 23, 2021 · 1 comment · Fixed by #718
Closed

Problems about the "Sanity checks" assertion code in tracking evaluation #700

huangyangyi opened this issue Dec 23, 2021 · 1 comment · Fixed by #718
Assignees

Comments

@huangyangyi
Copy link

Hi, I met a problem when using the tracking evaluation, with this assertion triggered:

# Sanity checks.
unachieved_thresholds = np.sum(np.isnan(thresholds))
duplicate_thresholds = len(thresholds) - len(np.unique(thresholds))
assert unachieved_thresholds + duplicate_thresholds + len(thresh_metrics) == self.num_thresholds

The assertion was triggered by the case of multiple NaNs occurring in the threshold list, e.g. thresholds=[nan, nan, nan, nan, nan, nan, nan, nan, 0.14626915256182352, 0.17571373816047395, 0.1982034333050251, 0.22260631062090397, 0.24383812966558294, 0.2603936386294663, 0.2848243469541723, 0.3308456484003034, 0.3668973971960257, 0.3824963077902794, 0.39220086903106877, 0.41123709362000227, 0.4171593593699591, 0.42581389248371126, 0.4534411536795752, 0.4758617915213108, 0.5016027579412741, 0.5305963274505403, 0.5490754961967468, 0.5555436402559281, 0.5697322227060795, 0.5863827850956184, 0.5895171731710434, 0.5930080786347389, 0.5991135852776776, 0.6053177920034692, 0.6182821939388911, 0.6370792790101125,0.6611657304068407, 0.6718776701018214, 0.6763528749346733, 0.7061878126114607] and num_thresholds=40.
Not sure about the purpose of this sanity check. Is multiple NaNs occurence an invalid situation here?
P.s. Temporally I fixed this by changing L160 to:

duplicate_thresholds = len(thresholds) - len(np.unique(thresholds)) - (0 if unachieved_thresholds <= 1 else unachieved_thresholds - 1)
@whyekit-motional
Copy link
Collaborator

@huangyangyi the occurrence of multiple NaNs is valid and accounted for via:

unachieved_thresholds = np.sum(np.isnan(thresholds))

Perhaps you might want to check the self.tracks_pred for the scene_id that is triggering this assertion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants