KCF目标跟踪学习总结

大致过程:
由第一帧真实bb2.5倍大小的window通过循环移位得到周围样本,真实bb的window作为base img,因为循环矩阵的特殊性,仅仅考虑base img的fhog feature即可(因为其他样本的fhog feature的每个通道的feature都可以根据base img的每个通道的循环移位获得)。这样在样本图像特征在每个通道上都可以看成是一个块循环矩阵。记录第一帧base img的 thog feature(在傅里叶域中的表示)。
通过高斯分布标记这些训练样本,即,根据样本中心离目标的远近分别赋值[0,1]范围的数。离目标越近,值越趋向于1,离目标越远,值越趋向于0。但考虑到将peak置于中心将使最终的output 不必要地平移半个window,如果将peak置于左上角(并环绕),能正确地将检测结果置于中心。所以作者将label的峰值置于左上角,并在边界环绕,作为每个样本的label。
作者采用基于回归的方法,即要训练一个分类器,使得通过分类器预测到的样本标签与真实标签差距最小,所以,要为用于训练的每个样本分配一个系数(按理说,正样本的权重为正,负样本的权重为负。正样本的权重大,负样本中和正样本越相似,权重的绝对值越大)。
作者引入了高斯核,计算每个样本与base img 的相似度情况,从而得到每个样本的系数。存入模型在后续帧中,以上一帧预测到的bb2.5倍大小的window通过循环移位得到周围样本,计算每个样本与模型中存入的目标window的 thog feature的相似度,并将每个样本的kernel与每个样本的系数相乘,得到每个样本的响应,响应最大的记为本帧的目标bb的位置。
以线性组合的方式,以一定的学习率添加本次结果到模型中,从而更新模型中的目标winow的 fhogfeature(在傅里叶域中的表示〉以及每个样本的系数(在傅里叶域中的表示),更新模型的过程,即是不断训练分类器的过程。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
## Tracking with Kernelized Correlation Filters Code author : Tomas Vojir ________________ This is a C++ reimplementation of algorithm presented in "High-Speed Tracking with Kernelized Correlation Filters" paper. For more info and implementation in other languages visit the [autor's webpage!](http://home.isr.uc.pt/~henriques/circulant/). It is extended by a scale estimation (use several *7* different scales steps) and by a RGB (channels) and Color Names [2] features. Data for Color Names features were obtained from [SAMF tracker](https://github.com/ihpdep/samf). It is free for research use. If you find it useful or use it in your research, please acknowledge my git repository and cite the original paper [1]. The code depends on OpenCV 2.4+ library and is build via cmake toolchain. _________________ Quick start guide for linux: open terminal in the directory with the code $ mkdir build; cd build; cmake .. ; make This code compiles into binary **kcf_vot** ./kcf_vot - using VOT 2014 methodology (http://www.votchallenge.net/) - INPUT : expecting two files, images.txt (list of sequence images with absolute path) and region.txt with initial bounding box in the first frame in format "top_left_x, top_left_y, width, height" or four corner points listed clockwise starting from bottom left corner. - OUTPUT : output.txt containing the bounding boxes in the format "top_left_x, top_left_y, width, height" ./kcf_trax - using VOT 2014+ trax protocol (http://www.votchallenge.net/) - require [trax](https://github.com/votchallenge/trax) library to be compiled with opencv support and installed. See trax instruction for compiling and installing. ___________ Performance | | **VOT2016 - baseline EAO** | **VOT2016 - unsupervised EAO** | [**TV77**](http://cmp.felk.cvut.cz/~vojirtom/dataset/index.html) Avg. Recall | |:---------------|:--------------:|:------------------:|:----------------:| | kcf |0.1530 | 0.3859 | 51% | | skcf |0.1661 | 0.4155 | 56% | | skcf-cn |0.178 | 0.4136 | 58% | | kcf-master |**0.1994** | **0.4376** | **63%** | __________ References [1] João F. Henriques, Rui Caseiro, Pedro Martins, Jorge Batista, “High-Speed Tracking with Kernelized Correlation Filters“, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015 [2] J. van de Weijer, C. Schmid, J. J. Verbeek, and D. Larlus. "Learning color names for real-world applications." TIP, 18(7):1512–1524, 2009. _____________________________________ Copyright (c) 2014, Tomáš Vojíř Permission to use, copy, modify, and distribute this software for research purposes is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. __________________ Additional Library NOTE: The following files are part of Piotr's Toolbox, and were modified for usage with c++ src/piotr_fhog/gradientMex.cpp src/piotr_fhog/sse.hpp src/piotr_fhog/wrappers.hpp You are encouraged to get the [full version of this library here.](http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html) ______________________________________________________________________________ Copyright (c) 2012, Piotr Dollar All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.
KCF是一种目标跟踪算法,全称为Kernelized Correlation Filter,中文名为核相关滤波器。它在Matlab平台上常被应用于目标跟踪领域。 KCF算法通过在图像序列中检测目标物体的位置,实现目标的连续追踪。算法首先采用采样窗口将目标物体从图像中提取出来,并将其转换为特征向量表示。然后,基于核相关滤波器的思想,使用训练样本来构造一个滤波模板。该模板可以对图像进行卷积操作,从而实现对目标物体的精确跟踪。 在Matlab平台上,可以使用KCF算法来实现目标的检测和跟踪。Matlab提供了许多用于图像处理和计算机视觉的工具箱和函数,可以方便地实现KCF算法的各个模块。例如,可以使用Matlab的图像处理工具箱对图像进行预处理,提取目标物体的特征向量。然后,使用Matlab提供的相关滤波函数来构造滤波模板,并利用其进行目标跟踪KCF算法在Matlab平台上的应用广泛,可以用于多个领域,例如视频监控、自动驾驶和机器人导航等。它具有计算效率高、跟踪精度高等优点,可以在实时场景下实时跟踪目标物体。此外,KCF算法还可以通过对目标物体进行机器学习来实现自适应跟踪,提高跟踪的准确性和鲁棒性。 总之,KCF目标跟踪算法在Matlab中提供了一种有效的方式,可以在图像序列中对目标进行连续跟踪。它的应用广泛,并且在实时性、准确性和鲁棒性方面表现出色。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值