How to load data from Video Labelled Sessions?

2 次查看(过去 30 天)
I am trying to create yolo_v2 object detection model. For this I have .mp4 video file which is labeled using MATLAB Video Labeller. The labelled data is stored as groundTruth in MATLAB workspace.
The Structure of the ground_truth
TIME PEN BLUE_PEN AC_REMOTE
%labels is the original groundTruth variable
video_bbox = labels.LabelData;
rng(0);
shuffledIndices = randperm(height(video_bbox));
idx = floor(0.8 * length(shuffledIndices) );
trainingIdx = 1:idx;
trainingDataTbl = video_bbox(shuffledIndices(trainingIdx),:);
validationIdx = idx+1 : idx + 1 + floor(0.1 * length(shuffledIndices) );
validationDataTbl = video_bbox(shuffledIndices(validationIdx),:);
imdsTrain = imageDatastore(trainingDataTbl{:,'Time'});
bldsTrain = boxLabelDatastore(trainingDataTbl(:,{'Pen','Blue_Pen','AC_Remote'}));
imdsValidation = imageDatastore(validationDataTbl{:,'Time'});
bldsValidation = boxLabelDatastore(validationDataTbl(:,{'Pen','Blue_Pen','AC_Remote'}));
trainingData = combine(imdsTrain,bldsTrain);
validationData = combine(imdsValidation,bldsValidation);
%error
Error using yolo (line 11)
Unrecognized table variable name 'Time'.

回答(1 个)

Rishik Ramena
Rishik Ramena 2020-11-3
LabelData is a timetable which is different than a regular table. If you need to access the time column as well you might want to consider using timetable2table. You can also access the Time column from timetables using a dot notation as mentioned here.
TLDR: convert the timetable to table as shown below and this should work.
video_bbox = timetable2table(labels.LabelData); %convert timetable to table

类别

Help CenterFile Exchange 中查找有关 Recognition, Object Detection, and Semantic Segmentation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by