ilastik icon indicating copy to clipboard operation
ilastik copied to clipboard

Increasing max nearest neighbors did not result in finding all training arcs

Open jwindhager opened this issue 6 years ago • 3 comments

In the "Tracking with Learning" workflow (after importing a "Training" project as "Training with Learning"), when calculating the tracking weights, the progress window "halts", the weights aren't updated and the following message appears in ilastik_log.txt:

INFO 2018-10-16 18:41:45,673 opStructuredTracking 13820 140318438639360 [structuredTrackingGui] Increasing max nearest neighbors! DIVISION 84 697
INFO 2018-10-16 18:41:45,673 opStructuredTracking 13820 140318438639360 max nearest neighbors= 10
INFO 2018-10-16 18:41:45,673 opStructuredTracking 13820 140318438639360 [structuredTracking] Increasing max nearest neighbors did not result in finding all training arcs!

I can close the progress window and click "Calculate tracking weights" again, resulting in the same behavior. In the "Training" applet, I manually tracked ~90 tracks in one image starting with 3 "seed cells", and I'm fairly certain that all of the tracked cells have a matching detection in the following frame within a (spatial) neighborhood of max. 5 nearest cells.

I know that I didn't provide a lot of training data (yet), but that error message seems suspicious. Any hints what I might be doing wrong? Is there any way to figure out which cells supposedly don't have a "corresponding arc" within the given neighborhood?

I'm running Ilastik 1.3.0 with CPLEX 12.8 on an Ubuntu 18.04 system.

jwindhager avatar Oct 16 '18 17:10 jwindhager

Thanks for the report! You have provided more than enough training data, this algorithm is supposed to work with just a few annotated tracks.

To simplify debugging, do you mind sharing your project file with us, with input data saved inside? We can be reached by e-mail at [email protected].

akreshuk avatar Oct 18 '18 09:10 akreshuk

Hi @akreshuk

Unfortunately, it's impossible for me to share the data for legal reasons.

Meanwhile, I noticed a few things:

  1. When creating a new "Tracking with Learning" project from scratch, I cannot load my complete data set because Ilastik seems to only be able to deal with one time series at a time in this workflow. My original "Training" project, however, contained training data on 27 time series, where each time series is a single HDF5 file with dimensions (t, y, x, 7). I only realized this incoherence when creating a "Tracking with Learning" project from scratch, since converting the multi-file "Tracking" project into a "Tracking with Learning" project didn't raise any warning. I guess that this might be one potential explanation for this issue. If the "Tracking with Learning" workflow is indeed just meant for one time series at a time, showing an error message when importing from a "Tracking" project might be good.

  2. When creating a new "Tracking with Learning" project from scratch, it seems as if I only experience the issue when my training data contains cells that are assigned to multiple tracks. I cannot say for certain, but it might be that the issue indeed only arises when my training data contains cells assigned to more tracks than the maximum trained number according to the object count classifier. While this makes sense, it would be good to raise a warning in this situation. Unfortunately, I cannot validate this observation, since I didn't keep all my attempts in creating a "Tracking with Learning" project due to their large file sizes.

I'm really sorry I cannot be of more help at this time. If I observe similar problems on a data set I'm able to share, I will get back to you. Meanwhile, creating a "Tracking with Learning" project from scratch and training only on well-segmented objects seems the way to go.

jwindhager avatar Oct 18 '18 15:10 jwindhager

to add to this - I think this happens when adding a division and not starting any new track after (so division meaning annotating mother plus child cells and then not doing anything else). There seems to be an inconsistency between

  • TrackingAnnotations/Annotations/0/divisions <-> TrackingAnnotations/Divisions
  • TrackingAnnotations/Annotations/0/labels <-> TrackingAnnotations/Labels

let alone that the whole code for gathering the training data for the parameter optimization there is pretty convoluted

k-dominik avatar Jul 16 '22 20:07 k-dominik