Model Explanations with Image Data¶
In this demo we will:
Launch an image classification model
Send prediction requests to the model
Create an explainer for the model
Generate explanations for previously sent prediction requests
The model used in this demo was trained to classify images based on the CIFAR10 dataset.
The explainer uses the anchors technique to provide insight into why a particular classification was made by the model. We’ll see the segments in an input image that are the most relevant to the prediction outcome.
Enter the deployment details as follows:
Type: Seldon Deployment
Configure the default predictor as follows:
Model Project: default
Storage Secret: (leave blank/none)
Skip to the end and click
If your deployment is launched successfully, it will have
We will make a prediction request using the image of a
The image is a JSON file in Tensorflow Serving protocol format.
Click on the
cifar10-classifierdeployment created in the previous section to enter the deployment dashboard.
Inside the deployment dashboard, click on the
Predictpage, click on
Upload JSON fileand upload the truck image.
Add an Anchor Images Explainer¶
cifar10-classifierdeployment dashboard, click
For step 1 of the Explainer Configuration Wizard, select
For step 2, click make sure
Anchorsis selected, then click
For step 3, enter the following value for the
For step 4, click
Next. (Do not change any fields).
For step 5, click
Next. (Do not change any fields). You may wish to enter a comment here for a gitops enabled namespace.
For step 6, click
After a short while, the explainer should become available.
Get Explanation for one Request¶
Navigate to the
Requests page using the left navigation drawer.
Click on the magnifying glass icon to generate explanations for the request.
Congratulations, you’ve created an explanation for the request! 🥳
If you make a request in the
Predict tab, you can also generate an explanation for it immediately by clicking on the same icon under the
Explain section below the response.
Why not try our other demos? Ready do dive in? Read our operations guide to learn more about how to use Deploy.