MATLAB Answers

Size of an input image in Object detection using AlexNet transfer Learning

12 views (last 30 days)
hanish lakhani
hanish lakhani on 24 Jun 2018
Answered: Prajit T R on 28 Jun 2018
Hi I am trying to use transfer learning using Alexnet in an example "Object Detection Using Deep Learning" Below is the modification that I have done cifar10Net = alexnet; doTraining = True; if doTraining
% Set training options
options = trainingOptions('sgdm', ...
'MiniBatchSize', 128, ...
'InitialLearnRate', 1e-3, ...
'LearnRateSchedule', 'piecewise', ...
'LearnRateDropFactor', 0.1, ...
'LearnRateDropPeriod', 100, ...
'MaxEpochs', 100, ...
'Verbose', true);
% Train an R-CNN object detector. This will take several minutes.
rcnnStopNet= trainRCNNObjectDetector(stopSigns, cifar10Net, options, ...
'NegativeOverlapRange', [0 0.3], 'PositiveOverlapRange',[0.5 1])
save rcnnStopNet;
else
% Load pre-trained network for the example.
load('rcnnStopNet.mat','rcnn')
end
For same set of images (Stop Signs) ,Training happens successfully but results are less accurate when using original Cifar10 net.
1) Am I doing something wrong.
2) Do we need to resize STOP images to 227,227 when using Alexnet for transfer learning.

  0 Comments

Sign in to comment.

Answers (1)

Prajit T R
Prajit T R on 28 Jun 2018
Hi Hanish
Alexnet was trained using images of size 227,227 so you need to resize your training images using the 'imresize' function.
As for accuracy, 'alexnet' is a pre-trained network which may not be accurate for your specific use-case so you may have to perform some fine tuning with respect to the training parameters.
Prajit

  0 Comments

Sign in to comment.

Sign in to answer this question.