niuzhiheng / caffe

Caffe
http://caffe.berkeleyvision.org/
BSD 2-Clause "Simplified" License
317 stars 129 forks source link

MATLAB wrapper for Windows #23

Open ssakhavi opened 10 years ago

ssakhavi commented 10 years ago

Hi,

I wanted to ask that what modifications I must perform on the matcaffe.cpp so it can work for the windows installation you have proposed.

mjmarin commented 10 years ago

Hi,

I have been able to generate a mex file with the following project: https://github.com/mjmarin/caffe/tree/winmex/build/MSVCmex

I hope you find it useful.

niuzhiheng commented 10 years ago

@mjmarin Thank you very much for your information. It is more than welcome, if you can push a PR to my branch.

jotaf98 commented 10 years ago

Any chance the pre-compiled MEX file could make it into the standalone package? It would make for a really easy setup for any newcomers who just want to play a bit with the standard networks in their scripts.

CMeteor commented 9 years ago

@mjmarin Could you help me? There is something wrong with my caffe.mex64. I can pass the compile. But when I run matcaffe_demo.m.

Invalid MEX-file 'E:\caffe-winmex\matlab\caffe\caffe.mexw64': E:\caffe-winmex\matlab\caffe\caffe.mexw64 is not a valid Win32 application.

My configuration: win8.1 x64 matlab2014a cuda 6.0 vs2012

mjmarin commented 9 years ago

@CMeteor I'm not an expert but, have you tried to build your MSVS project both in "Win32" and "x64"? Perhaps you selected the wrong one. Sorry for not being able to provide you more help.

yimingchan commented 9 years ago

@CMeteor The invalid MEX-file messages usually means required dlls are missing. Please check your %PATH% environment variable include the path "caffe/bin". You can use Matlab function "setenv".

Example setenv('PATH', [getenv('PATH') ';CAFFE_INSTALLED_PATH/bin']);

CMeteor commented 9 years ago

@mjmarin @yimingchan Thank you very much. I add the path "caffe/bin" to %PATH% environment variable.everything is OK.

shuangao commented 9 years ago

Hi @mjmarin and people, I am new to this. Can you tell me how to run the matlab MEX in more detail? I downloaded the MEX64 file and put it in matlab/caffe/ folder. Is it enough to run the demo in caffe? If not, what else should I do? My error is:

Invalid MEX-file 'D:\caffe-windows\matlab\caffe\caffe.mexw64': The specified module could not be found.

Error in matcaffe_init (line 19) if caffe('is_initialized') == 0

iiwindii commented 9 years ago

@shuangao Hi, have you solved your problem, i met with the same question。。。。

iiwindii commented 9 years ago

@CMeteor Hi, in the caffe directory , i have not found "caffe/bin"..... can you give some details,,thanks

febrary1992 commented 9 years ago

@shuangao I've met the same problem, did you solve your problem?

shuangao commented 9 years ago

NO. I gave up and turn to python wrapper which is very easy for training and predicting. You can find the tutorial here http://nbviewer.ipython.org/github/BVLC/caffe/tree/master/examples/

On Thu, Jun 25, 2015 at 9:57 AM, febrary1992 notifications@github.com wrote:

@shuangao https://github.com/shuangao I've met the same problem, did you solve your problem?

— Reply to this email directly or view it on GitHub https://github.com/niuzhiheng/caffe/issues/23#issuecomment-115266046.

Cheers Shuang