Skip to content

AI Pixel Classifier

The AI Pixel Classifier command applies a pixel classifier trained via the app’s Train Classifier dialog as a segmentation step. It recomputes the exact feature recipe baked into the model at training time, classifies every pixel of the image independently, and writes the result into the segmentation map - the same output shape Threshold produces, so downstream steps like Connected Components and Extract Objects don’t need to care which one ran.

Available in builds with the ai Cargo feature enabled - see AI Models.

ParameterDescription
Model PathPath to a trained pixel classifier .evamodel file, saved from the Train Classifier dialog
Segmentation MappingMaps each of the model’s predicted classes to one of this project’s segmentation classes

The model’s own classes are a snapshot taken at training time and aren’t guaranteed to line up with this project’s segmentation class numbers - Segmentation Mapping is the bridge between the two. It’s a repeatable list of Segmentation Class → Object Class ID pairs, one entry per model class you want to map through.

The command errors if Model Path doesn’t exist, or if it points at a model trained as an Object Classifier instead of a Pixel Classifier.

A pixel classifier nuclei-px.evamodel was trained on two classes: Background and Nucleus.

Model Path: models/nuclei-px.evamodel
Segmentation Mapping: Nucleus → 1

Pixels predicted as Nucleus are written to segmentation class 1; pixels predicted as Background (left unmapped) fall back to segmentation class 0. A typical follow-up pipeline: AI Pixel ClassifierConnected ComponentsExtract ObjectsClassify Objects.