Classifying bottles

Published

October 21, 2022

Esther decided to do something with her machine learning model to get better results from her model.

She was responsible for a deep learning model to classify bottles in a factory. Instead of running every picture through her model, she created two more copies of the image: the first by flipping the original image vertically and the second by zooming in around 10%.

Esther ran all three images through the model. She figured that having multiple images to construct the final answer would give her better results.

What’s the best way for Esther to use the three softmax vectors that her model will output to make a final decision? Select only one option.

  1. Esther should select the best one of the three vectors that come out of her model.

  2. Esther should use the softmax vector that contains the lowest value to compute the final result.

  3. Esther should use the softmax vector that includes the highest value to calculate the final result.

  4. Esther should average out every softmax vector and use that new vector to compute the final result.

4

Esther is using Test-time augmentation, a technique that relies on augmenting the original image before running it through a model. By doing this, Esther gives the model more opportunities to compute the correct prediction.

When Esther runs three pictures through the model, she will get back three different vectors. How can she use these vectors to determine the final result?

The best approach from the ones provided in this question is to average all three vectors and use the result to compute the correct class. By doing this, Esther will take advantage of each picture to make the final decision.

There’s no way to know which vector is “the best one,” so the first option is incorrect. Choosing the vector will the lowest value doesn’t seem like a great idea to make the best prediction, and although Esther could use the vector with the highest value, averaging all vectors will be a better approach.

Recommended reading

  • Check Test-time augmentation for an introduction to a technique that will help you make better predictions with your machine learning model.