Giter Site home page Giter Site logo

codepujan / bilateralnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mpi-is/bilateralnn

0.0 1.0 0.0 68 KB

Learning Sparse High Dimensional Filters with Neural Networks

Home Page: http://bilateralnn.is.tue.mpg.de

License: BSD 3-Clause "New" or "Revised" License

CMake 3.30% Python 4.03% Cuda 17.57% C++ 53.04% Protocol Buffer 22.05%

bilateralnn's Introduction

Learning Sparse High Dimensional Filters

This is the code accompanying the following CVPR 2016 publication:


Learning sparse high dimensional filters : Image Filtering, Dense CRFs and Bilateral Neural Networks.


This is developed and maintained by Martin Kiefel, Varun Jampani, Raffi Enficiaud and Peter V. Gehler.

Please visit the project website http://bilateralnn.is.tue.mpg.de for more details about the paper and overall methodology.

Installation

The code provided in this repository relies on the same installation procedure as the one from Caffe. Before you start with the BilateralNN code, please install all the requirements of Caffe by following the instructions from this page first. You will then be able to build Caffe with our code.

Integration into Caffe

There are mainly two ways for integrating the additional layers provided by our library into Caffe:

  • Dowloading a fresh clone of Caffe and patching it with our source files, so that you will be able to test the code with minimal effort
  • Patching an existing copy of Caffe, so that you can integrate our code with your own development on Caffe.

Downloading and Patching

This can be done just by the following commands:

cd $bilateralNN
mkdir build
cd build
cmake ..

This will configure the project, you may then run:

  • for building the project

    make -j
    

    This will clone a Caffe version from the main Caffe repository into the build folder and compiles together with our newly added layers.

  • for running the tests, including the ones of the BilateralNN:

    make -j runtest
    

    (this follows the same commands as for Caffe)

Notes

  • Our code has been tested with revision a1c81aca641e5b16f3e2007be07dfdedc072606e of Caffe, and this is the version that is cloned. You may change the version by passing the option CAFFE_VERSION on the command line of cmake:

      cmake -DCAFFE_VERSION=some_hash_or_tag ..
    

such as cmake -DCAFFE_VERSION=HEAD ...

  • If you want to use your fork instead of the original Caffe repository, you may provide the option CAFFE_REPOSITORY on the cmake command line (it works exactly as for CAFFE_VERSION).

  • Any additional command line argument you pass to cmake will be forwarded to Caffe, except for those used directly by our code:

    cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -DBOOST_ROOT=../osx/boost_1_60_0/
      -DBoost_ADDITIONAL_VERSIONS="1.60\;1.60.0" ..
    

Patching an existing Caffe version

Automatic CMAKE way

You may patch an existing version of Caffe by providing the CAFFE_SRC on the command line

cd $bilateralNN
mkdir build
cd build
cmake -DCAFFE_SRC=/your/caffe/local/copy ..

This will add the files of the BilateralNN to the source files of the existing Caffe copy, but will also overwrite caffe.proto (a backup is made in the same folder). The command will also create a build folder local to the BilateralNN repository (inside the build folder on the previous example): you may use this one or use any previous one, Caffe should automatically use the sources of the BilateralNN.

Manual way

The above patching that is performed by cmake is rather a copying of the files from the folder of the bilateralNN to the corresponding folders of Caffe. Caffe will then add the new files into the project.

Alternatively, you can manually copy all but caffe.proto source files in bilateralNN folder to the corresponding locations in your Caffe repository. Then, for merging the caffe.proto file of bilateralNN to your version of the caffe.proto:

  1. the copy the lines 382-383 and 854-922 in caffe.proto to the corresponding caffe.proto file in the destination Caffe repository.
  2. Change the parameter IDs for PermutohedralParameter and PixelFeatureParameter based on the next available LayerParameter ID in your Caffe.

Example Usage

Examples are given in the folder $bilateralNN/bilateralnn_code/examples. Those examples rely on the Python extensions of Caffe. You would find on http://bilateralnn.is.tue.mpg.de a detailed description of the layer usage and an example.

Citations

Please consider citing the following papers if you make use of this work and/or the corresponding code:

@inproceedings{jampani:cvpr:2016,
	title = {Learning Sparse High Dimensional Filters: Image Filtering, Dense CRFs and Bilateral Neural Networks},
	author = {Jampani, Varun and Kiefel, Martin and Gehler, Peter V.},
	booktitle = { IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)},
	month = jun,
	year = {2016}
}
@article{kiefel:iclr:2015,
  title={Permutohedral Lattice CNNs},
  author={Kiefel, Martin and Jampani, Varun and Gehler, Peter V.},
  booktitle={International Conference on Learning Representations Workshop},
  month = May,
  year={2015}
}

bilateralnn's People

Contributors

varunjampani avatar suhangpro avatar raffienficiaud avatar

Watchers

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