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

TrackerState initial value is set wrong for n_init==1 #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SajjadPSavoji
Copy link

Bug

In the boundary case of n_init==1, the current implementation fails to replicate the idea behind DeepSort.

Write now the default value of TrackState for a new Track instance is set to be equal to Tentative . This value is then updated upon the first match in the tracking. However, if n_init==1 and we have an immediate occlusion, as the track was marked tentative will never get to a match state and consequently, the TrackState will never change to Confirmed.

Fix

in the constructor of Track assign initial value to TrackState according to hits and n_init.

self.state = TrackState.Tentative if self.hits < self._n_init else TrackState.Confirmed

Compatibility

Adding this line does not effect the regular behaviour of the source code except for the boundary case discussed (n_init==1).

In case that n_init > 1, the expression simplifies to the following. Keep in mind that hits==1 in constructor.

self.state = TrackState.Tentative if 1 < self._n_init else TrackState.Confirmed

Or more simple as

self.state = TrackState.Tentative if True else TrackState.Confirmed

With final value equaling to

self.state = TrackState.Tentative

which is the the current behaviour of the source code.

need to change track state to confirmed if n_init == 1 in the constructor. I am conditioning based on hits and n_init.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant