This Installation will help you get started to setup Caffe-HRT on RK3399 quickly.
sudo apt-get install git cmake scons protobuf-compiler libgflags-dev libgoogle-glog-dev
sudo apt-get install libblas-dev libhdf5-serial-dev liblmdb-dev libleveldb-dev
sudo apt-get install liblapack-dev libsnappy-dev python-numpy
sudo apt-get install libprotobuf-dev libopenblas-dev libgtk2.0-dev
sudo apt-get install python-yaml python-numpy python-scipy python-six
sudo apt-get install --no-install-recommends libboost-all-dev
cd ~
wget --no-check-certificate https://github.com/opencv/opencv/archive/3.3.0.tar.gz
tar -xvf 3.3.0.tar.gz
wget ftp://ftp.openailab.net/tools/script/gen-pkg-config-pc.sh
chmod +x ./gen-pkg-config-pc.sh
git clone https://github.com/ARM-software/ComputeLibrary.git
git checkout 48bc34e
git clone https://github.com/OAID/Caffe-HRT.git
git clone https://github.com/google/googletest.git
cd ~/opencv-3.3.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/AID/opencv3.3.0 ..
sudo make install
sudo ~/gen-pkg-config-pc.sh /usr/local/AID
cd ~/ComputeLibrary
mkdir build
aarch64-linux-gnu-gcc opencl-1.2-stubs/opencl_stubs.c -Iinclude -shared -o build/libOpenCL.so
scons Werror=1 -j4 debug=0 asserts=1 neon=1 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
wget ftp://ftp.openailab.net/tools/script/Computelibrary/Makefile
sudo make install
sudo ~/gen-pkg-config-pc.sh /usr/local/AID
cd ~/Caffe-HRT
make all
make distribute
sudo make install
sudo ~/gen-pkg-config-pc.sh /usr/local/AID
cd ~/googletest
cmake -D CMAKE_INSTALL_PREFIX=/usr/local/AID/googletest CMakeLists.txt
make
sudo make install
cd ~/Caffe-HRT/unit_tests
make clean
make
sudo ~/gen-pkg-config-pc.sh /usr/local/AID
cd ~/Caffe-HRT/data/ilsvrc12
sudo chmod +x get_ilsvrc_aux.sh
./get_ilsvrc_aux.sh
cd ../..
./scripts/download_model_binary.py ./models/bvlc_reference_caffenet
./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
output message --
---------- Prediction for examples/images/cat.jpg ----------
0.3094 - "n02124075 Egyptian cat"
0.1761 - "n02123159 tiger cat"
0.1221 - "n02123045 tabby, tabby cat"
0.1132 - "n02119022 red fox, Vulpes vulpes"
0.0421 - "n02085620 Chihuahua"
cd ~/Caffe-HRT/unit_tests
./test_caffe_main
output message:
[==========] 29 tests from 6 test cases ran. (1236 ms total) [ PASSED ] 29 tests.