Using Ilastik for Synapse Classification

Hi all! I’m currently attempting to use Ilastik for synapse detection in neural tissue. Screenshot from 2018-06-06 16-39-22|690x424!
Screenshot from 2018-06-06 16-34-47|690x431.
We have multiple large data stacks obtained through FIBSEM analysis and would really benefit from your software when it comes to processing speed.
We have been attempting this using both the generic Pixel and object classification workflow and the iiBoost plugin designed specifically for this task, however have encountered some issues and uncertainties.
For one, we have a binary map of pre-traced PSDs we would like to use as our ground truth, which I have uploaded as a prediction mask. However, we would also like to use this tracing as training input instead of redoing any synapse detection manually within the Ilastik interface. Is this possible? I have also attempted to import the binary tiff file as labels in both workflows, but nothing seems to happen when I do. I am also unsure as to what values to input in the “mapping” column (shown in the first attached screenshot) in order to execute the import properly.
In order to use these tracings as training labels, into which of the above options should I import the file?
Secondly, I was wondering about the details of the pixel/object classification in the generic workflow. I have selected all the possible features for a sigma value below 10, which gave an error when selected (second screenshot, which shows the latest segmentation based on manual tracing). I was wondering if this allows for use of 3D characteristics for classification of synapses, i.e. integration of information in the z-space in order to recognize objects based on characteristics derived from 2D training labels. Does 3D analysis require iiBoost or another more specialized plugin?
If I could get some advice on how to proceed I would really appreciate it!
Thanks so much!

I’ve just been playing around with the “Prediction Mask” feature in #ilastik v 1.3.2 and I’m also finding that it doesn’t seem to do anything?

That is, if I include a prediction mask (which I’m assuming is supposed to be a binary image?), it does not seem to be possible to train a classifier - clicking live update at the training stage doesn’t seem to have any effect?

If I don’t include a prediction mask, everything works fine.

Is this a known issue?

Hey @djpbarry, you’ll need to use the latest beta 1.3.3beta1. Also note there is a bug right now such that right now you really should use an image with only '0’s and '1’s in it. (‘1’ for the regions you want to have predictions in).

1 Like

Thanks @k-dominik, but I’m afraid it’s still not behaving itself.

It’s also noticeable that, when I include a prediction mask, segmentations and predictions do not appear in the “Group Visibility” panel.

Hmm, what do you expect it to do, actually?

The prediction mask, as it is currently implemented will not trigger prediction where the mask has 0s. This is primarily done in order to speed up computation by ignoring areas that you are not interested in.

Yep, that’s exactly what I’m looking for!

Without the prediction mask, clicking live update gives me prediction maps in a second or two.

However, if I include a prediction mask, clicking live update does nothing?

it should behave as described: predictions where there are 1s, no predictions where there are 0s. Could you maybe share your data with us ( )?

Sure, I’ll do that now.

I should obviously point out that this is just a single slice from a much larger dataset. The idea was to verify the functionality on this single slice before extending the analysis to the rest of the data.

Sure sure, so, for me it works as expected (using pixel classification)


  • Input Data:
    • Raw Data tab: Click on Add new, select the image
    • Prediction Mask tab: Click on Add (as opposed to Add new) (row 1), add the mask
  • Feature Selection:
    • click on Select features, select all features
  • Training: Add one annotation for Label1, add one annotation for Label2, click live-update.

Also you should be able to see the masked out region being shown in black.

Nope, still not working for me - this is what I’m seeing:


I think you have not added the mask image to the first “lane” (so to the first original image). The data-selection should look like this:


you can go to the summary for confirmation:

I have updated the steps to make it clear to click on add (in row 1) and not on add new.

1 Like

Ah, I see - yes, that was the problem.

Thanks for your patience!

1 Like

glad that it works! :slight_smile: thanks for trying the beta, btw.