Santiago Profile picture
17 Jun, 10 tweets, 2 min read
Here is a simple trick that improves the results of your models.

Best part: You'll surprise your team. Guaranteed.

Thread: What is Test-Time Augmentation, and how you can start using it today.

Let's start with Data Augmentation:

It allows us to artificially increase the size of a dataset without having to collect more data.

Data augmentation is key to improve the performance of our models.
Data augmentation is very popular when working with images.

We can apply different transformations to each image to obtain new samples:

• Cropping
• Rotations
• Flipping
• Zoom

We can then train the model with the augmented dataset and get much better results.
There's another way we can use data augmentation:

At the time of making predictions.

This technique is called "Test-Time Augmentation."

Let's see how this works.
Imagine you trained a Convolutional Neural Network to classify images.

Here is how you apply Test-Time Augmentation:

1. Get a request
1. Augment the input image
2. Run every image through the model
3. Average the softmax results
4. Argmax to get the most likely class
Notice that we aren't just predicting on the input image.

We are augmenting it and running the entire batch through the model.

This will give us a batch of softmax probabilities that we can average.

Finally, we can return the class corresponding to the largest value.
How is this better than just running the original image?

It might not be, but many times it is.

By augmenting the input image, we give our model more opportunities to "see" something different, get the correct prediction, and influence the results.
The key to making this work: Carefully tuning your augmentations.

Things you should experiment with:

• How many augmentations you use.
• How aggressive these augmentations are.

Good start: Use the same augmentations that you use to train your model.
How much improvement should you expect from using Test-Time Augmentation?

• Sometimes, none.
• Sometimes, nothing significant.
• Sometimes, a nice bump.

The question you should answer: Are a few percentage points worth the extra effort?
Have you used Test-Time Augmentation before? I'd love to hear about your experience with it.

If you enjoy these threads, follow me @svpino as I help you deconstruct machine learning and turn it into Your Next Big Thing™.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Santiago

Santiago Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @svpino

18 Jun
I just went through 200+ applications for a machine learning position.

I think I figured out what works and doesn't in a resume.

Here are a few tips.
The question I want to answer when I read a resume:

• Should I call this person?

Anything that doesn't help me with this decision is working against you.
The most common problem I found when reviewing applications:

Most resumes are 90% noise and 10% signal. People bury relevant details in an ocean of useless information.

Fix this, and you increase your chances significantly.
Read 20 tweets
15 Jun
If you are planning to get started with Machine Learning:

My introductory course is on sale:

• 50 copies @ $5, starting right now.
• Free copies for those who can't afford this.

gum.co/kBjbC/five

If you want to support my content, like/retweet this. Everyone wins.
10 copies sold, 40 copies left @ $5.
20 copies sold, 30 copies left @ $5.
Read 11 tweets
15 Jun
Do you know what's holding you back?

The same boring projects than everyone else is working on. How do you break off the mold and make a difference?

Thread: 7 machine learning projects that will teach you the technical skills you need to succeed out there.
Today, companies are dumping insane amounts of money on people with the right skills.

But here we are, showing up with the same "MNIST Digit Recognition" and "Iris dataset" experience.

These are good to start, but you need to take your learning to another level.
The good news for you: Most people can't be bothered.

Most people will bookmark this thread and will never do anything with it.

Even if you do one of these 7 projects, you'll be doing more than 99% of everyone who reads this!

It has never been easier to stand out!
Read 19 tweets
14 Jun
How close are we to building a truly intelligent agent?

Most scientists think we are still decades away, but today, a group of scientists from @DeepMind claims they know how to get there.

Let's talk about what's going on.
What is "Artificial General Intelligence" (AGI)?

An agent capable of learning any intellectual task than a person can also learn.

Today, AI has been limited to systems that can learn particular tasks. A system that can learn anything you teach it, just like a human, is AGI.
Unfortunately, there's no way to build such a general, intelligent agent without formulating a custom solution for every individual task.

This sucks. This doesn't scale. This doesn't get us to AGI.

But maybe we aren't that far off...
Read 16 tweets
12 Jun
6 lies you have been told about machine learning:

1. You need a lot of math to start
2. You need a Ph.D. to get a job
3. You always need a lot of data
4. You need to buy expensive hardware
5. It's hard to become proficient in it
6. It's the solution for most problems

Bullshit.
In the last 6 months, I've posted more than 100 threads here on Twitter talking about machine learning and how you can build a career on it.

And I'm just getting started!

Stay tuned. A lot more is coming.
First misconception: All machine learning is hardware-hungry.

Deep learning stretches you, but outside that, it gets much better.

If you need GPUs/TPUs, there are many free/cheap options you can use, especially while learning.

Read 9 tweets
11 Jun
Software developers want to get into machine learning.

Many make the same mistakes. I've seen a few, and I have some ideas on how to avoid them.

This is what I've learned ↓
Lesson 1

Most people love the idea of starting something new. Only a few take the first step.

Preparing for something new is fun and exciting. It can also turn into glorified procrastination.

Stop collecting resources. Take what's right in front of you and run with it.
Lesson 2

Learning is a marathon, not a sprint. Strap yourself for a long, lifelong road.

If you are looking to make a quick buck, look elsewhere. If you are looking for shortcuts, this ain't it.

Make sure you come for the right reasons and are willing to go the distance.
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(