Giter VIP home page Giter VIP logo

resnet-matconvnet's Introduction

ResNet-Matconvnet

โŒ I have stopped maintaining this repo. For fine-tuning ResNet, I would suggest using Torch version from Facebook repo.

This repository is a Matconvnet re-implementation of "Deep Residual Learning for Image Recognition",Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun. You can train Deep Residual Network on ImageNet from Scratch or fine-tune pre-trained model on your own dataset. This repo is created by Hang Zhang.

Table of Contents

  1. Get Started
  2. Train from Scratch
  3. Fine-tune Your Own
  4. Changes

Get Started

The code relies on vlfeat, and matconvnet, which should be downloaded and built before running the experiments. You can use the following commend to download them.

git clone -b v1.0 --recurse-submodules https://github.com/zhanghang1989/ResNet-Matconvnet.git

If you have problem with compiling, please refer to the link.

Train from Scratch

  1. Cifar. Reproducing Figure 6 from the original paper.

    run_cifar_experiments([20 32 44 56 110], 'plain', 'gpus', [1]);
    run_cifar_experiments([20 32 44 56 110], 'resnet', 'gpus', [1]);

    Cifar Experiments

    Reproducing the experiments in Facebook blog. Removing ReLU layer at the end of each residual unit, we observe a small but significant improvement in test performance and the converging progress becomes smoother.

    res_cifar(20, 'modelType', 'resnet', 'reLUafterSum', false,...
    	'expDir', 'data/exp/cifar-resNOrelu-20', 'gpus', [2])
    plot_results_mix('data/exp','cifar',[],[],'plots',{'resnet','resNOrelu'})
  2. Imagenet2012. download the dataset to data/ILSVRC2012 and follow the instructions in setup_imdb_imagenet.m.

    run_experiments([50 101 152], 'gpus', [1 2 3 4 5 6 7 8]);
  3. Your own dataset.

    run_experiments([18 34],'datasetName', 'minc',...
    'datafn', @setup_imdb_minc, 'nClasses', 23, 'gpus', [1 2]);

Fine-tune Your Own

  1. Download

  2. Fine-tuning

    res_finetune('datasetName', 'minc', 'datafn',...
    @setup_imdb_minc, 'gpus',[1 2]);

Changes

  1. 06/21/2016:

  2. 05/17/2016:

    • Reproducing the experiments in Facebook blog, removing ReLU layer at the end of each residual unit.
  3. 05/02/2016:

    • Supported official Matconvnet version.
    • Added Cifar experiments and plots.
  4. 04/27/2016: Re-implementation of Residual Network:

resnet-matconvnet's People

Contributors

zhanghang1989 avatar

Watchers

James Cloos avatar Xiaoyu Chen avatar paper2code - bot 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.