trainCasca​deObjectDe​tector does not work with image laberel

4 次查看(过去 30 天)
I am attempting to use COD-Detector in MATLAB to detect regions of interest (ROIs). To define positiveInstances, I used Image Labeler to identify the ROIs and then exported the groundTruth to the workspace. However, I keep encountering an error message indicating that the data is invalid. I have attempted to export the ROIs as both groundTruth and as a table from Image Labeler, but I still receive the error message. What steps can I take to resolve this issue?"
%% COD Training
%% Load positive images and bounding boxes of bikes
load imageLabelingSession % Hier Training von Image Labeler mit Personen
%% Step 2: Specify folder with negative images
negativeFolder = 'C:\Users\Alami Merrouni\OneDrive\Desktop\7. Semster\Bachelorarbeit\Liegende Personen detektieren\Trainingsdaten\keine Personen'; % Hier Bilder von keine Personen einfügen
%% Step 3: Train the detector
NumStages = 5;
FAR = 0.05;
trainCascadeObjectDetector('detectcodtraining_5_5.xml', person, negativeFolder,...
'NumCascadeStages', NumStages, 'FalseAlarmRate', FAR);
the Error:
Error using trainCascadeObjectDetector>parseInputs
The value of 'positiveInstances' is invalid. Expected input number 2, positiveInstances, to be one of these types:
struct, char, table, matlab.io.datastore.Datastore, matlab.io.Datastore
Instead its type was groundTruth.
Error in trainCascadeObjectDetector (line 210)
parser = parseInputs(varargin{:});
Error in coddetetctor (line 25)
trainCascadeObjectDetector('detectcodtraining_5_5.xml', gTruth, negativeFolder,...
  1 个评论
Ibrahim alami merroui
i solved it, the answer is:
the variable 'person' must be Gtruth as a table of (m X 2)
That means by exporting the Gtruth data to the workspace it should be as a table.

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by