FIB-SEM Image Segmentation: from 2.5D to 2D

Greetings, dear community members!

I need to segment quite a few FIB-SEM slices (see example below).

I managed to achieve the desired result with Wand tool (yellow margin):

However I still cannot figure out how to design an automated image segmentation workflows, which is capable of doing the same for every slice in the set.

Can you point me to the right direction or, maybe, suggest the best plugin for accomplishing this task please?

I appreciate your help.


You could try using the machine learning Fiji plugin Trainable Weka Segmentation.

That might do the trick! :slight_smile:


Thank you for the suggestion.

I have already tried Trainable Weka Segmentation plugin, but found that it is very slow with low CPU and memory load and I see no way to improve its performance.

Currently I am testing ilastik to solve this task and will report once I achieve the goal.


@iarganda Just thought I’d ping you on this thread as well… in case you have some insight on the ‘slowness’ issue …

eta :slight_smile:

1 Like

Do you also experience almost-dead behavior of TWS plugin? :neutral_face:


Perhaps what you are eluding to - the ‘slowness’ of TWS - depends on the size of your image. You can always attempt to train a classifier on a cropped-section/subset of the data and then apply that classifier to other images via macro scripting


The speed will also depend on how many features you tell TWS to compute. I would suggest you play with various features first on a small patch of your image to determine which ones are effective and necessary, paring down the enabled features to be as small as possible, then run with those features across larger images as needed.

1 Like

That’s strange, can you give us an example of the input image, the traces and the features you used?

That’s a good option as well.

Please download a archive with original image and its mask:

Perhaps it is too large image for quick segmentation?

My current workstation includes dual Intel Xeon CPU E5-2690 v2 @ 3.00 GHz with 512 GB of RAM. However I observe that TWS makes only 5-10% CPU load and takes up to 10 GB of RAM.

OK, I believe I found where the problem is. If I’m not wrong, you are using the mask image as labels/traces, is that right? That beats the purpose of the plugin which is thought to be used with sparse traces. Moreover, most of the time will be used by the plugin to check the label of each pixel inside the irregular shapes, which is very slow. Can you try with some sparse annotation to see how it goes?

Yes, you are right! I was thinking in the following way: I make segmentation by hand and feed the result to the TWS plugin, it will learn the logic and do the similar-style of segmentation across the rest slices.

What is meant by sparse traces? What should dimensions of such traces comparing the to the original image dimensions?

That’s correct. The only problem is the way you introduced your manual segmentation (using large shape freehand selections), whose reading is not optimized in the plugin. It basically takes forever to read all pixels inside those shape selections. I will try to find a solution for that.

In the meantime, try using other selections tools, for example:

  • Freehand lines (these are sparse traces):
  • Rectangles (non sparse but fast to read):
1 Like

Update: I have fixed the issue with the shape ROIs in the latest release of the plugin.

Give it a try!


Thank you very much — I will try it and post the report.

1 Like