For some time, I installed libraries for my embedded systems manually from the command line. It takes more time than the autoinstallation script or docker. In this repository I will add more scripts for autoinstallation. If someone uses this repository, but he lacks some packages - write and I will add. Scripts will work for Debian(Ubuntu, Debian, Kali Linux..) based systems.
-
Script.sh
a) Opencv
b) Dlib
c) Eigen
-
Caffe auto install script - Caffe.sh
git clone https://github.com/popikeyshen/scripts
cd scripts
sudo bash ./install.sh
sudo bash ./caffe.sh
If the caffe open file -> add following
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
and
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
You can import caffe from this folder or add path
export PYTHONPATH=/home/user/caffe/python
or in python add:
import sys
sys.path.append('/home/user/caffe/python')
- add in Makefile.config
WITH_PYTHON_LAYER := 1
sudo pip uninstall protobuf
./configure #--prefix=/usr
make
sudo make install
cd python
python setup.py build
python setup.py test
python setup.py install
and test by
protoc --version
from BVLC/caffe#2092
- export PYTHONPATH of pythonLayer
export PYTHONPATH=/home/user/pythonLayer/
error while loading shared libraries: libopencv_highgui.so.3.4
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
If you have errors - look comments in the install script. And dont forget to install the same versions of OpenCV and Contrib
caffe installation, caffe bash autoinstall opencv installation, opencv bash autoinstall
Viacheslav Popika