Video Labelling for Video Classification (LSTM)

조회 수: 4 (최근 30일)
Richie Chang
Richie Chang 2020년 12월 2일
답변: Richie Chang 2021년 1월 8일
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에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by