Train on various images with Trainable weka segmentations

Hi all,

I am using the Trainable Weka segmentation plugin to classify soil cover types. I am very new to segmentation but I read the documentation for the plugin.
I have a great variability in my images and so I would like to train my classifier on many images rather than 1.

So I tried to first train my classifier on 1 image and to save it. Then I open another image, load the classifier. First I want to visualize if the classifier is good enough for this image by visualizing the segmentation (as in “toggle overlay”). If the classes look ok, I would just go to the next image. If not, I would continue training the classifier by adding new traces from this images.
However, when I load the classifier, the classes are empty. So I wonder whether the new traces (from the new image) I give erase the previous ones (from the first) or are added to the classifier ?

Hello @Marypop,

First of all, sorry for the late answer. It seems your post somehow escaped my radar :confused:

If you want to train a classifier on different images you have two options:

  1. Open all images as a stack (if the don’t have the same size you can enforce it) and use the plugin as usual. you don’t need traces of all classes in all the images.
  2. Use the plugin once per image but saving and loading the traces (using the Save/Load data buttons) for each new image, so the trace information (features used and classes).

Another option, not yet implemented in the plugin, would be to use an “updateable” classifier that could be retrain without starting from scratch as most Weka classifiers.

I hope this helps!

ignacio

5 Likes

Fantastic, it works! I am using the second solution as it will allow me to train on as many images as necessary.

Also, thanks for this great plugin :smiley:

1 Like