detectMaskRCNN: YRCNNreg not the correct size
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am newer to coding, and have been working on mask rcnn project to identify Stryker Miltary Vehicles in images. I trained the maskrcnn network with no problems with the help of the mask rcnn training example and matlab answers, but when I tried to run the function detectMaskRCNN I am getting errors. The main error is that after running lines 39-45 in the Matlab's detectMaskRCNN funciton the YRCNNReg variable and the bboxes are not the same size. I know that it is the YRCNNReg variable that is not the correct size after reading the documentation YRCNNReg is supposed to be [numClasses*4 numObs]. Both are using numClasses but YRCNNReg is including the background class. For example YRCNNReg size is 8x1000 single and bboxes is a 1000x4 single. The params parameter that is passed in indicates that the numClasses to detect is 1. So I am not sure how to fix this size discrepancy. Thanks so much for your help!
Question
So my question is "how can I get YRCNNReg to be the correct size?"
Error:
Arrays have incompatible
sizes for this operation.
Error in
helper.applyRegression
(line 24)
gx = boxIn(:,3).*x +
px; % center position
Error in detectMaskRCNN
(line 93)
bboxes =
helper.applyRegression(bboxes,
reg, params.MinSize,
params.MaxSize);
Code that is being ran:
line 38: % Run prediction on the inputs
line 39: [bboxes, YRCNNClass, YRCNNReg, featureMap] = predict(...
line 40: dlnet, X, 'Outputs', outputNodes);
line 41:
line 42 % Extract data from the output dlarrays
line 43: bboxes = extractdata(bboxes)';
line 44: YRCNNClass = extractdata(YRCNNClass);
line 45: YRCNNReg = extractdata(YRCNNReg);
...
line 93: bboxes = helper.applyRegression(bboxes, reg, params.MinSize,params.MaxSize);
My Code
1 comentario
Respuestas (0)
Ver también
Categorías
Más información sobre Deep Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!