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)