trainFaste​rRCNNObjec​tDetector does not work

1 visualización (últimos 30 días)
YUNYI GUANG
YUNYI GUANG el 6 de Jul. de 2019
Comentada: Dheeraj Singh el 5 de Ag. de 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 comentarios
YUNYI GUANG
YUNYI GUANG el 6 de Jul. de 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 el 5 de Ag. de 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:

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by