rbgirshick / voc-dpm

Object detection system using deformable part models (DPMs) and latent SVM (voc-release5). You may want to use the latest tarball on my website. The github code may include code changes that have not been tested as thoroughly and will not necessarily reproduce the results on the website.
http://www.cs.berkeley.edu/~rbg/latent/
MIT License
582 stars 308 forks source link

error running script compile.m on windows , matlab2015 #14

Closed kkhetarpal closed 8 years ago

kkhetarpal commented 8 years ago

I am trying to run the compile script on a windows machine , with MATLAB 2015.

However, I am facing the following error with the compile.m script:

>> compile
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex
resize.cc 
C:\Users\Pallavi\Documents\Khimya\voc-release3.1\resize.cc(36) : error C2057: expected        constant expression
C:\Users\Pallavi\Documents\Khimya\voc-release3.1\resize.cc(36) : error C2466: cannot allocate   an array of constant size 0
C:\Users\Pallavi\Documents\Khimya\voc-release3.1\resize.cc(36) : error C2133: 'ofs' : unknown size
C:\Users\Pallavi\Documents\Khimya\voc-release3.1\resize.cc(70) : error C3861: 'bzero': identifier not found

Error in compile (line 1)
mex -O resize.cc

I did follow the read me and tried all three convolution options as mentioned in step 3 "(you may need to edit compile.m to use a different convolution routine depending on your system) "

Could you please suggest if this code would work in windows ? Also, how could one fix the above issue ? It will be of great help. Thanks.

kkhetarpal commented 8 years ago

This below two links help me get rid of all the errors related to resize.cc and dt.cc

  1. http://blog.csdn.net/jiyangsb/article/details/38713119
  2. http://www.mathworks.com/matlabcentral/answers/157130-compiling-mex-on-win7-x64

If anyone faces the same error. Hope it helps. However, I am still facing a mex related errors while compiling

Error using mex
Unknown MEX argument '-o'.

Error in compile (line 9)
mex -O fconvblas.cc -lmwblas -o fconv

Any suggestions ? Thanks

kkhetarpal commented 8 years ago

Fixed the above problem by following the below steps Edit the compile.m script by replacing

mex -O fconv.cc -o fconv

with

mex -O fconv.cc

If you are using the third option(the above convolution option), running the compile script now leads to the following error

Error using mex
fconv.cc
error C4716: 'process' : must return a value

This link here - https://code.csdn.net/snippets/128261 , helped resolve this issue, and I successfully ran the compile script and hence the demo script for detection :relieved:

P.S. I am using the version 3 release as I am using this code only as a prerequisite for http://people.csail.mit.edu/tjudd/WherePeopleLook/index.html

Ayehsu commented 7 years ago

how to solve for error C4716: 'process' : must return a value