Skip to content

Commit

Permalink
Removed wrong code
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopomasi committed Sep 17, 2014
1 parent ddcaa69 commit 6ee301a
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions demo_reid_kcca.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

%% Load data%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
datasetname='VIPeR'; %VIPeR %PRID
ccaON = 0; %% can be turned off since it is slow.
ccaON = 1; %% can be turned off since it is slow.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if strcmp('VIPeR',datasetname)
Expand Down Expand Up @@ -77,8 +77,6 @@
disp('>Computing CCA on the training set...');
%% Computing CCA on the training set
[Wx_cca Wy_cca r] = cca(train_b,train_a,kapa_cca);
Wx_cca = real(Wx_cca);
Wy_cca = real(Wy_cca);
end

disp('>Computing KCCA on the training set...');
Expand All @@ -94,24 +92,7 @@
end
test_b_ker_proj = test_b_ker*Wx;
test_a_ker_proj = test_a_ker*Wy;

%%projecting train
train_b_ker_proj = train_b_ker*Wy;
train_a_ker_proj = train_a_ker*Wy;

myscore = zeros(size(test_b_ker_proj,1),10);
allTrain = [train_a_ker_proj; train_b_ker_proj];
disp('>Computing dual score...');
for p=1:size(test_b_ker_proj,1)
finalScore = score_kcca(:,p);
[sortScore sortIndex] = sort(finalScore);
for g=1:10
tic
myscore(p,g) = dualSimiliarityReid(test_b_ker_proj(p,:),test_a_ker_proj(sortIndex(g),:),allTrain );
toc
end
end


disp('>Computing distances...');
%% Compute distances
if ccaON
Expand Down

0 comments on commit 6ee301a

Please sign in to comment.