...
The detection result is a set of heatmaps (one for each class). When validating, heatmaps are plotted in the image for better illustration. In the heatmaps, the searched-for areas surrounded by rectangles are added to the context to ‘detectedRectangles’. Each rectangle has a class assigned, depending on which heatmap it was found in.
Evaluation
We can set the rules for all classes or individually. There are three options for the evaluation rules:
Count - number of defects (rectangles)
Edge length - length of the edge of individual rectangle
Area - sum of pixels (of given class if it’s selected) in the whole heatmap