필터 지우기
필터 지우기

trainCasca​deObjectDe​tector does not work with image laberel

조회 수: 1 (최근 30일)
Ibrahim alami merroui
Ibrahim alami merroui 2023년 5월 1일
댓글: Ibrahim alami merroui 2023년 5월 1일
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
Ibrahim alami merroui 2023년 5월 1일
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