trainFaste​rRCNNObjec​tDetector does not work

1 Ansicht (letzte 30 Tage)
YUNYI GUANG
YUNYI GUANG am 6 Jul. 2019
Kommentiert: Dheeraj Singh am 5 Aug. 2019
clear all
close all
clc
FIRE_PATH = 'DataSet\posFire\';
load('DataSet\posFire\fires_training.mat');
% set up parameters
doTrainingAndEval = true;
options = trainingOptions('sgdm', ...
'MaxEpochs', 5, ...
'MiniBatchSize', 1, ...
'InitialLearnRate', 1e-3, ...
'CheckpointPath', tempdir);
if doTrainingAndEval
% Train Faster R-CNN detector.
% * Use 'vgg16' as the feature extraction network.
% * Adjust the NegativeOverlapRange and PositiveOverlapRange to ensure
% training samples tightly overlap with ground truth.
[detector, info] = trainFasterRCNNObjectDetector(fires_training, 'vgg16', options, ...
'NegativeOverlapRange', [0 0.3], ...
'PositiveOverlapRange', [0.6 1]);
save(strcat(FIRE_PATH,'fasterRCNNVgg16FireDetection.mat'), 'detector');
else
% Load pretrained detector for the example.
pretrained = load('fasterRCNNResNet50FireDetection.mat');
detector = pretrained.detector;
end
% testing
I = imread('DataSet\posFire\Testing\6_12.jpg');
[box, score, label] = detect(detector, I);
Hi all, I met a problem when using the detect function which is displayed in the last two lines. When I run the code to test one image, the returning box and score are null. I don't know whether there is something wrong with the detector or not. But everything goes well when I use the ResNet50 rather than VGG16.
My MATLAB version is 2018b.
Please help me!
  2 Kommentare
YUNYI GUANG
YUNYI GUANG am 6 Jul. 2019
For further information, the vgg16 detector I've trained is shared with this link: https://drive.google.com/open?id=1DU1104zvvNMAPF2K_1mO6CJoHdnmguGH
Thanks all!
Dheeraj Singh
Dheeraj Singh am 5 Aug. 2019
Using the mat file, you provided, we can see that the network might not have converged. Please check the training parameters. Please refer to the following link for setting the parameters:

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Recognition, Object Detection, and Semantic Segmentation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by