How to train a Machine Learning model?

How to train a Machine Learning model?

Training a Machine Learning model for custom object detection or custom object image classification

Training a model simply means learning (determining) good values for all the weights and the bias from labeled examples. In supervised learning, a machine learning algorithm builds a model by examining many examples and attempting to find a model that minimizes loss; this process is called empirical risk minimization.

Loss is the penalty for a bad prediction. That is, loss is a number indicating how bad the model’s prediction was on a single example. If the model’s prediction is perfect, the loss is zero; otherwise, the loss is greater. The goal of training a model is to find a set of weights and biases that have low loss, on average, across all examples.

developers.google.com

About the training process

The process of training an ML model involves providing an ML algorithm (that is, the learning algorithm) with training data to learn from. The term ML model refers to the model artifact that is created by the training process.

The training data must contain the correct answer, which is known as a target or target attribute. The learning algorithm finds patterns in the training data that map the input data attributes to the target (the answer that you want to predict), and it outputs an ML model that captures these patterns.

You can use the ML model to get predictions on new data for which you do not know the target.

In this blog, you will find examples for training an ML model for image classification and object detection.

docs.aws.amazon.com

IMAGE CLASSIFICATION vs OBJECT DETECTION

In Image Classification, we have one label per image while for object detection, we can have single or multiple labels per image as demonstrated below.


TRAINING AN ML MODEL FOR OBJECT DETECTION

We can use either of the TF1 or TF2 model zoo’s to select our model for training.

Here are 2 tutorials on how to train a machine learning model for custom object detection for both the TensorFlow versions (TF 1.x & TF 2.x) using Google colab.

1) Train an ML model for custom object detection (TensorFlow 1.x)


2) Train an ML model for custom object detection (TensorFlow 2.x)


TRAIN AN ML MODEL FOR IMAGE CLASSIFICATION

Here are 2 tutorials on how to train a model for custom object image classification using Google colab and Teachable Machine.

1) Train an ML model for custom object image classification (Using TensorFlow 2.x on Google Colab)


2) Train an ML model for custom object image classification (Using Teachable-Machine)


CREDITS

References

Video Sources


Leave a Reply

en_USEnglish