trackmate-sc / TrackMate

TrackMate is your buddy for your everyday tracking.
https://imagej.net/plugins/trackmate
GNU General Public License v3.0
169 stars 76 forks source link

Tracking fast flows #295

Closed Lollum89 closed 6 months ago

Lollum89 commented 6 months ago

Hello, in this version I made an improvement in the tracking of fast flows using the Kalman Tracker. Essentially, I added a new field in the tracker, which is called expectedMovement. It is an array, therefore representing the X;Y;Z displacement vector. In the fast flows, initiating a track is not optimal, as the spots might move a lot in a preferential direction. In the Jaquaman linking step of the tracker, the origin spots are moved by the expected movement vector, therefore moving them closer to the expected position of the target spots. This allows for a much smaller initial search radius, mitigating the issue of spurious tracks that are initiated in the wrong direction and must be terminated after 1 or 2 steps. The presence of these artifact tracks also impedes the initiation of the true tracks, therefore some visually very clear cases are ignored. After determining the relation between an origin and a target spot, the tracking can then proceed using the unmodified Kalman filter. I am including these changes as a draft request, since some changes are kind of messy. But if there is interest and you tell me which branch I should use for these changes, I will prepare a cleaner version.

TrackMate capture of MASK_Result test4_trackingModLP

tinevez commented 6 months ago

This looks like a great idea. We could see how to augment it with the input from optic flow. But later.

In the meantime, if possible, please develop the new tracker as a separate one, so that we retain the existing config for the Kalman tracker.

And if possible: test the performance of the new tracker by comparing with a manually annotated ground truth. You will find the in the TrackMate-Helper the tools to measure tracking performance.

Lollum89 commented 6 months ago

I close this pull request. All the changes will be in a new one, since I created a dedicated branch in order to keep the code clean.