The ResNet architecture was in 2015 in the paper Deep Residual Learning for Image Recognition (https://arxiv.org/abs/1512.03385). ResNet has a different network than VGG. It consists of micro-architectures that are stacked on top of each other. ResNet won the ILSVRC competition in 2015 and surpassed human performance on the ImageNet dataset. In this recipe, we will demonstrate how to leverage ResNet50 weights to extract bottleneck features.
- We start by implementing all Keras tools:
from keras.models import Model from keras.applications.resnet50 import ResNet50 from keras.applications.resnet50 import preprocess_input from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.applications import imagenet_utils
- Next, we load the
ResNet50
model with theimagenet
weights:
resnet_model = ResNet50(weights='imagenet')
- For this example, we will extract the final average pooling layer in the...