boxlabelDatastore for 2 or more classes

1 次查看(过去 30 天)
Hello everyone! I need some hel with a custom multiclass object detector. I'm new in matlab programming and I can't figure how to use boxlabeldatastore for 2 classes. I'm using a Tutorial video post by matlab but they only detect 1 class. I'd really appreciate some help
here's the code for the boxlabeldatastore
rng(0)
shuffledIndices = randperm(height(fileNames{1}));
idx = floor(0.7 * height(fileNames{1}));
trainingIdx = 1:idx;
TrainingSelectedIndices = shuffledIndices(trainingIdx);
trainingDataTbl = fileNames{1}(TrainingSelectedIndices,:);
trainingDataTblBX = labelData{1}(TrainingSelectedIndices,:);
imdsTrain = imageDatastore(trainingDataTbl);
bldBigRedBuoy = trainingDataTblBX(:,1);
bldBigGreenBuoy = trainingDataTblBX(:,2);
bldsTrain = boxLabelDatastore(bldBigRedBuoy,bldBigGreenBuoy);
bldsTrain = boxLabelDatastore(bldBigRedBuoy,bldBigGreenBuoy);
bldsTrain seems only use "bldBigRedBuoy"

回答(1 个)

Harsh
Harsh 2023-6-27
Hi @Isaac,
I believe bldsTrain has data from both the bldBigRedBuoy and bldBigGreenBuoy. The values for bldBigGreenBuoy are stacked at the bottom of bldBigRedBuoy. You can verify that by checking the size of bldBigRedBuoy and bldBigGreenBuoy. In the example above, it should be 183.
Check the documentation of boxlabeldatastore for more clarity -
Please let me know if this answers your query !

Community Treasure Hunt

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

Start Hunting!

Translated by