I am getting the below error while running the Faster RCNN please help me to understand what is this error represent and how can i fix this. Thank You in Advance.

1 次查看(过去 30 天)
Index exceeds matrix dimensions.
Error in vision.internal.cnn.parseInputsFasterRCNN>iGetBoxSizesPerClass (line 337)
minLength = min( min(allBoxes(:,[3 4])) );
Error in vision.internal.cnn.parseInputsFasterRCNN (line 194)
allBoxesPerClass = iGetBoxSizesPerClass(trainingData, params);
Error in trainFasterRCNNObjectDetector (line 239)
vision.internal.cnn.parseInputsFasterRCNN

回答(1 个)

David Ding
David Ding 2017-9-25
Hi,
This error means that in line 337 of the function "iGetBoxSizesPerClass" in the file vision.internal.cnn.parseInputsFasterRCNN, which you can open via:
>> edit vision.internal.cnn.parseInputsFasterRCNN
the indexing inside the "allBoxes" array is greater than the size of that array. This is analogous to "Index Out of Bounds" error.
The best way to debug this is to place a break point at this line and run your program. Your program will stop at this line, and you may examine the size of the "allBoxes" array. If the array's dimensions are not matching the index that you are trying to access, step back and investigate why this is the case.
All the best,
David

Community Treasure Hunt

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

Start Hunting!

Translated by