How do I edit a gTruth object if I mislabelled the label?
16 views (last 30 days)
Show older comments
I've been using groundTruthLabeler a LOT and I was wondering how I can edit Labels in the gTruth object that I'm creating from exporting the labels into a .mat file. It's created as read-only..
0 Comments
Answers (2)
Anand
on 4 Jun 2018
Here is some pseudo-code to help anyone else who wants to do this.
% Load old groundTruth MAT file
load oldGTruth;
% Extract data from old ground truth.
dataSource = oldGTruth.DataSource;
labelDefs = oldGTruth.LabelDefinitions;
labelData = oldGTruth.LabelData;
% Replace oldName with newName
% oldName = 'Car'; newName = 'Sedan';
labelDefs.Name = strrep(labelDefs.Name, oldName, newName);
labelData.Properties.VariableNames = strrep(labelData.Properties.VariableNames, oldName, newName);
% Create new groundTruth object
newGTruth = groundTruth(dataSource, labelDefs, labelData);
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!