Created
April 17, 2016 21:15
-
-
Save kracwarlock/96499936487d6125dd010319669c6648 to your computer and use it in GitHub Desktop.
FIle for combining .mat files generated by http://www.cs.toronto.edu/~yukun/extracting_feature.m into a single h5 file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
load imdbTmV.mat; | |
frames = dlmread('train_framenum.txt'); | |
totalframes = sum(frames); | |
matObj = matfile('train_features.h5','Writable',true); | |
matObj.features(50176, totalframes) = single(0); | |
frames_seen = 0; | |
for i = 1:size(frames,1) | |
fprintf('%d\n',i); | |
a = strsplit(imdb.trainset{i},'/'); | |
a = strsplit(a{end},'.'); | |
a = a{1}; | |
filename = strcat('/ais/gobi3/u/shikhar/hmdb/dataset/split1/feat_cache/',a,'.mat'); | |
load(filename); | |
feat = full(feat); | |
matObj.features(1:50176,frames_seen+1:frames_seen+frames(i)) = single(feat'); | |
clear('feat'); | |
frames_seen = frames_seen + frames(i); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment