2 [![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE)
4 This Installation will help you get started to setup CaffeOnACL on RK3399 quickly.
7 ## 2.1 General dependencies installation
8 sudo apt-get install git cmake scons protobuf-compiler libgflags-dev libgoogle-glog-dev
9 sudo apt-get install libblas-dev libhdf5-serial-dev liblmdb-dev libleveldb-dev
10 sudo apt-get install liblapack-dev libsnappy-dev python-numpy
11 sudo apt-get install libprotobuf-dev libopenblas-dev libgtk2.0-dev
12 sudo apt-get install python-yaml python-numpy python-scipy python-six
14 sudo apt-get install --no-install-recommends libboost-all-dev
16 ## 2.2 Download source code
20 #### Download "OpenCV"
21 wget --no-check-certificate https://github.com/opencv/opencv/archive/3.3.0.tar.gz
23 #### Download "gen-pkg-config-pc"
24 wget https://github.com/OAID/AID-tools/tree/master/script/gen-pkg-config-pc.sh
26 git clone https://github.com/ARM-software/ComputeLibrary.git
27 #### Download "CaffeOnACL" :
28 git clone https://github.com/OAID/CaffeOnACL.git
29 #### Download "Googletest" :
30 git clone https://github.com/google/googletest.git
38 cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/AID/opencv3.3.0 ..
40 sudo ~/gen-pkg-config-pc.sh /usr/local/AID
44 aarch64-linux-gnu-gcc opencl-1.2-stubs/opencl_stubs.c -Iinclude -shared -o build/libOpenCL.so
45 scons Werror=1 -j4 debug=0 asserts=1 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
46 wget https://github.com/OAID/AID-tools/tree/master/script/Computelibrary/Makefile
55 ## 3.4 Build Unit tests
56 ##### Build the gtest libraries
58 cmake -D CMAKE_INSTALL_PREFIX=/usr/local/AID/googletest CMakeLists.txt
62 ##### Build Caffe Unit tests
63 cd ~/CaffeOnACL/unit_tests
67 ## 3.5 To Configure The Libraries
68 sudo ~/gen-pkg-config-pc.sh /usr/local/AID
73 cd ~/CaffeOnACL/data/ilsvrc12
74 sudo chmod +x get_ilsvrc_aux.sh
77 ./scripts/download_model_binary.py ./models/bvlc_reference_caffenet
78 ./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
80 ---------- Prediction for examples/images/cat.jpg ----------
81 0.3094 - "n02124075 Egyptian cat"
82 0.1761 - "n02123159 tiger cat"
83 0.1221 - "n02123045 tabby, tabby cat"
84 0.1132 - "n02119022 red fox, Vulpes vulpes"
85 0.0421 - "n02085620 Chihuahua"
87 #### 4.2 Run Unit test
88 cd ~/CaffeOnACL/unit_tests
91 [==========] 29 tests from 6 test cases ran. (1236 ms total) [ PASSED ] 29 tests.