Dear Sir,
I got error when run the code of mask rcnn.
the error like below
but all the step I was follow correctly.
Unrecognized function or variable 'gasonMex'.
Error in gason (line 53)
out = gasonMex( 'convert', in );
Error in CocoApi (line 61)
coco.data=gason(fileread(annFile)); end
Error in unpackAnnotations (line 7)
coco = CocoApi(annotationFile);

7 comentarios

Walter Roberson
Walter Roberson el 9 de Mayo de 2023
The distribution there provides .mex* files for MacOS Intel, and for Linux. For Windows you would probably have to mex gasonMex.cpp and possibly maskApiMex.c as well. (I do not know if the package supports Windows; I do not see any remark indicating it does not support it.)
mohd akmal masud
mohd akmal masud el 9 de Mayo de 2023
Editada: mohd akmal masud el 9 de Mayo de 2023
the instruction like this:
To install: -For Matlab, add coco/MatlabApi to the Matlab path (OSX/Linux binaries provided) -For Python, run "make" under coco/PythonAPI -For Lua, run “luarocks make LuaAPI/rocks/coco-scm-1.rockspec” under coco/
but i quite dont understand
Walter Roberson
Walter Roberson el 10 de Mayo de 2023
If you are using MacOS or Linux, use pathtool to add the coco/MatlabApi folder to your MATLAB path.
If you are using Windows, you will need to compile the files. To do that you could try changing your current directory to coco/MatlabApi, and then giving the commands
mex gasonMex.cpp
mex maskApiMex.c
If both of those work, then add the coco/MatlabApi folder to your MATLAB path using pathtool.
mohd akmal masud
mohd akmal masud el 10 de Mayo de 2023
Editada: mohd akmal masud el 10 de Mayo de 2023
Ok sir, I will try today. Then let you know
mohd akmal masud
mohd akmal masud el 10 de Mayo de 2023
I tried. But got error
>> mex gasonMex.cpp
Building with 'Microsoft Visual C++ 2019'.
Error using mex
Creating library gasonMex.lib and object gasonMex.exp
gasonMex.obj : error LNK2019: unresolved external symbol "char const * __cdecl jsonStrError(int)" (?jsonStrError@@YAPEBDH@Z)
referenced in function mexFunction
gasonMex.obj : error LNK2019: unresolved external symbol "public: void __cdecl JsonAllocator::deallocate(void)"
(?deallocate@JsonAllocator@@QEAAXXZ) referenced in function "public: __cdecl JsonAllocator::~JsonAllocator(void)"
(??1JsonAllocator@@QEAA@XZ)
gasonMex.obj : error LNK2019: unresolved external symbol "int __cdecl jsonParse(char *,char * *,union JsonValue *,class
JsonAllocator &)" (?jsonParse@@YAHPEADPEAPEADPEATJsonValue@@AEAVJsonAllocator@@@Z) referenced in function mexFunction
gasonMex.mexw64 : fatal error LNK1120: 3 unresolved externals
mohd akmal masud
mohd akmal masud el 10 de Mayo de 2023
Editada: mohd akmal masud el 10 de Mayo de 2023
YAH..I WAS TRY THE METHOD BUT STILL ERROR

Iniciar sesión para comentar.

 Respuesta aceptada

Shivam Malviya
Shivam Malviya el 19 de Mayo de 2023

0 votos

Hi,
It appears that you are currently working on instance segmentation using Mask R-CNN and using the COCO API for MATLAB to access the annotation data; however, you are running into an error that "gasonMex" is unrecognized.
This error causing is because the gason parser is not being compiled. To compile it, follow the instruction below:
  • Clone the COCO API GitHub repository as using the following command:
git clone https://github.com/cocodataset/cocoapi
  • In MATLAB, change your current directory to "cocoapi/MatlabAPI".
  • Ensure that your system has a version of GCC that supports C++11 (version 4.7 or later).
  • To compile the gason parser, execute the following MATLAB command:
mex('CXXFLAGS=$CXXFLAGS -std=c++11 -Wall','-largeArrayDims','private/gasonMex.cpp','../common/gason.cpp', '-I../common/','-outdir','private');
Refer to the following links for a better understanding;
  • https://in.mathworks.com/help/deeplearning/ug/instance-segmentation-using-mask-rcnn.html
  • https://github.com/cocodataset/cocoapi
Regards,
Shivam

Más respuestas (0)

Categorías

Más información sobre Image Processing and Computer Vision en Centro de ayuda y File Exchange.

Preguntada:

el 9 de Mayo de 2023

Respondida:

el 19 de Mayo de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by