Video Labelling for Video Classification (LSTM)

1 次查看(过去 30 天)
Excuse me,
I want to ask how to make a video to be a label ?
its like imds but for a video (MATLAB R2018B)
example on imds
imds = imageDatastore('TrainingData','IncludeSubFolders',true','LabelSource','foldernames');

采纳的回答

Richie Chang
Richie Chang 2021-1-8
function for reading the labels.
function [files, labels] = TrainingDataFiles(dataFolder)
fileExtension = ".mp4";
listing = dir(fullfile(dataFolder, "*", "*" + fileExtension));
numObservations = numel(listing);
files = strings(numObservations,1);
labels = cell(numObservations,1);
for i = 1:numObservations
name = listing(i).name;
folder = listing(i).folder;
[~,labels{i}] = fileparts(folder);
files(i) = fullfile(folder,name);
end
labels = categorical(labels);
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by