Reading Combined Datastores Converts to Array ?
9 ビュー (過去 30 日間)
古いコメントを表示
I have a augmented image datastore and a box label datastore. I am able to read each individually and receive the appropriate syntax. Here is a my augmented image datastore image (I would have included a '.mat' file however since it has directories specific to my computer I do not believe the data will be able to be processed on another computer):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658560/image.jpeg)
Here is my box label datastore output (Note: the type of the output is a cell array when using the read function):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658565/image.jpeg)
I believe this is due to how I created my boxLabelDatastore since I used cell2table function, see code below:
blds = boxLabelDatastore(cell2table(lookup_matrix,'VariableNames',{'char_48','char_49','char_50','char_51','char_52','char_53','char_54','char_55','char_56','char_57'}));
When I combine these datastores the bounding box information is converted to an matrix rather than a cell array. See below for code/output:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/658570/image.jpeg)
This Var2 is the bounding box however it is nolonger a cell array which causes an error when attempting to train:
Error using vision.internal.cnn.validation.checkGroundTruthDatastore>iCheckBoxes (line 75)
The bounding box (2nd column) from the read method output of the training input datastore must be an M-by-1 cell array, containing elements of
N-by-4 double matrix, where N equals the number of bounding boxes.
Error in vision.internal.cnn.validation.checkGroundTruthDatastore (line 46)
mSize = iCheckBoxes(boxes);
Error in trainFasterRCNNObjectDetector>iParseInputs (line 1037)
params.ClassNames = vision.internal.cnn.validation.checkGroundTruthDatastore(trainingDs);
Error in trainFasterRCNNObjectDetector (line 408)
[trainingData, options, params] = iParseInputs(...
Error in main_rev1 (line 20)
detector = trainFasterRCNNObjectDetector(ds, lgraph, options, ...
0 件のコメント
回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!