Transfer Learning Models
Transfer learning is a machine learning technique where a model trained on one task is re-purposed on a second related task.A pre-trained source model is chosen from available models. Many research institutions release models on large and challenging datasets that may be included in the pool of candidate models from which to choose from. The model pre-trained model can then be used as the starting point for a model on the second task of interest. This may involve using all or parts of the model, depending on the modeling technique used. Optionally, the model may need to be adapted or refined on the input-output pair data available for the task of interest. One of the fundamental requirements for transfer learning is the presence of models that perform well on source tasks. Luckily, the deep learning world believes in sharing. Many of the state-of-the art deep learning architectures have been openly shared by their respective teams. These span across different domains, such as computer vision and NLP, the two most popular domains for deep learning applications. Pre-trained models are usually shared in the form of the millions of parameters/weights the model achieved while being trained to a stable state. Pre-trained models are available for everyone to use through different means. The famous deep learning Python library, keras, provides an interface to download some popular models.
This approach is effective because the images were trained on a large corpus of photographs and require the model to make predictions on a relatively large number of classes, in turn, requiring that the model efficiently learn to extract features from photographs in order to perform well on the problem. For computer vision, you can leverage some popular models including, VGG-16, VGG-19, Inception V3, XCeption, ResNet-50. Deep learning has been quite successfully utilized for various computer vision tasks, such as object recognition and identification, using different CNN architectures.
Table
TL Models | Test Accuracy | Test Loss | F1-Score |
---|---|---|---|
VGG16 | 94 | 0.81 | 94 |
InceptionV3 | 27 | 1.40 | 19 |
VGG19 | 47 | 0.46 | 33 |
ResNet50 | 88 | 0.41 | 88 |
MobileNet_v2 | 37 | 1.73 | 30 |
Transfer Learning Models
Among the few models trained on the training data and validated on Testing data, we can see that VGG16 model consisting of 13 Convolution nodes yeilds higher accuracy and lower loss.
The VGG16 transfer learning model was developed by K. Simonyan and it has '138 million' parameters. The model was loaded with pre-trained weights and was trained on our data for only '20' epochs. We compiled the model with sparse categotical crossentropy as the loss function with 'Adam' as optimizer. Later the model was fit using a batch size of '32'. This resulted a F1-score of '94%'