- 10 Oct 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
View Predictions
- Updated on 10 Oct 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
This article applies to these versions of LandingLens:
LandingLens | LandingLens on Snowflake |
✓ | ✓ (see exceptions below) |
After training a model, you can see the model's predictions as overlays on the images in your dataset. The overlay format depends on the project type:
- Object Detection: Predictions are dotted bounding boxes that are the color of the class the model predicted.
- Segmentation: Predictions are highlights that are the color of the class the model predicted.
- Classification: The predicted class name displays in the bottom left corner of the image. A green check mark means the prediction matches the label. A red "x" means the prediction doesn't match the label.
Use Prediction Overlays to Help You Troubleshoot
The predictions give you a visual indication of how your model performed. If the predictions are on top of or close to the labels, then the model performed well. If there's a discrepancy between the label and prediction, find out the root cause; resolving it will likely improve model performance.
For example, in the image below, there's a blue prediction over a yellow label. This could indicate that the object was mislabeled or that the model needs more labeled images of both classes to correctly detect them.
View Predictions for the Dataset
You can see a model's predictions for images in the Build tab. You can also change the applied model and its confidence threshold (for Object Detection and Segmentation projects).
To do this:
- Open the project to the Build tab.
- Turn on the Prediction toggle.
- By default, the most recently used or trained model is applied. If you want to select a different model or adjust the confidence threshold, click the model name.
- Select the model you want to apply to the dataset from the Model drop-down menu. Models are listed in the chronological order in which they were created.
- If you have an Object Detection or Segmentation project and want to adjust the confidence threshold, adjust the Confidence Threshold slider.
- To close the Prediction menu, click anywhere off of the menu.
Confidence Threshold
The confidence score indicates how confident the model is that its prediction is correct.
The confidence threshold is the minimum confidence score the model must assign to a prediction in order for it to believe that its prediction is correct. Typically, a lower confidence threshold means that you will see more predictions, while a higher confidence threshold means you will see fewer.
When LandingLens creates a model, it selects the confidence threshold with the best F1 score for all labeled data.
Confidence thresholds are only applicable to Object Detection and Segmentation projects.
Images vs. Instances
When the Prediction toggle is on, you can choose to view predictions by image or by instance. These are controlled by the Images and Instances buttons on the Build tab.
Images View
When you select Images, all the images in the dataset display. This is the default view.
Instances View
When you select Instances, each labeled or predicted area displays as a separate image. You can think of this as LandingLens displaying "one instance" of a label or prediction at a time. You can filter the instances by Ground truth (the label) or Prediction. The images are zoomed in to help you see the object. Instances view is helpful if the objects of interest are too small to see when viewing the dataset in Images view.
Select the Prediction radio button in Instances view to filter by model predictions. The predictions overlay includes the confidence score, which represents how certain (or "confident") the model is that its prediction is accurate. For example, in the screenshot below, the model is 39% confident that the prediction on the left is a Scratch.
View Predictions for Each Image
Click an image to open it and see the model's predictions. You can toggle the Labels and Predictions on and off. To learn how to turn predictions into labels, go to Label Assist.
Why Do Some Images Not Have Predictions?
Some images in a dataset may not have predictions. In these situations, it's because the model did not have an opportunity to make predictions on those images. For example, if Predict at Upload is disabled and you upload an image after training a model, the model doesn't have an opportunity to make a prediction on that image. (Predict at upload is not available in LandingLens on Snowflake.)
When Does a Model Make Predictions?
When you train a model, the model makes predictions for the images currently in the dataset. But there are other situations that also trigger a model to make predictions on an image. Here is a list of all situations that cause a model to make predictions on an image:
- When you train a model, the model makes predictions on all images currently in the dataset.
- If Predict at Upload is enabled and you upload an image after training a model, the model makes a prediction on the image. (Predict at upload is not available in LandingLens on Snowflake.)
- If you go to the Models page and run a model on an evaluation set, the model checks what images it hasn't "seen" before. If the model hasn't "seen" the image before, it makes a prediction on it. You can then view those predictions when you select that model on the Build tab.
- If you open an image and click Get Prediction, the selected model makes a prediction on the image.