Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
92 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
function [perfAblations] = mainExperiment() | ||
%MAINEXPERIMENT Summary of this function goes here | ||
% Detailed explanation goes here | ||
globals; | ||
params = getParams(); | ||
classInds = [6 14 12 17]; %bus, motorbike, dog, sheep | ||
nClasses = length(classInds); | ||
usePascalViews = [0 0 1 1]; %evaluation using pascal3d or pascal voc labels | ||
|
||
%% Run SCT vs GC Experiment | ||
perfAblations = zeros(5,nClasses); | ||
|
||
params.features = 'vggJoint16'; | ||
perfAblations(1,:) = mainViewpoint(classInds, usePascalViews); %% prints accuracy for bus, motorbike, dog, sheep respectively | ||
|
||
params.features = 'vggCommon16'; | ||
perfAblations(2,:) = mainViewpoint(classInds, usePascalViews); %% prints accuracy for bus, motorbike, dog, sheep respectively | ||
|
||
%% Run experiment for various similarity features | ||
|
||
params.similarityFeatName = 'vggConv5'; | ||
for c = 1:nClasses | ||
[~,optAcc] = optimizePredictions(pascalIndexClass(classInds(c),'pascal'),0,usePascalViews(c),1,0,0); | ||
perfAblations(3,c) = optAcc; | ||
end | ||
|
||
params.spatialNormSmoothing = 0; | ||
for c = 1:nClasses | ||
[~,optAcc] = optimizePredictions(pascalIndexClass(classInds(c),'pascal'),0,usePascalViews(c),1,0,0); | ||
perfAblations(4,c) = optAcc; | ||
end | ||
|
||
params.similarityFeatName = 'vggFc7'; | ||
for c = 1:nClasses | ||
[~,optAcc] = optimizePredictions(pascalIndexClass(classInds(c),'pascal'),0,usePascalViews(c),1,0,0); | ||
perfAblations(5,c) = optAcc; | ||
end | ||
|
||
end |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function errors = mainViewpoint(classInds, usePascalViews) | ||
%% Define Classes | ||
classes = {'aeroplane','bicycle','bird','boat','bottle','bus','car','cat','chair','cow','diningtable','dog','horse','motorbike','person','plant','sheep','sofa','train','tvmonitor'}; | ||
%classInds = [1 2 4 5 6 7 9 11 14 18 19 20]; | ||
%classInds = [1 2 4 5 6 7 9]; | ||
%classInds = [1 2 6 7 9 14]; | ||
%classInds = [1 2 4 5 6 7 9 11 14 18 19 20]; | ||
%classInds = [1 2 4 5 6 7 9 14 18 19 20]; | ||
%classInds = [12 17]; | ||
|
||
numClasses = size(classInds,2); | ||
|
||
%% Iterate over pose predictions | ||
errors = zeros(numClasses,1); | ||
medErrors = zeros(numClasses,1); | ||
for c = 1:numClasses | ||
class = classes{classInds(c)}; | ||
disp(class); | ||
[err,medErr] = regressToPose(class, usePascalViews(c)); | ||
errors(c,:)=err; | ||
medErrors(c,:) = medErr; | ||
end | ||
prettyPrintResults(errors,medErrors); | ||
end |
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
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
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