# Score Distribution Graph

The horizontal dimension of the graph represents the overall score for the view A view of an image is a region of pixels in an image. Tool processing is limited to the pixels within the view. You can manually specify a view, or you can use the results of an upstream tool to generate a view.. For Legacy and Standard type tools, and for Unsupervised type tools, the overall scores is calculated differently.

## Legacy and Standard Type Red Analyze

The overall score for the view is the maximum defect probability in the view. In this mode, the Red Analyze tool returns a probability map indicating, for each pixel location in the input image, the probability that the pixel represents a defect. The defect probabilities are normalized such that the probability that the pixel is a defect, plus the probability that the pixel is background, totals to 1.0.

If the Red Analyze tool has multiple defect classes, the probabilities are normalized so that the sum of each trained class’s probability plus the probability that the pixel is background totals to 1.0.

## Unsupervised Type Red Analyze

The overall score for the view is the maximum deviation for the view. In this mode, the Red Analyze tool returns a deviation map indicating, for each pixel location in the input image, the degree to which this pixel represents a deviation from the expected value, based on the collection of image data used for training Training is the process that your tool, which is a neural network, is learning about the features (pixels) based on the labels you made. For example, a tool will learn the defect/normal pixels in each image based on the defect/normal labels you drew. The goal of the tool Training is learning enough to give the correct inspection results of whether an unseen image is defective or not. The key to training is to ensure that you include all possible variations within your training set, and that your images are accurately labeled. Training times vary by the application, tool setup and the GPU in the PC being used to train the network..

The actual value of the deviation is unitless, and is a function of the characteristics of the trained image data. Since every input image generates a unique deviation value, it is not possible to normalize the deviation to a fixed range. Another way to think about this is that while the maximum possible probability for a defect pixel is 1.0, there is no maximum possible deviation for a pixel, and consequently no fixed bounds to which to normalize the deviation.

Note: In images that include objects or features on a background, an Unsupervised type Red Analyze tool typically cannot report missing objects or features as deviations. Because all of the “good” images provided for training include background regions, the does not report the presence of background as a deviation, even as the amount or proportion of background in the input image changes.