Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ i. Initialize path variables using:
> initialize;

ii. To generate proposals, you can use either of the following commands:
> proposals = runObjectProposals('< proposalname >', 'path\to\image.jpg');
> proposals = runObjectProposal('< proposalname >', 'path\to\image.jpg');

or
> im=imread('path\to\image.jpg'); proposals = runObjectProposals('< proposal name >', im);
> im=imread('path\to\image.jpg'); proposals = runObjectProposal('< proposal name >', im);


iii. For long-running jobs, open config.json; Set *imageLocation*, and *outputLocation* to locations of your choice.

Once *imageLocation*, and *outputLocation* are set, you can call
>runObjectProposals('< proposal name >');
>runObjectProposal('< proposal name >');

This will generate proposals for all the images in the *imageLocation* and save the proposals in the *outputLocation*.

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions evaluation-metrics/get_config.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function [config] = get_config()


% this is where best candidates and all other computed data are stored
config.precomputed_candidates = 'C:\Users\Prateek\Desktop\best_candid';

if config.precomputed_candidates(end) ~= '\'
config.precomputed_candidates = [config.precomputed_candidates '\'];
end
end
192 changes: 192 additions & 0 deletions evaluation-metrics/getmethod.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
function methods = getmethod()


colormap = [ ...
255, 255, 50 ; ...
100, 163, 163 ; ...
218, 71, 71 ; ...
200, 36, 36 ; ...
145, 92, 146 ; ...
183, 36, 73 ; ...
135, 200, 170 ; ...
150, 150, 27 ; ...
140, 190, 200 ; ...
138, 180, 66 ; ...
255, 150, 255 ; ...
92, 172, 158 ; ...
195,189,40;
0, 255, 255;
88, 128, 189;
255, 255, 0;
] ./ 256;

config = get_config();
precomputed_prefix = config.precomputed_candidates;

methods = [];

i = numel(methods) + 1;
methods(i).name = 'Objectness';
methods(i).short_name = 'O';
prefix = [precomputed_prefix 'objectness\'];
% methods(i).candidate_dir = [prefix 'mat_nms_10k'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'descend';
% methods(i).extract = @run_objectness;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;

i = numel(methods) + 1;
methods(i).name = 'Rahtu';
methods(i).short_name = 'Rah';
prefix = [precomputed_prefix 'rahtubest\'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'none';
% methods(i).extract = @run_rahtubest;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;

i = numel(methods) + 1;
methods(i).name = 'Sel.Search';
methods(i).short_name = 'S.S';
prefix = [precomputed_prefix 'selective_search\'];
% methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'ascend';
% methods(i).extract = @run_selective_search;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;

i = numel(methods) + 1;
methods(i).name = 'Rand.Prim';
methods(i).short_name = 'R.P';
prefix = [precomputed_prefix 'randomized_prims\'];
methods(i).candidate_dir = [prefix 'mat'];
methods(i).gt_recall_num_candidates = 20000;
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
% methods(i).rerun_num_candidates = 10 .^ (0:0.25:5);
methods(i).rerun_num_candidates = [];
% methods(i).repeatability_num_candidates = 5000;
% methods(i).gt_recall_num_cand_idxs = [1 4 6 8 10 12 14 17 19];
methods(i).order = 'none';
% methods(i).extract = @run_randomized_prims;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;


i = numel(methods) + 1;
methods(i).name = 'Endres';
methods(i).short_name = 'En';
prefix = [precomputed_prefix 'endres\'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'none';
% methods(i).extract = @run_prop;
methods(i).num_candidates = false;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;

i = numel(methods) + 1;
methods(i).name = 'Rantalankila';
methods(i).short_name = 'R.K';
prefix = [precomputed_prefix 'Rantalankila\'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'none';
% methods(i).extract = @run_rantalankila;
methods(i).num_candidates = true;
methods(i).rerun_num_candidates = [10 100 1000 10000];
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;

%
i = numel(methods) + 1;
methods(i).name = 'EdgeBoxes';
methods(i).short_name = 'EB';
prefix = [precomputed_prefix 'edgebox\'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'descend';
% methods(i).extract = @run_edgeboxes;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;
%
%
i = numel(methods) + 1;
methods(i).name = 'MCG';
methods(i).short_name = 'M';
prefix = [precomputed_prefix 'MCG\'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];
methods(i).order = 'none';
% methods(i).extract = @run_MCG;
methods(i).num_candidates = true;
methods(i).color = colormap(i,:);
methods(i).is_baseline = false;
%
% add your own method here:
if false
i = numel(methods) + 1;
methods(i).name = 'The full name of your method';
methods(i).short_name = 'a very short version of the name';
prefix = [precomputed_prefix 'my-method/'];
methods(i).candidate_dir = [prefix 'mat'];
% methods(i).repeatability_candidate_dir = [prefix 'repeatability_mat'];
methods(i).best_voc07_candidates_file = [prefix 'best_candidates_file.mat'];
% methods(i).best_imagenet_candidates_file = [prefix 'best_candidates_imagenet.mat'];
% methods(i).repeatability_matching_file = [prefix 'repeatability_matching.mat'];

% A function pointer to a method that runs your proposal detector.
% methods(i).extract = @run_edgeboxes;

% methods(i).rerun_num_candidates = []; % ceil(10 .^ (2:0.5:4));
% Specifies whether or not your method takes the desired number of candidates
% as an input.

methods(i).num_candidates = true;
% colormap for drawing
methods(i).color = colormap(i,:);
% This should be false. Is used for drawing baselines dashed.
methods(i).is_baseline = false;
end

% do the sorting dance
sort_keys = [num2cell([methods.is_baseline])', {methods.name}'];
for i = 1:numel(methods)
sort_keys{i,1} = sprintf('%d', sort_keys{i,1});
end
[~,idx] = sortrows(sort_keys);
for i = 1:numel(methods)
methods(idx(i)).sort_key = i;
end
end
2 changes: 1 addition & 1 deletion evaluation-metrics/maxRow.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [matching, objective] = greedy_matching_rowwise(iou_matrix)
function [matching, objective] = maxRow(iou_matrix)
assert(size(iou_matrix, 1) <= size(iou_matrix, 2));
n = size(iou_matrix, 1);
matching = zeros(n, 1);
Expand Down
Binary file modified evaluation-metrics/methods.mat
Binary file not shown.
Binary file added evaluation-metrics/newmethods.mat
Binary file not shown.
4 changes: 3 additions & 1 deletion evaluation-metrics/plotMetric.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ function plotMetric(configjson)
% figures/.
parDir = configjson.params.parDir;
testset = load(fullfile(parDir, 'evaluation-metrics', 'data/pascal_gt_data.mat'));
methods = getMethods(configjson);
methods = getMethods(configjson);% This function is not available in the repository
% Use methods = getmethods() instead , make changes accoriding to your
% need

compute_best_recall_candidates(testset, methods);

Expand Down