Hi,
Faster-rcnn has their own caffe repo (contains some self-implemented layers) and it is required to compile caffe nested in py-faster-rcnn rather than BVLC caffe.
But faster-rcnn can work WELL on jetson tx1 with 24.2. You can follow this:
-
Use Jetpack to install CUDA-8.0, cuDNN v5.1, opencv4Tegra 2.4.13
-
Clone code
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git
- caffe and pycaffe
- Sync following file to BVLC caffe in order to support cuDNNv5
→ You can just git clone BVLC caffe and replace folloing file directly
include/caffe/util/:
cudnn.hpp
src/caffe/layers/:
cudnn_conv_layer.cu
cudnn_relu_layer.cpp
cudnn_relu_layer.cu
cudnn_sigmoid_layer.cpp
cudnn_sigmoid_layer.cu
cudnn_tanh_layer.cpp
cudnn_tanh_layer.cu
include/caffe/layers/:
cudnn_relu_layer.hpp
cudnn_sigmoid_layer.hpp
cudnn_tanh_layer.hpp
cp Makefile.config.example Makefile.config
edit Makefile.config
+++ USE_CUDNN := 1
+++ WITH_PYTHON_LAYER := 1
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
edit Makefile
--- LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+++ LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
make
make pycaffe
- faster RCNN
cd $FRCN_ROOT/lib
make
cd $FRCN_ROOT
./data/scripts/fetch_faster_rcnn_models.sh
cd $FRCN_ROOT
./tools/demo.py
- Possible error
numpy error:
sudo apt-get install python-numpy
cython error:
sudo apt-get install cython
checksum incorrect error when run data/scripts/fetch_faster_rcnn_models.sh
edit data/scripts/fetch_faster_rcnn_models.sh
--- wget $URL -O $FILE
+++ wget --no-check-certificate $URL -O $FILE
ImportError: No module named easydict:
sudo apt-get install python-pip
sudo pip install easydict
locale.Error: unsupported locale setting:
sudo apt-get install language-pack-id
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
ImportError: No module named cv2:
sudo apt-get install python-opencv
ImportError: No module named skimage.io:
sudo apt-get install libfreetype6-dev
sudo pip install scikit-image
‘GDK_IS_DISPLAY (display)’ failed:
sudo apt-get install libv4l-dev
sudo apt-get install xorg
export DISPLAY=:1
startx &
ImportError: No module named google.protobuf.internal:
sudo apt-get install python-protobuf
ImportError: Cairo backend requires that cairocffi or pycairo is installed:
sudo apt-get install python-dev
sudo apt-get install libffi-dev
sudo pip install cffi
sudo pip install cairocffi
ImportError: No module named yaml:
sudo pip install pyyaml