Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 image. It is also possible to select multiple images at once using the ‘Shift’ key and classify them in bulk.

...

Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width680px
urlhttps://www.youtube.com/watch?v=gECGC6BTM08
height400px

Classification of objects

...

in static positions

With this type of Classifier, you first need This option needs the user to draw the rectangles determining the positions on which the objects are position in the image that is 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 evaluated. The rectangles are automatically copied to the rest of the images. It is necessary to assign at least 2 different classes.

You are able to lock and unlock the rectangle positions to prevent unwanted relocation during annotations.

...

To delete a rectangle either press ‘Delete’ on your keyboard or use a trashcan icon at the top of the image.

Set allowed classes manually

With this option it is possible to specify which classes are allowed for individual rectangles. Create classes in Class manager and then specify the Allowed classes for a particular rectangle.

...

Class management

This module allows a user to set custom classes for the model. It is necessary to define at least two classes and specify their names and colors.

...

Automatic class import (Classes by folders)

In case your images are named and sorted into folders, it is possible to use the feature Add Folders in the Images Manager. This way your images are going to have a prefix from the folder.

...

With this method you can automatically create the required classes and annotate images without any additional input.

...

Training

Look at the following annotations in one image.

...

Before starting a training we have several options. You are able to https://pekatvision.atlassian.net/wiki/spaces/KB3/pages/698057883/Training+Overview#Extend-Model an existing model, set https://pekatvision.atlassian.net/wiki/spaces/KB3/pages/698058476/Classifier#Max-size and other.

It is also possible to set a custom Training Data Split, this allows the user to specify how many annotation examples go into training the model and and how many go into testing the accuracy of classification.

Info

The recommendation is 80% training and 20% testing.

If the amount of available images is very low, it is recommended to set the slider to 100% train.

...

Smart sorting

Smart sorting 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 Tagscan be assigned by image name prefix, creating a custom regex, or by using tags on images.

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 and select a class. 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 bracketsClasses can also be selected by pressing a numeric key for faster annotations.

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. The pre-set and recommendation is to keep max size at 256 pixels for most usecases.

Info

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

Info

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.

...

Inference

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

...

...

To evaluate the accuracy of the trained model you can have a look at Confusion Matrix. The matrix shows the classification results on the testing data.

...

In Context a new attribute classNames is added to the detectedRectangles box. It inserts an associative field with a class description.

Before

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

After

Code Block
languagepy
{
    "x": 28.588958740234375,
    "y": 4.583988189697266,
    "width": 90.23117065429688,
    "height": 64.35350036621094,
     "id": 1681720335225001,
     "confidence": 0.9833984375,
     "classNames": [
      {
        "label": "ClassnameClass 1",
        "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.

Info

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.

...