Favicon of Trainable Weka Segmentation

Trainable Weka Segmentation

An open-source Fiji plugin that trains Weka classifiers locally to segment 2D and 3D images, with reusable models and per-class probability maps.

Screenshot of Trainable Weka Segmentation website

Trainable Weka Segmentation is a local image segmentation plugin and Java library for Fiji. It's for researchers and image analysts who want to teach a classifier which image regions belong to each class, then apply that model to other images or stacks. It's free and open source under GPL-3.0.

The plugin works with grayscale and color images in both 2D and 3D. You supply example annotations through Fiji's drawing tools, and it learns to assign a class to each pixel. Training and image processing run on the machine running Fiji, with multiple CPU cores used for feature calculation.

Its main distinction is the choice of Weka classifiers and image features. FastRandomForest is the default, but you can compare other available Weka classifiers for the same segmentation task. Features describe edges, textures and membrane-like structures; the 3D feature calculations account for differences in voxel dimensions.

Results include colored segmentation overlays, labeled images and probability maps for each class. Probability maps let you inspect how strongly the model assigns a pixel to a class. ROC and precision-recall charts show performance on the training data.

You can save classifiers in Weka's .model format and reuse them in later sessions or on other image stacks. The plugin also imports and exports training feature data in ARFF format for use in Weka Explorer. Training can distinguish multiple classes, with names you choose for the structures in your images.

Similar to Trainable Weka Segmentation