1. 程式人生 > >在Jetson TX1上編譯執行Faster R-CNN

在Jetson TX1上編譯執行Faster R-CNN

本文介紹如何在Jeston TX1上編譯執行python版本的Faster R-CNN程式碼

1.安裝相關依賴庫

$ sudo apt-get install libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libboost-all-dev libgflags2 libgflags-dev libgoogle-glog-dev liblmdb-dev libyaml-dev
$ sudo apt-get install python-numpy python-setuptools python-pip cython python-opencv python-skimage python-protobuf
$ 
sudo pip install easydict PyYAML
2.克隆原始碼
$ cd py-faster-rcnn/lib
$ sed -i -e 's/lib64/lib/g' setup.py
$ make


$ sed -i -e '1617s/__pyx_t_5numpy_int32_t/int/g' nms/gpu_nms.cpp
$ make

3.複製修改Cmake.config檔案

$ ../caffe-fast-rcnn/
$ cp Makefile.config.example Makefile.config
USE_CUDNN := 1
WITH_PYTHON_LAYER := 1
編譯caffe
make all -j3
make pycaffe -j3
4.下載模型檔案

cd $FRCN_ROOT./data/scripts/fetch_fast_rcnn_models.sh

5.測試執行demo

cd $FRCN_ROOT./tools/demo.py

結果:

ZF網路訓練模型:


參考:http://www.cnblogs.com/louyihang-loves-baiyan/p/4885659.html?utm_source=tuicool&utm_medium=referral

http://qiita.com/kndt84/items/a32d07350ad8184ea25e

http://blog.csdn.net/jiajunlee/article/details/50373815