The Classifier Tool in Aivia allows you to create and apply custom object classifications on analyzed data. The classifier uses a random forest algorithm to identify unique features (i.e. measurements) for classification.
The Classifier Tool is accessed by clicking on the Classifier View icon ClassifierViewIcon.png on the zoom bar.

Graphical User Interface

When the Classifier tool is launched, the Aivia window will switch to the classifier view, collapsing the Display Settings and Analysis Panel. You can click on the vertical separator on the right side of the Aivia window to expand the right panel.

The Classifier view has two sections: the image viewer on the left and the gallery on the right. Controls for the tool is found in the gallery section.

Classifier view

The Classifier toolbar is located at the top of the gallery on the right side of the Classifier view. The toolbar allows you to perform file actions related to the Classifier tool, such as selection, creation, and saving.


ClassifierThe Classifier dropdown menu lets you select a loaded classifier to apply to your data. Three neuron classifiers are pre-loaded into Aivia for classifying human, rat, and mouse neurons.
NewClassifierIcon.pngCreate new classifier
This option allows the user to create a new, blank classifier for teaching
Delete.pngDelete classifier
This option removes the selected classifier from Aivia. This will not delete the selected classifier from file
Load_Classifier.pngLoad classifierThis option allows the user to load a pre-trained classifier (.classifier) from file into Aivia
Save_Classifier.pngSave classifier
This option allows the user to save the current classifier to file
ExcelIcon.pngExport classifier data to CSV
This option allows the user to export the classifier data (trained objects and measurements) to an Excel-readable comma-separated value (CSV) file
ReloadIcon.pngReload classifier
This option reloads the current classifier to its previously-saved state, discarding any changes made to the current classifier
MeasureIcon.pngSelect measurements
This option will launch a window that lets you specify the measurements to use in the classifier
MultiSelectIcon.pngToggle multi-selection cursor

This option turns on the multi-selection cursor allowing you to select multiple objects by clicking on each object in the gallery separately without holding down the Shift or Ctrl key on your keyboard

The gallery shows a thumbnail of all objects on the image as well as the thumbnails of any objects that are taught during the current session. The gallery separates the thumbnails by classes indicated by a colored header. You can expand/collapse each class separately.


In the collapsed view, a generic icon (on the right) indicates the number of additional thumbnails/objects are available in the class. Clicking on the generic icon will fully expand the current class and collapse all others.

Classifier bar

The Classifier bar is located at the bottom of the gallery and provides a number of actions for teaching and applying the classifier on the image.


Apply a classifier

Aivia comes pre-loaded with three classifiers for neuron classification. You can also load a classifier from file and apply classification on new data.

To apply a classifier, select the classifier to run from the dropdown menu and click the Apply button in the lower right corner of the gallery. If the data has existing classifications, applying a classifier will remove the existing classifications and create new ones.

Example of classification output with Color by Class turned on (Neuron reconstruction courtesy of

On apply, the classifier will look at each object and assign a class. If you have Color by Class turned on in the Display Settings, the color of the objects will change to correspond to its assigned category.

You can also view the objects by class in the Spreadsheet panel as subsets.

Create a classifer

You can create a new classifier from scratch by clicking on the Create New Classifer button in the Classifier View. Make sure you have loaded an image and have analysis data prior to using the Classifier tool. When you click the Create New button, the Classifier Creation dialog will be shown.


Select object type
In the dialog, enter a name for your classifier into the Name field and select the type of objects you wish to classify using the Object Type dropdown menu. Aivia currently supports the classification of seven types of objects:

  • Neuron: classify whole 3D neuron (based on full neuron reconstruction with soma, dendrites, and spines included)
  • MeshFeatures: classify 3D object surfaces
  • Soma: classify 3D soma
  • Dendrite: classify 3D dendritic arbors (based on overall dendrite branching)
  • DendriteSegment: classify 3D dendritc branches/segments as individual objects
  • Spine: classify 3D spine objects (based on spine head and neck)
  • Outline: classify 2D objects for each time-point

When you are done, click Create to return to the Classifier view and create a blank classifier.

Create class

In order to create a functional object classifier, you will need to have a minimum of two (2) classes defined with examples of objects given in each class. To create a class, click on the + button to the right of the Class dropdown menu in the classifier bar.

When you create a class, a new header is shown in the gallery with the name highlighted. Type in a new name and press Enter to finish creating a class. Do this for each class you wish to add to the classifier.

Select measurements

Select measurement window
You can specify the measurements to use when generating the classification rules by clicking on the Select measurement MeasureIcon.png icon on the toolbar. When you click on the icon, a new dialog opens. Click on the checkbox for each measurement you want to include. If the measurement has not been calculated on the image, it will be automatically calculated when you apply the classifier. When you are finished selecting the measurements, click Finish to confirm and save your changes.

Intensity measurements can be selected on the additional tabs in the Select Measurement window. Once you have selected the intensity measurements, click on the Channel Input Selection button located just below the toolbar to specify the input channels to measure from the image.

Channel input selection (expanded)

Teaching the classifier

The classifier is generated through a "teaching" process by providing examples of objects for each defined class. The Classifier tool uses a random forest algorithm to identify unique (and most recurrent) measurements for separating the classes.

Depending on the Object Type chosen, the Classifier tool will automatically generate the appropriate list of measurements to be used for classification. Depending on the size of the image, there may be a short delay in Aivia while the measurements are being generated.

To teach the classifier, first select the representative objects by clicking on its thumbnail in the gallery or directly on the image. You can select multiple objects by holding down the Ctrl or Shift key on your keyboard while clicking in the gallery or on the image. Alternately, you can also use the Toggle Multi-Selection Cursor option to select multiple objects one-by-one.

Two ways to assign objects to a class

Once selected, you can drag-and-drop the selected thumbnails directly to the header of one of the classes in the gallery. Alternately, you can select the class to assign to using the Class dropdown menu below the gallery and clicking the Assign button.

On assignment to a class, the selected thumbnails will appear in the gallery of its assigned class.

When you are done providing the examples for the classifier, press the Teach button to generate the classifier.

Note: You must provide at least one (1) example object each to at least two (2) classes in order to teach the classifier.

Review classifier quality

You can review the quality of the classifier by looking at the quality indicator to the left of the Teach button. A full green bar indicates the classifier is good (meaning that the classifier has sufficient unique features to separate each class) whereas a red bar indicates the classifier is poor. You can view the classifier accuracy value by hovering over the bar.

You can review the classification quality for each class by looking at the indicator bar to the left of the class header in the gallery.

Save classifier

After applying the classifier, make sure to save the classifier by clicking the Save Classifier button. This will allow you to load the classify and apply it to other images in the future.

Additional options

The Detect Novelties checkbox allows you to incorporate novelty detection to your classifier. With novelty detection turned on, the classifier will generate an additional novelty score for each object. If the object's novelty score is higher than the specified Novelty Threshold, it will be assigned to a novel class in addition to an existing class.

This option lets you identify outliers in your data that may potentially belong to an unknown phenotype.