Automatically applying compression
Scan compression can be applied in an automated way to new scans. This only requires the user to train a classifier able to highlight areas of interest and flag the relevant class as foreground.
Enabling automatic foreground mask for scan compression
In our example, we created a "background" class and a "object" class
, labeled the saved scan, trained a model using Model search. The following screenshot shows the Object view
with the object of interest
segmented.

When a classifier and object segmenter are available in perClass Mira project, then acquiring a new scan in scan mode will automatically highlight the foreground in yellow.
Applying foreground mask automatically
We have shifted plastic tiles on the table and acquired a new scan. In the screenshot below, we can see that the foreground area
is now automatically highlighted in yellow. We can use the toolbar slider
to dilate the foreground mask out from the objects. In this way, we will also save some of the background, which is useful to be able to train good models along object boundaries.

Adjusting the automatic mask
The user can still paint in the mask, this way interesting areas can be preserved even if not highlighted by the the classification model. Similarly automatically highlighted objects can be erased by painting with the Shift key held down.
Other mask controls are available in the toolbar:
- Show mask toggles mask visualization on and off.
- Draw mask is enabled at any moment that the user paints the mask manually, disabling it removes only the manually painted parts, preserving the automatic model decisions.
- Object mask re-applies the model to the scan, re-creating the mask.
- Clear mask completely removes the mask, switching back to no compression.