Skip to content

Wronskia/caffe-jacinto

 
 

Repository files navigation

Caffe-jacinto

Caffe-jacinto - embedded deep learning framework

Caffe-jacinto is a fork of NVIDIA/caffe, which in-turn is derived from BVLC/Caffe. The modifications in this fork enable training of sparse, quantized CNN models - resulting in low complexity models that can be used in embedded platforms.

For example, the semantic segmentation example shows how to train a model that is nearly 80% sparse (only 20% non-zero coefficients) and 8-bit quantized. This reduces the complexity of convolution layers by 5x. An inference engine designed to efficiently take advantage of sparsity can run significantly faster by using such a model.

Care has to be taken to strike the right balance between quality and speedup. We have obtained more than 4x overall speedup for CNN inference on embedded device by applying sparsity. Since 8-bit multiplier is sufficient (instead of floating point), the speedup can be even higher on some platforms.

Prerequisite

  • The scripts for training and infering models using caffe-jacinto is placed in caffe-jacinto-models. Please see it's documentation before proceeding further.

Installation

  • After cloning the source code, switch to the branch caffe-0.15, if it is not checked out already. -- git checkout caffe-0.15

  • Please see the installation instructions for installing the dependencies and building the code.

Features

New layers and options have been added to support sparsity and quantization.

Note that Caffe-jacinto does not directly support any embedded/low-power device. But the models trained by it can be used for fast inference on such a device due to the sparsity and quantization.

Additional layers
  • ImageLabelData and ImageLabelListData layers have been added to support training for semantic segmentation.
Sparsity
  • One major feature is quickly and accurately introducing sparsity in the coefficients. These include zeroing out of small coefficients during training, training without updating the zero coefficients (sparse update).
  • See another work that uses sparse update: caffe-scnn paper, code
Quantization
  • Dynamic -8 bit fixed point quantization, improved from Ristretto paper, code

Examples

See caffe-jacinto-models for several examples.


The following sections are kept as it is from the original Caffe.

Caffe

Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by the Berkeley Vision and Learning Center (BVLC) and community contributors.

Check out the project site for all the details like

and step-by-step examples.

Join the chat at https://gitter.im/BVLC/caffe

Please join the caffe-users group or gitter chat to ask questions and talk about methods and models. Framework development discussions and thorough bug reports are collected on Issues.

Happy brewing!

License and Citation

Caffe is released under the BSD 2-Clause license. The BVLC reference models are released for unrestricted use.

Please cite Caffe in your publications if it helps your research:

@article{jia2014caffe,
  Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
  Journal = {arXiv preprint arXiv:1408.5093},
  Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
  Year = {2014}
}

About

Caffe-jacinto - embedded deep learning framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 79.5%
  • Python 7.8%
  • Cuda 6.4%
  • CMake 2.6%
  • Protocol Buffer 1.8%
  • MATLAB 0.8%
  • Other 1.1%