Video Labelling for Video Classification (LSTM)

1 vue (au cours des 30 derniers jours)
Richie Chang
Richie Chang le 2 Déc 2020
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');

Réponse acceptée

Richie Chang
Richie Chang le 8 Jan 2021
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

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by