Validate computer vision deep learning models

Get the code

This code pattern is part of the Getting started with PowerAI Vision learning path.

Summary

After a deep learning computer vision model is trained and deployed, it is often necessary to periodically (or continuously) evaluate the model with new test data. This developer code pattern provides a Jupyter Notebook that will take test images with known “ground-truth” categories and evaluate the inference results versus the truth.

Description

We will use a Jupyter Notebook to evaluate a PowerAI Vision image classification model. You can train a model using the provided example or test your own deployed model. The notebook will use test images, which are separated into directories to indicate the expected category classifications. These expected classifications are considered the “ground truth.” The deployed model’s API endpoint will be called to collect the inference results for each image. The collected results are then used to evaluate the actual model performance. Model accuracy is demonstrated by showing a confusion matrix and calculating a variety of the most common statistics used to measure the accuracy of a model.

When you have completed this code pattern, you will understand how to:

  • Train and deploy an image classification model with PowerAI Vision
  • Run a Jupyter Notebook
  • Evaluate the results using a variety of accuracy statistics
  • Validate existing deployed models with new test data sets

Flow

Validate deep learning models flow

The steps will show you how to:

  1. Create a data set.
  2. Train a model for image classification.
  3. Deploy it to a REST API endpoint.
  4. Validate the model with new data.

Instructions

Find the detailed steps for this pattern in the README file. Learn how to:

  1. Clone the repo.
  2. Log in to PowerAI Vision.
  3. Create a data set.
  4. Assign categories to images.
  5. Train the model.
  6. Deploy and test.
  7. Run the notebook.
  8. Analyze the results.

Conclusion

This code pattern used a Jupyter Notebook to evaluate a PowerAI Vision image classification model by taking test images with known “ground-truth” categories and evaluating the inference results versus the truth. The code pattern is the final part of the Getting started with PowerAI Vision learning path. Congratulations! You should now have a fundamental understanding of PowerAI Vision and some of its advanced features. But, if you want to learn more, take a look at the PowerAI Vision page.