Perform Instance Segmentation Using Mask R-CNN

thank you to click
i just following 'Perform Instance Segmentation Using Mask R-CNN' example
URL : "https://kr.mathworks.com/help/vision/ug/example-InstanceSegmentationUsingMaskRCNNDeepLearningExample.html"
I have download the file(instances_train2014.json, cocoapi-master, unpackAnnotations.m(was in helper file) )
but i don't know how to compling gason.
so i get a error
i just copy the example and change the file path
%download traindata
imageFolder = fullfile(dataFolder,"images");
captionsFolder = fullfile(dataFolder,"annotations");
if ~exist(imageFolder,"dir")
mkdir(imageFolder)
mkdir(captionsFolder)
end
annotationFile = fullfile(captionsFolder,"instances_train2014.json");
str = fileread(annotationFile);
%read and process training data
trainClassNames = ["person","car"];
numClasses = length(trainClassNames);
imageSizeTrain = [800 800 3];
cocoAPIDir = fullfile(dataFolder,"cocoapi-master","MatlabAPI");
addpath(cocoAPIDir);
unpackAnnotationDir = fullfile(dataFolder,"annotations_unpacked","matFiles");
if ~exist(unpackAnnotationDir,'dir')
mkdir(unpackAnnotationDir)
end
helper.unpackAnnotations(trainClassNames,annotationFile,imageFolder,unpackAnnotationDir);
%create data
i want to train coco dataset but i don't know c++ compling
how can i get complied data..?

 採用された回答

Shivam Malviya
Shivam Malviya 2023 年 1 月 12 日

0 投票

Hi Young Hun,
I understand you are working with the example Perform Instance Segmentation Using Mask R-CNN, and you are facing issues with the compilation of the gason parser.
In the file "gason.m", at line number 21, there is a command to compile the "gasonMex.cpp" file into a MEX file. Below is the command mentioned in the file;
mex('CXXFLAGS=\$CXXFLAGS -std=c++11 -Wall','-largeArrayDims','.\private\gasonMex.cpp','..\common\gason.cpp','-I..\common\','-outdir','private');
While executing this command if you encounter the following error;
Error using mex
g++: error: \-fexceptions: No such file or directory
Try out the following command;
mex('CXXFLAGS=$CXXFLAGS -std=c++11 -Wall','-largeArrayDims','.\private\gasonMex.cpp','..\common\gason.cpp','-I..\common\','-outdir','private');
Hope this helps!
Regards,
Shivam Malviya

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by