Skip to content

Instantly share code, notes, and snippets.

View aksimhal's full-sized avatar

Anish aksimhal

View GitHub Profile
function metrics = pr_eval(detectVol, truthVol)
% W. Gray Roncal - 02.12.2015
% Feedback welcome and encouraged. Let's make this better!
% Other options (size filters, morphological priors, etc. can be added.
% z = rand(100,100);
% t = z > 0.8;
%
tic
%% params
@aksimhal
aksimhal / whiteandgold.m
Created February 27, 2015 04:28
#whiteandgold
% whiteandgold
img = imread('dress.jpg');
white_pt = [243, 210];
gold_pt = [537, 339];
white_rgb = squeeze(img(white_pt(1), white_pt(2), :));
gold_rgb = squeeze(img(gold_pt(1), gold_pt(2), :));
figure; subplot(1, 3, 1);
imagesc(img);
@aksimhal
aksimhal / ARI_example.m
Created October 12, 2016 20:36
Example usage of ARI
% Adjusted Rand Index Example
mu0 = [0, 0];
sigma0 = [1, 0; 0, 1];
h0 = mvnrnd(mu0, sigma0, 50);
mu1 = [2, 3];
sigma1 = [2, 0; 0, 2 ];
h1 = mvnrnd(mu1,sigma1, 50);