Giter Site home page Giter Site logo

athewsey / amazon-sagemaker-analyze-model-predictions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-sagemaker-analyze-model-predictions

0.0 1.0 0.0 62.44 MB

License: Apache License 2.0

Jupyter Notebook 99.46% Python 0.54% Dockerfile 0.01%

amazon-sagemaker-analyze-model-predictions's Introduction

Detecting and analyzing incorrect model predictions with Amazon SageMaker Model Monitor and Debugger

This repository contains the notebook and scripts for the blogpost "Detecting and analyzing incorrect model predictions with Amazon SageMaker Model Monitor and Debugger"

Create a SageMaker notebook instance and clone the repository:

git clone [email protected]:aws-samples/amazon-sagemaker-analyze-model-predictions.git

In the notebook analyze_model_predictions.ipynb we first deploy a ResNet18 model that has been trained to distinguish between 43 categories of traffic signs using the German Traffic Sign dataset.

We will setup SageMaker Model Monitor to automatically capture inference requests and predictions. Afterwards we launch a monitoring schedule that periodically kicks off a custom processing job to inspect collected data and to detect unexpected model behavior.

We will then create adversarial images which lead to the model making incorrect predictions. Once Model Monitor detects this issue, we will use SageMaker Debugger to obtain visual explanations of the deployed model. This is done by updating the endpoint to emit tensors during inference and we will then use those tensors to compute saliency maps.

The saliency map can be rendered as heat-map and reveals the parts of an image that were critical in the prediction. Below is an example (taken from the German Traffic Sign dataset): the image on the left is the input into the fine-tuned ResNet model, which predicted the image class 25 (‘Road work’). The right image shows the input image overlaid with a heat-map where red indicates the most relevant and blue the least relevant pixels for predicting the class 25.

License

This project is licensed under the Apache-2.0 License.

amazon-sagemaker-analyze-model-predictions's People

Contributors

amazon-auto avatar athewsey avatar nrauschmayr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.