樹莓派3b+上安裝
1、安裝
sudo apt-get install git sudo apt-get install cmake sudo apt-get install -y gfortran sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev libatlas-base-dev
2、git clone https://github.com/Tencent/ncnn
3、修改CmakeList.txt文件。去掉下面兩段代碼前面的#,便於后續的測試
add_subdirectory(examples)
add_subdirectory(benchmark)
https://github.com/Tencent/ncnn/wiki/how-to-build
如果要使用examples,則需要添加opencv,在example/CMakeLists.txt中,首行添加:
set(OpenCV_DIR /home/自己的路徑/opencv-2.4.13/release)
4、開啟openmp
5、開啟neon
默認在android和ios下開啟neon,linux下,src/CMakeLists.txt在判斷sys和arch下,直接設為TRUE
參考:https://blog.csdn.net/yuanlulu/article/details/86168023
不知道是不是openmp沒有開啟成功,benchmark上有些網絡速度比example上慢不少。。。