Hi, I am doing a project that load a f.mat, which a exported from Image Lableler. Can someone help me to fix the error below ?plz
1 回表示 (過去 30 日間)
古いコメントを表示
%%設定路徑(SignPath=positive image ; noSignPath = negative image)
SignPath= fullfile('C:','Users','Administrator','Desktop','build model','380to780hyper(D5200)','matlab course','7_objectDetection','test1-28');
noSignPath= fullfile('C:','Users','Administrator','Desktop','build model','380to780hyper(D5200)','matlab course','7_objectDetection','nosignpath');
%%label positive samples (使用labler app)
imageLabeler(SignPath);
I use the imagelabeler to finish labeling and export with the name f.mat
load('f.mat');
addpath(SignPath);
%%train a cascade object detector called signdetector.xml using HOG feature
num = 2
switch num
case 1
trainCascadeObjectDetector('signdetector.xml',gTruth,noSignPath,'FlaseAlarmRate',0.1,'NumCascadeStages',4);
case 2
trainCascadeObjectDetector('signdetector.xml',gTruth,noSignPath,'FlaseAlarmRate',0.01,'NumCascadeStages',4);
end
Error started here:
Can any one teach me how to transfer gTruth type to struct , char, table?? Thx!
here's a code example from https://ww2.mathworks.cn/help/vision/ug/train-a-cascade-object-detector.html?#btuo74_
I dont know why they can load .mat file as table type? Instead of mine
1 件のコメント
Mohammad Sami
2020 年 1 月 29 日
Ground Truth object has a property called LabelData which is in table form.
回答 (1 件)
Rajani Mishra
2020 年 2 月 11 日
Function trainCascadeObjectDetector() accepts “positiveInstances” argument of type struct, char, table whereas gTruth is of type groundTruth object. groundTruth object has “labelDefinitions” and “LabelData” properties. LabelData property contains label data for each ROI and scene label, specified as a table for image collections or a timetable for videos or image sequence.
You can use LabelData instead of using gTruth object itself. For more information about gTruth object please refer below(refer to the examples section):
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!