ZheC / Realtime_Multi-Person_Pose_Estimation

Code repo for realtime multi-person pose estimation in CVPR'17 (Oral)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined function or variable 'maskApiMex'.

chuanheliu opened this issue · comments

Thanks for you share.

Ubuntu16.04, matlab2015
Whild run genCOCOMask.m

>> genCOCOMask
1/ 21634
2/ 21634
3/ 21634
4/ 21634
5/ 21634
6/ 21634
6/ 21634
Undefined function or variable 'maskApiMex'.

Error in MaskApi.decode (line 84)
      masks = maskApiMex( 'decode', Rs );

Error in genCOCOMask (line 48)
                    mask_crowd = logical(MaskApi.decode( coco_kpt(i).annorect(p).segmentation ));
 

Both gcc 5.4 and gcc 3.7 don't work.

@qinannan Here is the solution for windows: #199
But I use ubuntu, how to fix it?

I fixed it by
mex('CFLAGS=\$CFLAGS -Wall -std=c99','-largeArrayDims','private/maskApiMex.c','../common/maskApi.c','-I../common/','-outdir','private');

Hi, I got another error I can't understand what kind of syntax error there. I tried with / ,\ , \\ delimiter but it doesn't work. The expression 'mex' has red underline.

mex('CFLAGS=$CFLAGS -Wall -std=c99','-largeArrayDims','dataset\COCO\coco\MatlabAPI\private\maskApiMex.c','dataset\COCO\coco\common\maskApi.c','-Idataset\COCO\coco\common','-outdir','dataset\COCO\coco\MatlabAPI\private');

The error shows>>
""
Error using MaskApi
Error: File: MaskApi.m Line: 69 Column: 5
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error.
To construct matrices, use brackets instead of parentheses.
""

I have solved the problem. I am able to generate mask. You should declare your mex expression under the specific function. Edit the MaskApi.m and placed the "mex(...........);" just after declared the function Rs and function masks...

methods( Static )
function Rs = encode( masks )
mex('CFLAGS=$CFLAGS -Wall...........................private');
Rs = maskApiMex( 'encode', masks );
end
function masks = decode( Rs )
mex('CFLAGS=$CFLAGS -Wall -std=c99'.....................private');
masks = maskApiMex( 'decode', Rs );

Dear,
I am facing the error and don't really understand if I need it under every function or what?
Can you help please