Step-by-step Protocol for Using Ilastik
Pixel Classification:
Pixel classification is a method for analyzing images by assigning each pixel to a specific category based on its characteristics, such as brightness, texture, or color. This is achieved using machine learning techniques, which identify patterns in the image. As an output, it can generate a segmentation, determining whether “this pixel belongs to a cell” or “this pixel is background”.
Another important output is a probability map. Instead of making a strict decision for each pixel, the probability map provides a confidence level ranging from 0 (unlikely) to 1 (very likely), indicating how certain the model is about the classification. This approach allows for more flexible and accurate segmentation, which is particularly useful for analyzing complex biological images.
Open Ilastik and choose “Pixel Classification” from the available options.
Select a location to save your project and give it a name.
Load images in Input Data (supported formats: TIFF, HDF5, PNG, etc). You can add them separately or as a single 3D image sequence.
Feature selection:
Small structures: Sigma 0.3-1.0
Large structures: Sigma 1.0-5.0
Experiment with different settings to achieve the best results.
Training: Add labels for different classes (e.g., background and cells) using the brush tool to mark each category accordingly.
Train the model and visualize the results by clicking Live Update.
In Prediction Export, select the export type (probabilities, simple segmentation, uncertainty, features, labels). Probabilities or Simple Segmentation are commonly recommended. Choose the export format (HDF5, compressed HDF5, TIFF,etc).
For batch processing of multiple images, train one and process the rest using Batch Processing.
Segmentation and Tracking
Create a new project and select “Tracking with Learning[Inputs: Raw Data, Pixel Prediction Map]”.
Open the segmented images:
Raw Data: The original image.
Prediction maps: The segmented image.
Threshold and Size Filter:
It converts the Pixel Prediction Map into a binary image.
Division Detection (optional):
Use the brush tool to classify cells as divided or non-divided.
Object Count Classification:
Add labels to classify false detections and actual cell objects.
A label assistance table helps calculate object sizes and locate the largest and smallest objects.
Training:
Create some tracks for training.
There are several options: star new track, remove active track, division event and mark as false detection.
Tracking - Structured Learning:
Calculate tracks using detection, division, transition, appearance and disappearance weights.
Detection: detected object.
Division: influences the division classifier.
Transition: Allows an object to be assigned to another in the next frame.
Appearance: Allows initiating a new track at a time other than the start.
Disappearance: Allows ending an existing track before the final time frame.
Adjust parameters according to your dataset and refine settings through testing.
Tracking Result Export:
Choose and export function (tracking-result, merger-result, object-identities or plugin).
Using Plugin, you can generate a CSV table with tracking statistics.