Pre-trained ML models from AWS marketplace

A pre-trained ML(machine learning) model is an entity that accepts an input payload and returns you a prediction. It’s a mathematical model that generates predictions by finding patterns in your data.

A pre-trained ML model typically solves a type of a problem. * For example, there is an ML model that accepts a car’s picture as an input and performs a prediction (a.k.a inference) returning the make, model, and year of the car. * There is another pre-trained machine learning model that identifies whether a person is wearing a mask or not.

Typically, machine learning models can accept text, image, audio, video, tabular data and generate prediction in different forms such as a number (e.g. price of a house), a class(e.g. positive vs negative sentiment), bounding boxes of objects identified in image/video data, etc.

Using a pre-trained model means you can get around the heavy lifting of hiring ML resources and training/tuning ML models from scratch.

ML Models are deployed to perform two types of inferences (or predictions):

  • Real-time Inference to synchronously generate predictions for individual data observations.
  • Batch Inference to asynchronously generate predictions for multiple input data observations.

Pre-trained Machine Learning (ML) models from AWS Marketplace are ready-to-use models that can be quickly deployed on Amazon SageMaker, a fully managed cloud machine learning service. You can purchase paid pre-trained ML models or use free pre-trained ML models, via AWS Marketplace.

Task - learn about pre-trained ML models from AWS Marketplace

Watch first 7 minutes of the following video.

Task - Try and subscribe to ML model

For today’s lab, you will be using Resnet-18 ML model, a general purpose free ML model that accepts a picture and returns probabilities for 1000 different object categories. You will deploy the ML model for real-time inference and then you will perform the inference.

Step 2 - Try Resnet-18 ML Model product from AWS Marketplace

The ML model you are going to try today requires an image as the input payload. Download this sample image to your computer.

  • Open AWS Marketplace -
  • In the top left, under Delivery methods, choose Amazon SageMaker
  • Browse different listings.
  • Search ResNet18.
  • Click on ResNet18 product result.
  • Click on Try Product Demo
  • Click on Upload an image button
  • Choose the image you downloaded earlier.
  • You will see image rendered on the screen. Scroll down and see the tags identified in the Inference results section.

Congratulations, you just performed a prediction on an ML model. Note how an ML model was able to identify intelligent attributes from the image.

Step 3 - Subscribe Resnet-18 ML Model product from AWS Marketplace

  • Choose Continue to Subscribe.
  • Choose Accept Offer.

Congratulations, you have just completed step 2 from the following architecture diagram.