Ending Note

Recap and reinforce your knowledge of image classification using the PyTorch Image Model framework.

Here’s a recap of all the lessons in this course:

Introduction

The course started with the fundamental concepts behind image classification. It also highlighted the techniques and metrics for image classification.

Then, it explored the PyTorch Image Model framework, an open source Python library to train image classification models.

Basic concepts

Subsequently, we have learned more about the common built-in functions in the PyTorch Image Model framework. We can use these functions to perform the following functions:

  • Create a new model architecture.
  • Search all the existing models.
  • Load and preprocess images.
  • Perform prediction using pretrained models.

Augmentation

We learned different augmentations available in the PyTorch Image Model framework. The latest version supports the following augmentations:

  • Mixup and Cutmix
  • RandAugment
  • Random Erase
  • AutoAugment
  • Random resized crop and interpolation

Loss

The loss function is an important aspect of machine learning. It serves to evaluate how well an algorithm models the datasets. The PyTorch Image Model framework supports the following loss functions:

  • Asymmetric loss
  • Jensen-Shannon divergence
  • Cross-entropy loss

Training

In the training process, we went through many arguments available in the training script of the PyTorch Image Model framework.

We can train a new model from scratch or fine-tune an existing model. We also learned that applying exponential moving average (EMA) in training improves the performance of certain models.

Model conversion

In model conversion, we learned the following operations:

  • Perform inference using a PyTorch model.
  • Convert a PyTorch model into an ONNX model.
  • Perform inference using an ONNX model.
  • Convert an ONNX model into a TensorFlow model.
  • Perform inference using a TensorFlow model.
  • Convert a TensorFlow model into a TFLite model.
  • Perform inference using a TFLite model.

Deployment

In deployment, we learned the basics of the FastAPI framework, a Python web framework for building APIs.

We can use it to build an image classification API where users submit an image and get the result in JSON format.

Ending note

Congratulations, you have completed this course! We hope you had a good learning experience. If you want to learn more about machine learning and artificial intelligence, check out our other courses. Thanks, and have a great day!

Get hands-on with 1200+ tech skills courses.