Classifier

This module classifies the detected objects. Each object can be in one class only. This module can classify the whole image, objects detected in previous modules, or objects in static positions.

Classifier types

Classification of the whole image

This type of Classifier lets you distinguish between different kinds of images by assigning a class to an image as a whole. It is also possible to select multiple images at once using the ‘Shift’ key and classify them in bulk.

Classification of objects detected in previous modules

When using this type of Classifier, you assign classes to objects already detected in the previous modules (for example Detector, Surface Detector, Code, Anomaly...). The combination with Detector is described in the video below. In this video, the classification and detection process is split into two modules, but it is possible to perform this type of classification directly in the Detector and thereby speed the process up.

 

Classification of objects on static positions

With this type of Classifier, you first need to draw the rectangles determining the positions on which the objects are supposed to be located and then the contents of those areas are classified on each image. You only need to draw the rectangles on one image and they will be automatically copied onto the other images. Then you assign classes to each of these rectangles on images to be used for training, depending on which object appeared in that position. To delete a rectangle you can either use the trashcan icon in the top right corner or press 'Delete' when the rectangle is selected.

Training

Smart sorting

This allows you to automatically classify all the detected objects according to image names or tags. All objects within the image will belong to the same class. Classes are assigned depending on whether the entered text is a prefix to the image name. If the Regex option is enabled classes are assigned depending on whether the entered text is in the image name. You can also filter images you want to classify by their Tags.

If the image corresponds to multiple classes, only the first one is taken into consideration. Processing may take a while.

Classes

To assign a class to an object, click on that object. The minimum number of classes for training is 2. Not all objects need to have a class assigned. The number in brackets next to the class name indicates the number of objects in that class. To select the class faster, you can press a numeric key corresponding to the class number which is in square brackets.

Max size

For training, the classifier module must resize all images to the size of the biggest one, so that they all have the same size, with a maximum value of 800 pixels.

During training, annotations are automatically adjusted to fit the max size selected.

If you want to improve accuracy, you can try to select a bigger max size. If you want to improve the processing time or lower the GPU memory required for training, you can try setting a smaller max size.

Detection

Each classified object/image enclosed in a rectangle is labeled with a class name and a percentage - confidence of classification.

 

The ‘classNames’ adds an attribute to the ‘detectedRectangles’ box. It inserts an associative field with a class description.

Before

{ "x": 28.588958740234375, "y": 4.583988189697266, "width": 90.23117065429688, "height": 64.35350036621094, "id": 1681720335225001, "confidence": 0.9833984375 }

After

{ "x": 28.588958740234375, "y": 4.583988189697266, "width": 90.23117065429688, "height": 64.35350036621094, "id": 1681720335225001, "confidence": 0.9833984375, "classNames": [ { "label": "Classname", "id": 1, "accuracy": 0.9995 } ] }

Tensor RT

The model can optionally be optimized using Tensor RT for the specific GPU used when you check the TRT switch in the model list. The optimization improves inference times when processing images using this model.

The model is optimized for specific GPUs, so if you transfer the project to a PC with a different type of GPU, the optimization needs to be done again for the new graphics card.