gTruth ist invalid in meinem Code

2 次查看(过去 30 天)
Ich bekomme bei diesem Code einen Error:
clear all;
clc;
load('erkannte_zebras_label.mat', 'gTruth', '-mat');
Error using load
Unable to find file or directory 'erkannte_zebras_label.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?

回答(1 个)

Ramtej
Ramtej 2023-12-7
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!!

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!