Coder Social home page Coder Social logo

shengwenliang / image-classification-caltech-256 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tropcomplique/image-classification-caltech-256

0.0 1.0 0.0 510.91 MB

Exploring CNNs and model quantization on Caltech-256 dataset

Jupyter Notebook 99.55% Python 0.45%

image-classification-caltech-256's Introduction

Image Classification Experiments on Caltech-256 dataset

Results

model accuracy, % top 5 accuracy, % number of parameters
DenseNet-121 85 96 7,216,256
DenseNet-121 with trained ternary quantization 73 91 ~7.2M 2-bit, ~79% zeros
DenseNet-121 with binary weights 41 67 ~7.2M 1-bit
DenseNet-201 87 97 18,584,704
ResNet-18 81 94 11,307,840
ResNet-18 with trained ternary quantization 52 78 ~11M 2-bit, ~86% zeros
ResNet-18 with stochastic depth 70 89 11,307,840
SqueezeNet v1.1 66 85 853,824
SqueezeNet v1.1 with entropy regularization 66 86 853,824
Delegating classifiers 77 93 -

Trained ternary quantization

Trained ternary quantization [2] is a method of reducing size of a neural network. It replaces all weights in a convolutional layer with +1, 0, -1 and two float scaling factors (one for +1 and one for -1).

Binary-Weights-Networks

Stochastic depth

Entropy regularization

Delegating classifiers

SmoothGrad

SmoothGrad is a method of computing nice sensitivity maps. Sensitivity maps show which image pixels influence class predictions. They require to compute gradients with respect to an input image. Here are a few examples: sensitivity maps with smoothgrad

Implementation details

Notes

  • I often use cosine annealing [6] of the learning rate. I believe that this reduces training time a lot.

Requirements

  • Python 3.5
  • pytorch 0.2
  • torchvision, Pillow
  • numpy, pandas, sklearn, matplotlib, tqdm

References

[1] Regularizing Neural Networks by Penalizing Confident Output Distributions

[2] Trained Ternary Quantization

[3] Deep Networks with Stochastic Depth

[4] SmoothGrad: removing noise by adding noise

[5] XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks

[6] Snapshot Ensembles: Train 1, get M for free

image-classification-caltech-256's People

Contributors

tropcomplique avatar

Watchers

He Listen 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.