Code Monkey home page Code Monkey logo

transfer_learning's Introduction

TransferLearning

Overview

transfer_learning is a keras-based transfer learning module for arbitrary end-to-end image classification. The module supports transfer learning that is based on any of the following pre-trained models

Transfer learning takes place through the following two steps

  • Quick learning via a top model
    • A top model is a pre-trained model with last block of fully connected layers being re-trained to accommodate a specific classification task.
  • Fine tuning of unfreezed layers
    • Fine tuning begins by initializing its weights to those of a top model trained in first step and re-trains those unfreezed layers, typically the final fully connected layer block + its previous adjacent convolutional layer block.

Please refer to Francois Chollet's excellent tutorial for the details of a top model and fine tuning process.

Setup

Download all the Python files of the module into the project folder. In order for the module to correctly find the data, the following folder structure is required to store the data

project_dir/
    data/
        train/
            category_1
                image_11
                image_12
                ...
            category_2
                image_21
                image_22
                ...
            ...
            category_N
                image_N1
                image_N2
                ...
        valid/
            ...
        test/
            ...

Usuage

python transfer_learning.py -m resnet50

Contact

If you have any questions or encounter any bugs, please contact the author (Feiyang Niu, [email protected])

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.