error in faster rcnn matlab code with the minibatch size

7 visualizaciones (últimos 30 días)
Sivaramakrishnan Rajaraman
Sivaramakrishnan Rajaraman el 21 de Sept. de 2018
Comentada: Jacob Nye el 17 de Feb. de 2019
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 comentarios
Fahad Parvez Mahdi
Fahad Parvez Mahdi el 25 de Dic. de 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 el 17 de Feb. de 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.

Iniciar sesión para comentar.

Respuestas (2)

numi khnax
numi khnax el 25 de Oct. de 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 el 17 de En. de 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!

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by