Giter Club home page Giter Club logo

transferlearning_vgg16-19's Introduction

Download the dataset from: https://www.kaggle.com/alxmamaev/flowers-recognition
Checkout the article on transfer learning: https://medium.com/@koushik1102/how-to-transfer-learning-through-vgg16-and-vgg19-the-simpler-way-ad4eec1e2997

What is Transfer learning?

In transfer learning, we use an existing model to solve different but related problems. Basically, we try to exploit what has been learned in one task and improve generalization in another task. We use the model's pre-trained weights or model architecture to solve our problem. In this blog, we are using the pre-trained weights of VGG16 and VGG19, change the output layer and solve a classification problem on the flower dataset.

Is transfer learning advantageous?

Yes, it is! Transfer learning saves training time, gives better performance in most cases, and reduces the need for a huge dataset. It isn't a generalized method but helps in solving related problems.

Any existing Transfer learning methods to start with?

Keras applications have given users access to architectures such as VGG16, VGG19, RESNET, and a lot more. There are 25+ models available, with mention of their top accuracies on ImageNet classifications, parameters, depth, and size. You can access the models here. Let's explore two models, know-how these architectures are!

VGG-16

Published in 2014, VGG16 [Visual Geometry Group - 16] is one of the simplest CNN architectures used in ImageNet competitions. Taking out the ambiguity of filter size, kernel size and padding, VGG16 is structured as follows: All convolution layers in VGG-16 have
  • Filter size - 3x3
  • Stride - 1 
  • Padding - Same

All Max-pooling layers in VGG-16 have

  • Filter size - 2x2 
  • Stride - 2

alt text

2Conv - 1Maxpool - 2Conv - 1Maxpool - 3Conv - 1Maxpool - 3Conv - 1Maxpool - 3Conv - 1Maxpool - 1FC - 1FC - 1FC

The architecture has 13 convolutional layers followed by 3 fully connected layers, adding up to 16 layers to learn weights and bias parameters and hence the name VGG-16.

VGG-19

VGG-19 architecture is very much similar to VGG-16. We have 3 additional convolutional layers for the VGG-16 network. The architecture is as follows:

2Conv - 1Maxpool - 2Conv - 1Maxpool - 4Conv - 1Maxpool - 4Conv - 1Maxpool - 4Conv - 1Maxpool - 1FC - 1FC - 1FC

VGG-16 and VGG-19 architectures, due to their depth are slow to train and produce models of very large size. Though the architectures we see here are different, we can create a simple template to perform transfer learning from these models with few lines of code.

alt text

transferlearning_vgg16-19's People

Contributors

koushikkumarl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.