We may add or remove classes anytime. In our example, we labeled only background, leaves and nuts so far. However, there are other objects of other materials present, such as nut shells, olive kernels, wood or stones.


We add several classes to the project:



We will then use Model search to find a new model. The difference between Model search and Retrain tools is as follows:

  • The Model search performs full search for the best model
  • The Retrain tool uses the existing model definition and retrains it using the current labels


If we only perform slight update of the labeling, for example, around the edges or adding more representative examples of existing materials, Retrain is sufficient. The model search is useful when we add entirely new classes or label quite defferent examples of the existing classes. 



We can see that we have labeled olive kernels as "wood". We may wish to have them labeled as "shell" instead. In perClass Mira, we have a full control on the labeling. We can easily assign individual labeling strokes to different classes.


Switch to the Labels mode (via the toolbar button or by pressing small l key (l as in Labels).


In the Classes list, select the class you wish to assign the stroke to (Shells). Then, right-click with the mouse over the brown label stroke on top of the olive kernel. 

In the context menu, select Assign region to current class.



The label stroke will be assigned to the shells class and will become red:



We also assign the second label stroke on top of the other olive kernel to shells and re-run the Model search.

The olive kernels are now part of the red shells class. Note, that in perClass Mira, the user may define classes that span multiple materials or represent generic high-level concepts (defect, background, product etc.)