A big hurdle
How hard would it be to use deep learning to build a classifier that categorizes a picture of a circuit board appropriately?
As with any good ol’ classification model, we need to build a training set containing samples for each specific category we want to classify.
And here lies the problem.
Somebody would have to do this manually. Depending on how many images we need, the number of different classes, how long it takes to inspect each picture visually, and how much we need to pay people to do this job, creating the training dataset may be too expensive to consider.
We know how to solve the problem, but we need training data. And putting this together is not a trivial task.
Unfortunately, this is a common situation out there.
There’s always a way
Framing our problem in a traditional Supervised Learning approach where we need a ton of labeled data to train a classifier is not an option. We have to think differently.
Here’s an idea. We can start by labeling a few examples of each circuit board category to create a small training set that can kick things off. We can build a model off of it.
After training this model, we can use it to make predictions across the entire unlabelled dataset. Since we didn’t use enough data to train the model, the results won’t be good, but we can still use them to our advantage.
The prediction results will give us the confidence the model has on each image belonging to each category. We can select the top few images that our model is the least confident in, manually label them, add them to the training dataset, and retrain a new version of the model.
Can you see where I’m going with this?
From this point, we can repeat the whole process: use the model to create new predictions, select the worst results, label them, and create a new version of the model using the expanded training set.
One step at a time, the model will get better and better. We’ll only label those examples that maximize the information we need for the model to learn in every round. We’ll end up minimizing the amount of work we need to do manually.
This approach is called “Active Learning,” a semi-supervised machine learning technique. Here is an excerpt from Wikipedia
Active learning is a special case of machine learning in which a learning algorithm can interactively query a user (or some other information source) to label new data points with the desired outputs.
There are different variations of Active Learning, specifically how you can select which images you want to label during each iteration. The example above shows an approach known as “Least Confidence
,” but you can find several more explained in this fantastic tutorial
Active Learning is instrumental in making many use cases work that otherwise would be impractical to tackle with a Supervised Learning approach.
Look into it and keep it close. It will prove much more useful than what you might imagine.