GithubHelp home page GithubHelp logo

alixiu / caffe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from superlich7/caffe

0.0 0.0 0.0 134.89 MB

This fork of BVLC/Caffe is dedicated to supporting Cambricon deep learning processor and improving performance of this deep learning framework when running on Machine Learning Unit(MLU).

Home Page: http://forum.cambricon.com

License: Other

CMake 0.33% Shell 0.03% C++ 96.01% Cuda 0.54% Python 0.35% C 2.73%

caffe's Introduction

Cambricon Caffe

To support Cambricon deep learning processor, the open source deep learning programming framework BVLC-Caffe has been modified. New functions such as off-line multi-core inference, online fusion mode, support of multiple cards and others are developed. Cambricon Caffe focus on inference, it is dedicated to improving BVLC-Caffe performance when running on Machine Learning Unit(MLU).

Cambricon Caffe Version

Cambricon Caffe supports several Cambricon Machine Learning Unit, please see below for more details.

  • For serials of MLU100:

You need to switch to the release_v1.0.0 branch first, and see below for how to use it.

  • For serials of MLU270:

You need to switch to the master branch first, and see below for how to use it.

Prerequisites

Cambricon Caffe has several dependencies as same as BVLC-Caffe does, please refer to caffe.berkeleyvision.org for details.

Building

You need to firstly clone Cambricon Caffe, and then go to scripts folder to compile Cambricon Caffe:

  • For serials of MLU100:
git clone [email protected]:Cambricon/caffe.git
cd caffe
git checkout release_v1.0.0
cd scripts

To build Cambricon Caffe, you could use build_cambriconcaffe.sh, which is in the scripts folder. It has three options:

  • -debug: build Cambricon Caffe with debug information.
  • -release: build Cambricon Caffe for production environment. This is the default build type.
  • -platform: specify platform argument. Supported arguments are x86, arm32, arm64. Default platform is x86.

x86

./build_cambriconcaffe.sh -platform x86

arm32

Please download cross toolchain, e.g. arm-linux-gnueabihf-4.8.3-201404, and set CROSS_TOOLCHAIN_PATH environment to point to the tool chain downloaded:

export CROSS_TOOLCHAIN_PATH=your_toolchain_path/bin  // please replace your_toolchain_path with your actual path

There is another dependent library set arm32_linux_lib, which is necessary for the compiling of Cambricon Caffe. It has been pre-compiled and is available for downloading on Cambricon's FTP site. Please clone caffe_boost, then run download_dependency.sh. The script will help download it.

The download_dependency.sh script needs one argument. The argument meaning is listed below:

  • 1: download arm32_linux_lib.
  • 2: download android_lib_r17b.

Firstly, download the library set.

git clone [email protected]:Cambricon/caffe_boost.git
cd caffe_boost/scripts
./download_dependency.sh 1

Then set ARM32_LINUX_LIB_ROOT environment variable for arm32_linux_lib:

export ARM32_LINUX_LIB_ROOT=your_lib_path  // please replace your_lib_path with your actual path

Once you have set up above two environment variables, you are ready to compile Cambricon Caffe for arm32 platform.

./build_cambriconcaffe.sh -platform arm32

arm64

For arm64, please download android-ndk-r17b firstly, it can be downloaded from NDK's official website. Then place it in /opt/shared/Android/Ndk/ directory(if not exists, please create one) and set ARM64_R17_NDK_ROOT environment as follows:

export ARM64_R17_NDK_ROOT=/opt/shared/Android/Ndk/android-ndk-r17b

There is another dependent library set android_lib_r17b. It also has been pre-compiled and is available for downloading on Cambricon's FTP site. Please input parameter 2 for download_dependency.sh.

git clone [email protected]:Cambricon/caffe_boost.git
cd caffe_boost/scripts
./download_dependency.sh 2

Finally, set ARM64_R17_ANDROID_LIB_ROOT environment variable for android_lib_r17b:

export ARM64_R17_ANDROID_LIB_ROOT=your_android_lib_path  // please replace your_android_lib_path with your actual path

Once you have finished setting the environment variables, you could compile Cambricon Caffe for arm64 platform:

./build_cambriconcaffe.sh -platform arm64
  • For serials of MLU270:
git clone [email protected]:Cambricon/caffe.git
cd caffe/scripts

To build Cambricon Caffe, you could use build_cambriconcaffe.sh, which is in the scripts folder. It has three options:

  • -debug: build Cambricon Caffe with debug information.
  • -release: build Cambricon Caffe for production environment. This is the default build type.
  • -platform: specify platform argument. Default platform is x86.
./build_cambriconcaffe.sh

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}
}

*Other names and brands may be claimed as the property of others

SSD: Single Shot MultiBox Detector

This repository contains merged code issued as pull request to BVLC caffe written by: Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, Alexander C. Berg.

Original branch can be found at https://github.com/weiliu89/caffe/tree/ssd.

Read our wiki page for more details.

Darknet

If you use Darknet in your research please cite it!

@misc{darknet13,
  author =   {Joseph Redmon},
  title =    {Darknet: Open Source Neural Networks in C},
  howpublished = {\url{http://pjreddie.com/darknet/}},
  year = {2013--2016}
}

YOLOv2

If you use YOLOv2 in your work please cite it!

@article{redmon2016yolo9000,
  title={YOLO9000: Better, Faster, Stronger},
  author={Redmon, Joseph and Farhadi, Ali},
  journal={arXiv preprint arXiv:1612.08242},
  year={2016}
}

YOLOv3

If you use YOLOv3 in your work please cite it!

@article{yolov3,
  title={YOLOv3: An Incremental Improvement},
  author={Redmon, Joseph and Farhadi, Ali},
  journal = {arXiv},
  year={2018}
}

R-FCN

If you use R-FCN in your work please cite it!

@article{dai16rfcn,
  title={{R-FCN}: Object Detection via Region-based Fully Convolution Networks},
  author={Jifeng Dai, Yi Li, Kaiming He, Jian Sun},
  journal = {arXiv preprint arXiv:1605.06409},
  year={2016}
}

caffe's People

Contributors

shelhamer avatar jeffdonahue avatar yangqing avatar longjon avatar sguada avatar kloudkl avatar sergeyk avatar ronghanghu avatar qipeng avatar lukeyeager avatar cypof avatar flx42 avatar rbgirshick avatar philkr avatar cdluminate avatar eelstork avatar dgolden1 avatar mavenlin avatar noiredd avatar jamt9000 avatar erictzeng avatar tnarihi avatar yosinski avatar blgene avatar mohomran avatar willyd avatar williford avatar jyegerlehner avatar ducha-aiki avatar netheril96 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.