Code Monkey home page Code Monkey logo

ywang370 / caffe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yjxiong/caffe

0.0 1.0 0.0 36.93 MB

A fork of Caffe with OpenMPI-based Multi-GPU (mainly data parallel) support for action recognition and more. More documentation please see the original readme.

Home Page: http://caffe.berkeleyvision.org/

License: Other

CMake 2.95% Makefile 0.66% MATLAB 1.08% Python 8.52% Shell 0.33% C++ 79.35% M 0.01% Cuda 5.50% Protocol Buffer 1.60%

caffe's Introduction

Action Recognition with Deep Learning

Build Status

This branch hosts the code for the technical report "Towards Good Practices for Very Deep Two-stream ConvNets", and more.

Updates

  • Apr 27, 2016
    • cuDNN v5 support, featuring the super fast WINOGrad Convolution and cuDNN implementation of BatchNormalization.
  • Dec 23, 2015
    • Refactored cudnn wrapper to control overall memory consumption. Will automatically find the best algorithm combination under memory constraint.
  • Dec 17, 2015
    • cuDNN v4 support: faster convolution and batch normalization (around 20% performance gain).
  • Nov 22, 2015
    • Now python layer can expose a prefetch() method, which will be run in parallel with network processing.

Full Change Log

Features

  • VideoDataLayer for inputing video data.
  • Training on optical flow data.
  • Data augmentation with fixed corner cropping and multi-scale cropping.
  • Parallel training with multiple GPUs.
  • cuDNNv4 integration.

Usage

See more in Wiki.

Generally it's the same as the original caffe. Please see the original README. Please see following instruction for accessing features above. More detailed documentation is on the way.

  • Video/optic flow data
    • First use the optical flow extraction tool to convert videos to RGB images and opitcal flow images.
    • A new data layer called VideoDataLayer has been added to support multi-frame input. See the UCF101 sample for how to use it.
    • Note: The VideoDataLayer can only input the optical-flow images generated by the tool listed above.
  • Fixed corner cropping augmentation
    • Set fix_crop to true in tranform_param of network's protocol buffer definition.
  • "Multi-scale" cropping augmentation
    • Set multi_scale to true in transform_param
    • In transform_param, specify scale_ratios as a list of floats smaller than one, default is [1, .875, .75, .65]
    • In transform_param, specify max_distort to an integer, which will limit the aspect ratio distortion, default to 1
  • cuDNN v5
  • The cuDNN v5 wrapper has optimized engines for convolution and batch normalization.
  • The solver protobuf config has a parameter richness which specifies the total GPU memory in MBs available to the cudnn convolution engine as workspaces. Default richness is 300 (300MB). Using this parameter you can control the GPU memory consumption of training, the system will find the best setup under the memory limit for you.
  • Training with multiple GPUs
    • Requires OpenMPI > 1.7.4 (Why?). Remember to compile your OpenMPI with option --with-cuda
    • Specify list of GPU IDs to be used for training, in the solver protocol buffer definition, like device_id: [0,1,2,3]
    • Compile using cmake and use mpirun to launch caffe executable, like
mkdir build && cd build
cmake .. -DUSE_MPI=ON
make && make install
mpirun -np 4 ./install/bin/caffe train --solver=<Your Solver File> [--weights=<Pretrained caffemodel>]

Note: actual batch_size will be num_device times batch_size specified in network's prototxt.

Working Examples

Extension

Currently all existing data layers sub-classed from BasePrefetchingDataLayer support parallel training. If you have newly added layer which is also sub-classed from BasePrefetchingDataLayer, simply implement the virtual method

inline virtual void advance_cursor();

Its function should be forwarding the "data cursor" in your data layer for one step. Then your new layer will be able to provide support for parallel training.

Questions

Contact

Citation

You are encouraged to also cite the following report if you find this repo helpful

@article{MultiGPUCaffe2015,
  author    = {Limin Wang and
               Yuanjun Xiong and
               Zhe Wang and
               Yu Qiao},
  title     = {Towards Good Practices for Very Deep Two-Stream ConvNets},
  journal   = {CoRR},
  volume    = {abs/1507.02159},
  year      = {2015},
  url       = {http://arxiv.org/abs/1507.02159},
}

Following is the original README of 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}
}

caffe's People

Contributors

shelhamer avatar jeffdonahue avatar yangqing avatar longjon avatar sguada avatar kloudkl avatar sergeyk avatar yjxiong avatar qipeng avatar rbgirshick avatar ronghanghu avatar mavenlin avatar flx42 avatar dgolden1 avatar cysu avatar jamt9000 avatar yosinski avatar tnarihi avatar philkr avatar lukeyeager avatar mtamburrano avatar netheril96 avatar wanglimin avatar mohomran avatar ste-m5s avatar erictzeng avatar jyegerlehner avatar tdomhan avatar pluskid avatar cnikolaou avatar

Watchers

Yilin Wang 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.