There is a problem running minibatchqueue function.
古いコメントを表示
I'm lerning yolo v3 with https://ww2.mathworks.cn/help/vision/ug/object-detection-using-yolo-v3-deep-learning.html?searchHighlight=YOLO&s_tid=srchtitle.
I made my data set. Here is a part of it.

I run my dataset and an error occurs at this step.
mbqTrain = minibatchqueue(preprocessedTrainingData, 2,...
"MiniBatchSize", miniBatchSize,...
"MiniBatchFcn", @(images, boxes, labels) createBatchData(images, boxes, labels, classNames), ...
"MiniBatchFormat", ["SSCB", ""],...
"DispatchInBackground", dispatchInBackground,...
"OutputCast", ["", "double"]);
It says: Error using minibatchqueue, Unable to apply function specified by 'MiniBatchFcn' value.
Caused by: Error using cat, Dimensions of arrays being concatenated are not consistent.
I checked and found that when running the function createBatchData:
function [XTrain, YTrain] = createBatchData(data, groundTruthBoxes, groundTruthClasses, classNames)
some of the data in the input argumentsr groundTruthBoxes become empty. LIke the third line:

But it's supposed to have a 3*4double data here. But it just disappear.
I dont know whether other people have met this question, or it just me. But I'm really frustrated with this question.
Please help me.
回答 (1 件)
泽宇 王
2021 年 5 月 18 日
0 投票
1 件のコメント
bipun manpati
2021 年 5 月 29 日
hi there,
I would like to know if this error is due to the same size of width and height of the image. as you have mentioned the image size is 612. i had checked in vehicle dataset and found that it has different size of width and height. For my case, image size is 256*256* 3 and found all bounding boxes empty.
カテゴリ
ヘルプ センター および File Exchange で Language Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!