Azzera filtri
Azzera filtri

error in faster rcnn matlab code with the minibatch size

4 visualizzazioni (ultimi 30 giorni)
As observed from the documentation available for Object Detection Using Faster R-CNN Deep Learning, it has been mentioned that the mini-batch size must be 1 for Faster R-CNN training, which processes multiple image regions from one training image every iteration. However, when we try to execute this, we encounter the error: The minibatchsize should be atleast '4'.
optionsStage1 =
trainingOptions('sgdm', ...
'MaxEpochs', 10, ...
'MiniBatchSize', 1, ...
'InitialLearnRate', 1e-3, ...
'CheckpointPath', tempdir);
when we change the minibatchsize to '4' it works. Does that mean the Faster R-CNN processes multiple image regions from four training images every iteration? It this right?
  7 Commenti
Fahad Parvez Mahdi
Fahad Parvez Mahdi il 25 Dic 2018
I cannot say exactly the reason, but in my experience the error is coming because the number of samples are too small/the feature information they gathered are not adeqaute enough to satisfy the condition [0.7] and therefore they couldn't propose such regions. Try to reduce 'PositiveOverlapRange'and try again.
Jacob Nye
Jacob Nye il 17 Feb 2019
Hi, I’ve seen this error (the one requring a minimum minibach of 4 instead of only 1) before when training faster RCNNs across different versions of MATLAB (MATLAB 2018a and MATLAB 2018b). I‘m going to guess that the reason you‘re getting this error saying the minibatch size must be at least 4 is because you‘re running the function on MATLAB 2018a or older. MATLAB changed the mandatory minibatch size between MATLAB 2018a and 2018b and the example online assumes a 2018b MATLAB version (for reference, you can find the change explained here under the “functionality being removed or changed” section of 2018b. For what its worth, in my brief experience trying to train a faster rcnn on Matlab 2018a with a minibatch size of 4, I saw much worse performance on my validation set and a more unstable training than with MATLAB 2018b and a batch size of one.

Accedi per commentare.

Risposte (2)

numi khnax
numi khnax il 25 Ott 2018
I was trying yesterday and got the same error. I hope someone replies/address this issue.
It is actually an example shared by Matlab (https://www.mathworks.com/help/vision/examples/object-detection-using-faster-r-cnn-deep-learning.html)

ziwei li
ziwei li il 17 Gen 2019
I try the same example ,and got the same error of minibatchsize. But faster-rcnn require a batchsize of 1 .
Have you find the solution? Can you share with us?Thank you!

Community Treasure Hunt

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

Start Hunting!

Translated by