Ubuntu 14.04 64位机上不带CUDA支持的Caffe配置编译操作过程+faster-rcnn

下面介绍在Ubuntu上只用CPU的Caffe配置编译过程:

1.安装BLAS:$ sudo apt-get install libatlas-base-dev

2.安装依赖项:$ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler liblmdb-dev

$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

3. 下载Caffe:$ git clone git://github.com/BVLC/caffe.git
4.

安装Caffe: $cd caffe

$ cp Makefile.config.example Makefile.config

修改Makefile.config文件:去掉注释,cpu_ONLY:= 1

修改 caffe目录下的Makefile.config,Makefile


$gedit Makefile.config;

在Makefile.config文件的第85行,添加 /usr/include/hdf5/serial/ 到 INCLUDE_Dirs,也就是把下面第一行代码改为第二行代码

INCLUDE_Dirs := $(PYTHON_INCLUDE) /usr/local/include
INCLUDE_Dirs := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/

# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_Dirs := $(PYTHON_INCLUDE) /usr/local/include\
                                  /usr/include/hdf5/serial/ 
LIBRARY_Dirs := $(PYTHON_LIB) /usr/local/lib /usr/lib

gedit Makefile;

在Makefile文件的第173行,把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial,也就是把下面第一行代码改为第二行代码
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

INCLUDE_Dirs += $(BUILD_INCLUDE_DIR) ./src ./include
ifneq ($(cpu_ONLY),1)
	INCLUDE_Dirs += $(CUDA_INCLUDE_DIR)
	LIBRARY_Dirs += $(CUDA_LIB_DIR)
	LIBRARIES := cudart cublas curand
endif
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial 


5.

$ make all

$ make test

$ make runtest


说明:1.make all步骤出现错误
./include/caffe/util/hdf5.hpp:6:18: Fatal error: hdf5.h: No such file or directory

解决方法如步骤4

2.编译带CUDA支持的Caffe与上面的步骤完全一致,只要把cpu_ONLY:=1注释掉即可。

CPU运行faster-rcnn:参考博客:http://www.cnblogs.com/justinzhang/p/5386837.html


参考文献:

1. http://caffe.berkeleyvision.org/installation.html

2.http://m.blog.csdn.net/blog/zxd675816777/39649281

3.http://www.haodaima.net/art/2823705


5.http://www.cnblogs.com/platero/p/3993877.html

6.http://blog.csdn.net/kuaitoukid/article/details/40395617

7. http://blog.csdn.net/u011762313/article/details/47262549#%E5%AE%89%E8%A3%85%E4%BE%9D%E8%B5%96%E5%BA%93%E4%B8%80

8

http://blog.csdn.net/hongye000000/article/details/51043913

http://www.jb51.cc/article/p-xmydevyj-ux.html

http://www.jb51.cc/article/p-evvodmjx-gt.html

http://www.cnblogs.com/simplelovecs/p/5156458.html

http://blog.csdn.net/u011762313/article/details/47262549


http://www.jb51.cc/article/p-evvodmjx-gt.html

http://www.jb51.cc/article/p-claeqeyj-k.html

https://github.com/rbgirshick/py-faster-rcnn

http://demo.netfoucs.com/danieljianfeng/article/details/42836167

http://blog.csdn.net/wishchin/article/details/52327257

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...