Transfer learning for feature extraction

Now comes the interesting part. We are ready to leverage transfer learning to extract useful features from our base feature map images for each data point. For this, we will use an excellent pretrained deep learning model that has proven to be a very effective feature extractor on images. The VGG-16 model is what we will be using here. However, we will just use it as a plain feature extractor here without any fine-tuning (which is something we have explored in previous chapters).

Feel free to leverage fine-tuning, which may even lead to superior and better classifiers. We start by defining some basic utilities and functions to process our base images:

from keras.preprocessing import image from keras.applications.imagenet_utils ...

Get Hands-On Transfer Learning with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.