Exporting from image labeler , gTruth embaty after labeling the images
4 次查看(过去 30 天)
显示 更早的评论
Hello
I am working on detecting road in an image in order to avoid obstacle project. however, I want to detect the road by labeling it in many images using MATLAB imageLabeler tool. when I export to file the ground truth is empaty as I opened and checked it without any data
ps: I used pixel labeling for roads labeling in the images
visiondatadir = fullfile('C:\Users','TAREK','Desktop','labeler11');%%folder loaction
dataSource = groundTruthDataSource(visiondatadir)
imgDataStore = imageDatastore(visiondatadir)
buildingImage = imread(fullfile(visiondatadir,'1.jpg'));
buildingLabels = imread(fullfile(visiondatadir,'PixelLabelData','Label_1.png'));
labelIDs = [1];
labelcats = ["road"];
buildingLabelCats = categorical(buildingLabels,labelIDs,labelcats);
imshow(labeloverlay(buildingImage,buildingLabelCats)) %%showing first labeld image with labaled boundries
data=load('RgTruth.mat') %% warning given :Warning: While loading an object of class 'groundTruth':Too many input arguments.
roaddet = data.gTruth;
%roaddet.PixelLabelData = fullfile(visiondatadir,roaddet.PixelLabelData);
dataSource = groundTruthDataSource(visiondatadir)
trainingData = objectDetectorTrainingData(gTruth) %% error: Error using vision.internal.trainingData.checkGroundTruthSources (line 9) Expected ground truth to have at least one valid source. Error in objectDetectorTrainingData>validateInputs (line 155) vision.internal.trainingData.checkGroundTruthSources(gTruth, writeParams.Location, samplingFactor);Error in objectDetectorTrainingData (line 131) [gTruth, samplingFactor, writeParams, isVideoOrCustomSource, labelNames] = validateInputs(varargin{:});
my main question is how can I export anduse gtruth correctly then using it to train a network to detect the labeled object(similer to the example of detceting the signstop (openExample('deeplearning_shared/DeepLearningRCNNObjectDetectionExample'))) : in my case roads.
thank you in advance.
0 个评论
回答(2 个)
awezmm
2019-2-28
Sometimes the the order of the labeled data files gets reversed when saving the labeled data. Try overlaying your last image on your first label. Also make sure the filenames in the fullfile variable are in the correct order by visually checking the variable
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image and Video Ground Truth Labeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!