ilastik’s Pixel Classification trains a random forest from painted examples. This exercise follows the product documentation.[1]
With ilastik installed, prepare a small PNG of dark buttons on pale paper for this exercise.[2]
- Create a Pixel Classification project. In Input Data, choose Add New → Add separate image(s) and open the PNG.
- Under Feature Selection → Select features, select all feature types and scales for this small 2D image.
- In Training, rename the two labels Button and Paper. Select each label and draw short scribbles inside matching areas.
- Turn on Live update. Inspect the Segmentation overlay; add corrective scribbles where paper becomes button, or vice versa. Include edges and shadows.
If a stroke marks the wrong class, erase it. The classifier updates as you correct the examples.[1]
In Prediction Export, choose Simple Segmentation as Source. Under Choose Settings, select TIFF and a destination filename. Check Live Preview against the button edges, then Export. The saved image assigns a class label to each pixel.[3][1]
Sources & further reading
- Pixel Classification ilastik · Accessed 20 Oct 2026
- Data Selection ilastik · Accessed 20 Oct 2026
- Exporting Output ilastik · Accessed 20 Oct 2026
- The Startup Screen ilastik · Accessed 20 Oct 2026