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 | jianxiongxiao/SFMedu-master | vl_quickvis.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_demo_aib.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_demo_alldist.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_demo_kdtree_sift.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/demo/vl_demo_kdtree_sift.m | 6,822 | utf_8 | 191589ff45e0f5cdb79b1eed1b1bb906 | 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 | jianxiongxiao/SFMedu-master | vl_tpsu.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_xyz2lab.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_twister.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_twister.m | 1,162 | utf_8 | 1ae9040a416db503ad73600f081d096b | 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 | jianxiongxiao/SFMedu-master | vl_test_kdtree.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_kdtree.m | 2,448 | utf_8 | 66f429ff8286089a34c193d7d3f9f016 | 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 | jianxiongxiao/SFMedu-master | vl_test_imwbackward.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_pegasos.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_pegasos.m | 2,852 | utf_8 | 45a09a3bfefa3facd439fefbb7f1a903 | function results = vl_test_pegasos(varargin)
% VL_TEST_KDTREE
vl_test_init ;
function s = setup()
randn('state',0) ;
s.biasMultiplier = 10 ;
s.lambda = 0.01 ;
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... |
github | jianxiongxiao/SFMedu-master | vl_test_alphanum.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_imintegral.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_sift.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_binsum.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_binsum.m | 1,301 | utf_8 | 5bbd389cbc4d997e413d809fe4efda6d | 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 | jianxiongxiao/SFMedu-master | vl_test_lbp.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_lbp.m | 1,056 | utf_8 | 3b5cca50109af84014e56a4280a3352a | function results = vl_test_lbp(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_one_on()
I = {} ;
I{1} = [0 0 0 ; 0 0 1 ; 0 0 0] ;
I{2} = [0 0 0 ; 0 0 0 ; 0 0 1] ;
I{3} = [0 0 0 ; 0 0 0 ; 0 1 0] ;
I{4} = [0 0 0 ; 0 0 0 ; 1 0 0] ;
I{5} = [0 0 0 ; 1 0 0 ; 0 0 0] ;
I{6} = [1 0 0 ; 0 0 0 ; 0 0 0] ;
I{7} = [0 1 0 ;... |
github | jianxiongxiao/SFMedu-master | vl_test_colsubset.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_alldist.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_grad.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_whistc.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_dsift.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_imsmooth.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_phow.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_kmeans.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_kmeans.m | 2,788 | utf_8 | 14374b7dbae832fc3509e02caf00cdf5 | 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 | jianxiongxiao/SFMedu-master | vl_test_imarray.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_homkermap.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_slic.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/xtest/vl_test_slic.m | 229 | utf_8 | 42c827b383cca74cae2540e5da870bbf | function results = vl_test_slic(varargin)
% VL_TEST_SLIC
vl_test_init ;
function s = setup()
s.im = im2single(imread(fullfile(vl_root,'data','a.jpg'))) ;
function test_slic(s)
segmentation = vl_slic(s.im, 10, 0.1, 'verbose') ;
|
github | jianxiongxiao/SFMedu-master | vl_test_imdisttf.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_argparse.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_test_binsearch.m | .m | SFMedu-master/matchSIFT/vlfeat/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 | jianxiongxiao/SFMedu-master | vl_plotframe.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/plotop/vl_plotframe.m | 5,410 | utf_8 | 8c48bac1c5d80dba361b67cd135103d9 | function h=vl_plotframe(frames,varargin)
% VL_PLOTFRAME Plot feature frame
% VL_PLOTFRAME(FRAME) plots the frames FRAME. Frames are attributed
% image regions (as, for example, extracted by a feature detector). A
% frame is a vector of D=2,3,..,6 real numbers, depending on its
% class. VL_PLOTFRAME() supports the... |
github | jianxiongxiao/SFMedu-master | vl_roc.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/plotop/vl_roc.m | 6,848 | utf_8 | 3d7ed746da2d3f389ad56c8e36f006d7 | function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
% VL_ROC Compute ROC curve
% [TP,TN] = VL_ROC(LABELS, SCORES) computes the receiver operating
% characteristic (ROC curve). LABELS are the ground thruth labels (+1
% or -1) and SCORE is the scores assigned to them by a classifier
% (higher scores correspond... |
github | jianxiongxiao/SFMedu-master | vl_click.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/plotop/vl_click.m | 2,661 | utf_8 | 6982e869cf80da57fdf68f5ebcd05a86 | function P = vl_click(N,varargin) ;
% VL_CLICK Click a point
% P=VL_CLICK() let the user click a point in the current figure and
% returns its coordinates in P. P is a two dimensiona vectors where
% P(1) is the point X-coordinate and P(2) the point Y-coordinate. The
% user can abort the operation by pressing any k... |
github | jianxiongxiao/SFMedu-master | vl_ubcread.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/sift/vl_ubcread.m | 3,015 | utf_8 | e8ddd3ecd87e76b6c738ba153fef050f | function [f,d] = vl_ubcread(file, varargin)
% SIFTREAD Read Lowe's SIFT implementation data files
% [F,D] = VL_UBCREAD(FILE) reads the frames F and the descriptors D
% from FILE in UBC (Lowe's original implementation of SIFT) format
% and returns F and D as defined by VL_SIFT().
%
% VL_UBCREAD(FILE, 'FORMAT', '... |
github | jianxiongxiao/SFMedu-master | vl_plotsiftdescriptor.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/sift/vl_plotsiftdescriptor.m | 4,348 | utf_8 | b9a98b0c298fa249fb5fcd1314762b88 | function h=vl_plotsiftdescriptor(d,f,varargin)
% VL_PLOTSIFTDESCRIPTOR Plot SIFT descriptor
% VL_PLOTSIFTDESCRIPTOR(D) plots the SIFT descriptors D, stored as
% columns of the matrix D. D has the same format used by VL_SIFT().
%
% VL_PLOTSIFTDESCRIPTOR(D,F) plots the SIFT descriptors warped to
% the SIFT fram... |
github | jianxiongxiao/SFMedu-master | vl_test_twister.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_twister.m | 1,166 | utf_8 | 1e18a0b343ffe164ec9c941e18575c05 | function vl_test_twister
% VL_TEST_TWISTER
% test seed by scalar
rand('twister',1) ; a = rand ;
vl_twister('state',1) ; b = vl_twister ;
check(a,b,'twister: seed by scalar + VL_TWISTER()') ;
% read state
rand('twister') ; a = rand('twister') ;
vl_twister('state') ; b = vl_twister('state') ;
check(a,b,'twister: read s... |
github | jianxiongxiao/SFMedu-master | vl_test_imintegral.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_imintegral.m | 1,257 | utf_8 | d5ad8d073e99ff451cc1b692da99ec6d | function vl_test_imintegral
I = ones(5,6);
correct = [1 2 3 4 5 6;
2 4 6 8 10 12;
3 6 9 12 15 18;
4 8 12 16 20 24;
5 10 15 20 25 30;];
if ~all(all(slow_imintegral(I) == correct))
fpri... |
github | jianxiongxiao/SFMedu-master | vl_test_sift.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_sift.m | 1,849 | utf_8 | cfae71614a40aebf645eb42102ca53f3 | function vl_test_sift
% VL_TEST_SIFT Test VL_SIFT implementation(s)
I = vl_test_pattern(101);
% run various instances of the code
[a0,b0] = vl_sift(single(I),'verbose','peaktresh',0,'levels',4) ;
[a1,b1] = cmd_sift(I,'--first-octave=0 --peak-tresh=0 --levels=4') ;
[a2,b2] = cmd_sift(I,'--first-octave=0',1) ;
[a3,... |
github | jianxiongxiao/SFMedu-master | vl_test_binsum.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_binsum.m | 1,030 | utf_8 | c69da861d697e8228e243a385f5ba545 | function vl_test_binsum
% VL_TEST_BINSUM Test VL_BINSUM function
testh({[0 0], 1, 2}, [0 1] ) ;
testh({[1 7], -1, 1}, [0 7] ) ;
testh({[1 7], -1, [1 2 2 2 2 2 2 2]}, [0 0] ) ;
testh({eye(3), [1 1 1], [1 2 3], 1 }, 2*eye(3)) ;
testh({eye(3), [1 1 1]', [1 2 3]', 2 }, 2*eye... |
github | jianxiongxiao/SFMedu-master | vl_test_imsmooth.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_imsmooth.m | 1,566 | utf_8 | 27ae6791e4ca852539a031b78ae7a00b | function vl_test_imsmooth
I = im2double(imread('data/spots.jpg')) ;
I = max(min(imresize(I,2),1),0) ;
I = single(I) ;
global fign ;
fign = 1 ;
step = 1 ;
ker = 'gaussian' ;
testmany(I,'triangular',1) ;
testmany(I,'triangular',2) ;
testmany(I,'gaussian',1) ;
testmany(I,'gaussian',2) ;
function testmany(I,ker,step)... |
github | jianxiongxiao/SFMedu-master | vl_test_hikmeans.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_hikmeans.m | 2,037 | utf_8 | f57532e5de667fbe2f6cb9c714f20457 | function vl_test_hikmeans
% VL_TEST_HIKMEANS Test VL_HIKMEANS function
K = 2;
nleaves = 2;
data = uint8(rand(2,100)*255);
[tree,A] = vl_hikmeans(data,K,nleaves,'verbose','verbose');
%keyboard;
K = 3 ;
nleaves = 100 ;
data = uint8(rand(2,1000) * 255) ;
datat = uint8(rand(2,10000)* 255) ;
[... |
github | jianxiongxiao/SFMedu-master | vl_test_homkmap.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_homkmap.m | 1,493 | utf_8 | a78c933efd15a4279e2724ba4441ad76 | function vl_test_homkmap
x = 2.^(-12:.1:0) ;
L = .3 ;
n = 4 ;
V = vl_homkmap(x, n, L, 'kchi2') ;
V_ = featureMap('chi2', n, L, x, 1) ;
V
V_
figure(1) ; clf ;
subplot(1,2,1) ;
semilogx(x,V_','-') ; hold on ;
semilogy(x,V','--') ;
subplot(1,2,2);
plot(x,V_','-') ; hold on ;
plot(x,V','--') ;
function psi = feat... |
github | jianxiongxiao/SFMedu-master | vl_test_aibhist.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_aibhist.m | 2,263 | utf_8 | d46c6fa557ab0d00e465eaedd060add9 | % VL_TEST_AIBHIST
function vl_test_aibhist
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 ;
C = 1:K*K ;
Pcx = zeros(3,K*K) ;
f1 = quantize(X1,D,K) ;
f2 = quantize(X2,D,K) ;... |
github | jianxiongxiao/SFMedu-master | vl_test_ikmeans.m | .m | SFMedu-master/matchSIFT/vlfeat/toolbox/test/vl_test_ikmeans.m | 1,552 | utf_8 | 1d5747a991a0d81ed4f7a2c90cd2a213 | function vl_test_ikmeans
% VL_TEST_IKMEANS Test VL_IKMEANS function
fprintf('test_ikmeans: Testing VL_IKMEANS and IKMEANSPUSH\n')
% -----------------------------------------------------------------------
fprintf('test_ikmeans: Testing Lloyd algorithm\n')
K = 3 ;
data = uint8(rand(2,1000) * 255) ;
datat = ... |
github | jianxiongxiao/SFMedu-master | phow_caltech101.m | .m | SFMedu-master/matchSIFT/vlfeat/apps/phow_caltech101.m | 11,269 | utf_8 | 91ef403a7a3865b32e7a5673350fec49 | function phow_caltech101
% PHOW_CALTECH101 Image classification in the Caltech-101 dataset
% This program demonstrates how to use VLFeat to construct an image
% classifier on the Caltech-101 data. The classifier uses PHOW
% features (dense SIFT), spatial histograms of visual words, and a
% Chi2 SVM. To speedup ... |
github | jianxiongxiao/SFMedu-master | sift_mosaic.m | .m | SFMedu-master/matchSIFT/vlfeat/apps/sift_mosaic.m | 4,621 | utf_8 | 8fa3ad91b401b8f2400fb65944c79712 | function mosaic = sift_mosaic(im1, im2)
% SIFT_MOSAIC Demonstrates matching two images using SIFT and RANSAC
%
% SIFT_MOSAIC demonstrates matching two images based on SIFT
% features and RANSAC and computing their mosaic.
%
% SIFT_MOSAIC by itself runs the algorithm on two standard test
% images. Use SIFT_MOSAI... |
github | xenron/sandbox-github-clone-master | classification_demo.m | .m | sandbox-github-clone-master/HanXiaoyang/image_retrieval/caffe/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | 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 | xenron/sandbox-github-clone-master | spp_train.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/spp_train.m | 18,062 | utf_8 | 04708700969d6d1e195eb33c5139c5b4 | function [spp_model] = spp_train(imdb, roidb, varargin)
% [spp_model] = spp_train(imdb, roidb, varargin)
% Trains a SPP detector for all classes in the imdb.
%
% Keys that can be passed in:
%
% svm_C SVM regularization parameter
% bias_mult Bias feature value (for liblinear)
% pos_loss_... |
github | xenron/sandbox-github-clone-master | spp_test.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/spp_test.m | 6,213 | utf_8 | 7d704487f42fd6a5394ccf07107448be | function res = spp_test(spp_model, imdb, roidb, feat_cache, suffix, fast, evaluate)
% res = spp_test(spp_model, imdb, roidb, feat_cache, suffix, fast, evaluate)
% Compute test results using the trained spp_model on the
% image database specified by imdb. Results are saved
% with an optional suffix.
%
% Adapted fr... |
github | xenron/sandbox-github-clone-master | spp_config.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/spp_config.m | 4,368 | utf_8 | 431f887c109236424fe87e3724fcbd11 | function conf = spp_config(varargin)
% Set up configuration variables.
% conf = spp_config(varargin)
%
% Adapted from spp code written by Ross Girshick
% AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Shaoqing Ren
%
% This file is part of the SPP code and is available
%... |
github | xenron/sandbox-github-clone-master | spp_finetune_voc.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/finetuning/spp_finetune_voc.m | 14,059 | utf_8 | 9942dc63ae7bfdb41768fe628d788b95 | function finetuned_model_path = spp_finetune_voc(opts)
% [] = spp_finetune_voc(opts)
% finetune fc layers
%
% this version read conv feature maps from disk each iteration for compatibility and small
% memory usage. load all conv feature maps into memory will accelerate finetuning
% greatly
%
% AUTORIGHTS
% --------... |
github | xenron/sandbox-github-clone-master | spp_test_svm_bbox_regressor.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/bbox_regression/spp_test_svm_bbox_regressor.m | 7,022 | utf_8 | 4b57bd105d47b6cb4fb40a0165fdd492 | function res = spp_test_svm_bbox_regressor(spp_model, imdb, roidb, bbox_reg, feat_cache, suffix, fast)
% res = spp_test_svm_bbox_regressor(spp_model, imdb, roidb, bbox_reg, feat_cache, suffix, fast)
% Compute test results using the trained spp_model on the
% image database specified by imdb. Results are saved
% w... |
github | xenron/sandbox-github-clone-master | spp_train_bbox_regressor.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/bbox_regression/spp_train_bbox_regressor.m | 9,742 | utf_8 | a1c42c6f6ebec259b894152b7634b61f | function bbox_reg = spp_train_bbox_regressor(imdb, roidb, spp_model, varargin)
% bbox_reg = spp_train_bbox_regressor(imdb, roidb, spp_model, varargin)
% Trains a bounding box regressor on the image database imdb
% for use with the SPP model spp_model. The regressor is trained
% using ridge regression.
%
% Keys ... |
github | xenron/sandbox-github-clone-master | subsample_images.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/utils/subsample_images.m | 3,015 | utf_8 | b885f5fbed8f95d51f215da90b553c40 | function [imdbs, roidbs] = subsample_images(imdbs, roidbs, num_per_class, seed, scale_filter)
if nargin < 5
scale_filter = [];
end
if ~exist('seed', 'var')
seed = [];
end
class_num = cellfun(@(x) length(x.class_ids), imdbs, 'UniformOutput', true);
assert(length(unique(class_num)) == 1);
class_num = unique(clas... |
github | xenron/sandbox-github-clone-master | test_2010_from_2012.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/utils/test_2010_from_2012.m | 1,163 | utf_8 | 4fd6b5864d38807aaadcc7d98084912b | function test_2010_from_2012()
year = '2010';
testset = 'test';
VOCdevkit2012 = './datasets/VOCdevkit2012';
VOCdevkit2010 = './datasets/VOCdevkit2010';
imdb_2012 = imdb_from_voc(VOCdevkit2012, 'test', '2012');
image_ids_2010 = get_2010_test_image_ids();
detrespath_2010 = '/work4/rbg/VOC2010/VOCdevkit/results/VOC201... |
github | xenron/sandbox-github-clone-master | roidb_from_voc.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/imdb/roidb_from_voc.m | 5,915 | utf_8 | 2d67f5d1af8c72f45dca3a5e40719cf5 | function roidb = roidb_from_voc(imdb, with_hard_samples, with_selective_search, with_edge_box, rootDir)
% roidb = roidb_from_voc(imdb, rootDir)
% Builds an regions of interest database from imdb image
% database. Uses precomputed selective search boxes available
% in the R-CNN data package.
%
% Inspired by Andr... |
github | xenron/sandbox-github-clone-master | showboxes_new.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/vis/showboxes_new.m | 1,485 | utf_8 | 51e3ec15df847948200caee1756a1a6d | function showboxes_new(im, boxes, legends)
% Draw bounding boxes on top of an image.
% showboxes(im, boxes)
%
% -------------------------------------------------------
fix_width = 800;
imsz = size(im);
scale = fix_width / imsz(2);
im = imresize(im, scale);
boxes = cellfun(@(x) x * scale, boxes, 'UniformOutput', fal... |
github | xenron/sandbox-github-clone-master | Script_spp_voc.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/experiments/Script_spp_voc.m | 6,220 | utf_8 | 5916aa40e83f5fe8253ef30e2046a0f8 | function Script_spp_voc()
% Script_spp_voc()
%
% AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Shaoqing Ren
%
% This file is part of the SPP code and is available
% under the terms of the Simplified BSD License provided in
% LICENSE. Please retain this notice and... |
github | xenron/sandbox-github-clone-master | spp_exp_cache_features_voc.m | .m | sandbox-github-clone-master/ShaoqingRen/SPP_net/experiments/spp_exp_cache_features_voc.m | 4,451 | utf_8 | 83e1bb343570d5d4a403caeff81d5d31 | function spp_exp_cache_features_voc(chunk, opts)
% -------------------- CONFIG --------------------
if ~exist('opts', 'var')
opts.net_file = fullfile(pwd, 'data','cnn_model','Zeiler_conv5','Zeiler_conv5');
opts.net_def_file = fullfile(pwd, 'data','cnn_model','Zeiler_conv5','Zeiler_spm_scale224_test_c... |
github | xenron/sandbox-github-clone-master | fast_rcnn_get_minibatch.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_get_minibatch.m | 6,639 | utf_8 | 6fc8a42795ae5283c7f1af848e441eec | function [im_blob, rois_blob, labels_blob, bbox_targets_blob, bbox_loss_blob] = fast_rcnn_get_minibatch(conf, image_roidb)
% [im_blob, rois_blob, labels_blob, bbox_targets_blob, bbox_loss_blob] ...
% = fast_rcnn_get_minibatch(conf, image_roidb)
% --------------------------------------------------------
% Fast R-CNN
... |
github | xenron/sandbox-github-clone-master | fast_rcnn_conv_feat_detect.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_conv_feat_detect.m | 4,211 | utf_8 | 7757435a0286baaedd67b1aa30c1f523 | function [pred_boxes, scores] = fast_rcnn_conv_feat_detect(conf, caffe_net, im, conv_feat_blob, boxes, max_rois_num_in_gpu)
% [pred_boxes, scores] = fast_rcnn_conv_feat_detect(conf, caffe_net, im, conv_feat_blob, boxes, max_rois_num_in_gpu)
% --------------------------------------------------------
% Fast R-CNN
% Reimp... |
github | xenron/sandbox-github-clone-master | fast_rcnn_train.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_train.m | 11,078 | utf_8 | efd1eee216e32ac5a0a792f2796a1f4f | function save_model_path = fast_rcnn_train(conf, imdb_train, roidb_train, varargin)
% save_model_path = fast_rcnn_train(conf, imdb_train, roidb_train, varargin)
% --------------------------------------------------------
% Fast R-CNN
% Reimplementation based on Python Fast R-CNN (https://github.com/rbgirshick/fast-rcnn)... |
github | xenron/sandbox-github-clone-master | fast_rcnn_im_detect.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_im_detect.m | 4,781 | utf_8 | 76b56954f7f1f2d32f89b7d0a00e8338 | function [pred_boxes, scores] = fast_rcnn_im_detect(conf, caffe_net, im, boxes, max_rois_num_in_gpu)
% [pred_boxes, scores] = fast_rcnn_im_detect(conf, caffe_net, im, boxes, max_rois_num_in_gpu)
% --------------------------------------------------------
% Fast R-CNN
% Reimplementation based on Python Fast R-CNN (https:... |
github | xenron/sandbox-github-clone-master | fast_rcnn_test.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_test.m | 8,455 | utf_8 | 1b4a7dc5b5a0d67d5458497cdc47242d | function mAP = fast_rcnn_test(conf, imdb, roidb, varargin)
% mAP = fast_rcnn_test(conf, imdb, roidb, varargin)
% --------------------------------------------------------
% Fast R-CNN
% Reimplementation based on Python Fast R-CNN (https://github.com/rbgirshick/fast-rcnn)
% Copyright (c) 2015, Shaoqing Ren
% Licensed und... |
github | xenron/sandbox-github-clone-master | fast_rcnn_prepare_image_roidb.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_prepare_image_roidb.m | 5,790 | utf_8 | 217eeabed3ac683cc222b600869094a0 | function [image_roidb, bbox_means, bbox_stds] = fast_rcnn_prepare_image_roidb(conf, imdbs, roidbs, bbox_means, bbox_stds)
% [image_roidb, bbox_means, bbox_stds] = fast_rcnn_prepare_image_roidb(conf, imdbs, roidbs, cache_img, bbox_means, bbox_stds)
% Gather useful information from imdb and roidb
% pre-calculate mean... |
github | xenron/sandbox-github-clone-master | fast_rcnn_generate_sliding_windows.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/fast_rcnn/fast_rcnn_generate_sliding_windows.m | 1,729 | utf_8 | a788da565d8e7d1810407473c3135094 | function roidb = fast_rcnn_generate_sliding_windows(conf, imdb, roidb, roipool_in_size)
% [pred_boxes, scores] = fast_rcnn_conv_feat_detect(conf, im, conv_feat, boxes, max_rois_num_in_gpu, net_idx)
% --------------------------------------------------------
% Fast R-CNN
% Reimplementation based on Python Fast R-CNN (htt... |
github | xenron/sandbox-github-clone-master | proposal_generate_anchors.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_generate_anchors.m | 2,558 | utf_8 | 3712bef03385b5b03e207b13cc7a67a1 | function anchors = proposal_generate_anchors(cache_name, varargin)
% anchors = proposal_generate_anchors(cache_name, varargin)
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -----------------------... |
github | xenron/sandbox-github-clone-master | proposal_train.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_train.m | 14,555 | utf_8 | 3208bf1b1292bbcad07b7884f50bb57d | function save_model_path = proposal_train(conf, imdb_train, roidb_train, varargin)
% save_model_path = proposal_train(conf, imdb_train, roidb_train, varargin)
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for de... |
github | xenron/sandbox-github-clone-master | proposal_locate_anchors.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_locate_anchors.m | 2,092 | utf_8 | 2122289a0e5dc8538186e7fbb0e4840e | function [anchors, im_scales] = proposal_locate_anchors(conf, im_size, target_scale, feature_map_size)
% [anchors, im_scales] = proposal_locate_anchors(conf, im_size, target_scale, feature_map_size)
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed u... |
github | xenron/sandbox-github-clone-master | proposal_prepare_image_roidb.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_prepare_image_roidb.m | 8,724 | utf_8 | 5a43f4118ad33579350e6aca2ddb186f | function [image_roidb, bbox_means, bbox_stds] = proposal_prepare_image_roidb(conf, imdbs, roidbs, bbox_means, bbox_stds)
% [image_roidb, bbox_means, bbox_stds] = proposal_prepare_image_roidb(conf, imdbs, roidbs, cache_img, bbox_means, bbox_stds)
% --------------------------------------------------------
% Faster R-CNN
... |
github | xenron/sandbox-github-clone-master | proposal_im_detect.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_im_detect.m | 5,112 | utf_8 | 593894a0ed6fc3bcfa24d706877363fa | function [pred_boxes, scores, box_deltas_, anchors_, scores_] = proposal_im_detect(conf, caffe_net, im)
% [pred_boxes, scores, box_deltas_, anchors_, scores_] = proposal_im_detect(conf, im, net_idx)
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed u... |
github | xenron/sandbox-github-clone-master | proposal_generate_minibatch.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/functions/rpn/proposal_generate_minibatch.m | 5,423 | utf_8 | c75bed208f9c1b041a41967f150dffed | function [input_blobs, random_scale_inds] = proposal_generate_minibatch(conf, image_roidb)
% [input_blobs, random_scale_inds] = proposal_generate_minibatch(conf, image_roidb)
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [se... |
github | xenron/sandbox-github-clone-master | showboxes.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/utils/showboxes.m | 2,624 | utf_8 | be6b3bca7e6364f27e7ac8d3f76a3628 | function showboxes(im, boxes, legends, color_conf)
% Draw bounding boxes on top of an image.
% showboxes(im, boxes)
%
% -------------------------------------------------------
fix_width = 800;
if isa(im, 'gpuArray')
im = gather(im);
end
imsz = size(im);
scale = fix_width / imsz(2);
im = imresize(im, scale);
if ... |
github | xenron/sandbox-github-clone-master | roidb_from_voc.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/imdb/roidb_from_voc.m | 7,325 | utf_8 | ef87ae9f2d80c96ec3b8e885bff99d7c | function roidb = roidb_from_voc(imdb, varargin)
% roidb = roidb_from_voc(imdb, rootDir)
% Builds an regions of interest database from imdb image
% database. Uses precomputed selective search boxes available
% in the R-CNN data package.
%
% Inspired by Andrea Vedaldi's MKL imdb and roidb code.
% AUTORIGHTS
% --... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC2012_VGG16.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC2012_VGG16.m | 4,761 | utf_8 | 422e6ffa70c40318fb2b15562241f22f | function script_faster_rcnn_VOC2012_VGG16()
% script_faster_rcnn_VOC2012_VGG16()
% Faster rcnn training and testing with VGG16 model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -----------------... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_demo.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_demo.m | 6,201 | utf_8 | de9d9c512d35ec48c7117b2e09abf3d8 | function script_faster_rcnn_demo()
close all;
clc;
clear mex;
clear is_valid_handle; % to clear init_key
run(fullfile(fileparts(fileparts(mfilename('fullpath'))), 'startup'));
%% -------------------- CONFIG --------------------
opts.caffe_version = 'caffe_faster_rcnn';
opts.gpu_id = auto_select... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC0712_VGG16.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC0712_VGG16.m | 4,758 | utf_8 | 1fea2360bf8509de950d1e4e765ba6a0 | function script_faster_rcnn_VOC0712_VGG16()
% script_faster_rcnn_VOC0712_VGG16()
% Faster rcnn training and testing with VGG16 model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -----------------... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC0712plus_VGG16.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC0712plus_VGG16.m | 4,781 | utf_8 | e8c645ff31d7a4ad78af2b35b75f36a3 | function script_faster_rcnn_VOC0712plus_VGG16()
% script_faster_rcnn_VOC0712plus_VGG16()
% Faster rcnn training and testing with VGG16 model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% ---------... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC0712_ZF.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC0712_ZF.m | 4,747 | utf_8 | 82fe0f4db24a3e5f5596da6afbb47cd6 | function script_faster_rcnn_VOC0712_ZF()
% script_faster_rcnn_VOC0712_ZF()
% Faster rcnn training and testing with Zeiler & Fergus model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -------------... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC2007_VGG16.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC2007_VGG16.m | 4,758 | utf_8 | 9dfd47e9e41d95917c16d2271d221109 | function script_faster_rcnn_VOC2007_VGG16()
% script_faster_rcnn_VOC2007_VGG16()
% Faster rcnn training and testing with VGG16 model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -----------------... |
github | xenron/sandbox-github-clone-master | script_faster_rcnn_VOC2007_ZF.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/script_faster_rcnn_VOC2007_ZF.m | 4,747 | utf_8 | ea0d96156ab6ee6efa0cbf9622f67a0f | function script_faster_rcnn_VOC2007_ZF()
% script_faster_rcnn_VOC2007_ZF()
% Faster rcnn training and testing with Zeiler & Fergus model
% --------------------------------------------------------
% Faster R-CNN
% Copyright (c) 2015, Shaoqing Ren
% Licensed under The MIT License [see LICENSE for details]
% -------------... |
github | xenron/sandbox-github-clone-master | gather_rpn_fast_rcnn_models.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/+Faster_RCNN_Train/gather_rpn_fast_rcnn_models.m | 5,367 | utf_8 | 7705050151a6dfb9e89a0d1481c10b9c | function gather_rpn_fast_rcnn_models(conf_proposal, conf_fast_rcnn, model, dataset)
cachedir = fullfile(pwd, 'output', 'faster_rcnn_final', model.final_model.cache_name);
mkdir_if_missing(cachedir);
% find latest model for rpn and fast rcnn
[rpn_test_net_def_file, rpn_output_model_file] = find_last... |
github | xenron/sandbox-github-clone-master | do_proposal_test.m | .m | sandbox-github-clone-master/ShaoqingRen/faster_rcnn/experiments/+Faster_RCNN_Train/do_proposal_test.m | 1,961 | utf_8 | 67338b0121c98a4d2afd5a31055753cc | function roidb_new = do_proposal_test(conf, model_stage, imdb, roidb)
aboxes = proposal_test(conf, imdb, ...
'net_def_file', model_stage.test_net_def_file, ...
'net_file', model_stage.output_model_file, ... |
github | xenron/sandbox-github-clone-master | classification_demo.m | .m | sandbox-github-clone-master/BVLC/caffe/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | 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 | xingyizhou/deepcut-master | plotRPC.m | .m | deepcut-master/lib/eval/plotRPC.m | 887 | utf_8 | 75731508a8dcc258648c8f8ef8f4e3c8 | % function [precision, recall, sorted_scores] = plotRPC(class_margin, true_labels, totalpos, colorVal, lineType, legendName, bPlot)
function [precision, recall] = plotRPC(precision, recall, colorVal, lineType, titleName)
% if (nargin < 7)
% bPlot = true;
% end
%
% N = length(true_labels);
% ndet = N;
%
% npos = ... |
github | xingyizhou/deepcut-master | loadannotations.m | .m | deepcut-master/lib/utils/loadannotations.m | 11,369 | utf_8 | 392f3a17873054d2d579f0fc387c56ea | % This file is part of the implementation of the human pose estimation model as described in the paper:
% Leonid Pishchulin, Micha Andriluka, Peter Gehler and Bernt Schiele
% Strong Appearance and Expressive Spatial Models for Human Pose Estimation
% IEEE International Conference on Computer Vision (ICCV'13), Sydn... |
github | xingyizhou/deepcut-master | saveannotations.m | .m | deepcut-master/lib/utils/saveannotations.m | 6,660 | utf_8 | 2248f8d4d6b563c873685a6572f11862 | % annotations - annotation list
% outputfilename
% rescale_factor - rescale all annorects by this factor (default = 1)
% score_factor - multiply all scores by this factor (default = 1)
% abs_path - if false all image filenames will be saved as relative (default = true)
%
%function saveannotations(annotations, outputfil... |
github | xingyizhou/deepcut-master | struct2xml.m | .m | deepcut-master/lib/utils/struct2xml.m | 850 | utf_8 | b288fae1b1afdf0a28081ae46eb06901 | function res = struct2xml(s)
res = [];
names = fieldnames(s);
nl_char = sprintf('\n');
for i = 1:length(names)
% skip empty fields
if isempty(s.(names{i}))
continue;
end
if isnumeric(s.(names{i}))
if length(s.(names{i})) > 1
%warning(['ignoring field ' names{i} ': arrays ar... |
github | xingyizhou/deepcut-master | extract_pair_distribution.m | .m | deepcut-master/lib/utils/extract_pair_distribution.m | 308 | utf_8 | c7eb1fdcd5799f3be2f375c01c92958c | function [ res ] = extract_pair_distribution( p, distr, j1, j2 )
num_c = p.idpr_num_clusters;
res = distr(idpr_joint_range(j1, num_c), idpr_joint_range(j2, num_c));
end
function res = idpr_joint_range(joint_no, num_clusters)
s = sum(num_clusters(1:joint_no-1));
res = s+1:s+num_clusters(joint_no);
end |
github | xingyizhou/deepcut-master | splitpath.m | .m | deepcut-master/lib/utils/splitpath.m | 275 | utf_8 | a8d0a1a2b7ae9fd710b9fbd1f4aee9aa | %function [path, filename] = splitpath(str)
function [path, filename] = splitpath(str)
slashidx = strfind(str, '/');
if isempty(slashidx)
path = [];
filename = str;
else
path = str(1:slashidx(end)-1);
filename = str(slashidx(end)+1:end);
end
end |
github | xingyizhou/deepcut-master | rcnn_scoremaps_save.m | .m | deepcut-master/lib/utils/rcnn_scoremaps_save.m | 2,725 | utf_8 | f2033832f2feceb670aea15a8966f297 | function rcnn_scoremaps_save(config, rcnn_model_file)
root_dir = config.dataset_root_dir;
imdb_test = config.imdb_func(root_dir, 'test', config);
roidb = imdb_test.roidb_func(imdb_test);
fprintf('loading model\n');
rcnn_model = rcnn_load_model(rcnn_model_file, true);
scoremaps = []; cnt = 1;
for i =... |
github | xingyizhou/deepcut-master | splitpathext.m | .m | deepcut-master/lib/utils/splitpathext.m | 309 | utf_8 | 4487c41eda32b5a5a798fd8aabf98349 | % function [path, filename, ext] = splitpathext(str)
function [path, filename, ext] = splitpathext(str)
[path, filename] = splitpath(str);
ptidx = strfind(filename, '.');
if isempty(ptidx)
ext = [];
else
ext = filename(ptidx(end)+1:end);
filename = filename(1:ptidx(end)-1);
end
end |
github | xingyizhou/deepcut-master | padZeros.m | .m | deepcut-master/lib/utils/padZeros.m | 162 | utf_8 | ea6d175507a2fb18a438ef49cc8c418c | %
% function res = padZeros(str, npad)
%
function res = padZeros(str, npad)
n = length(str);
assert(n <= npad);
res = [repmat('0', 1, npad - n) str];
|
github | xingyizhou/deepcut-master | compute_idpr_entropy.m | .m | deepcut-master/lib/utils/compute_idpr_entropy.m | 413 | utf_8 | 88b0b7c6ea2e4aebcc7a7921ba0a2e87 | function e = compute_idpr_entropy( distr )
e1 = 0;
for i = 1:size(distr, 1)
e1 = e1 + compute_entropy(distr(i,:));
end
e1 = e1/size(distr, 1)
e2 = 0;
for i = 1:size(distr, 2)
e2 = e2 + compute_entropy(distr(:,i));
end
e2 = e2/size(distr, 2)
e = compute_entropy(distr(:));
end
function e = compute_entropy(... |
github | xingyizhou/deepcut-master | rcnn_scoremaps.m | .m | deepcut-master/lib/utils/rcnn_scoremaps.m | 1,760 | utf_8 | 5d5019e867afca5093dd9ff781ac49a9 | function rcnn_scoremaps(config, rcnn_model_file)
root_dir = config.dataset_root_dir;
imdb_test = config.imdb_func(root_dir, 'test', config);
roidb = imdb_test.roidb_func(imdb_test);
rcnn_model = rcnn_load_model(rcnn_model_file, true);
fh = figure;
for i = 1:numel(roidb.rois), image = imdb_test.image_a... |
github | xingyizhou/deepcut-master | find_conn_comp.m | .m | deepcut-master/lib/multicut/find_conn_comp.m | 2,401 | utf_8 | 960673364e91687bab5704ded197784a | % Algorithm for finding connected components in a graph
% Valid for undirected graphs only
% INPUTS: adj - adjacency matrix
% OUTPUTS: a list of the components comp{i}=[j1,j2,...jk}
% Other routines used: find_conn_compI.m (embedded), degrees.m, kneighbors.m
% GB, Last updated: October 2, 2009
function comp_mat = fi... |
github | xingyizhou/deepcut-master | compute_simple_feature.m | .m | deepcut-master/lib/multicut/hdf5/compute_simple_feature.m | 1,126 | utf_8 | eb14e9ceda4c1fc190053fd1394db1f6 | function feature = compute_simple_feature(det,frame_rate_norm)
% compute spatial-temporal feature between two detections
% needs to be normalized by frame rate
det1 = det(1,:);
det2 = det(2,:);
[h1,xCenter1,yCenter1, t1] = get_detail(det1);
[h2,xCenter2,yCenter2, t2] = get_detail(det2);
h_cmp = (h1+h2)/2;
offset_t =... |
github | xingyizhou/deepcut-master | displayKeypoints.m | .m | deepcut-master/lib/vis/displayKeypoints.m | 490 | utf_8 | b084b820d89f95b219578f27bc838ae2 | function res = displayKeypoints(imidx, keypointsAll, stuff)
im = imread(keypointsAll(imidx).imgname);
joints_orig = keypoints2joints(stuff.keypointsAll(imidx).det);
joints_tomp = keypoints2joints(keypointsAll(imidx).det);
figure(1);
vis_pred(im, joints_orig);
figure(2);
vis_pred(im, joint... |
github | xingyizhou/deepcut-master | vis_multicut_pipeline.m | .m | deepcut-master/lib/vis/vis_multicut_pipeline.m | 13,985 | utf_8 | 327b7b348f7ad5f5703796e92d0649f5 | function vis_multicut_pipeline(expidx,firstidx,nImgs)
p = exp_params(expidx);
multicutDir = p.multicutDir;
fprintf('multicutDir: %s\n',multicutDir);
keypointsDir = multicutDir;
resDir = multicutDir;
visDir = [multicutDir '/vis/'];
if (isfield(p,'testGTnopad'))
load(p.testGTnopad,'annolist');
bProject = true;... |
github | xingyizhou/deepcut-master | vis_combined_scoremap.m | .m | deepcut-master/lib/vis/vis_combined_scoremap.m | 2,126 | utf_8 | c3d471485d0356d320e645db20c86152 | function vis_combined_scoremap(expidx, img_idx, ends)
p = exp_params(expidx);
load(p.testGT)
im_fn = annolist(img_idx).image.name;
[~,im_name,~] = fileparts(im_fn);
im = imread(im_fn);
scmap_name = fullfile(p.unary_scoremap_dir, [im_name '.mat']);
load(scmap_name, 'scoremaps');
colors = [1 0 1; 1 1 0; 0 1 1; 1 0 0;... |
github | xingyizhou/deepcut-master | get_spatial_features_same_part_regr.m | .m | deepcut-master/lib/pose/get_spatial_features_same_part_regr.m | 10,603 | utf_8 | 5e1089bf41651ac6a725187381d0c65c | function [X_pos, keys_pos, boxes_pos, X_neg, keys_neg, boxes_neg] = get_spatial_features_same_part_regr(expidx,cidx)
RandStream.setGlobalStream ...
(RandStream('mt19937ar','seed',42));
p = exp_params(expidx);
fprintf('cidx: %d\n',cidx);
save_file = [p.pairwiseDir '/feat_spatial_cidx_' num2str(cidx) '.mat'];... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.