Importing labeled ground truth data using Image Labeler
古いコメントを表示
I have labeled some data using Image Labeler. However, when I load gTruth labels and try to use the objectDetectorTrainingData(gTruth), I get the following error:
Error using boxLabelDatastore (line 216) Incorrect bounding box format. Bounding box must be an M-by-4 numeric matrix, where M specifies the number of boxes in a row. The column in the training data table that contains the bounding boxes must be a cell array.
data= load('exportedLabels.mat');
[imds,bxds] = objectDetectorTrainingData(data.gTruth);
Image Labeler seems to store bounding boxes as struct instead of Mx4 matrices, I reckon this might be the issue. How can I load the gTruth obj the right way?

How can I get gTruth data in the following format?

Any help will be much appreciated.
1 件のコメント
Rohan Sanghavi
2020 年 4 月 28 日
I too had the same question However I want to convert the full table into the bounding box format mentioned. I can’t do it individually And if I loop it then the data having more than 1 bounding box gets concatenated as a 1 by 8 array Please help in this regard as well
採用された回答
その他の回答 (1 件)
Ali Ozturk
2023 年 3 月 26 日
編集済み: Ali Ozturk
2023 年 3 月 26 日
0 投票
In the ImageLabeler tool, choose "To Workspace" from Export and select "table" as the "Export Format" instead of "ground truth" within "Export to workspace" window. Then, if you use that variable within Matlab, you may encounter less problem. The groundtruth data is too complicated to use in the Matlab code.
カテゴリ
ヘルプ センター および File Exchange で Ground Truth Labeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!