# Red Analyze Tool

| The Red Analyze tool is used to perform two types of defect detection, anomaly detection or defect detection and segmentation, depending on the mode of operation, Unsupervised or Supervised. The reason for the different modes of operation is due to the subtle differences that can exist between the two types of defect detection.

#### Unsupervised Mode

In Unsupervised Mode, the Red Analyze tool is taught the appearance of the good parts – and only the good parts (including any and all acceptable variations) – so that it finds anomalies from the learned, normal appearance. As such, the tool tries to find a compact description of the object to be inspected. The tool's ability to find anomalies, both in terms of selectivity and specificity, depends largely on the compactness of the model. If, for instance, the part comes in different types and different orientations, the compactness gets reduced, and ambiguities between part types and orientations may prevent the tool from finding certain anomalies.

#### Supervised Mode

In Supervised Mode, the Red Analyze tool is taught the appearance of defects. As such it does not (at least explicitly) form a model of the inspected part and as a consequence is much less dependent on part configuration, type or the conditions during image acquisition. However, the Red Analyze tool in Supervised mode will need to form an explicit model of the different types of defects. Thus, it needs both good and bad samples to train. In particular, it requires a representative collection of the latter (which are often quite challenging to obtain).

Also, while in Supervised mode, a Red Analyze tool can be used to search for differences other than defects. The tool can be used to identify different regions in an image that are intended to be there. A Red Analyze tool in Supervised mode could be used to label the targeted regions on the training images in order to be able find and mark similar type of regions on untrained images after training.

The two modes are complementary, in terms of their performance and requirements, and can be used in combination. For example, an Unsupervised tool could be used to first filter the visual anomalies, and one or more subsequent Supervised tools would be used to find specific and visually difficult to discern defects like scratches, low contrast stains or texture changes.

Challenge | Unsupervised Mode | Supervised Mode
--- | --- | ---
Finds unforeseen defects | Likely | Hardly
Requires defect samples | No | Yes
Sensitivity to part configurations and variations | Strong | Weak
Detects line-type defects like scratches, cracks or fissures | Difficult | Easy
Detects defect-type specificity | No | Possible
Measurable defect parameters (next to position and intensity) | None | Size, shape

Note: For more information about configuring the Red Analyze tool, see the Using the Red Analyze Tool topic.