caffe调试之caffeheatmap:make matcaffe

本文介绍了在使用Caffe框架时遇到的matcaffe编译及运行问题,并提供了详细的解决方案,包括重新安装OpenCV、调整Makefile配置、清理并重新编译等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

caffe调试之caffeheatmap:make matcaffe

Problem:

 $ make matcaffe
 cannot find lopencv_imgcodecs

Solution:

reinstall opencv3.0.0
and add "opencv_imgcodecs" to makefile.

接下来在caffeheatmap目录下:

make clean
make
make matcaffe 

matcaffe编译成功后:

make mattest

出现invalid mexfile错误:

cd matlab; /usr/local/MATLAB/R2014a/bin/matlab -nodisplay -r 'caffe.run_tests(), exit()'

                            < M A T L A B (R) >
                  Copyright 1984-2014 The MathWorks, Inc.
                    R2014a (8.3.0.532) 64-bit (glnxa64)
                             February 11, 2014


To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.

Invalid MEX-file '/home/zjq/caffe-heatmap/matlab/+caffe/private/caffe_.mexa64':
/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol:
FT_Face_GetCharVariantIndex

Error in caffe.set_mode_cpu (line 5)
caffe_('set_mode_cpu');

Error in caffe.run_tests (line 6)
caffe.set_mode_cpu();

followed https://github.com/BVLC/caffe/issues/3934 and http://s1nh.org/post/setup-matcaffe/ (mainly the second one):
原因是Caffe用系统的opencv编译,但是运行matcaffe时链接了matlab的opencv版本
https://github.com/BVLC/caffe/issues/3934

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值