Perform Instance Segmentation Using Mask R-CNN
7 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1256017/image.png)
so i get a error
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1256022/image.png)
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..?
0 个评论
采纳的回答
Shivam Malviya
2023-1-12
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!