Anomaly of Surface

The anomaly module looks for anomalies in images according to a pre-trained model. The model is trained using OK images (with no defects). Basic work with the module is described in the following video, or you can try it yourself in the interactive tutorial, which is available directly in the application after creating a new project and starting it for the first time (displaying the tutorial can be turned off in the Settings or by ticking "Don't show this again" when the tutorial prompt appears).


The input for training includes images assigned to the ‘Good’ class. You can click the ‘Good’ option or use number 1 on numpad to assign the ‘Good’ class. It is also possible to select multiple images at once using the ‘Shift’ key and classify them in bulk. Assigning just one image to the ‘Good’ class is enough to be able to start the training, but we usually recommend using 10-20+ OK images for optimal results, depending on the surface variability. However, the more images you have in the ‘Good’ class, the more complicated the model is, which results in slower detection (slowing down is logarithmic).

Class name by filename

This allows you to automatically assign images to a class according to their names. Classes are assigned depending on whether the entered text is a prefix to the image name. If the image corresponds to multiple classes, only the first one is taken into consideration.


Size of the viewfinder determines how much the inspection will be focused. The size is selected depending on how detailed inspection model is desired. If you choose a size which is too small, you lose the knowledge of the surroundings and therefore can miss some defects; on the other hand, if chosen size is too large, details can be overlooked. Just as when a human eye focuses on detecting errors. Some errors are seen from a larger distance, and others can only be seen through a magnifying glass. Along with the size, the recognition speed also varies. There is no general rule on how to set the right size, you need to try out a number of sizes and learn how to estimate the best size at the first try. The size of the defects you are searching for might be of help.

Detection Area

A dotted rectangle is displayed on the image when in the Training tab. Defects are only being detected in the area inside this rectangle, due to the way the algorithm works. The bigger the view-finder, the bigger the area outside the rectangle in which defects aren't being detected.

Local Image

Types of training

Fast Training

This function runs training with 0 training cycles. Brightness resistance, resistance to deviation, vertical and horizontal flip values are valid.

Deep training

This type of training allows you to choose the number of training cycles.

At first, we recommend to try fast training using different sizes of view-finder and training parameters (brightness resistance, resistance to deviation) to find out what combination works best in your case. When you find suitable settings, but want to achieve even more precise results, you may try deep training with more training cycles (otherwise using the same settings).

Further information about the training options can be found in the section training.

Local Image


The result of the detection is a heatmap. When validating, heatmaps are plotted in the image for better illustration. In the heatmaps, the detected areas are surrounded by rectangles that are added to the ‘detectedRectangles’ item in the context.


Parameter indicating sensitivity to anomalies. It can be changed in model preview. Higher sensitivity value means more sensitive detection – more anomalies are found. However, the anomalies, where deviation is still acceptable, can be displayed as well.

Automatic sensitivity

This functions helps you set the correct sensitivity. To apply this function you first need to classify OK and NOK images in the dialog window. You cannot use images which were used as OK in anomaly training. The software then computes a threshold for each sensitivity value. The threshold is computed as a mean of the amount of "red pixels" (marked as defective) in the "most red" OK image and the "least red" NOK image for a given sensitivity value. As a result, you get a graph containing two curves showing percentages of OK images "less red" than the threshold and NOK images "more red" than the threshold for every sensitivity value. Ideally, you want to choose a sensitivity at which both curves are maximized. It is possible to choose the sensitivity by clicking into the graph.

Local Image

results matching ""

    No results matching ""