Michal Sojka [Sat, 8 Sep 2018 09:12:03 +0000 (11:12 +0200)]
Do not force CUDA_HOST_COMPILER to g++
cmake sets CUDA_HOST_COMPILER automatically based on CC environment
variable. If one uses custom CC variable and CUDA_HOST_COMPILER is set
this way, build usually fails. This happens, for example, when one
needs to use an older compiler (e.g. gcc-5), because the newer default
compiler is not supported by CUDA.
DynMem class streamlines dynamic memory allocation for both CUDA
and CPU version of the tracker. Also some minor changes in fft_cufft.hpp
were made, because there was a problem with order of header includes.
Shanigen [Fri, 10 Aug 2018 11:20:02 +0000 (13:20 +0200)]
CUDA streams works
This commit adds support for CUDA streams and also corrects issue
with CUFFTW version of the tracker. All version now works without
any problem. CUDA streams version currently does not support C++
async directive and only OpenMP.
TODO: Implement correct use of OpenMP in big batch mode.
Shanigen [Thu, 9 Aug 2018 13:42:18 +0000 (15:42 +0200)]
Work done so far on CUDA streams
This commit contains not only workd done to implement CUDA streams,
but also some changes to correct warnings and make the naming little
bit more consistent.
Shanigen [Tue, 7 Aug 2018 08:26:35 +0000 (10:26 +0200)]
FFT does not take whole Scale_vars struct
FFT class now does not need to know anything about the tracker. It only gets as
input parameters objects and variables on which to perform FFT. Also Scale_vars
constructor was added, which allocates memory for variables.
Shanigen [Fri, 3 Aug 2018 13:34:45 +0000 (15:34 +0200)]
Cleaned OpenCV version
All version now uses same minimal FFT API and workflow.
TODO Clean the scale_var and scale_vars_init, add support for big_batch
mode for FFTW and CUFFT, implement cuda streams.
Shanigen [Fri, 3 Aug 2018 11:00:12 +0000 (13:00 +0200)]
Smaller FFT API
FFT API now only consist these functions: forward, forward_window and inverse.
All of them take Scale_vars structure as the sole input parameter. This API
currently works only with CuFFT if I remember correctly. I will have to test it
with OpenCV and FFTW.
Shanigen [Wed, 1 Aug 2018 11:42:13 +0000 (13:42 +0200)]
Scale_vars version now supports FFTW
Added support for FFTW in Scale_vars version of the tracker.
The nondeterminism problem with FFTW version seems to be corrected
for single threaded version of the tracker (In this version the FFTW
uses 2 threads for its plans). But for the std::async version and OpenMP
version of the tracker the problem persists. But when tested the nondeter-
minism is smaller than in the original implementation.
Shanigen [Wed, 1 Aug 2018 08:51:08 +0000 (10:51 +0200)]
Removed memory allocation in tracker update
Added xf to Scale_vars, which is used during tracker updating and was allocated every frame.
Now it is allocated only once in KCF_Tracker::init in scale_vars[0] and is reused every frame.
Correction of commit f5fe586e979629ba757f245e5ecdf9e6bbdf6c05,
in which I substantialy changed the whole tracker workflow.
This is a patch that corrects the issue with wrong tracking,
which happened because I used wrong value of scale to
compute weighted max response in response map.
I added Scale_var structure to begin work to fix issue #6. This should also fix #8. This is not the final version of the structure but it is
stable version, which works with all versions and there should currently be no problems with building of the KCF_tracker.
In the commit 8b28efcd5c939b1d41ce02ac0c2e267d204e4e72 I introduced float ComplexMat::sqr_norm() method again but forgot to add also to Cufft
version of the ComplexMat.
Michal Sojka [Wed, 18 Jul 2018 20:42:47 +0000 (22:42 +0200)]
Remove CUDA_DEBUG option
This option is not about debugging but about error checking. And errors
should be ALWAYS done, because without that weird things (like segfaults)
can happen.