Transfer learning is a deep learning technique that seeks to repurpose a neural network trained for one task to perform another.
One application of transfer learning is fine-tuning, which involves taking an existing model that performs well on a general task and training it on a new, more specific dataset.
The most obvious application is fine-tuning for object recognition. Starting from a model capable of identifying a large number of classes, you refine it so that it recognizes a specific class.
The original model performs well because it was trained:
Fine-tuning saves on all three of these requirements: it uses a smaller dataset, less computing power, and less time.
The goal is to achieve a higher accuracy rate than the general model on the new, more specific task.
The general model must be capable of solving a task similar to yours.
In most cases, this means changing the shape of the model's last layer so that it outputs the correct number of classes. This modified layer is initialized with random weights. The remaining layers of the network are frozen so that their weights are not altered during training.
Train the model on the specific dataset. This is typically done with a small learning rate, which enables finer learning than during the original model's training.
Following this PyTorch tutorial, I used fine-tuning to recognize pedestrians and vehicles in a warehouse.
I generated the dataset in Blender. This process is detailed in this article: Synthetic Dataset Using 3D Rendering in Blender - AI Squad by Reboot Conseil (rebootia.com)
I selected the pre-trained MaskRCNN model with ResNet50 from PyTorch, a 50-layer model that performs well across a large number of classes.
Here, we need to identify 3 classes: pedestrians, pallet jacks, and the background. The model's last layer is therefore replaced with a layer that has 3 outputs.
The objective was achieved. Starting from a general model, I now have a model that meets my specific needs, all with minimal training time and a small dataset.
Ancien Rebooter passé par Météo-France, Oscar a marqué son passage chez Reboot par son énergie fédératrice : organisation de meetups IA, quiz Twitch, animation de la communauté tech strasbourgeoise. Un profil technique doublé d'un vrai talent pour rassembler les gens autour de l'IA.
LinkedInGet our best articles every month.
Débloquer la valeur cachée dans des milliers de documents. Un projet bancaire qui transforme la recherche documentaire en quelques secondes.
ProjectDébloquer l'extraction de données hétérogènes. Un projet utilisant l'IA multimodale pour 9 marques.
ProjectDoubler la capacité de production d'audits grâce à l'automatisation intelligente.
TrainingFondamentaux ML, scikit-learn, premiers modèles supervisés et non supervisés.
ServiceDe l'audit au déploiement. Diagnostic, formation, POC, audit 360°, projet complet.
ServiceFormateurs opérationnels. IA, data science, développement web. Certifié Qualiopi.