Dave
Dave

Reputation: 564

Why are Keras models instantiated with imagenet weights only?

If we look at the list of available models in Keras as shown here we see that almost all of them are instantiated with weights='imagenet'. For instance:

model = VGG16(weights='imagenet', include_top=False)

Why always imagenet? is it because it is the baseline? If not, what are the other options available?

Thank you

Upvotes: 2

Views: 8645

Answers (1)

Gerry P
Gerry P

Reputation: 8102

Imagenet is a defacto standard for images classification. A yearly contest is run with millions of training images in 1000 categories. The models used in the imagenet classification competitions are measured against each other for performance. Therefore it provides a "standard" measure for how good a model is for image classification. So many often used transfer learning model models use the imagenet weights. Your model if you are using transfer learning can be customized for your application by adding additional layers to the model. You do not have to use the imagenet weighst but it generally is beneficial as it helps the model converge in less epochs. I use them but I also set all layers to be trainable which helps adapt the weights of the model to your application.

Upvotes: 8

Related Questions