Video Labelling for Video Classification (LSTM)

Illustration
prveenahmed_78 - 2021-04-16T14:59:21+00:00
Question: Video Labelling for Video Classification (LSTM)

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');

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

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


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!