Computer recommendation for better ilastik performance?

Greetings!

I’m looking for a desktop computer with best performance for large image processing (e.g. 17565*12700 pix2). The computer I’m using has 32GB RAM. But I still often encounter slowly dragging and software not responding…problem. Actually I’m not sure if it is due to inherent limitation of ilastik or poor performance of the computer. Also, the pop-up window ‘large image warning’ is for every computer the same? Or ilastik knows the capacity of the computer?

Answers are appreciated!

Hello @Mia_Learning_More,

welcome to the image.sc community and hope you have a great learning experience here :partying_face: :

The large image warning is indeed generic and does not take into account your computing resources.

There are some things you can do. First of all I’d recommend using our latest beta version. In most image (modern) image viewers the data is not requested at once, but usually only the part you are currently looking at is requested. The image subdivided in “tiles” (quadratic regions, a regular grid) in order to do that. The grid size (aka tile width) can be configured. In the last build we added a little functionality the adjusts the size automatically for 2D and 3D data. So this should already be very helpful!

Along the same lines, there are some good practices for working with larger data, summarized here: Which upgrade for my laptop would be most beneficial for working with "Ilastik"? - #2 by k-dominik

one thing that isn’t on the list there, is probably also the file format. For best performance in ilastik we recommend, first of all to scale your data appropriately (do you really need that level resolution?). And second, ilastik works best when data is in hdf5 format. This allows ilastik to efficiently access smaller blocks of the data, which is what the whole processing ilastik is based on. We have a fiji plugin, that allows you do convert your data to hdf5: ilastik - FIJI import/export plugin

3 Likes

Hi @k-dominik ,

wow, thank you for the informative answer! I will try the latest version and the plugin. I’m processing some SEM images. The smallest item is down to 4 pixels… So the resolution matters. Regarding your previous answer about the laptop upgrade, I think I can conclude that the more RAM and the better CPU, the faster ilastik will process images (Pixel Classification), right?

Nevertheless, for now I consider to divide the large image into smaller sub-images and run Batch Processing, and then stich all sub-images back to the large image. Will there be any difference between this kind of batch processing to direct training of large image?

Training on patches is fine, it makes the UI more responsive. The only thing to consider is that the different sub-images represent the overall appearance of the image well, and that you train on a couple of those. Then I’d recommend to run ilastik with one of the batch options on the whole image - no stitching needed then.

1 Like

Thank you! @k-dominik

“train on a couple of those” means taking more than one image as input to generate more features for training? Or loading sub-images (patches) as a time series stack for training more of them? I only have experience with Pixel Classification. Also, it will be interesting to know if ilastik can handle images captured under different modes. That’s to say, an object is taken under visible and infrared light. Feature in one mode may be clearer than in the other mode, can ilastik then capture all features from both modes (in this case, two images as input are required)?

I didn’t find the batch option on the whole image. How can I avoid stitching them again? One thing I can think about is to zoom in into small representative area, train, stop live update, zoom to fit, and live update again, as ilastik will only predict what presents on the window…

The idea is to generate training data points on many patches, that all feed into a single classifier. Both of your proposed methods (timeseries, and as separate images) will achieve the same thing :). There is the limitation for “time” series that all “frames” need to be the same size.
But all in all it all evolves around the concept, that you limit the visible area, so that training prediction is faster. You could also zoom in and achieve the same thing.

So in ilastik the idea is in general to train a classifier and then to export the result for further analysis.
Furthermore, the trained classifier can be run on unseen images in various ways, e.g. via the batch processing applet, usually the last step in the workflow, via the fiji plugin, or the headless mode.

If you give ilastik an image with multiple channels, the features will be calculated on all of them, so all channels are taken into account by the classifier. Note that these channels have to be present in all images you train on (and also in those that you want to process with the trained project).

By the way, did any of the measures discussed earlier in this thread, result in any speedup?

Thank you for your explanation! @k-dominik

Yes, the lasted version combined with Fiji plugin works faster than before.

1 Like