forked from hanulbogo/CoActivity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UT_RUN_THIS.m
51 lines (39 loc) · 1.34 KB
/
UT_RUN_THIS.m
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
function UT_RUN_THIS()
addpath(genpath('./Codes/'));
global dpath;
global npath;
dpath ='./../data/';
npath =[dpath ,'UT_subsequence_hists/'];
% subsequnce sampled every 10 frame
stepsize =10;
% length of subsequence
len= stepsize*3;
% DB information
load([dpath ,'UT_nVideos.mat']);
% Annotation for YouTube dataset. GT information.
load([dpath ,'UT_annotation.mat']);%'UT_annotation'
nCenters =4000;
% Algorithm.
global mname;
mlist = {'AMC', 'AMC-','PR'};
for mm =1:3
mname =mlist{mm};
fprintf('%s \n',mname);
for class =1%:11
close all;
nVideos = nVideolist(class);
lname =UT_annotation{sum(nVideolist(1:(class-1)))+1}.label;
fprintf('%s ',lname);
%% Features of subsequences
if ~exist([npath,lname,'_stepsize_',num2str(stepsize), '_subsequence_len_',num2str(len),'.mat'],'file')
UT_subsequence_hist(stepsize, class, len); %
end
%% Graph Construction and Co-activity score AMC
absorption_time= UT_AMC(class,len,stepsize,lname);
%% Co-activity score
coactivity_score= UT_CoActivity_Score(stepsize, class, len,absorption_time);
%% Thresholding and Detect Co-activity frames by using GMM
UT_Thresholding(coactivity_score,nVideos, class);
fprintf('\n');
end
end