基于caffe的Faster-rcnn 编译出错

由于原作者的cudnn跟小C的不同,小C是cudnn 5,所以makefile.config的cudnn需要注释掉,也就是说不能使用GPU。

编译make -j8 && make pycaffe时出错
1 make: *** No rule to make target '–j8'。 停止。
发现是命令输入错误,应该是make -j8 && make pycaffe,气死了!这种错误。。。

2 装好前面python-opencv库会解决caffe.pb.h丢失问题

3 Makefile:563: recipe for target '.build_release/tools/extract_features.bin' failed
make: *** [.build_release/tools/extract_features.bin] Error 1

解决:把原来caffe的makefile.config中的cudnn也注释掉,两边的设置一样。

4 Makefile:568: recipe for target '.build_release/examples/mnist/convert_mnist_data.bin' failed
make: *** [.build_release/examples/mnist/convert_mnist_data.bin] Error 1
Makefile:563: recipe for target '.build_release/tools/compute_image_mean.bin' failed
make: *** [.build_release/tools/compute_image_mean.bin] Error 1

考虑是编码问题,可能多了空格,在window下查看并没有,排除。
是opencv不对,在faster-rcnn的makefile.config中添加OPENCV_VERSION := 3,然后又报错
.build_release/lib/libcaffe.so:对‘mdb_cursor_open’未定义的引用
.build_release/lib/libcaffe.so:对‘cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_, double, double, int)’未定义的引用
Makefile:563: recipe for target '.build_release/tools/upgrade_net_proto_binary.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1

发现一个方法,在 makefile.config里面加一个LIBRARIES直接加在opencv下面,如下

# Uncomment if you‘re using OpenCV 3
OPENCV_VERSION := 3
LIBRARIES += glog gflags protobuf leveldb snappy lmdb boost_system hdf5_hl hdf5 m opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs

再次编译通过了!
感谢http://www.bubuko.com/infodetail-2038229.html作者!

跑数据出错:/lib/rpn/proposal_layer.py", line 26, in setup
layer_params = yaml.load(self.param_str)
AttributeError: 'ProposalLayer' object has no attribute 'param_str'

解决:把param_str改为param_str_。

你可能感兴趣的:(faster-rcnn,caffe)