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://blog.csdn.net/fengbingchun/article/details/45535741#quote 

http://blog.csdn.net/xiaxiazls/article/details/52039473

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

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


http://blog.csdn.net/xiaxiazls/article/details/52039473

http://blog.csdn.net/u013174689/article/details/39185757

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

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

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










评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值