trainingOptions for a RCNN detector with AlexNet

6 ビュー (過去 30 日間)
Andrei Agârbiceanu
Andrei Agârbiceanu 2022 年 6 月 25 日
コメント済み: Image Analyst 2022 年 6 月 26 日
Hello everyone!
I would like to train an RCNN network to detect traffic signs. CNN's network (net) is AlexNet, which has already been trained and tested to recognize traffic signs (94% test accuracy).
Below are the options I used to train the RCNN network. During training I obtained an accuracy of 84%, but on the test side it does not find many signs (I have an accuracy of 25% if the score> 0.5).
I would like to have more signs detected and I suspect that the problem is with the options chosen for training. Can someone please help me with the training options?
options = trainingOptions('sgdm', ...
'MiniBatchSize', 128, ...
'InitialLearnRate', 1e-3, ...
'LearnRateSchedule', 'piecewise', ...
'LearnRateDropFactor', 0.1, ...
'LearnRateDropPeriod', 100, ...
'MaxEpochs', 30, ...
'Verbose', true);
rcnn = trainRCNNObjectDetector(DataTrain, net, options, ...
'NegativeOverlapRange', [0 0.3], 'PositiveOverlapRange',[0.5 1]);
[bbox, score, label] = detect(rcnn, img, 'MiniBatchSize', 128);

回答 (1 件)

Image Analyst
Image Analyst 2022 年 6 月 25 日
Why are you retraining it when you said it has already been trained to recognize stop signs? If that's true, just delete the first two lines of your code and just have the call to detect.
If the accuracy is not high enough, you can do transfer learning (re-train alexnet) for a "stop-sign-only detector" by supplying a ton of stop sign images. It will be better but it won't be able to detect anything else. Is that what you're thinking of doing? How many stop signs do you have? Do you know how many stops signs the original alexnet training had? You should have many, many more than that.
Also, see section
  2 件のコメント
Image Analyst
Image Analyst 2022 年 6 月 26 日
Try training longer, or using more training images, or use higher resolution network. alexnet has only 227x227 which is extremely low spatial resolution especially if the sign takes up only a small fraction of the scene.


Community Treasure Hunt

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

Start Hunting!

Translated by