Skip to content

TrackMate-Ilastik-1.2.0: Support multi channel models.

Latest
Compare
Choose a tag to compare
@tinevez tinevez released this 16 Mar 12:15
· 37 commits to master since this release

What's Changed

The TrackMate-Ilastik detector crashes if it is used with an ilastik project containing a model trained on images
with more than one channel. The TrackMate module always crop the source image to pass a single-
channel image to ilastik (this is the 'segment in channel' setting), and of course that would make ilastik unhappy if the model was expecting a multi-channel image.

This PR fixes this, retaining compatibility with previous features:

  • First the ilastik runner inspects the ilastik project file and checks on how many channels the model was trained on.

  • If it is 1, then the TrackMate module crops the input to only pass the specified channel to ilastik and everything is fine.

  • If there is more than 1, then TrackMate passes the full input image to ilastik. For this to work, there must be the same number of channels in the training images than in the input image, and they must be at the same position. This is a normal expectation but it does not cost much to remind it. When it is the case, the TrackMate ilastik module works as expected.