ilastik

Overview

ilastik is a simple, user-friendly tool for interactive image classification, segmentation and analysis. It is built as a modular software framework, which currently has workflows for automated (supervised) pixel- and object-level classification, automated and semi-automated object tracking, semi-automated segmentation and object counting without detection.

ilastik has an interactive graphical user interface (GUI) for training a classifier and refining your results. On the CSF3 the GUI can be started remotely on a compute node as an interactive job.

ilastik It also provides a headless mode, which is suitable for running batch jobs in the CSF3. Except for the Carving Workflow, all workflows are able to run in headless mode. For more info on headless mode please read the official project documentation.

Restrictions on use

ilastik is free software under the GNU General Public License, either version 2 of the License, or any later version, with a special exception to allow extensions of ilastik not covered under the GNU General Public License. See the license page for details.

All CSF users may use this software, as long as they follow the license terms.

Set up procedure

Before running ilastik, load one of the modules below:

module load apps/binapps/ilastik/1.4.1
module load apps/binapps/ilastik/1.4.1-gpu       # Includes GPU support for some workflows

Currently only workflows that use deep neural networks (Neural Network Workflow, Trainable Domain Adaptation) support doing calculations on a GPU. Other workflows, like Pixel- or Object Classification do not use the GPU for calculations. So if you are using these GPU-enabled workflows you can load the <VERSION>-gpu module and request one GPU from a Slurm gpuX partition, to be able to take advantage of the NVidia graphics card.

Running the application

Running the GUI interactively from a compute node

To be able to run workflows that can utilise multiple CPU cores, in this case 8 cores:

srun-x11 -p interactive -n 1 -c 8 -t 0-1
module load apps/binapps/ilastik/1.4.1
export LAZYFLOW_THREADS=$SLURM_CPUS_PER_TASK
run_ilastik.sh &

To run Neural Network Workflow or Trainable Domain Adaptation workflow, which are able to utilise one GPU:

srun -p gpuL -G 1 -n 1 -c1 -t 1-0 --pty bash
module load apps/binapps/ilastik/1.4.1-gpu
export LAZYFLOW_THREADS=$SLURM_CPUS_PER_TASK
run_ilastik.sh &

Running a Multi-threaded batch job in headless mode

Create a jobscript similar to the one below:

#!/bin/bash --login
#SBATCH -p multicore  # Partition is required. Runs on an AMD Genoa hardware.
#SBATCH -n 1          # (or --ntasks=)
#SBATCH -c 8          # cores/CPUs per Task/node, can be between 2 and 168
#SBATCH -t 1-0        # Wallclock limit (days-hours). Required!
                      # Max permitted is 7 days (7-0).

# Load any required modulefiles. A purge is used to start with a clean environment.
module purge
module load apps/binapps/ilastik/1.4.1

# tell ilastik the number of CPU cores to use
export LAZYFLOW_THREADS=$SLURM_CPUS_PER_TASK      # this variable is set by SLURM to the value of -c
# optionally, specify how much RAM to use. Make sure it is within the limits provided by Slurm,
# depending on the partition and number of cores requested
export LAZYFLOW_TOTAL_RAM_MB=20000

run_ilastik.sh --headless --project=MyProject.ilp my_next_image1.png my_next_image2.png

Then submit your jobscript from within the scratch directory:
sbatch jobscript

Further info

For more headless options and flags please read the official project documentation.
Also controlling CPU and RAM resources.

For the ImageJ (FIJI) plugin to run ilastik workflows please read here and consult our FIJI documentation.

Last modified on January 5, 2026 at 4:50 pm by Paraskevas Mitsides