gTruth ist invalid in meinem Code
1 view (last 30 days)
Show older comments
Ich bekomme bei diesem Code einen Error:
clear all;
clc;
load('erkannte_zebras_label.mat', 'gTruth', '-mat');
Zebrastreifen = gTruth.DataSource.Source;
imds = imageDatastore(Zebrastreifen);
plds = pixelLabelDatastore(gTruth);
positiveInstances = combine(imds, plds);
negativeFolder = 'Ordnermitnegativeninstanzen';
trainCascadeObjectDetector('ZebrastreifenDetector.xml', positiveInstances, negativeFolder, 'FalseAlarmRate', 0.06, 'NumCascadeStages', 7)
der Error:
Error using pixelLabelDatastore>parseGroundTruthInputs
The value of 'gTruth' is invalid. groundTruth objects must contain a label definition table with PixelLabel type.
Error in pixelLabelDatastore (line 206)
[gTruth, params] = parseGroundTruthInputs(varargin{:});
Error in trainer (line 9)
plds = pixelLabelDatastore(gTruth);
Die gTruth Variable enthält LabelData, LabelDefinitions und DataSource.
Fehlt dort etwas?
0 Comments
Answers (1)
Ramtej
on 7 Dec 2023
Hi Steven,
Da ich kein deutscher Muttersprachler bin, beantworte ich die Frage auf Englisch
I understand that you are encountering an error while loading the "gTruth" variable using the "load" command. The error is likely due to an invalid path to the MAT file or file missing in the current folder.
To resolve this issue, ensure the correctness of the MAT file name/ path and file existence.
Hope this helps!!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!