Skip to content

Commit

Permalink
update for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaoqingRen committed Dec 8, 2014
1 parent 400f6ac commit 3a4be95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nms/nms_multiclass_mex.cpp
Expand Up @@ -53,7 +53,7 @@ void nms(const mxArray *input_boxes, int iScoreIdx, double overlap, const vector
T xx2 = std::min(pBoxes[2*nSample + last], pBoxes[2*nSample + it_idx]);
T yy2 = std::min(pBoxes[3*nSample + last], pBoxes[3*nSample + it_idx]);

double w = std::max(0.0, xx2-xx1+1), h = std::max(0.0, yy2-yy1+1);
double w = std::max(0.0, (double)xx2-xx1+1), h = std::max(0.0, (double)yy2-yy1+1);

double ov = w*h / (vArea[last] + vArea[it_idx] - w*h);

Expand All @@ -77,7 +77,7 @@ void nms(const mxArray *input_boxes, int iScoreIdx, double overlap, const vector
}


void mexFunction(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if (nrhs != 2)
mexErrMsgTxt("Wrong number of inputs");
Expand Down Expand Up @@ -135,7 +135,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])

vector<int> nPick(nDim_boxes - 4, 0);
vector<vector<int> > vPicks(nDim_boxes - 4);
plhs[0] = mxCreateCellMatrix_730(nDim_boxes - 4, 1);
plhs[0] = mxCreateCellMatrix(nDim_boxes - 4, 1);

#pragma omp parallel for ordered schedule(dynamic)
for (int i = 0; i < vPicks.size(); ++i)
Expand Down
5 changes: 5 additions & 0 deletions startup.m
Expand Up @@ -34,4 +34,9 @@
mkdir_if_missing(fullfile(curdir, 'feat_cache'));
mkdir_if_missing(fullfile(curdir, 'imdb', 'cache'));

if ~ispc
hfile = [matlabroot '/extern/include/matrix.h'];
loadlibrary('libmx',hfile)
end

fprintf('SPP_net startup done\n');

0 comments on commit 3a4be95

Please sign in to comment.