GlossaryTransfer learning
Transfer learning
Transfer learning is reusing a model trained on one task or dataset as the starting point for a new, related task. Instead of training from scratch, a team adapts a pretrained model to its own parts, defects or scenes with far less data.
How it works
A model trained on a large, general dataset, such as millions of everyday images, learns features that apply widely: edges, textures, shapes and object parts. Transfer learning keeps those learned features and trains only part of the model, or the whole model briefly, on the new task.
There are two common approaches. In feature extraction, the pretrained layers stay frozen and a small new layer on top learns the new classes. In fine-tuning, some or all pretrained layers are also updated with a low learning rate. A 2014 study measured how features transfer between tasks and found that early layers learn general features while later layers become specific to the original task, which is why the top layers are usually the ones retrained.
Surveys of the field also cover domain adaptation, where the task stays the same but the data shifts, such as from rendered to real images or from one camera to another.
Transfer learning vs training from scratch
Training from scratch learns every feature from the new data, which takes large labeled datasets and a lot of compute. Transfer learning starts from features that already work and needs only a few hundred to a few thousand labeled examples for many vision tasks. Training from scratch makes sense only when the new data looks nothing like any available pretrained model's data.
Why it matters
Labeled examples are the scarce resource in industrial AI. A factory has few images of each defect type, and a robot team has limited time to label scenes. Transfer learning makes useful models possible with that little data and gets a first working model in days instead of months.
How to get it right
- Start from a model pretrained on data similar to yours, such as industrial or close-up images when available.
- Freeze early layers first, and unfreeze more only if accuracy stalls.
- Use a low learning rate so pretrained features are not destroyed.
- Hold out real test images from the deployed camera.
- Check licenses and terms on pretrained weights before shipping them.
Transfer learning in robotics and drone hardware
A defect classifier for a new board, a detector for a new part or a landing-zone model for a new terrain all start from pretrained vision models. Small models adapted this way often fit on the onboard computer of a robot or drone, while training stays on a workstation or server.