-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptDebugDeepCrash.m
More file actions
37 lines (28 loc) · 976 Bytes
/
ScriptDebugDeepCrash.m
File metadata and controls
37 lines (28 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
moviename = '/home/mayank/Work/FlySpaceTime/walkMovies/SS03500_test/movie.ufmf';
trackfilename = '/home/mayank/Work/FlySpaceTime/walkMovies/SS03500_test/trx.mat';
stationary = true;
method = 'deep-sup';
flowname = 'DS';
ff = fopen('DebugDeepCrash.txt','w');
tracks = load(trackfilename);
tracks = tracks.trx;
[readfcn,nframes,fid,headerinfo] = get_readframe_fcn(moviename);
fclose(fid);
blocksize = 50;
minfirst = min([tracks.firstframe]);
maxlast = max([tracks.endframe]);
nframes = maxlast-minfirst+1;
nblocks = ceil((nframes-1)/blocksize);
allftrs ={};
% compute features in parallel for different intervals of frames.
% parfor ndx = 1:nblocks
for ndx = 41:80
[readfcn,nframes,fid,headerinfo] = get_readframe_fcn(moviename);
fstart = minfirst + (ndx-1)*blocksize;
fend = min(maxlast,ndx*blocksize);
tic;
allftrs{ndx} = genFeatures(readfcn,headerinfo,fstart,fend,tracks,stationary,method);
telapsed = toc;
fclose(fid);
fprintf(ff,'%d\n',ndx);
end