plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | shenweichen/Coursera-master | submit.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/submit.m | 6,420 | utf_8 | 65e87abcad910a4eacf237bbf8476f02 | function submit(part)
addpath('./lib');
conf.assignmentKey = 'jk3STQNfEeadkApJXdJa6Q';
conf.itemName = 'Simple BN Knowledge Engineering';
conf.partArrays = { ...
{ ...
'COq9M', ...
{ 'Credit_net.net' }, ...
'Constructing a Credit Network', ...
}, ...
{ ...
'1AayO', ...
... |
github | shenweichen/Coursera-master | GetValueOfAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/GetValueOfAssignment.m | 780 | utf_8 | 91b3eb2efe778c915238a249c2c7d529 | % GetValueOfAssignment Gets the value of a variable assignment in a factor.
%
% v = GetValueOfAssignment(F, A) returns the value of a variable assignment,
% A, in factor F. The order of the variables in A are assumed to be the
% same as the order in F.var.
%
% v = GetValueOfAssignment(F, A, VO) gets the value o... |
github | shenweichen/Coursera-master | ComputeMarginal.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/ComputeMarginal.m | 1,353 | utf_8 | 02cee4818966e91d4881c5f916eb66e9 | %ComputeMarginal Computes the marginal over a set of given variables
% M = ComputeMarginal(V, F, E) computes the marginal over variables V
% in the distribution induced by the set of factors F, given evidence E
%
% M is a factor containing the marginal over variables V
% V is a vector containing the variables i... |
github | shenweichen/Coursera-master | AssignmentToIndex.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/AssignmentToIndex.m | 583 | utf_8 | 7de922c7e9eadc1074cd0fd64ea070d5 | % AssignmentToIndex Convert assignment to index.
%
% I = AssignmentToIndex(A, D) converts an assignment, A, over variables
% with cardinality D to an index into the .val vector for a factor.
% If A is a matrix then the function converts each row of A to an index.
%
% See also IndexToAssignment.m and FactorTuto... |
github | shenweichen/Coursera-master | ComputeJointDistribution.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/ComputeJointDistribution.m | 1,155 | utf_8 | 0fcd6681c0225c16d6575dc13d0d6513 | %ComputeJointDistribution Computes the joint distribution defined by a set
% of given factors
%
% Joint = ComputeJointDistribution(F) computes the joint distribution
% defined by a set of given factors
%
% Joint is a factor that encapsulates the joint distribution given by F
% F is a vector of factors (struct a... |
github | shenweichen/Coursera-master | ObserveEvidence.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/ObserveEvidence.m | 2,153 | utf_8 | 2091f6e7b89f7fd55fe26c49bb85bdc2 | % ObserveEvidence Modify a vector of factors given some evidence.
% F = ObserveEvidence(F, E) sets all entries in the vector of factors, F,
% that are not consistent with the evidence, E, to zero. F is a vector of
% factors, each a data structure with the following fields:
% .var Vector of variables in the... |
github | shenweichen/Coursera-master | SetValueOfAssignment.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/SetValueOfAssignment.m | 1,122 | utf_8 | 9db8bd3d64e44264de19e5df4de0f241 | % SetValueOfAssignment Sets the value of a variable assignment in a factor.
%
% F = SetValueOfAssignment(F, A, v) sets the value of a variable assignment,
% A, in factor F to v. The order of the variables in A are assumed to be the
% same as the order in F.var.
%
% F = SetValueOfAssignment(F, A, v, VO) sets the... |
github | shenweichen/Coursera-master | submitWithConfiguration.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/lib/submitWithConfiguration.m | 3,063 | utf_8 | 42a8097130904eea340b909cc3fb6638 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | shenweichen/Coursera-master | savejson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | shenweichen/Coursera-master | loadjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/lib/jsonlab/loadjson.m | 18,888 | ibm852 | f5b550952f123aa7ebbb4cc1e4e1a2ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | shenweichen/Coursera-master | loadubjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | shenweichen/Coursera-master | saveubjson.m | .m | Coursera-master/Specialization_Probabilistic_Graphical_Models_Stanford_University/Course1_Probabilistic_Graphical_Models_1_Representation/HW1_Simple BN Knowledge Engineering/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | shenweichen/Coursera-master | learn_perceptron.m | .m | Coursera-master/Neural_Networks_for_Machine_Learning_University_of_Toronto/Assignment1/learn_perceptron.m | 6,073 | utf_8 | 976c946a5c5a2beb350d7ec85392b08b | %% Learns the weights of a perceptron and displays the results.
function [w] = learn_perceptron(neg_examples_nobias,pos_examples_nobias,w_init,w_gen_feas)
%%
% Learns the weights of a perceptron for a 2-dimensional dataset and plots
% the perceptron at each iteration where an iteration is defined as one
% full pass th... |
github | shenweichen/Coursera-master | plot_perceptron.m | .m | Coursera-master/Neural_Networks_for_Machine_Learning_University_of_Toronto/Assignment1/plot_perceptron.m | 3,409 | utf_8 | 808099ac46c6f636fa74de07abbcc8bb | %% Plots information about a perceptron classifier on a 2-dimensional dataset.
function plot_perceptron(neg_examples, pos_examples, mistakes0, mistakes1, num_err_history, w, w_dist_history)
%%
% The top-left plot shows the dataset and the classification boundary given by
% the weights of the perceptron. The negative ex... |
github | shenweichen/Coursera-master | a3.m | .m | Coursera-master/Neural_Networks_for_Machine_Learning_University_of_Toronto/Assignment3/a3.m | 13,745 | utf_8 | c81d18f404c66c6fe25cdf67133a4954 | function a3(wd_coefficient, n_hid, n_iters, learning_rate, momentum_multiplier, do_early_stopping, mini_batch_size)
warning('error', 'Octave:broadcast');
if exist('page_output_immediately'), page_output_immediately(1); end
more off;
model = initial_model(n_hid);
from_data_file = load('data.mat');
datas = fr... |
github | shenweichen/Coursera-master | a4_main.m | .m | Coursera-master/Neural_Networks_for_Machine_Learning_University_of_Toronto/Assignment4/a4_main.m | 4,551 | utf_8 | a36e706a0a625e7ca1eeadc45f05145f | % This file was published on Wed Nov 14 20:48:30 2012, UTC.
function a4_main(n_hid, lr_rbm, lr_classification, n_iterations)
% first, train the rbm
global report_calls_to_sample_bernoulli
report_calls_to_sample_bernoulli = false;
global data_sets
if prod(size(data_sets)) ~= 1,
error('You must r... |
github | shenweichen/Coursera-master | train.m | .m | Coursera-master/Neural_Networks_for_Machine_Learning_University_of_Toronto/Assignment2/train.m | 8,724 | utf_8 | f1ced206e6c895129b06f256ffe18f88 | % This function trains a neural network language model.
function [model] = train(epochs)
% Inputs:
% epochs: Number of epochs to run.
% Output:
% model: A struct containing the learned weights and biases and vocabulary.
if size(ver('Octave'),1)
OctaveMode = 1;
warning('error', 'Octave:broadcast');
start_time... |
github | yongsk/bpDecoder-master | decode_bpa.m | .m | bpDecoder-master/decode_bpa.m | 3,472 | utf_8 | 870948a8531cf5347b65f04979ad1036 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% < Belief-Propagation Algorithm(BPA) / Probabilistic Decoder >
%
% Date : 16.08.07
% Author : Yongseen Kim
% Version : 1.0
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [xhat] = de... |
github | vid33/CPS-TDVP-master | eigenshuffle.m | .m | CPS-TDVP-master/eigenshuffle.m | 13,230 | utf_8 | be08169c99e0d8b0d8a386a858dd1847 | function [Vseq,Dseq] = eigenshuffle(Asequence)
% eigenshuffle: Consistent sorting for an eigenvalue/vector sequence
% [Vseq,Dseq] = eigenshuffle(Asequence)
%
% Includes munkres.m (by gracious permission from Yi Cao)
% to choose the appropriate permutation. This greatly
% enhances the speed of eigenshuffle over my previ... |
github | vid33/CPS-TDVP-master | calculateEigenvectors_inv.m | .m | CPS-TDVP-master/calculateEigenvectors_inv.m | 1,312 | utf_8 | fb0339cf0fd026336227008725013c2b | %Calculate lr eigenvectors, and normalise stuff
function [ C, Eeigvals, L, R ] = calculateEigenvectors_inv(C)
E = C.*conj(C);
[Rtmp, DE] = eig(E);
Ltmp = inv(Rtmp);
Eeigvals = diag(DE);
% fprintf('1- Max eigenvalue is %d\n', 1-max(Eeigvals));
C = C/sqrt(max(Eeigvals));
% E = C... |
github | vid33/CPS-TDVP-master | calculateEigenvectors.m | .m | CPS-TDVP-master/calculateEigenvectors.m | 1,693 | utf_8 | 9ce976cbdb024ef3cbebc7051b80cdce | %Calculate lr eigenvectors, and normalise stuff
function [ C, Eeigvals, L, R ] = calculateEigenvectors(C)
E = C.*conj(C);
[Rtmp,DE,Ltmp] = eig(E);
Eeigvals = diag(DE);
Ltmp = Ltmp';
Rtmp = transpose(Rtmp);
%normalise eigvectors
Diag_tmp = diag(Ltmp*transpose(Rtmp));
Rtmp = transpose(R... |
github | vid33/CPS-TDVP-master | Contract.m | .m | CPS-TDVP-master/Contract.m | 3,086 | utf_8 | ffdd05dd983ccc7cb565f9a24c01ee55 | function X=Contract(tensors,contractions)
numcont=max(cell2mat(contractions));
%fprintf('numcont is %d\n', numcont);
table=zeros(numcont,2);
for k=1:length(contractions)
c=contractions{k};
for i=c(c>0)
if table(i,1)==0
table(i,1)=k;
... |
github | mdeguzis/ftequake-master | echo_diagnostic.m | .m | ftequake-master/engine/libs/speex/libspeex/echo_diagnostic.m | 2,076 | utf_8 | 8d5e7563976fbd9bd2eda26711f7d8dc | % Attempts to diagnose AEC problems from recorded samples
%
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
%
% Computes the full matrix inversion to cancel echo from the
% recording 'rec_file' using the far end signal 'play_file' using
% a filter length of 'tail_length'. The output is saved to 'o... |
github | oweisse/msaleaelogic-master | ExtractBitsFromDigitalPins.m | .m | msaleaelogic-master/ExtractBitsFromDigitalPins.m | 1,629 | utf_8 | 0cc0e446f6c3c270918f39e8502295ff | % Author: Ofir Weisse, mail: oweisse (at) umich.edu, www.ofirweisse.com
%
% MIT License
%
% Copyright (c) 2016 oweisse
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, i... |
github | alliedel/anomalyframework_ECCV2016-master | plotROC.m | .m | anomalyframework_ECCV2016-master/code/scripts/plotting/plotROC.m | 962 | utf_8 | 808d1405ef434eef5fef06c835f3e857 |
function plotROC(pars, plotPars)
upsize_to_gt = 0;
gt_file = load(pars.paths.files.pathToGroundTruth,'volLabel'); %;
y_file = load(fullfile(pars.paths.folders.pathToResults,'an'));
fnLoc_file = load(pars.paths.files.finalFeatMATfile);
volFile = GenerateVolname(pars.paths.files.pathToVideo);
... |
github | alliedel/anomalyframework_ECCV2016-master | Movie_GT.m | .m | anomalyframework_ECCV2016-master/code/scripts/plotting/Movie_GT.m | 285 | utf_8 | ebe94c39e7afc28795037e5409d85e79 |
function Movie_GT(pars, plotPars)
gt_file = load(pars.paths.files.pathToGroundTruth,'volLabel'); %;
for i = 1:length(gt_file.volLabel)
imshow(gt_file.volLabel{i});
title(sprintf('%03d/%03d',i,length(gt_file.volLabel)));
drawnow;
end
end
|
github | alliedel/anomalyframework_ECCV2016-master | ClipSignals.m | .m | anomalyframework_ECCV2016-master/code/scripts/plotting/ClipSignals.m | 235 | utf_8 | 9e8a1e12ae09a75ef6f2fb4bdcffa194 |
function [siga,sigb] = ClipSignals(siga,sigb,tol)
a = length(siga);
b = length(sigb);
if tol < abs((a-b)/a)
error('vectors aren''t close in length. Something is wrong');
end
l = min(a,b);
siga = siga(1:l);
sigb = sigb(1:l);
end
|
github | alliedel/anomalyframework_ECCV2016-master | An1dTo3d.m | .m | anomalyframework_ECCV2016-master/code/scripts/formatdata/An1dTo3d.m | 244 | utf_8 | 154f86e0ee2ca4815e630db9dcaff703 |
function an3 = An1dTo3d(an, LocV3, BKH, BKW, T)
sig = an./(1-an);
Err = sig(:)';
AbEvent = zeros(BKH, BKW, T);
for ii = 1 : length(Err)
AbEvent(LocV3(1,ii),LocV3(2,ii),LocV3(3,ii)) = Err(ii);
end
an3 = smooth3( AbEvent, 'box', 5);
end
|
github | alliedel/anomalyframework_ECCV2016-master | wrap_DetectAnomalies.m | .m | anomalyframework_ECCV2016-master/code/scripts/wrappers/wrap_DetectAnomalies.m | 2,123 | utf_8 | 2ae590600df5b18eebd8871e14fefc5e | function wrap_DetectAnomalies(pars)
% Features should already be computed. Will error if false.
% Will call the correct method (ours or competitor's)
assert(exist(pars.paths.files.fn_libsvm,'file')~=0, 'fn_libsvm does not exist: %s', pars.paths.files.fn_libsvm);
%% Anomaly Detection
if ~exist(fullfile(pars.paths.fold... |
github | alliedel/anomalyframework_ECCV2016-master | fullRun.m | .m | anomalyframework_ECCV2016-master/code/src/fullRun.m | 1,734 | utf_8 | a6767472bc29e8b4fd770ad9ae2040c8 | function pars = fullRun( args, scriptArgs)
%FULLRUN Detect anomalies on video
% Calculates dense trajectory features and uses a variant of density
% ratio estimation to rate the anomalousness of each frame.
%% Parse inputs and add paths
parsScript = ParseScriptArgs(scriptArgs{:});
AddToolPaths(parsScript);
pars = ... |
github | alliedel/anomalyframework_ECCV2016-master | GetPaths_anomalyDetection.m | .m | anomalyframework_ECCV2016-master/code/src/parse/GetPaths_anomalyDetection.m | 1,359 | utf_8 | 9c81dde9fc210186ab83d288b6b7b676 | function [paths] = GetPaths_anomalyDetection(pars)
% In case we're running this for debugging
% if eval('pars.argsString')
% pars.argsString = '';
% warning('argsString not set; hopefully you''re not running fullRun.m and you''re just debugging.');
% end
% Some preliminary stuff (non-technical)
[pth,name,~] = f... |
github | alliedel/anomalyframework_ECCV2016-master | GetTags_anomalyDetection.m | .m | anomalyframework_ECCV2016-master/code/src/parse/GetTags_anomalyDetection.m | 4,683 | utf_8 | fbe54dbfbbedaa55f8e3bac2c3d9c4b0 | function tags = GetTags_anomalyDetection(pars)
% - system:
tags.datestring = datestr(now,'yyyy_mm_dd');
tags.timestring = datestr(now,'HH_MM_SS');
% - inputs: video, groundtruth
% - features
[~,name,~] = fileparts(pars.pathToVideo); %output = [pathstr, name, ext]
if ~isinf(pars.endFrame)
error('Filename doesn''... |
github | alliedel/anomalyframework_ECCV2016-master | StitchNames.m | .m | anomalyframework_ECCV2016-master/code/src/parse/StitchNames.m | 6,739 | utf_8 | c196dd04264fb60a380b654b23e55b58 | function paths = StitchNames(tags, pars)
% - features
paths = StitchFeatureNames(tags, pars);
% - inputs: video, groundtruth
[pth,name,~] = fileparts(pars.pathToVideo); [~,collection,~] = fileparts(pth);
paths.name = name;
paths.folders.pathToGndTruth = fullfile(pars.anomDetectRoot,sprintf('data/input/groundTruth/%s/... |
github | alliedel/anomalyframework_ECCV2016-master | anomalyDetect_write.m | .m | anomalyframework_ECCV2016-master/code/src/algorithm/anom/anomalyDetect_write.m | 1,735 | utf_8 | cb4137bf4a077bfc6211d5e7a2ab796c | function an = anomalyDetect_write(pars)
% 1. Prepare Features: Convert to LibSVM, Shuffle, and Save
GenerateAndSaveShufflesVersions(pars);
% 2. Run anomaly detection (get scores an for each frame)
an = CalculateAnomalyRatings_write(pars);
end
function GenerateAndSaveShufflesVersions(pars)
% Get first (non-)shuffl... |
github | alliedel/anomalyframework_ECCV2016-master | logistic_tmp.m | .m | anomalyframework_ECCV2016-master/code/src/algorithm/ML/logistic_tmp.m | 2,957 | utf_8 | 09be01e3bb8d3ac7289e39da49b158d2 | % function x = logistic(a, y, w, ridge, param)
%
% Logistic regression. Design matrix A, targets Y, optional instance
% weights W, optional ridge term RIDGE, optional parameters object PARAM.
%
% W is a vector with length equal to the number of training examples; RIDGE
% can be either a vector with length equal ... |
github | alliedel/anomalyframework_ECCV2016-master | logistic.m | .m | anomalyframework_ECCV2016-master/code/src/algorithm/ML/logistic.m | 2,957 | utf_8 | 09be01e3bb8d3ac7289e39da49b158d2 | % function x = logistic(a, y, w, ridge, param)
%
% Logistic regression. Design matrix A, targets Y, optional instance
% weights W, optional ridge term RIDGE, optional parameters object PARAM.
%
% W is a vector with length equal to the number of training examples; RIDGE
% can be either a vector with length equal ... |
github | zjuzhaozhou/AdaPMMSC-master | AdaPMMSC.m | .m | AdaPMMSC-master/AdaPMMSC.m | 4,554 | utf_8 | bf61111a84491ce8fed29c0d4719d427 | function [alpha] = AdaPMMSC(X_a,X_b,na,nb,nc,dim,l2norm,maxiter)
% This code is modified from the following codes
% 1. code provided by Honglak Lee, Alexis
% Battle, Rajat Raina, and Andrew Y. Ng in the following paper:
% 'Efficient Sparse Codig Algorithms', Honglak Lee, Alexis Battle, Rajat Raina, Andrew Y. Ng,
% A... |
github | zjuzhaozhou/AdaPMMSC-master | learn_basis.m | .m | AdaPMMSC-master/learn_basis.m | 2,295 | utf_8 | e7282f177622e413a2ed6c456b0914e7 | function B = learn_basis(X, S, l2norm, Binit)
% Learning basis using Lagrange dual (with basis normalization)
%
% This code solves the following problem:
%
% minimize_B 0.5*||X - B*S||^2
% subject to ||B(:,j)||_2 <= l2norm, forall j=1...size(S,1)
%
% The detail of the algorithm is described in the following... |
github | yihui-he/caffe-pro-master | classification_demo.m | .m | caffe-pro-master/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | sabbiu/ObjectDetection-master | ObjectDetection.m | .m | ObjectDetection-master/Project-GUI/ObjectDetection.m | 33,059 | utf_8 | 1bf25e61b23affba3908a3840d31e7ff | function varargout = ObjectDetection(varargin)
% ObjectDetection MATLAB code for ObjectDetection.fig
% ObjectDetection, by itself, creates a new ObjectDetection or raises the existing
% singleton*.
%
% H = ObjectDetection returns the handle to a new ObjectDetection or the handle to
% the existing si... |
github | sabbiu/ObjectDetection-master | generate_bow.m | .m | ObjectDetection-master/Project-GUI/generate_bow.m | 1,102 | utf_8 | 0d60c525624de53cb15dceb0a362c607 | %% Object Detection
% Sabbiu Shah, Sagar Adhikari, Samip Subedi
% Department of Electronics and Computer Engineering
% IOE, Pulchowk Campus
% 2016
%% ================ function that generates bag of words ==============
function [histogram] = generate_bow( image )
%generates bow for new image
bagg = 500;
... |
github | sabbiu/ObjectDetection-master | features_SIFT.m | .m | ObjectDetection-master/Project-GUI/features_SIFT.m | 1,027 | utf_8 | 53223ae2686f49c32df120fbc841dcc9 | %% Object Detection
% Sabbiu Shah, Sagar Adhikari, Samip Subedi
% Department of Electronics and Computer Engineering
% IOE, Pulchowk Campus
% 2016
%% ================ SIFT_features function ===========================
function [ descriptor ] = features_SIFT( image_loc )
% This function returns descriptor for image u... |
github | sabbiu/ObjectDetection-master | Reinforcement.m | .m | ObjectDetection-master/Project-GUI/Reinforcement.m | 8,479 | utf_8 | f5547f62ed14534a6c137d0254ea627d | function varargout = Reinforcement(varargin)
% REINFORCEMENT MATLAB code for Reinforcement.fig
% REINFORCEMENT, by itself, creates a new REINFORCEMENT or raises the existing
% singleton*.
%
% H = REINFORCEMENT returns the handle to a new REINFORCEMENT or the handle to
% the existing singleton*.
%
% ... |
github | sabbiu/ObjectDetection-master | object_det_4.m | .m | ObjectDetection-master/Project-GUI/object_det_4.m | 1,580 | utf_8 | 616421e85fba939e42d363392ea0381f | %% Object Detection
% Sabbiu Shah, Sagar Adhikari, Samip Subedi
% Department of Electronics and Computer Engineering
% IOE, Pulchowk Campus
% 2016
%% ============== Part 5. Manage the training sets ====================
% Here, the training sets are managed so that it is ready to be trained
% with SVM (SMO)
function [... |
github | sabbiu/ObjectDetection-master | kmeans.m | .m | ObjectDetection-master/Project-GUI/kmeans.m | 1,652 | utf_8 | 3d14ffd9f0a50969931cde873f4b27ec | %% Object Detection
% Sabbiu Shah, Sagar Adhikari, Samip Subedi
% Department of Electronics and Computer Engineering
% IOE, Pulchowk Campus
% 2016
%==================== K-means function ==============================
function [ center, number ] = kmeans( features, clusters, KMI )
%It is the implementation of kmeans ... |
github | sabbiu/ObjectDetection-master | vl_compile.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/vl_compile.m | 5,060 | utf_8 | 978f5189bb9b2a16db3368891f79aaa6 | function vl_compile(compiler)
% VL_COMPILE Compile VLFeat MEX files
% VL_COMPILE() uses MEX() to compile VLFeat MEX files. This command
% works only under Windows and is used to re-build problematic
% binaries. The preferred method of compiling VLFeat on both UNIX
% and Windows is through the provided Makefile... |
github | sabbiu/ObjectDetection-master | vl_noprefix.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/vl_noprefix.m | 1,875 | utf_8 | 97d8755f0ba139ac1304bc423d3d86d3 | function vl_noprefix
% VL_NOPREFIX Create a prefix-less version of VLFeat commands
% VL_NOPREFIX() creats prefix-less stubs for VLFeat functions
% (e.g. SIFT for VL_SIFT). This function is seldom used as the stubs
% are included in the VLFeat binary distribution anyways. Moreover,
% on UNIX platforms, the stub... |
github | sabbiu/ObjectDetection-master | vl_pegasos.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/misc/vl_pegasos.m | 2,837 | utf_8 | d5e0915c439ece94eb5597a07090b67d | % VL_PEGASOS [deprecated]
% VL_PEGASOS is deprecated. Please use VL_SVMTRAIN() instead.
function [w b info] = vl_pegasos(X,Y,LAMBDA, varargin)
% Verbose not supported
if (sum(strcmpi('Verbose',varargin)))
varargin(find(strcmpi('Verbose',varargin),1))=[];
fprintf('Option VERBOSE is no longer supported.\n');
en... |
github | sabbiu/ObjectDetection-master | vl_svmpegasos.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/misc/vl_svmpegasos.m | 1,178 | utf_8 | 009c2a2b87a375d529ed1a4dbe3af59f | % VL_SVMPEGASOS [deprecated]
% VL_SVMPEGASOS is deprecated. Please use VL_SVMTRAIN() instead.
function [w b info] = vl_svmpegasos(DATA,LAMBDA, varargin)
% Verbose not supported
if (sum(strcmpi('Verbose',varargin)))
varargin(find(strcmpi('Verbose',varargin),1))=[];
fprintf('Option VERBOSE is no longer suppor... |
github | sabbiu/ObjectDetection-master | vl_override.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/misc/vl_override.m | 4,654 | utf_8 | e233d2ecaeb68f56034a976060c594c5 | function config = vl_override(config,update,varargin)
% VL_OVERRIDE Override structure subset
% CONFIG = VL_OVERRIDE(CONFIG, UPDATE) copies recursively the fileds
% of the structure UPDATE to the corresponding fields of the
% struture CONFIG.
%
% Usually CONFIG is interpreted as a list of paramters with their
... |
github | sabbiu/ObjectDetection-master | vl_quickvis.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/quickshift/vl_quickvis.m | 3,696 | utf_8 | 27f199dad4c5b9c192a5dd3abc59f9da | function [Iedge dists map gaps] = vl_quickvis(I, ratio, kernelsize, maxdist, maxcuts)
% VL_QUICKVIS Create an edge image from a Quickshift segmentation.
% IEDGE = VL_QUICKVIS(I, RATIO, KERNELSIZE, MAXDIST, MAXCUTS) creates an edge
% stability image from a Quickshift segmentation. RATIO controls the tradeoff
% bet... |
github | sabbiu/ObjectDetection-master | vl_demo_aib.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/demo/vl_demo_aib.m | 2,928 | utf_8 | 590c6db09451ea608d87bfd094662cac | function vl_demo_aib
% VL_DEMO_AIB Test Agglomerative Information Bottleneck (AIB)
D = 4 ;
K = 20 ;
randn('state',0) ;
rand('state',0) ;
X1 = randn(2,300) ; X1(1,:) = X1(1,:) + 2 ;
X2 = randn(2,300) ; X2(1,:) = X2(1,:) - 2 ;
X3 = randn(2,300) ; X3(2,:) = X3(2,:) + 2 ;
figure(1) ; clf ; hold on ;
vl_plotframe(X... |
github | sabbiu/ObjectDetection-master | vl_demo_alldist.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/demo/vl_demo_alldist.m | 5,460 | utf_8 | 6d008a64d93445b9d7199b55d58db7eb | function vl_demo_alldist
%
numRepetitions = 3 ;
numDimensions = 1000 ;
numSamplesRange = [300] ;
settingsRange = {{'alldist2', 'double', 'l2', }, ...
{'alldist', 'double', 'l2', 'nosimd'}, ...
{'alldist', 'double', 'l2' }, ...
{'alldist2', 's... |
github | sabbiu/ObjectDetection-master | vl_demo_ikmeans.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/demo/vl_demo_ikmeans.m | 774 | utf_8 | 17ff0bb7259d390fb4f91ea937ba7de0 | function vl_demo_ikmeans()
% VL_DEMO_IKMEANS
numData = 10000 ;
dimension = 2 ;
data = uint8(255*rand(dimension,numData)) ;
numClusters = 3^3 ;
[centers, assignments] = vl_ikmeans(data, numClusters);
figure(1) ; clf ; axis off ;
plotClusters(data, centers, assignments) ;
vl_demo_print('ikmeans_2d',0.6);
[tree, assig... |
github | sabbiu/ObjectDetection-master | vl_demo_svm.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/demo/vl_demo_svm.m | 1,235 | utf_8 | 7cf6b3504e4fc2cbd10ff3fec6e331a7 | % VL_DEMO_SVM Demo: SVM: 2D linear learning
function vl_demo_svm
y=[];X=[];
% Load training data X and their labels y
load('vl_demo_svm_data.mat')
Xp = X(:,y==1);
Xn = X(:,y==-1);
figure
plot(Xn(1,:),Xn(2,:),'*r')
hold on
plot(Xp(1,:),Xp(2,:),'*b')
axis equal ;
vl_demo_print('svm_training') ;
% Parameters
lambda =... |
github | sabbiu/ObjectDetection-master | vl_demo_kdtree_sift.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/demo/vl_demo_kdtree_sift.m | 6,832 | utf_8 | e676f80ac330a351f0110533c6ebba89 | function vl_demo_kdtree_sift
% VL_DEMO_KDTREE_SIFT
% Demonstrates the use of a kd-tree forest to match SIFT
% features. If FLANN is present, this function runs a comparison
% against it.
% AUTORIGHS
rand('state',0) ;
randn('state',0);
do_median = 0 ;
do_mean = 1 ;
% try to setup flann
if ~exist('flann_search'... |
github | sabbiu/ObjectDetection-master | vl_impattern.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/imop/vl_impattern.m | 6,876 | utf_8 | 1716a4d107f0186be3d11c647bc628ce | function im = vl_impattern(varargin)
% VL_IMPATTERN Generate an image from a stock pattern
% IM=VLPATTERN(NAME) returns an instance of the specified
% pattern. These stock patterns are useful for testing algoirthms.
%
% All generated patterns are returned as an image of class
% DOUBLE. Both gray-scale and colou... |
github | sabbiu/ObjectDetection-master | vl_tpsu.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/imop/vl_tpsu.m | 1,755 | utf_8 | 09f36e1a707c069b375eb2817d0e5f13 | function [U,dU,delta]=vl_tpsu(X,Y)
% VL_TPSU Compute the U matrix of a thin-plate spline transformation
% U=VL_TPSU(X,Y) returns the matrix
%
% [ U(|X(:,1) - Y(:,1)|) ... U(|X(:,1) - Y(:,N)|) ]
% [ ]
% [ U(|X(:,M) - Y(:,1)|) ... U(|X(:,M) - Y(:,N)|) ]
%
% where X... |
github | sabbiu/ObjectDetection-master | vl_xyz2lab.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/imop/vl_xyz2lab.m | 1,570 | utf_8 | 09f95a6f9ae19c22486ec1157357f0e3 | function J=vl_xyz2lab(I,il)
% VL_XYZ2LAB Convert XYZ color space to LAB
% J = VL_XYZ2LAB(I) converts the image from XYZ format to LAB format.
%
% VL_XYZ2LAB(I,IL) uses one of the illuminants A, B, C, E, D50, D55,
% D65, D75, D93. The default illuminatn is E.
%
% See also: VL_XYZ2LUV(), VL_HELP().
% Copyright ... |
github | sabbiu/ObjectDetection-master | vl_test_gmm.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_gmm.m | 1,332 | utf_8 | 76782cae6c98781c6c38d4cbf5549d94 | function results = vl_test_gmm(varargin)
% VL_TEST_GMM
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
vl_test_init ;
end
function s = setup()
randn('st... |
github | sabbiu/ObjectDetection-master | vl_test_twister.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_twister.m | 1,251 | utf_8 | 2bfb5a30cbd6df6ac80c66b73f8646da | function results = vl_test_twister(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_illegal_args()
vl_assert_exception(@() vl_twister(-1), 'vl:invalidArgument') ;
vl_assert_exception(@() vl_twister(1, -1), 'vl:invalidArgument') ;
vl_assert_exception(@() vl_twister([1, -1]), 'vl:invalidArgument') ;
function te... |
github | sabbiu/ObjectDetection-master | vl_test_kdtree.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_kdtree.m | 2,449 | utf_8 | 9d7ad2b435a88c22084b38e5eb5f9eb9 | function results = vl_test_kdtree(varargin)
% VL_TEST_KDTREE
vl_test_init ;
function s = setup()
randn('state',0) ;
s.X = single(randn(10, 1000)) ;
s.Q = single(randn(10, 10)) ;
function test_nearest(s)
for tmethod = {'median', 'mean'}
for type = {@single, @double}
conv = type{1} ;
tmethod = char(tmethod) ;... |
github | sabbiu/ObjectDetection-master | vl_test_imwbackward.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_imwbackward.m | 514 | utf_8 | 33baa0784c8f6f785a2951d7f1b49199 | function results = vl_test_imwbackward(varargin)
% VL_TEST_IMWBACKWARD
vl_test_init ;
function s = setup()
s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
function test_identity(s)
xr = 1:size(s.I,2) ;
yr = 1:size(s.I,1) ;
[x,y] = meshgrid(xr,yr) ;
vl_assert_almost_equal(s.I, vl_imwbackward(xr,yr,s.I,... |
github | sabbiu/ObjectDetection-master | vl_test_alphanum.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_alphanum.m | 1,624 | utf_8 | 2da2b768c2d0f86d699b8f31614aa424 | function results = vl_test_alphanum(varargin)
% VL_TEST_ALPHANUM
vl_test_init ;
function s = setup()
s.strings = ...
{'1000X Radonius Maximus','10X Radonius','200X Radonius','20X Radonius','20X Radonius Prime','30X Radonius','40X Radonius','Allegia 50 Clasteron','Allegia 500 Clasteron','Allegia 50B Clasteron','Al... |
github | sabbiu/ObjectDetection-master | vl_test_printsize.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_printsize.m | 1,447 | utf_8 | 0f0b6437c648b7a2e1310900262bd765 | function results = vl_test_printsize(varargin)
% VL_TEST_PRINTSIZE
vl_test_init ;
function s = setup()
s.fig = figure(1) ;
s.usletter = [8.5, 11] ; % inches
s.a4 = [8.26772, 11.6929] ;
clf(s.fig) ; plot(1:10) ;
function teardown(s)
close(s.fig) ;
function test_basic(s)
for sigma = [1 0.5 0.2]
vl_printsize(s.fig, s... |
github | sabbiu/ObjectDetection-master | vl_test_cummax.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_cummax.m | 838 | utf_8 | 5e98ee1681d4823f32ecc4feaa218611 | function results = vl_test_cummax(varargin)
% VL_TEST_CUMMAX
vl_test_init ;
function test_basic()
vl_assert_almost_equal(...
vl_cummax(1), 1) ;
vl_assert_almost_equal(...
vl_cummax([1 2 3 4], 2), [1 2 3 4]) ;
function test_multidim()
a = [1 2 3 4 3 2 1] ;
b = [1 2 3 4 4 4 4] ;
for k=1:6
dims = ones(1,6) ;
dim... |
github | sabbiu/ObjectDetection-master | vl_test_imintegral.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_imintegral.m | 1,429 | utf_8 | 4750f04ab0ac9fc4f55df2c8583e5498 | function results = vl_test_imintegral(varargin)
% VL_TEST_IMINTEGRAL
vl_test_init ;
function state = setup()
state.I = ones(5,6) ;
state.correct = [ 1 2 3 4 5 6 ;
2 4 6 8 10 12 ;
3 6 9 12 15 18 ;
4 8 12 ... |
github | sabbiu/ObjectDetection-master | vl_test_sift.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_sift.m | 1,318 | utf_8 | 806c61f9db9f2ebb1d649c9bfcf3dc0a | function results = vl_test_sift(varargin)
% VL_TEST_SIFT
vl_test_init ;
function s = setup()
s.I = im2single(imread(fullfile(vl_root,'data','box.pgm'))) ;
[s.ubc.f, s.ubc.d] = ...
vl_ubcread(fullfile(vl_root,'data','box.sift')) ;
function test_ubc_descriptor(s)
err = [] ;
[f, d] = vl_sift(s.I,...
... |
github | sabbiu/ObjectDetection-master | vl_test_binsum.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_binsum.m | 1,377 | utf_8 | f07f0f29ba6afe0111c967ab0b353a9d | function results = vl_test_binsum(varargin)
% VL_TEST_BINSUM
vl_test_init ;
function test_three_args()
vl_assert_almost_equal(...
vl_binsum([0 0], 1, 2), [0 1]) ;
vl_assert_almost_equal(...
vl_binsum([1 7], -1, 1), [0 7]) ;
vl_assert_almost_equal(...
vl_binsum([1 7], -1, [1 2 2 2 2 2 2 2]), [0 0]) ;
function te... |
github | sabbiu/ObjectDetection-master | vl_test_lbp.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_lbp.m | 892 | utf_8 | a79c0ce0c85e25c0b1657f3a0b499538 | function results = vl_test_lbp(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_unfiorm_lbps(s)
% enumerate the 56 uniform lbps
q = 0 ;
for i=0:7
for j=1:7
I = zeros(3) ;
p = mod(s.pixels - i + 8, 8) + 1 ;
I(p <= j) = 1 ;
f = vl_lbp(single(I), 3) ;
q = q + 1 ;
vl_assert_equal(find(f... |
github | sabbiu/ObjectDetection-master | vl_test_colsubset.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_colsubset.m | 828 | utf_8 | be0c080007445b36333b863326fb0f15 | function results = vl_test_colsubset(varargin)
% VL_TEST_COLSUBSET
vl_test_init ;
function s = setup()
s.x = [5 2 3 6 4 7 1 9 8 0] ;
function test_beginning(s)
vl_assert_equal(1:5, vl_colsubset(1:10, 5, 'beginning')) ;
vl_assert_equal(1:5, vl_colsubset(1:10, .5, 'beginning')) ;
function test_ending(s)
vl_assert_equa... |
github | sabbiu/ObjectDetection-master | vl_test_alldist.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_alldist.m | 2,373 | utf_8 | 9ea1a36c97fe715dfa2b8693876808ff | function results = vl_test_alldist(varargin)
% VL_TEST_ALLDIST
vl_test_init ;
function s = setup()
vl_twister('state', 0) ;
s.X = 3.1 * vl_twister(10,10) ;
s.Y = 4.7 * vl_twister(10,7) ;
function test_null_args(s)
vl_assert_equal(...
vl_alldist(zeros(15,12), zeros(15,0), 'kl2'), ...
zeros(12,0)) ;
vl_assert_equa... |
github | sabbiu/ObjectDetection-master | vl_test_ihashsum.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_ihashsum.m | 581 | utf_8 | edc283062469af62056b0782b171f5fc | function results = vl_test_ihashsum(varargin)
% VL_TEST_IHASHSUM
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(round(16*rand(2,100))) ;
sel = find(all(s.data==0)) ;
s.data(1,sel)=1 ;
function test_hash(s)
D = size(s.data,1) ;
K = 5 ;
h = zeros(1,K,'uint32') ;
id = zeros(D,K,'uint8');
next = zer... |
github | sabbiu/ObjectDetection-master | vl_test_grad.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_grad.m | 434 | utf_8 | 4d03eb33a6a4f68659f868da95930ffb | function results = vl_test_grad(varargin)
% VL_TEST_GRAD
vl_test_init ;
function s = setup()
s.I = rand(150,253) ;
s.I_small = rand(2,2) ;
function test_equiv(s)
vl_assert_equal(gradient(s.I), vl_grad(s.I)) ;
function test_equiv_small(s)
vl_assert_equal(gradient(s.I_small), vl_grad(s.I_small)) ;
function test_equiv... |
github | sabbiu/ObjectDetection-master | vl_test_whistc.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_whistc.m | 1,384 | utf_8 | 81c446d35c82957659840ab2a579ec2c | function results = vl_test_whistc(varargin)
% VL_TEST_WHISTC
vl_test_init ;
function test_acc()
x = ones(1, 10) ;
e = 1 ;
o = 1:10 ;
vl_assert_equal(vl_whistc(x, o, e), 55) ;
function test_basic()
x = 1:10 ;
e = 1:10 ;
o = ones(1, 10) ;
vl_assert_equal(histc(x, e), vl_whistc(x, o, e)) ;
x = linspace(-1,11,100) ;
o =... |
github | sabbiu/ObjectDetection-master | vl_test_roc.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_roc.m | 1,019 | utf_8 | 9b2ae71c9dc3eda0fc54c65d55054d0c | function results = vl_test_roc(varargin)
% VL_TEST_ROC
vl_test_init ;
function s = setup()
s.scores0 = [5 4 3 2 1] ;
s.scores1 = [5 3 4 2 1] ;
s.labels = [1 1 -1 -1 -1] ;
function test_perfect_tptn(s)
[tpr,tnr] = vl_roc(s.labels,s.scores0) ;
vl_assert_almost_equal(tpr, [0 1 2 2 2 2] / 2) ;
vl_assert_almost_equal(tnr,... |
github | sabbiu/ObjectDetection-master | vl_test_dsift.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_dsift.m | 2,048 | utf_8 | fbbfb16d5a21936c1862d9551f657ccc | function results = vl_test_dsift(varargin)
% VL_TEST_DSIFT
vl_test_init ;
function s = setup()
I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
s.I = rgb2gray(single(I)) ;
function test_fast_slow(s)
binSize = 4 ; % bin size in pixels
magnif = 3 ; % bin size / keypoint scale
scale = binSize... |
github | sabbiu/ObjectDetection-master | vl_test_alldist2.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_alldist2.m | 2,284 | utf_8 | 89a787e3d83516653ae8d99c808b9d67 | function results = vl_test_alldist2(varargin)
% VL_TEST_ALLDIST
vl_test_init ;
% TODO: test integer classes
function s = setup()
vl_twister('state', 0) ;
s.X = 3.1 * vl_twister(10,10) ;
s.Y = 4.7 * vl_twister(10,7) ;
function test_null_args(s)
vl_assert_equal(...
vl_alldist2(zeros(15,12), zeros(15,0), 'kl2'), ...
... |
github | sabbiu/ObjectDetection-master | vl_test_fisher.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_fisher.m | 2,097 | utf_8 | c9afd9ab635bd412cbf8be3c2d235f6b | function results = vl_test_fisher(varargin)
% VL_TEST_FISHER
vl_test_init ;
function s = setup()
randn('state',0) ;
dimension = 5 ;
numData = 21 ;
numComponents = 3 ;
s.x = randn(dimension,numData) ;
s.mu = randn(dimension,numComponents) ;
s.sigma2 = ones(dimension,numComponents) ;
s.prior = ones(1,numComponents) ;
s... |
github | sabbiu/ObjectDetection-master | vl_test_imsmooth.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_imsmooth.m | 1,837 | utf_8 | 718235242cad61c9804ba5e881c22f59 | function results = vl_test_imsmooth(varargin)
% VL_TEST_IMSMOOTH
vl_test_init ;
function s = setup()
I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
I = max(min(vl_imdown(I),1),0) ;
s.I = single(I) ;
function test_pad_by_continuity(s)
% Convolving a constant signal padded with continuity does not change... |
github | sabbiu/ObjectDetection-master | vl_test_svmtrain.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_svmtrain.m | 4,277 | utf_8 | 071b7c66191a22e8236fda16752b27aa | function results = vl_test_svmtrain(varargin)
% VL_TEST_SVMTRAIN
vl_test_init ;
end
function s = setup()
randn('state',0) ;
Np = 10 ;
Nn = 10 ;
xp = diag([1 3])*randn(2, Np) ;
xn = diag([1 3])*randn(2, Nn) ;
xp(1,:) = xp(1,:) + 2 + 1 ;
xn(1,:) = xn(1,:) - 2 + 1 ;
s.x = [xp xn] ;
s.y = [ones(1,Np) ... |
github | sabbiu/ObjectDetection-master | vl_test_phow.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_phow.m | 549 | utf_8 | f761a3bb218af855986263c67b2da411 | function results = vl_test_phow(varargin)
% VL_TEST_PHOPW
vl_test_init ;
function s = setup()
s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
s.I = single(s.I) ;
function test_gray(s)
[f,d] = vl_phow(s.I, 'color', 'gray') ;
assert(size(d,1) == 128) ;
function test_rgb(s)
[f,d] = vl_phow(s.I, 'color',... |
github | sabbiu/ObjectDetection-master | vl_test_kmeans.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_kmeans.m | 3,632 | utf_8 | 0e1d6f4f8101c8982a0e743e0980c65a | function results = vl_test_kmeans(varargin)
% VL_TEST_KMEANS
% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
vl_test_init ;
function s = setup()
randn('sta... |
github | sabbiu/ObjectDetection-master | vl_test_hikmeans.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_hikmeans.m | 463 | utf_8 | dc3b493646e66316184e86ff4e6138ab | function results = vl_test_hikmeans(varargin)
% VL_TEST_IKMEANS
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(rand(2,1000) * 255) ;
function test_basic(s)
[tree, assign] = vl_hikmeans(s.data,3,100) ;
assign_ = vl_hikmeanspush(tree, s.data) ;
vl_assert_equal(assign,assign_) ;
function test_elka... |
github | sabbiu/ObjectDetection-master | vl_test_aib.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_aib.m | 1,277 | utf_8 | 78978ae54e7ebe991d136336ba4bf9c6 | function results = vl_test_aib(varargin)
% VL_TEST_AIB
vl_test_init ;
function s = setup()
s = [] ;
function test_basic(s)
Pcx = [.3 .3 0 0
0 0 .2 .2] ;
% This results in the AIB tree
%
% 1 - \
% 5 - \
% 2 - / \
% - 7
% 3 - \ /
% 6 - /
% 4 - /
%
% coded by the map [5 ... |
github | sabbiu/ObjectDetection-master | vl_test_plotbox.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_plotbox.m | 414 | utf_8 | aa06ce4932a213fb933bbede6072b029 | function results = vl_test_plotbox(varargin)
% VL_TEST_PLOTBOX
vl_test_init ;
function test_basic(s)
figure(1) ; clf ;
vl_plotbox([-1 -1 1 1]') ;
xlim([-2 2]) ;
ylim([-2 2]) ;
close(1) ;
function test_multiple(s)
figure(1) ; clf ;
randn('state', 0) ;
vl_plotbox(randn(4,10)) ;
close(1) ;
function test_style(s)
figure... |
github | sabbiu/ObjectDetection-master | vl_test_imarray.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_imarray.m | 795 | utf_8 | c5e6a5aa8c2e63e248814f5bd89832a8 | function results = vl_test_imarray(varargin)
% VL_TEST_IMARRAY
vl_test_init ;
function test_movie_rgb(s)
A = rand(23,15,3,4) ;
B = vl_imarray(A,'movie',true) ;
function test_movie_indexed(s)
cmap = get(0,'DefaultFigureColormap') ;
A = uint8(size(cmap,1)*rand(23,15,4)) ;
A = min(A,size(cmap,1)-1) ;
B = vl_imarray(A,'m... |
github | sabbiu/ObjectDetection-master | vl_test_homkermap.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_homkermap.m | 1,903 | utf_8 | c157052bf4213793a961bde1f73fb307 | function results = vl_test_homkermap(varargin)
% VL_TEST_HOMKERMAP
vl_test_init ;
function check_ker(ker, n, window, period)
args = {n, ker, 'window', window} ;
if nargin > 3
args = {args{:}, 'period', period} ;
end
x = [-1 -.5 0 .5 1] ;
y = linspace(0,2,100) ;
for conv = {@single, @double}
x = feval(conv{1}, x) ;... |
github | sabbiu/ObjectDetection-master | vl_test_slic.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_slic.m | 200 | utf_8 | 12a6465e3ef5b4bcfd7303cd8a9229d4 | function results = vl_test_slic(varargin)
% VL_TEST_SLIC
vl_test_init ;
function s = setup()
s.im = im2single(vl_impattern('roofs1')) ;
function test_slic(s)
segmentation = vl_slic(s.im, 10, 0.1) ;
|
github | sabbiu/ObjectDetection-master | vl_test_ikmeans.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_ikmeans.m | 466 | utf_8 | 1ee2f647ac0035ed0d704a0cd615b040 | function results = vl_test_ikmeans(varargin)
% VL_TEST_IKMEANS
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(rand(2,1000) * 255) ;
function test_basic(s)
[centers, assign] = vl_ikmeans(s.data,100) ;
assign_ = vl_ikmeanspush(s.data, centers) ;
vl_assert_equal(assign,assign_) ;
function test_elk... |
github | sabbiu/ObjectDetection-master | vl_test_mser.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_mser.m | 242 | utf_8 | 1ad33563b0c86542a2978ee94e0f4a39 | function results = vl_test_mser(varargin)
% VL_TEST_MSER
vl_test_init ;
function s = setup()
s.im = im2uint8(rgb2gray(vl_impattern('roofs1'))) ;
function test_mser(s)
[regions,frames] = vl_mser(s.im) ;
mask = vl_erfill(s.im, regions(1)) ;
|
github | sabbiu/ObjectDetection-master | vl_test_inthist.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_inthist.m | 811 | utf_8 | 459027d0c54d8f197563a02ab66ef45d | function results = vl_test_inthist(varargin)
% VL_TEST_INTHIST
vl_test_init ;
function s = setup()
rand('state',0) ;
s.labels = uint32(8*rand(123, 76, 3)) ;
function test_basic(s)
l = 10 ;
hist = vl_inthist(s.labels, 'numlabels', l) ;
hist_ = inthist_slow(s.labels, l) ;
vl_assert_equal(double(hist),hist_) ;
function... |
github | sabbiu/ObjectDetection-master | vl_test_imdisttf.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_imdisttf.m | 1,885 | utf_8 | ae921197988abeb984cbcdf9eaf80e77 | function results = vl_test_imdisttf(varargin)
% VL_TEST_DISTTF
vl_test_init ;
function test_basic()
for conv = {@single, @double}
conv = conv{1} ;
I = conv([0 0 0 ; 0 -2 0 ; 0 0 0]) ;
D = vl_imdisttf(I);
assert(isequal(D, conv(- [0 1 0 ; 1 2 1 ; 0 1 0]))) ;
I(2,2) = -3 ;
[D,map] = vl_imdisttf(I) ;
asse... |
github | sabbiu/ObjectDetection-master | vl_test_vlad.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_vlad.m | 1,977 | utf_8 | d3797288d6edb1d445b890db3780c8ce | function results = vl_test_vlad(varargin)
% VL_TEST_VLAD
vl_test_init ;
function s = setup()
randn('state',0) ;
s.x = randn(128,256) ;
s.mu = randn(128,16) ;
assignments = rand(16, 256) ;
s.assignments = bsxfun(@times, assignments, 1 ./ sum(assignments,1)) ;
function test_basic (s)
x = [1, 2, 3] ;
mu = [0, 0, 0] ;
a... |
github | sabbiu/ObjectDetection-master | vl_test_pr.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_pr.m | 3,763 | utf_8 | 4d1da5ccda1a7df2bec35b8f12fdd620 | function results = vl_test_pr(varargin)
% VL_TEST_PR
vl_test_init ;
function s = setup()
s.scores0 = [5 4 3 2 1] ;
s.scores1 = [5 3 4 2 1] ;
s.labels = [1 1 -1 -1 -1] ;
function test_perfect_tptn(s)
[rc,pr] = vl_pr(s.labels,s.scores0) ;
vl_assert_almost_equal(pr, [1 1/1 2/2 2/3 2/4 2/5]) ;
vl_assert_almost_equal(rc, ... |
github | sabbiu/ObjectDetection-master | vl_test_hog.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_hog.m | 1,555 | utf_8 | eed7b2a116d142040587dc9c4eb7cd2e | function results = vl_test_hog(varargin)
% VL_TEST_HOG
vl_test_init ;
function s = setup()
s.im = im2single(vl_impattern('roofs1')) ;
[x,y]= meshgrid(linspace(-1,1,128)) ;
s.round = single(x.^2+y.^2);
s.imSmall = s.im(1:128,1:128,:) ;
s.imSmall = s.im ;
s.imSmallFlipped = s.imSmall(:,end:-1:1,:) ;
function test_basic... |
github | sabbiu/ObjectDetection-master | vl_test_argparse.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_argparse.m | 795 | utf_8 | e72185b27206d0ee1dfdc19fe77a5be6 | function results = vl_test_argparse(varargin)
% VL_TEST_ARGPARSE
vl_test_init ;
function test_basic()
opts.field1 = 1 ;
opts.field2 = 2 ;
opts.field3 = 3 ;
opts_ = opts ;
opts_.field1 = 3 ;
opts_.field2 = 10 ;
opts = vl_argparse(opts, {'field2', 10, 'field1', 3}) ;
assert(isequal(opts, opts_)) ;
opts_.field1 = 9 ;
... |
github | sabbiu/ObjectDetection-master | vl_test_liop.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_liop.m | 1,023 | utf_8 | a162be369073bed18e61210f44088cf3 | function results = vl_test_liop(varargin)
% VL_TEST_SIFT
vl_test_init ;
function s = setup()
randn('state',0) ;
s.patch = randn(65,'single') ;
xr = -32:32 ;
[x,y] = meshgrid(xr) ;
s.blob = - single(x.^2+y.^2) ;
function test_basic(s)
d = vl_liop(s.patch) ;
function test_blob(s)
% with a blob, all local intensity ord... |
github | sabbiu/ObjectDetection-master | vl_test_binsearch.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/xtest/vl_test_binsearch.m | 1,339 | utf_8 | 85dc020adce3f228fe7dfb24cf3acc63 | function results = vl_test_binsearch(varargin)
% VL_TEST_BINSEARCH
vl_test_init ;
function test_inf_bins()
x = [-inf -1 0 1 +inf] ;
vl_assert_equal(vl_binsearch([], x), [0 0 0 0 0]) ;
vl_assert_equal(vl_binsearch([-inf 0], x), [1 1 2 2 2]) ;
vl_assert_equal(vl_binsearch([-inf], x), [1 1 1 1 1]) ;
vl_a... |
github | sabbiu/ObjectDetection-master | vl_roc.m | .m | ObjectDetection-master/Project-GUI/vlfeat-0.9.20/toolbox/plotop/vl_roc.m | 10,113 | utf_8 | 22fd8ff455ee62a96ffd94b9074eafeb | function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
%VL_ROC ROC curve.
% [TPR,TNR] = VL_ROC(LABELS, SCORES) computes the Receiver Operating
% Characteristic (ROC) curve [1]. LABELS is a row vector of ground
% truth labels, greater than zero for a positive sample and smaller
% than zero for a negative o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.