]>
rtime.felk.cvut.cz Git - hercules2020/kcf.git/log
Michal Sojka [Mon, 21 Jan 2019 13:01:30 +0000 (14:01 +0100)]
test: Make tests pass on Travis
Work around problem with OpenCV version on Travis, which causes test
failures.
Michal Sojka [Mon, 21 Jan 2019 12:56:11 +0000 (13:56 +0100)]
Refactor print-test-results
Some tests fail on Travis so we will introduce a special case for them.
It will be easier after this commit.
Michal Sojka [Thu, 13 Dec 2018 08:48:34 +0000 (09:48 +0100)]
README: Describe the main differences from the original implementation
Michal Sojka [Thu, 13 Dec 2018 08:38:49 +0000 (09:38 +0100)]
Fix Markdown formating in README
Michal Sojka [Sat, 1 Dec 2018 23:02:58 +0000 (00:02 +0100)]
Do not use virtual methods in FFT class
This will become useful in next commit, where we will try to make
ComplexMat sizes constexpr. ComplexMat will become a template class
and therefore Fft classes will need to have template methods. Since it
is not possible to have virtual template methods, we are removing
virtual methods here.
Michal Sojka [Mon, 26 Nov 2018 21:48:49 +0000 (22:48 +0100)]
Makefile: Use absolute path when invoking ninja
This is for emacs to be able to correctly navigate the error messages.
Michal Sojka [Mon, 26 Nov 2018 21:31:28 +0000 (22:31 +0100)]
Make KCF member variables constexpr where possible
This is to prepare the code for constexprification need for PREMization :-)
Michal Sojka [Tue, 30 Oct 2018 13:07:40 +0000 (14:07 +0100)]
README: Fix typos
Michal Sojka [Fri, 26 Oct 2018 09:35:12 +0000 (11:35 +0200)]
Move patch capture for visual debug after scale step
This way, visual debug better shows what the tracker actually sees.
Michal Sojka [Fri, 19 Oct 2018 10:16:33 +0000 (12:16 +0200)]
Implement sub-gird angle estimation
This seems to improve tracking accuracy in many cases.
Fixes #41.
Michal Sojka [Fri, 19 Oct 2018 07:52:18 +0000 (09:52 +0200)]
Reduce the number of evaluated scales
This improves the performance a bit, while keeping almost the same
accuracy.
Michal Sojka [Fri, 19 Oct 2018 07:16:17 +0000 (09:16 +0200)]
Merge rotation branch
This code from that branch is not used directly. Instead, its
functionality was reimplemented in a clean way in the previous commits
of the master branch.
This merge is just to close the pull request and to not loos the
original implementation if it is needed sometimes later.
Michal Sojka [Fri, 19 Oct 2018 06:51:09 +0000 (08:51 +0200)]
main: Add video stream output
Michal Sojka [Thu, 18 Oct 2018 22:53:55 +0000 (00:53 +0200)]
test: Decrease accuracy limit
After addition of rotation support, some tests have lower accuracy (but
others (with rotating objects) higher).
Michal Sojka [Thu, 18 Oct 2018 22:30:09 +0000 (00:30 +0200)]
Fix scale weight calculation in big batch mode
Michal Sojka [Thu, 18 Oct 2018 22:15:45 +0000 (00:15 +0200)]
Fix numerical problems in sub_pixel_peak()
Sometimes, finding sub-pixel maximum fails (solution is very far from
the maximal value pixel) and the tracked object is lost. These changes
fix some the these cases. This problem was present also in the
original implementation.
Michal Sojka [Thu, 18 Oct 2018 22:02:27 +0000 (00:02 +0200)]
Draw maximum (cross) in the middle of pixels, not at the edge
Michal Sojka [Thu, 18 Oct 2018 14:37:05 +0000 (16:37 +0200)]
Fix sub_grid_scale calculation
Michal Sojka [Thu, 18 Oct 2018 14:27:11 +0000 (16:27 +0200)]
Allow specifying visual debug mode from command line
Michal Sojka [Thu, 18 Oct 2018 13:52:04 +0000 (15:52 +0200)]
Take current angle into account when updating tracked object position
Michal Sojka [Thu, 18 Oct 2018 12:26:45 +0000 (14:26 +0200)]
Show locations of detected maxima in visual debug mode
Michal Sojka [Thu, 18 Oct 2018 12:08:11 +0000 (14:08 +0200)]
Refactor point wrapping in frequency domain to a function
We will needed in next commits.
Michal Sojka [Thu, 18 Oct 2018 12:03:15 +0000 (14:03 +0200)]
Move visual debug after all calculations
Michal Sojka [Sat, 13 Oct 2018 14:19:13 +0000 (16:19 +0200)]
Add support for tracking of multiple angles
Michal Sojka [Sat, 13 Oct 2018 07:47:48 +0000 (09:47 +0200)]
Extend to support not only multiple scales but also multiple angles
So far, we neither rotate the patches nor use multiple angles.
Michal Sojka [Thu, 18 Oct 2018 12:36:21 +0000 (14:36 +0200)]
Do not set fixed delay for visual debug mode
Michal Sojka [Thu, 18 Oct 2018 10:48:56 +0000 (12:48 +0200)]
Leave 1px borders in visual debug window
Michal Sojka [Thu, 18 Oct 2018 10:19:55 +0000 (12:19 +0200)]
main: Quit by 'q' or ESC if run with -v0
Michal Sojka [Thu, 18 Oct 2018 04:33:58 +0000 (06:33 +0200)]
travis: Print backtraces on crashes or assertion failures
Michal Sojka [Thu, 18 Oct 2018 10:19:24 +0000 (12:19 +0200)]
Give windows more descriptive names
I use this the configure my window manager to handle those windows
specifically.
Michal Sojka [Sat, 13 Oct 2018 11:56:21 +0000 (13:56 +0200)]
Allow odd number of scales and angles
Odd numbers are probably only useful for debugging.
Michal Sojka [Mon, 15 Oct 2018 23:11:38 +0000 (01:11 +0200)]
Initialize angles vector dynamically
Michal Sojka [Fri, 12 Oct 2018 21:37:22 +0000 (23:37 +0200)]
Make visual debug mode to show RGB patches
Previously used displaying of filter responses is kept in the code and
one can easily switch between RGB and response modes by changing the value
of "bool rgb".
Michal Sojka [Sat, 13 Oct 2018 11:41:12 +0000 (13:41 +0200)]
Add more assertions about FFT arguments
This is to be sure that after adding rotation, all matrix dimensions are
still correct.
Michal Sojka [Fri, 12 Oct 2018 13:13:58 +0000 (15:13 +0200)]
Remove unnecessary calls to cudaStreamSynchronize()
Michal Sojka [Fri, 12 Oct 2018 12:49:52 +0000 (14:49 +0200)]
Fix ToC
Michal Sojka [Fri, 12 Oct 2018 12:47:06 +0000 (14:47 +0200)]
Update README
Michal Sojka [Fri, 12 Oct 2018 11:36:34 +0000 (13:36 +0200)]
Remove unused functions
Michal Sojka [Thu, 11 Oct 2018 23:04:25 +0000 (01:04 +0200)]
Do not allocate and free temporary matrices for every frame
This speeds up the CUDA version, because pinned memory allocation is
implicit synchronization point. By allocating the variables only once,
we reduce the number of synchronization points.
Michal Sojka [Thu, 11 Oct 2018 22:23:18 +0000 (00:23 +0200)]
Add NVTX markers to the code
This makes it easier to understand nvprof timelines.
Michal Sojka [Thu, 11 Oct 2018 14:39:54 +0000 (16:39 +0200)]
cufft: Use per-thread CUDA stream for cuBLAS calls
Michal Sojka [Mon, 8 Oct 2018 12:04:47 +0000 (14:04 +0200)]
Fix CUDA bugs that manifest themselves in BIG_BATCH mode
Michal Sojka [Mon, 8 Oct 2018 11:59:53 +0000 (13:59 +0200)]
Add more debug prints
Michal Sojka [Mon, 8 Oct 2018 11:59:30 +0000 (13:59 +0200)]
Fix CUDA assertion failures in BIG_BATCH mode
Michal Sojka [Mon, 8 Oct 2018 08:54:02 +0000 (10:54 +0200)]
Ensure that bbox angle is set to zero
Shanigen [Fri, 5 Oct 2018 10:00:22 +0000 (12:00 +0200)]
Extracted rotated output rectangle from rotation
Michal Sojka [Thu, 4 Oct 2018 22:44:47 +0000 (00:44 +0200)]
ComplexMat: Add CUDA stream synchronization before accessing host memory
Michal Sojka [Thu, 4 Oct 2018 22:29:50 +0000 (00:29 +0200)]
Add cudaStreamSynchronize after FFT
This is just a temporary solution, it should be possible to get rid of
CPU/GPU synchronization at most places.
Michal Sojka [Thu, 4 Oct 2018 22:19:46 +0000 (00:19 +0200)]
Revert "debug: Round low values to zero when printing them"
This reverts commit
3201116062300ef82b40d5d6d17eef4df27911f6 .
Michal Sojka [Thu, 4 Oct 2018 22:18:00 +0000 (00:18 +0200)]
Fix CUDA kernel bounds
Michal Sojka [Thu, 4 Oct 2018 22:17:21 +0000 (00:17 +0200)]
debug: Add commented out expression to print the whole matrix
Michal Sojka [Thu, 4 Oct 2018 22:16:21 +0000 (00:16 +0200)]
debug: Don't print matrices as multiple lines
Michal Sojka [Thu, 4 Oct 2018 21:33:44 +0000 (23:33 +0200)]
complexmat: Move CPU-only methods from .hpp to .cpp
Michal Sojka [Thu, 4 Oct 2018 11:01:36 +0000 (13:01 +0200)]
debug: Round low values to zero when printing them
This is to make comparison of outputs of different implementations easier.
Michal Sojka [Thu, 4 Oct 2018 10:48:08 +0000 (12:48 +0200)]
Simplify other ComplexMat CUDA methods
Use just 1D indexing and remove restriction of at most one block.
Michal Sojka [Thu, 4 Oct 2018 10:46:43 +0000 (12:46 +0200)]
Fix and simplify CUDA version of ComplexMat::sqr_norm
Michal Sojka [Thu, 4 Oct 2018 10:44:54 +0000 (12:44 +0200)]
debug: Allow setting trace float precision globally
Michal Sojka [Tue, 2 Oct 2018 23:12:44 +0000 (01:12 +0200)]
Do not execute CUDA version of gausian correlation
Use CPU version for now, because the CUDA version seems to have problems.
Michal Sojka [Tue, 2 Oct 2018 22:58:17 +0000 (00:58 +0200)]
Call cudaStreamSynchronize before debug prints
Michal Sojka [Tue, 2 Oct 2018 15:13:44 +0000 (17:13 +0200)]
Add CUDA implementation for sum_channels
Michal Sojka [Tue, 2 Oct 2018 13:50:49 +0000 (15:50 +0200)]
Unify CPU and GPU implementations of ComplexMat
CPU implementation is now in complexmat.cpp, GPU in complexmat.cu. Both
implementation share the same interface in complexmat.hpp.
Michal Sojka [Tue, 2 Oct 2018 13:40:48 +0000 (15:40 +0200)]
Make test protocol more brief and allow different sorting
Michal Sojka [Tue, 2 Oct 2018 08:35:32 +0000 (10:35 +0200)]
Make ComplexMat_ a non-template class
This will simplify for unification of CPU and CUDA. When the unification
is done, we may want to restore the template if needed.
Michal Sojka [Tue, 2 Oct 2018 08:24:48 +0000 (10:24 +0200)]
Convert leftovers from vector to DynMem conversion few commit ago
Since these are not used, the compiler does not complain.
Michal Sojka [Mon, 1 Oct 2018 23:01:55 +0000 (01:01 +0200)]
Do not destroy fftw plans if they were not created
Otherwise we get a segfault.
Michal Sojka [Mon, 1 Oct 2018 23:01:17 +0000 (01:01 +0200)]
Get rid of DynMem memory leaks
Michal Sojka [Sun, 30 Sep 2018 22:48:56 +0000 (00:48 +0200)]
Convert ComplexMat to use DynMem class
This is the first step to unification of CPU and GPU implementations.
It also fixes a incorrect dimensions of ComplexMats in
Gaussian_Correlation, which was unnoticed, because the matrices were
reallocated on the fly. Now, we use assertions in DynMem, which
prevents this. Ideally, we don't want any allocation during ComplexMat
computations, but we're not there yet.
Michal Sojka [Sun, 30 Sep 2018 22:21:10 +0000 (00:21 +0200)]
Remove unnecessary DEBUG_PRINT
Michal Sojka [Sun, 30 Sep 2018 21:41:42 +0000 (23:41 +0200)]
DynMem: Make num_elem const and public and add assertions to move operations
This will become handy in future commits.
Michal Sojka [Sun, 30 Sep 2018 21:38:33 +0000 (23:38 +0200)]
test: Show accuracy comparison only for non-failed tests
Michal Sojka [Sun, 30 Sep 2018 20:06:10 +0000 (22:06 +0200)]
Do not allow creation of ComplexMat with unknown size
To avoid memory (re)allocation after we switch ComplexMat to DynMem,
we need to know the size before hand.
Michal Sojka [Sun, 30 Sep 2018 19:32:17 +0000 (21:32 +0200)]
Do not use local ComplexMat variables
After we convert ComplexMat to DynMem storage, we won't want to
allocate memory in every step.
Michal Sojka [Sat, 29 Sep 2018 22:32:25 +0000 (00:32 +0200)]
Fix bug in assertion
Michal Sojka [Sat, 29 Sep 2018 20:26:27 +0000 (22:26 +0200)]
CompleMat: Having just one create() method is sufficient
The methods differ only in the _n_scales argument, which now takes default
value.
Michal Sojka [Sat, 29 Sep 2018 20:55:05 +0000 (22:55 +0200)]
Simplify creation of complexmat variables
Michal Sojka [Sat, 29 Sep 2018 20:23:18 +0000 (22:23 +0200)]
cmake: Compile CUDA version without intermediate kcfcuda library
Michal Sojka [Sat, 29 Sep 2018 19:47:58 +0000 (21:47 +0200)]
complexmat.cu: Remove unused member foreign_data
Michal Sojka [Fri, 28 Sep 2018 19:30:58 +0000 (21:30 +0200)]
Add assertion about found maximum response
Michal Sojka [Fri, 28 Sep 2018 05:47:04 +0000 (07:47 +0200)]
Make visual debug mode to work properly
Michal Sojka [Fri, 28 Sep 2018 05:46:42 +0000 (07:46 +0200)]
Rename DynMem type to value_type
This is to prevent name collisions between Mat::type and DynMem::type and
also makes the name the same as in STL.
Michal Sojka [Thu, 27 Sep 2018 21:22:16 +0000 (23:22 +0200)]
Merge branch 'visual-debug'
Michal Sojka [Thu, 27 Sep 2018 14:26:02 +0000 (16:26 +0200)]
Make OpenCV version checks to work correctly for both 2.x.x and 3.x.x
CV_VERSION_EPOCH seems to be defined only in 2.x.x.
Also fix the condition for operatoer<<(MatSize). We don't need it for
OpenCV 2.
Shanigen [Thu, 27 Sep 2018 10:47:18 +0000 (12:47 +0200)]
Integration of the visual debug, with zero changes to the tracker's API.
Michal Sojka [Wed, 26 Sep 2018 21:58:27 +0000 (23:58 +0200)]
Add backward compatibility code for OpenCV 2.4
Michal Sojka [Wed, 26 Sep 2018 21:58:15 +0000 (23:58 +0200)]
Remove unnedded code
Michal Sojka [Wed, 26 Sep 2018 21:39:10 +0000 (23:39 +0200)]
Add PRINT macro to temporarily print a value of an expression
Michal Sojka [Thu, 27 Sep 2018 05:33:13 +0000 (07:33 +0200)]
Run --fit tests without arguments
This always scales down the patch size and ensures that tests are run
faster. Fixed value may sometimes increase the patch size, which results
in longer test times.
Michal Sojka [Wed, 26 Sep 2018 21:38:44 +0000 (23:38 +0200)]
Rework patch fitting to specific dimensions
- It is not necessary to scale the whole image
- Define new variable fit_size and leave p_windows_size with original meaning
Michal Sojka [Wed, 26 Sep 2018 19:38:52 +0000 (21:38 +0200)]
Do not exit when pressing just shift, control, etc.
Michal Sojka [Wed, 26 Sep 2018 18:33:18 +0000 (20:33 +0200)]
Rename p_roi to feature_size
Michal Sojka [Wed, 26 Sep 2018 14:29:34 +0000 (16:29 +0200)]
Refactor p_pose and related variables
p_pose was used to store position of the tracked object. Its use was
confusing, because only the center point was updates and width/height
not. Width/height was updated only in getBBox() according to
p_current_scale.
This commit renames p_pose to p_init_pose and does not touch it after
init(). We store the position of the tracked object in
p_current_scale. getBBox is updated to calculate the bounding box from
p_current_center, p_current_scale and p_init_pose.
Michal Sojka [Wed, 26 Sep 2018 14:23:55 +0000 (16:23 +0200)]
test: Increase report width to not wrap result to multiple lines
Michal Sojka [Wed, 26 Sep 2018 13:18:52 +0000 (15:18 +0200)]
Rename scale_factor to fit_factor
The variable is related to --fit and not to scale estimation.
Michal Sojka [Wed, 26 Sep 2018 13:08:08 +0000 (15:08 +0200)]
Reformat, remove stale comments
Michal Sojka [Wed, 26 Sep 2018 11:37:09 +0000 (13:37 +0200)]
Give fit parameters default values
This is to make the KCF_Tracker interface compatible with the original
code.
Michal Sojka [Wed, 26 Sep 2018 11:29:34 +0000 (13:29 +0200)]
Fix -f argument parsing
We've also make p_cell_size public so that we can read it outside of the
class.
Michal Sojka [Wed, 26 Sep 2018 07:28:22 +0000 (09:28 +0200)]
Prepare for rotation branch merge
Michal Sojka [Wed, 26 Sep 2018 07:26:47 +0000 (09:26 +0200)]
Simplify scale initialization
Michal Sojka [Wed, 26 Sep 2018 07:01:39 +0000 (09:01 +0200)]
KCF: Mark constants as const
Michal Sojka [Wed, 26 Sep 2018 05:06:24 +0000 (07:06 +0200)]
Formatting changes
This is done to lower the number of differences with rotation pull
request.