Closed danielruelle closed 9 years ago
The matcaffe.cpp used for compiling is copied from SPP_net_release1_data_caffe_mex_cuda5.5.zip
Please help,
Hi danielruelle,
the "caffe/include/caffe/util//Directory.h" actually exists, you can have a check :) matcaffe.cpp should use original version from https://github.com/ShaoqingRen/caffe
thanks eendebakpt's help, current https://github.com/ShaoqingRen/caffe version should be compiled under Linux.
Hi Shaoqing,
Thank you for your reply. I already compiled caffe as you suggest.
However, I'm now unable to build "nms_multiclass_mex". This is because "windows.h" and "tchar.h" are included in the "nms_multiclass_mex.cpp".
Because I intend to run the "spp_demo" and "keeps = nms_multiclass(scored_boxes, 0.3);" is required at line 56 in spp_detect.m
Surely, I use "Zeiler_conv5_new" instead of "cnn_model/Zeiler_conv5".
Hope you can help, thank you very much.
Hi danielruelle,
could you provide the error message when compiling nms_multiclass_mex.cpp
Yes.
Here is the message.
nms/nms_multiclass_mex.cpp:2:21: fatal error: windows.h: No such file or directory
^
compilation terminated.
mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.
Error using mex (line 206) Unable to complete successfully.
Error in spp_build (line 85) mex -outdir bin ...
When I comment //#include < windows.h >
nms/nms_multiclass_mex.cpp:3:19: fatal error: tchar.h: No such file or directory
^
compilation terminated.
mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.
Error using mex (line 206) Unable to complete successfully.
Error in spp_build (line 85) mex -outdir bin ...
and here is the message when I comment both windows.h and tchar.h
Compiling nms_multiclass_mex
Warning: You are using gcc version "4.8.2-19ubuntu1)". The version currently supported with MEX is "4.4.6". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/
nms/nms_multiclassmex.cpp: In function ‘void nms(const mxArray, int, double, const std::vector
mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.
Error using mex (line 206) Unable to complete successfully.
Error in spp_build (line 85) mex -outdir bin ...
hi danielruelle,
I've updated a version for linux. I have no Linux environment at hand, so if this version has some compile errors, please see https://github.com/ShaoqingRen/SPP_net/blob/master/nms/nms_mex.cpp for reference.
I solved this problem on Ubuntu 14.04 and Matlab R2012b last week by editing several places as follows:
1) startup.m hfile = [matlabroot '/extern/include/matrix.h']; loadlibrary('libmx',hfile)
2) nms_multiclass_mex ~line 56: cast to double double w = std::max(0.0, (double)xx2-xx1+1), h = std::max(0.0, (double)yy2-yy1+1);
~line 82: mexFunction declaration: const void mexFunction(int nlhs, mxArray plhs[], int nrhs, const mxArray prhs[])
~line 142: change mxCreateCellMatrix_730 to mxCreateCellMatrix plhs[0] = mxCreateCellMatrix(nDim_boxes - 4, 1);
Hope this help.
@caocuong0306
Thanks very much. Could you merge your version ?
@ShaoqingRen
I just forked your SPP_net repository and committed the updated files (startup.m, nms_multiclass_mex.cpp, and spp_demo.m) so that we can run spp_demo on Linux (I tested with Ubuntu 14.04 and Matlab R2012b).
https://github.com/caocuong0306/SPP_net
Apart from the changes mentioned above, I also modified spp_demo.m as follows: spp_model_file = './data/spp_model/VOC2007/spp_model.mat'; caffe_net_file = fullfile(pwd, 'data/Zeiler_conv5_new/Zeiler_conv5'); caffe_net_def_file = fullfile(pwd, 'data/Zeiler_conv5_new/Zeiler_spm_scale224_test_conv5.prototxt'); im = imread('./datasets/VOCdevkit2007/VOC2007/JPEGImages/000015.jpg');
Here is the results generated on my computer.
@caocuong0306 Thank you very much. I've merged startup.m and nms_multiclass_mex.cpp. @danielruelle This version should be good under linux
@ShaoqingRen Thanks for your help @caocuong0306 It's helpful.
Please danielruelle, could you tell me how do you compile caffe (https://github.com/ShaoqingRen/caffe) ? I faced the following errors. however, I was able to compile the latest version of caffe (https://github.com/BVLC/caffe) but as you know in order to use SPP-Net we need to install the first one.
src/caffe/test/test_data_layer.cpp: In member function ‘void caffe::DataLayerTest
Hi Shaoqing,
I intend to compile and run spp_net on Ubuntu (because I'm running rcnn on Ubuntu too).
To do this, I need to compile caffe from source, not using the caffe.mexw64 that you provided on windows.
But when I compile caffe (https://github.com/ShaoqingRen/caffe), there are files missing such as "caffe/util/Directory.h" and probably others (because you already modified it).
Please give me some suggestions so that I can run spp_net on Ubuntu.
Thank you very much,