1 ![OPEN AI LAB](https://github.com/OAID/caffeOnACL/blob/master/acl_openailab/pics/openailab.png)
4 [![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE)
6 Please refer to [CaffeOnACL Release NOTE](https://github.com/OAID/caffeOnACL/blob/master/acl_openailab/Reversion.md) for details
9 ## 2.1 General dependencies installation
10 sudo apt-get -y update
11 sodo apt-get -y upgrade
12 sudo apt-get install -y build-essential pkg-config automake autoconf protobuf-compiler cmake cmake-gui
13 sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev
14 sudo apt-get install -y libatlas-base-dev libgflags-dev libgoogle-glog-dev liblmdb-dev libopenblas-dev
15 sudo apt-get install -y libopencv-dev python-dev
16 sudo apt-get install -y python-numpy python-scipy python-yaml python-six python-pip
17 sudo apt-get install -y scons git
18 sudo apt-get install -y --no-install-recommends libboost-all-dev
19 pip install --upgrade pip
21 ## 2.2 Download source code
22 Recommend creating a new directory in your work directory to execute the following steps. For example, you can create a direcotry named "oaid" in your home directory by the following commands.<br>
28 #### Download "ACL" (arm_compute : v17.05):
29 git clone https://github.com/ARM-software/ComputeLibrary.git
30 #### Download "CaffeOnACL" :
31 git clone https://github.com/OAID/caffeOnACL.git
32 #### Download "Googletest" :
33 git clone https://github.com/google/googletest.git
37 cd ~/oaid/ComputeLibrary
38 scons Werror=1 -j8 debug=0 asserts=1 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
41 export ACL_ROOT=~/oaid/ComputeLibrary
43 cp acl_openailab/Makefile.config.acl Makefile.config
46 ## 3.3 Build Unit tests
47 ##### Build the gtest libraries
53 ##### Build Caffe Unit tests
54 export CAFFE_ROOT=~/oaid/caffeOnACL
55 cd ~/oaid/caffeOnACL/unit_tests
60 If the output message of the following two tests is same as the examples, it means the porting is success.
62 export LD_LIBRARY_PATH=~/oaid/caffeOnACL/distribute/lib:~/oaid/ComputeLibrary/build
64 #### Reference Caffenet
65 cd ~/oaid/caffeOnACL/data/ilsvrc12
66 sudo chmod +x get_ilsvrc_aux.sh
69 ./scripts/download_model_binary.py ./models/bvlc_reference_caffenet
70 ./distribute/bin/classification.bin models/bvlc_reference_caffenet/deploy.prototxt models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel data/ilsvrc12/imagenet_mean.binaryproto data/ilsvrc12/synset_words.txt examples/images/cat.jpg
72 ---------- Prediction for examples/images/cat.jpg ----------
73 0.3094 - "n02124075 Egyptian cat"
74 0.1761 - "n02123159 tiger cat"
75 0.1221 - "n02123045 tabby, tabby cat"
76 0.1132 - "n02119022 red fox, Vulpes vulpes"
77 0.0421 - "n02085620 Chihuahua"
80 cd ~/oaid/caffeOnACL/unit_tests
83 [==========] 29 tests from 6 test cases ran. (1236 ms total) [ PASSED ] 29 tests.