Code Monkey home page Code Monkey logo

bc_learning_image's Introduction

BC learning for images

Implementation of Between-class Learning for Image Classification by Yuji Tokozume, Yoshitaka Ushiku, and Tatsuya Harada.

Our preliminary experimental results on CIFAR-10 and ImageNet-1K were already presented in ILSVRC2017 on July 26, 2017.

Between-class (BC) learning:

Contents

  • BC learning for images
    • BC: mix two images simply using internal divisions.
    • BC+: mix two images treating them as waveforms.
  • Training of 11-layer CNN on CIFAR datasets

Setup

  • Install Chainer v1.24 on a machine with CUDA GPU.
  • Prepare CIFAR datasets.

Training

  • Template:

      python main.py --dataset [cifar10 or cifar100] --netType convnet --data path/to/dataset/directory/ (--BC) (--plus)
    
  • Recipes:

    • Standard learning on CIFAR-10 (around 6.1% error):

        python main.py --dataset cifar10 --netType convnet --data path/to/dataset/directory/
      
    • BC learning on CIFAR-10 (around 5.4% error):

        python main.py --dataset cifar10 --netType convnet --data path/to/dataset/directory/ --BC
      
    • BC+ learning on CIFAR-10 (around 5.2% error):

        python main.py --dataset cifar10 --netType convnet --data path/to/dataset/directory/ --BC --plus
      
  • Notes:

    • It uses the same data augmentation scheme as fb.resnet.torch.
    • By default, it runs training 10 times. You can specify the number of trials by using --nTrials command.
    • Please check opts.py for other command line arguments.

Results

Error rate (average of 10 trials)

Learning CIFAR-10 CIFAR-100
Standard 6.07 26.68
BC (ours) 5.40 24.28
BC+ (ours) 5.22 23.68
  • Other results (please see paper):
    • The performance of Shake-Shake Regularization [1] on CIFAR-10 was improved from 2.86% to 2.26%.
    • The performance of ResNeXt [2] on ImageNet-1K was improved from 20.4% to 19.4% (single-crop top-1 validation error).

Reference

[1] X. Gastaldi. Shake-shake regularization. In ICLR Workshop, 2017.

[2] S. Xie, R. Girshick, P. Dollar, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In CVPR, 2017.

bc_learning_image's People

Contributors

tokozume 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.