gTruth ist invalid in meinem Code

조회 수: 1 (최근 30일)
Steven Schneiders
Steven Schneiders 2023년 11월 24일
답변: Ramtej 2023년 12월 7일
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!