example video switches individuals
MCMaurer opened this issue · 3 comments
Hi there!
I've been playing around with tracktor and I'm really excited to apply it to some videos! I've been looking at some of the examples and I noticed that in the tracked zebrafish video, there are some instances when the individuals get switched. I noticed it at frames ~1300 and ~1500 in zebrafish_video_tracked.mp4
. Both switches occur between individuals that are quite far apart, not just when two individuals pass close to each other.
I was wondering how often you run into this problem and how best to go about solving it.
Thanks!
Hello,
You are right that the identities switch sometimes between further away individuals. This is a result of the hungarian algorithm implemented for identity maintenance. Since the algorithm tries to minimise the overall distances between successive frames, it sometimes swaps around IDs of multiple individuals such that this costs function is minimised.
A software like IDTracker (with a much more sophisticated identity maintenance algorithm) is suitable for this. The advantage of tracktor however is that it has a much better detection rate. The best tracking performance will hence incorporate a combination of these two software.
At some point, I will try and release this as an addition to Tracktor but this might be a while.
Hope this helps.
Vivek
Hi Vivek,
Thank you so much for the response! I'm really excited to use Tracktor on some of my videos with single individuals, and I figure I'll give it a shot with groups too!
One other thing- I noticed that in the CSV file, right around the frames where the switches occurred, the pos_x
and pos_y
values went from having many decimal places to having only integer values. Is this a possible indicator that Tracktor is struggling to maintain individual IDs?
Here's what I'm thinking- if there is some indicator in the CSV that a switch may have occurred, such as a change in the number of decimals, I should be able to easily pick out those spots. I could then generate a list of frames with potential switches, and then go look at those points in the video to see if a switch happened. If a switch did occur, it should be simple enough to modify the CSV to correct for the identification mismatch, saying "alright, any individual flagged as A
after this point is actually individual B
". This would be pretty awesome!
Again, thanks for all the work on Tracktor, I think it's amazing and I'm really excited to use it more!!