gTruth ist invalid in meinem Code

1 visualización (últimos 30 días)
Steven Schneiders
Steven Schneiders el 24 de Nov. de 2023
Respondida: Ramtej el 7 de Dic. de 2023
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?

Respuestas (1)

Ramtej
Ramtej el 7 de Dic. de 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!!

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!