Giter Club home page Giter Club logo

cbof's Introduction

Bag-of-Features Pooling for Deep Convolutional Neural Networks

In this repository we provide an efficient and simple re-implementation of the Bag-of-Features Pooling method for Deep Convolutional Neural Networks using the Lasagne framework. The provided lasagne layer can be used in any lasagne-based model. The distance between the extracted feature vectors and the codebook is calculated using convolutional layers (exploiting that the squared distance ||x-y||^2 can be calculated using three inner products, i.e., x^2+y^2-2xy), significantly speeding up the training/testing speed.

We provide an example of using the proposed method in mnist_example.py and we compare the BoF pooling to the plain SPP polling. The proposed method can both increase the classification perfomance and provide better scale invariance, as shown below (the classification error on the MNIST dataset is reported):

Model Scale = 1 Scale = 0.8 Scale = 0.7
SPP 0.68 % 4.08 % 36.78 %
BoF Pooling 0.54 % 1.40 % 17.60 %

Note that this is not the implementation used for conducting the experiments in our paper. The original (slower, but more flexible) implementation can be found in cbof_paper.

If you use this code in your work please cite the following paper:

@InProceedings{cbof_iccv,
author = {Passalis, Nikolaos and Tefas, Anastasios},
title = {Bag-of-Features Pooling for Deep Convolutional Neural Networks},
booktitle = {Proceedings of the IEEE International Conference on Computer Vision (to appear)},
year = {2017}
}

Check my website for more projects and stuff!

cbof's People

Contributors

passalis avatar

Watchers

James Cloos avatar  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.