💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
摘要:
在视觉目标跟踪中经常会发现摄像机的运动与被跟踪对象的运动之间存在因果关系。这种目标运动可能是摄像机运动的结果,例如不稳定的手持摄像机。但它也可能是原因,例如摄像师对对象的构图。本文探讨了这些关系,并提供了用于检测和量化它们的统计工具,这些工具基于传递熵并源自信息理论。然后利用这些关系来预测对象的位置。该方法被证明是描述这种关系的优秀指标。在VOT2013数据集上,与最佳非因果预测器相比,预测准确性提高了62%。我们展示了位置预测对摄像机抖动和突发运动具有鲁棒性,这对于任何跟踪算法都是无价的,并通过将因果预测应用于两种最先进的跟踪器来证明这一点。它们都受益,Struck在VTB1.1基准上的准确性增加了7%,鲁棒性增加了22%,成为了新的最先进技术。
因果关系是两个事件之间的关系,一个是原因(源),另一个是结果(后果)。一般来说,我们说一个事件导致另一个事件(其结果),如果它在时间上先于结果发生,并且增加了结果发生的概率。尽管因果关系在哲学家们的研究中已经有数千年的历史,在20世纪之前,它在科学界受到了很少的关注。最近,理论上的进展已经为许多科学领域的时间序列分析带来了实际进展。
一个可以在计算机视觉领域观察(并加以利用)的因果关系的例子是视觉目标跟踪(VOT)中摄像机运动与物体之间的关系。存在不同的可能的因果关系。例如,摄像机的运动会立即导致图像帧中物体的运动。摄像机的突然移动(例如抖动)甚至可能导致跟踪器在其他情况下简单的跟踪场景中失败。一个特定的例子可以在ICCV VOT Challenge 2013的自行车序列中观察到。虽然这个序列在一般情况下相对容易跟踪,但存在两个具有挑战性的时刻。在帧180周围有很多跟踪失败,这是由于强烈的遮挡引起的,在帧140周围也有很多失败,这是由于突然的摄像机抖动。如果能够检测并考虑到这些因素,那么许多失败就可以被预防,而不论跟踪器如何。
📚2 运行结果
主函数代码:
% check that our TE actually works on some synthetic series
%% prepare the data
len = 300;
x = 1:len;
dy = randn(1, len) * 0.1;
y = zeros(1, len);
y(1) = 0;
for i = 2:len
y(i) = y(i-1)*0.9 + dy(i);
end
yd = [randn(1, 5)*0.1, y(1:end-5)] + randn(1,len)*0.01; % shifted by 5 with small noise
yr = yd(randperm(len));
%% print it
figure(123)
hold off
plot(x, y, 'k');
hold on
plot(x, yd, 'b');
plot(x, yr, 'r', 'LineWidth', 0.1);
lh = legend('$X$', '$Y$', '$\bar Y$');
set(lh, 'Interpreter', 'LaTeX');
drawnow
%saveas(gcf, '../results/input_data.png');
%% compute the stuff
n = 4; % length of the window
dt = 2; % offset to the past
X_t1 = [];
X_t = [];
Yd_t1 = [];
Yd_t = [];
Yr_t1 = [];
Yr_t = [];
sigmasd = [];
sigmasr = [];
sigmasdb = [];
sigmasrb = [];
for t = n+1+dt : len
x_t1 = y(t);
x_t = y(t-n-dt:t-1-dt);
yd_t1 = yd(t);
yd_t = yd(t-n:t-1);
yr_t1 = yr(t);
yr_t = yr(t-n:t-1);
X_t1 = [X_t1 x_t1'];
X_t = [X_t x_t'];
Yd_t1 = [Yd_t1 yd_t1'];
Yd_t = [Yd_t yd_t'];
Yr_t1 = [Yr_t1 yr_t1'];
Yr_t = [Yr_t yr_t'];
if mod(t, 100) == 1 % regular reset to escape possible local minimum
sigmasd = [];
sigmasr = [];
sigmasdb = [];
sigmasrb = [];
end
if length(Yd_t1) >= 50 + (2*n+1)
% predicting X->Y (y->yd)
[TEd(t), sigmasd] = estimTransferEn(Yd_t1, Yd_t, X_t, sigmasd);
% predicting X->Yr (y->yr)
[TEr(t), sigmasr] = estimTransferEn(Yr_t1, Yr_t, X_t, sigmasr);
% this way reversed, there will be some noticeable information trans
% predicting Y->X (yd->y)
[TEdb(t), sigmasdb] = estimTransferEn(X_t1, X_t, Yd_t, sigmasdb);
% predicting Yr->X (yr->y)
[TErb(t), sigmasrb] = estimTransferEn(X_t1, X_t, Yr_t, sigmasrb);
fprintf('Time t = %d done... (%.1f/%.1f/%.1f/%.1f)\n', t, TEd(t), TEr(t), TEdb(t), TErb(t));
end
drawnow
end
%% plot the results
figure(124)
hold off
plot(TEd, 'b', 'LineWidth', 2);
hold on
plot(TEr, 'r');
plot(TEdb, 'g');
plot(TErb, 'm');
title('TE');
lh = legend('$X \rightarrow Y$', '$X \rightarrow \bar Y$', '$Y \rightarrow X$', '$\bar Y \rightarrow X$',...
'Location', 'E');
set(lh, 'Interpreter', 'LaTeX');
xlabel('frame #');
ylabel('entropy (b)');
%% statistical test
start = find(TEd == 0, 1, 'last') + 1;
P = ones(1,len);
Pb = ones(1,len);
for i = start+1:len
start2 = max(start, i-99);
P(i) = ttestWelch(TEd(start2:i), TEr(start2:i), true);
Pb(i) = ttestWelch(TEdb(start2:i), TErb(start2:i), true);
end
%% plot the permutation test results
figure(125);
hold off
semilogy(P, 'b', 'LineWidth', 2);
hold on
semilogy(Pb, 'r')
lh = legend('$X \rightarrow Y$ vs. $X \rightarrow \bar Y$', '$Y \rightarrow X$ vs. $\bar Y \rightarrow X$',...
'Location', 'E');
set(lh, 'Interpreter', 'LaTeX');
xlabel('frame #');
ylabel('p-value (-)');
%% find where it crosses a threshold
pvalThr = 1e-4;
for i = 1:len
if P(i) < pvalThr
break
end
end
if i == len
selectedFrame = 0;
fprintf('No significant TE was found.\n');
else
selectedFrame = i;
fprintf('The first significant TE was found at frame %i.\n', selectedFrame);
end
%% do the grid search
dtm = 0;
dtM = 7;
nm = 1;
nM = 5;
TEgrid = zeros(dtM-dtm+1, nM-nm+1);
for dti = dtm:dtM
for ni = nm:nM
[X_t, Y_t, Y_t1] = getPoints(y, yd, ni, dti, selectedFrame);
TEgrid(dti-dtm+1, ni-nm+1) = estimTransferEn(Y_t1, Y_t, X_t);
fprintf('dt = %d, n = %d done...\n', dti, ni);
end
end
relImpr = relativeImprovement(TEgrid);
%% plot the grid of TE
riThr = 0.1;
figure(126);
hold off
b3h = bar3(TEgrid, 0.6);
hold on
[dti, ni] = find(relImpr > riThr);
plot3(ni, dti, 0.1 + TEgrid(sub2ind(size(TEgrid), dti, ni)), 'r*')
lh = xlabel('$n$');
set(lh, 'Interpreter', 'LaTeX');
lh = ylabel('$\Delta t$');
set(lh, 'Interpreter', 'LaTeX');
zlabel('TE (b)');
colorbar
colormap jet
view([-60, 40]);
xlim([0.5, size(TEgrid, 2) + 0.5]);
ylim([0.5, size(TEgrid, 1) + 0.5]);
set(gca, 'CLim', [-1 1]);
axis equal
set(gca, 'XTick', 1:nM-nm+1, 'XTickLabel', nm:nM);
set(gca, 'YTick', 1:dtM-dtm+1, 'YTickLabel', dtm:dtM);
for i = 1:length(b3h)
set(b3h(i), 'CData', kron(relImpr(:,i), ones(6,4)) );
end
%% get the optimal parameters
TEf = TEgrid(relImpr > riThr);
[~, ind] = max(TEf);
[dti, ni] = find(relImpr > riThr);
dtOptimal = dti(ind) + dtm - 1;
nOptimal = ni(ind) + nm - 1;
fprintf('Optimal parameters are: dt = %d, n = %i.\n', dtOptimal, nOptimal);
🎉3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
Karel Lebeda, Simon Hadfield, Richard Bowden (2017)