# Neural Network Processing

At runtime, each sample from the runtime image is processed individually, using the tool's trained network, and an individual network response is obtained for each sample.

The response from the network is expressed as a probability map, where each pixel in the sampled region of the input image is assigned a probability. The meaning of the probability map depends on which tool is being used.

- For the Red Analyze tool in Unsupervised Mode, the response is the deviation between the expected and actual appearance of the sampling region.
- For the Red Analyze tool in Supervised Mode, the response is the probability for each pixel in the sampling region, that the pixel is within an image defect.
- For the Blue Locate and Blue Read tools, the response is the probability that the center of a labeled feature lies within that pixel, and if that probability exceeds a threshold value that you specify, then the tool also provides the feature identity and the probability that the identification is correct.
- For the Green Classify tool, the response is the classification and the probability that the classification is correct.

These whole-image probability maps are assembled from the interpolated network responses to individual samples. The final results returned to the user (feature poses and identities, and defect regions) are based on a results formation process that the user controls by specifying thresholds for appearance deviation (Red Analyze tool in Unsupervised Mode), match quality (Blue Locate and Blue Read), defect probability (Red Analyze tool in Supervised Mode), or class probability (Green Classify).

In the above context, it is important to understand that the probability returned by a tool may not reflect well with our notion of how likely a certain judgment is. This is mostly due to the fact that the tools have a "limited view of the world" in that they do not return probabilities with respect to our wide and rich visual experience, but rather with respect to their very limited visual world of a couple of classes. Thus, for instance, in the case of a Green Classify tool, it is very well possible that the tool will assign a very high probability to a new and therefore unknown class even though these classes look very dissimilar to us. This is simply because to the tool that class looks many times more similar to that known class than any other.