Ilastik - Neural Network Classification workflow

Dear @ilastik_team,

I’m testing the “Version 1.4.0b8”, to play with the “Neural Network Classification workflow” and I have some feedback and some questions.

Installation on Win10 64-bit:

Went super smoothly! I installed both ilastik and TikTorch on my local machine with default settings.

(12 cores, 64 GB RAM, GPU 2080 Ti). Next step will be to use with the institute GPU grid, but I’ve to contact IT team for the installation step.

Server configuration

I had some “trouble” to do the “server configuration” step.
Basically (seems logic one you know), I had to start TikTorch FIRST (I guess I thought that ilastik will start it itself :stuck_out_tongue: ), and THEN to run ilastik as an administrator .
Please see below error in different cases.

NN training :

I downloaded a model from the Zoo (EM) and it tooks some time but Live Prediction came up with a result :smiley:

Thank you for making such tool and Congratulations for making it so easy to use!

Asking for a friend :face_with_hand_over_mouth:

Let say he would need more than 2 labels. We can’t add new label(s), right?

What would be the best/simple way to do it?

My first guess would be to:

  • use a pixel classification project with some more labels (4 or 5),
  • then use YAPIC to train a model and export it as a bioimage.io compatible model
  • load this model in ilastik NN

Thank you for your answers,

Cheers,

Romain

1 Like

Hi @romainGuiet,

thank you so much for this detailed and very systematic analysis.
I don’t think this problem surfaced in the tutorials that we ran so far.
However, I could reproduce it on a VM :confused:
We have changed some things with our config files and it seems now it will not work if the file C:\Users\<yourusername>\.ilastikrc does not exist. If you create this file manually then the error should go away. I don’t clearly see the reason for this, but it’s also late. This will definitely be gone in the next version. Thank you very much for making us aware of that!
The server configuration applet is currently being simplified. For the problem you reported I have opened an issue.

The asking for a Friend part
(btw, this was rendered hilariously in the email I got:


)

Short answer (:grimacing:) : You cannot change the number of classes the network provides. Furthermore, retraining the network from sparse annotations is currently not really supported.

As in ways to (re-)train a network outside of ilastik possibilities are plentiful and I am probably not the best person to ask for the easiest way. Maybe @constantinpape could comment on how he’d fine-tune/change a cnn to include more classes (my feeling is that you’d still need a considerable amount of training data).

Thank you again for your detailed feedback!
Cheers
Dominik

2 Likes

Assuming we have a segmentation network, you would need to change the output layer to return more / less channels depending on how you changed the number of classes.
It might also be benefitial to only update parts of the model by freezing the weights for the other layers during training. (There was a recent paper that showed that it’s actually based to just update the first layers in a U-Net for some cases, but that might not be true if you add new classes, so it’s something one can experiment with).

How to do it technically? I am not sure if there is a good tool which can do it yet, as I don’t think YAPIC supports finetuning a model (does it?). Hopefully we will have this in ilastik sooner than later.
If you want to train a model on new labels from scratch then your approach is of course feasible, @romainGuiet.

2 Likes