# Database Overview of Red Analyze

The Database Overview pane provides statistical details from the last 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. session of the currently selected Red Analyze tool. These details help evaluate the performance of the tool after training. In the Database Overview, you can find information such as:

- Processing time estimation

- Graph with the overall defect probability scores

- Confusion matrix

- Details about the Recall, Precision, and F-Score (only for Legacy and Standard type tools)

These details can help you to evaluate how well the tool distinguishes between defects and non-defects, and finetune your tools.

Note: When using Legacy and Standard type tools, you can have multiple defect classes. The Database Overview only shows the statistics of one defect class at a time. You can switch between the classes with the Count filter. The Database Overview cannot display the results from all defect classes at the same time.

## Breakdown of the Database Overview Pane

The diagram below breaks down the main sections and UI elements of the Database Overview pane. You can find an overview of each numbered section in the corresponding row of the table.

Number | Description
1 | These buttons switch between the graphs displayed in the section below (5): Click Scores to display the Score Distribution graph. Click ROC The Receiver Operating Characteristic (ROC) is a graphical tool that allows you to visualize and analyze the tradeoff between precision and recall exhibited by a particular set of training parameters when applied to a particular training image set. to display the Receiver Operating Metrics (ROC) graph.
2 | The processing time shown here is the average processing time per 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. as measured in the last processing task. The processing time is the sum of the processing time and the post-processing time.
3 | This section displays statistics about the images in your image database: The total number of images in the database The number of new images The number of views created from the images The number of labeled views The number of views used for training the tool
4 | The Count filter allows you to filter the statistics returned by the tool. You can filter based on views and regions, or if you have multiple defect classes, filter based on the class using the dropdown menus in the upper right corner. Views: Returns the highest scoring area for each view.​ Untrained Views: Returns the highest scoring areas for each untrained view.​ Regions: Returns the aggregate scoring on the pixel level for regions (this requires that regions have been labeled).​ Untrained Regions: Returns the aggregate scoring on the pixel level for untrained regions (this requires that regions have been labeled).​ If there are no untrained views, the graphs will be blank. If there are no labeled regions the following applies: The Count filter for Regions will look the same as that of Views. The Count filter for Untrained Regions will look the same as that of Untrained Views. For more information about how the Count option affects the values in the confusion matrix, see Count Options and the Confusion Matrix​
5 | The Score Distribution graph provides a visual representation of the defect probabilities in the analyzed views. The graph lists all images that were labeled and scored as well as the Threshold for the graph. The horizontal dimension of the graph represents the overall score for the view. For more information, see Score Distribution Graph. The vertical dimension of the graph represents the number of views or regions included in the statistics. The count depends on the Count filter you selected (see number 4). If you select a different filter, the graph changes. The dashed vertical line represents the threshold value for the graph, which is tied to the Threshold processing parameter. The Threshold determines what score a result must have before it is considered a true negative result (truly lacking a defect) or a true positive result (truly containing a defect). Each defect class has its own Threshold, which is independent from the Thresholds of the other classes. To adjust the Threshold, click and drag the dashed line on the graph. Lower the Threshold to make the tool less strict about what it predicts as a defect, generating more False Positives. Increase the Threshold to make the tool stricter about what it predicts as a defect, generating more False Negatives. Note: Adjusting the value here automatically updates the Threshold parameter setting. To automatically set the optimal Threshold: Open the tool parameters pane. Enable the Auto checkbox under the Threshold processing parameter. Click the magnifying glass icon in the tool controls to re-process the tool.
The Receiver Operating Characteristic (ROC) graph is a graphical tool that allows you to visualize and analyze the tradeoff between precision and recall exhibited by a particular set of training parameters when applied to a particular training image set A collection of images of your specific application. A training image set represents images of a specific part or process acquired in a consistent way using the lighting, optical, and mechanical characteristics of your runtime system. The training image set includes images that represent the range of image appearances that you expect to see in normal operation.. For more information, see Receiver Operating Characteristics Graph.
6 | The confusion matrix is a visual representation of the ground truth Ground truth refers to the actual nature of the problem that is the target of a machine learning model, reflected by the relevant data sets associated with the use case in question. Supervised machine learning models are trained on labeled data that are considered for the model to identify patterns that predict those labels on new data. versus the predictions of the tool. The horizontal dimension shows the predictions of the tool. The vertical dimension shows actual labels you assigned, which represent the ground truth for the tool. The F1 score of the confusion matrix is the combination of the Precision and Recall metrics. The F1 score is a comprehensive metric for the segmentation Segmentation is the process of selecting a view from an image. performance. Note: The confusion matrix only displays the results from one defect class, and other classes are counted as good. For more information, see Confusion Matrix of Red Analyze
7 | The Region Area Metrics return data about the Recall, Precision and F-Score of the currently trained tool. Note: Unsupervised type Red Analyze tools do not provide additional details in the Region Area Metrics section. IOU The Intersection over Union (IOU) shows how much the predictions of the tool match your labeling. A higher IOU percentage indicates a better match. refers to Intersection over Union. The IOU percentage shows how much the predictions of the tool match your labeling Labeling is the process of annotating an image with "ground truth". Depending on the tool that you are using, labeling can take different forms. You label an image set for two reasons: to provide the information needed to train the tool and to allow you to measure and validate the performance of the trained tool against the ground truth., or in other words, the ground truth. Recall refers to how likely the tool is to find a defect in a given image. Precision is how likely the tool is to find a defect where there is an actual defect. F-Score is average of Recall and Precision. Note: These metrics in the Region Area Metrics are calculated in pixels whereas the F1 Score of the confusion matrix is calculated in a different way. For more information about how the tool interprets these metrics, see Region Area Metrics.