This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------- benchmark 'test_benchmark_assign_3x3': 6 tests --------------------------------------------------------------------------------- | |
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
test_benchmark_assign_3x3[lapsolver] 21.8828 (1.0) 382.6180 (1.0) 27.1516 (1.0) 13.0945 (1.0) 23.1010 (1.0) 1.3541 (1.0) 1014;2011 36.8302 (1.0) 11318 1 | |
test_benchmark_assign_3x3[lap] 41.3780 (1.89) 887.3888 (2.32) 52.0903 (1.92) 23.1687 (1.77) 45.7240 (1.98) 1.9629 (1.45) 853;1701 19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
baseurl="http://cvlab.hanyang.ac.kr/tracker_benchmark" | |
wget "$baseurl/datasets.html" | |
cat datasets.html | grep '\.zip' | sed -e 's/\.zip".*/.zip/' | sed -e s'/.*"//' >files.txt | |
cat files.txt | xargs -n 1 -P 8 -I {} wget -c "$baseurl/{}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def covar1(m, s): | |
s = float(s) | |
r = np.arange(m, dtype=np.float) | |
d = np.reshape(r, (m, 1)) - np.reshape(r, (1, m)) | |
k = np.exp(-(0.5/s**2) * (d * d)) | |
return k | |
def smooth1(m, s): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function benchmark() | |
test(); | |
m1 = 32; | |
m2 = 48; | |
k = 24; | |
x = randn(m1, m2, k); | |
af = covar1(randn(m1, m2, k)); | |
a = ifft2(af, 'symmetric'); | |
t = time_func(@() mul1(af, x)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Computes circulant covariance of a and then multiplies x by covariance. | |
% Both images are of size (m1, m2) with k channels. | |
% | |
% size(a) is [m1, m2, k] | |
% size(x) is [m1, m2, k] | |
function b = mul_circ_covar(a, x) | |
[m1, m2, k] = size(x); | |
% compute circulant covariance from shifts of a | |
% sf(u1,u2,p,q) = conj(af(u1,u2,q)) * af(u1,u2,p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [x, mul_dx_dA, mul_dx_db] = solve_rect(A, b) | |
% solve_rect returns x that minimises |A x - b|^2 | |
% x = (A' A)^-1 A' b | |
% and operators that compute derivatives with respect to A and b. | |
% It uses a QR decomposition of A. | |
% | |
% Parameters: | |
% A has size [m, n] with m >= n and rank(A) = n. | |
% b has size [m, 1]. | |
% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [x, mul_dx_dA, mul_dx_db] = solve_square(A, b) | |
% solve_square returns x = A^-1 b and operators that compute products with | |
% derivatives with respect to A and b. It uses an LU decomposition of A. | |
% | |
% Parameters: | |
% A has size [n, n] and rank(A) = n. | |
% b has size [n, 1]. | |
% | |
% Returns: | |
% x has size [n, 1]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dy_dx = deriv_lsq_nonlin(rfun, x, y_hat, m, n) | |
% deriv_lsq_nonlin estimates the derivative of | |
% y(x) = argmin_y |r(x, y)|^2 . | |
% | |
% Parameters: | |
% [r, dr_dx, dr_dy, d2r_dxdy] = rfun(x, y) | |
% x has size [m, 1]. | |
% y has size [n, 1]. | |
% r has size [p, 1]. | |
% dr_dx has size [p, m] and dr_dx(i, j) = dr(i) / dx(j). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 100; | |
m = 50; | |
A = 1/sqrt(m) * randn(m, n); | |
K = 10; | |
rmin = ones(K, 1); | |
rmax = ones(K, 1); | |
trials = 1e4; | |
for k = 1:K | |
for i = 1:trials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 100; | |
m = 50; | |
A = 1/sqrt(m) * randn(m, n); | |
K = 10; | |
trials = 1e4; | |
rmin = ones(K, 1); | |
rmax = ones(K, 1); | |
for k = 1:K | |
for i = 1:trials |
NewerOlder