- selectLabelsByGroup(): https://www.mathworks.com/help/vision/ref/groundtruth.selectlabelsbygroup.html
- selectLabelsByName(): https://www.mathworks.com/help/vision/ref/groundtruth.selectlabelsbyname.html
Training the RCNN Detector with multivariable from groundtruth
1 回表示 (過去 30 日間)
古いコメントを表示
Abdussalam Elhanashi
2019 年 9 月 5 日
回答済み: Kritika Bansal
2019 年 9 月 13 日
Hi guys
Hope you are doing well
I have one code which is for Traning the RCNN object detector for detecting the smoke
i made dataset for labelling set of images which have many variable such as sky cars people smoke however i want in my code that to train the detector to detect smoke and not to detect the other variables which are labelled
currently in my code i can only make selecetlabels for smoke and traning the detector with smoke but i want to know how to select other variables and train the detector not to detect or select other variables
herein my code
load('gTruth.mat')
smokedetection = selectLabels(gTruth,'smoke');
if isfolder(fullfile('TrainingData'))
cd TrainingData
else
mkdir TrainingData
end
addpath('TrainingData');
options = trainingOptions('sgdm', ...
'MiniBatchSize', 32, ...
'InitialLearnRate', 1e-6, ...
'MaxEpochs', 10);
layers = [
imageInputLayer([32 32 3],"Name","imageinput")
convolution2dLayer([5 5],32,"Name","conv","BiasLearnRateFactor",2,"Padding",[2 2 2 2],"WeightsInitializer","narrow-normal")
maxPooling2dLayer([3 3],"Name","maxpool","Stride",[2 2])
reluLayer("Name","relu")
averagePooling2dLayer([3 3],"Name","avgpool","Stride",[2 2])
fullyConnectedLayer(2,"Name","fc_rcnn","BiasL2Factor",1,"BiasLearnRateFactor",10,"WeightLearnRateFactor",20,"WeightsInitializer","narrow-normal")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
trainingData = objectDetectorTrainingData(smokedetection,'SamplingFactor',1,...
'WriteLocation','TrainingData');
detector = trainRCNNObjectDetector(trainingData, layers, options, ...
'NegativeOverlapRange', [0 0.3]);
save('Detector.mat','detector');
0 件のコメント
採用された回答
Kritika Bansal
2019 年 9 月 13 日
Hi,
As per my understanding, you need a way to train the RCNN object detector to detect classes other than smoke.
Assuming you are using MATLAB R2019a, you can use the following functions to select the ground truth data for a set of labels:
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!