caffe icon indicating copy to clipboard operation
caffe copied to clipboard

MATLAB wrapper for Windows

Open ssakhavi opened this issue 10 years ago • 12 comments

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.

ssakhavi avatar Jul 23 '14 09:07 ssakhavi

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.

mjmarin avatar Aug 04 '14 18:08 mjmarin

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

niuzhiheng avatar Aug 05 '14 03:08 niuzhiheng

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.

jotaf98 avatar Sep 09 '14 22:09 jotaf98

@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

CMeteor avatar Dec 11 '14 03:12 CMeteor

@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.

mjmarin avatar Dec 11 '14 08:12 mjmarin

@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']);

yimingchan avatar Dec 11 '14 09:12 yimingchan

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

CMeteor avatar Dec 12 '14 01:12 CMeteor

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

shuangao avatar Jan 05 '15 20:01 shuangao

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

iiwindii avatar Apr 03 '15 14:04 iiwindii

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

iiwindii avatar Apr 03 '15 14:04 iiwindii

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

febrary1992 avatar Jun 25 '15 13:06 febrary1992

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 [email protected] 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

shuangao avatar Jun 25 '15 14:06 shuangao