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

4 ビュー (過去 30 日間)
hanish lakhani
hanish lakhani 2018 年 6 月 24 日
回答済み: Prajit T R 2018 年 6 月 28 日
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.

回答 (1 件)

Prajit T R
Prajit T R 2018 年 6 月 28 日
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

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by