]>
rtime.felk.cvut.cz Git - hercules2020/kcf.git/log
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.
Michal Sojka [Tue, 25 Sep 2018 22:10:50 +0000 (00:10 +0200)]
test: Ignore OpenCV FFT problems
The OpenCV-based version has sometimes half accuracy compared to other
implementations. Before this is fixed, we lower the bar for the test to
pass.
Michal Sojka [Tue, 25 Sep 2018 22:09:36 +0000 (00:09 +0200)]
CUDA: Set device flags before first cuda operation
Michal Sojka [Tue, 25 Sep 2018 22:01:20 +0000 (00:01 +0200)]
Move and rename cuda_error_check
There is no need for this file to have .cu* extension. It's only host code.
Michal Sojka [Tue, 25 Sep 2018 21:57:15 +0000 (23:57 +0200)]
Print better CUDA error messages
Michal Sojka [Tue, 25 Sep 2018 21:53:21 +0000 (23:53 +0200)]
Simplify OpenCV FFT
Michal Sojka [Tue, 25 Sep 2018 21:30:04 +0000 (23:30 +0200)]
test: Add expected results for new sequences
Also print expected accuracy in test results.
Michal Sojka [Tue, 25 Sep 2018 21:21:43 +0000 (23:21 +0200)]
test: Fix accuracy evaluation
Michal Sojka [Tue, 25 Sep 2018 21:21:22 +0000 (23:21 +0200)]
Select shorter default test sequences
Michal Sojka [Tue, 25 Sep 2018 21:02:39 +0000 (23:02 +0200)]
fftw: More meaningul threading configuration
Michal Sojka [Tue, 25 Sep 2018 20:13:31 +0000 (22:13 +0200)]
Makefile: Do not put "-G Ninja" to CMAKE_OPTS
When one overrides this variable from command line, -G flags is removed
and build fails.
Michal Sojka [Tue, 25 Sep 2018 19:53:56 +0000 (21:53 +0200)]
fftw: Make create_plan method const
Michal Sojka [Tue, 25 Sep 2018 19:53:21 +0000 (21:53 +0200)]
Simplify cuFFT class
Michal Sojka [Tue, 25 Sep 2018 11:10:17 +0000 (13:10 +0200)]
Travis: Hardcode libomp path
When we run tests on Travis, libomp cannot be found automatically.
Michal Sojka [Tue, 25 Sep 2018 10:55:11 +0000 (12:55 +0200)]
Really ignore test failures
On Travis, we sometimes got strange failures without any error messages.
Michal Sojka [Tue, 25 Sep 2018 06:01:34 +0000 (08:01 +0200)]
Fix OpenMP linking
- Move OpenMP compilation handling to kcf library
- After we added a call to omp_omp_set_num_threads(), we must properly
link the kcf_vot with OpenMP libraries. CMake (especially older
versions) seems to fail doing this properly automatically.
Michal Sojka [Mon, 24 Sep 2018 22:02:21 +0000 (00:02 +0200)]
fftw: Make everything related to BIG_BATCH conditionally compilable
Michal Sojka [Mon, 24 Sep 2018 20:14:29 +0000 (22:14 +0200)]
Simplify Fftw::init()
And use multiple FFT threads where it makes sense.
Michal Sojka [Tue, 25 Sep 2018 05:35:28 +0000 (07:35 +0200)]
Travis: Install CUDA only in builds where we need them
Michal Sojka [Mon, 24 Sep 2018 22:14:19 +0000 (00:14 +0200)]
Remove unused header
Michal Sojka [Mon, 24 Sep 2018 21:54:53 +0000 (23:54 +0200)]
cmake: Do not use deprecated feature
Michal Sojka [Tue, 25 Sep 2018 07:14:55 +0000 (09:14 +0200)]
Improve CMake option description
Michal Sojka [Mon, 24 Sep 2018 21:19:35 +0000 (23:19 +0200)]
Add Makefile target to print make variable values
Use this target to simplify travis config. It is also useful for manual
testing.
Michal Sojka [Mon, 24 Sep 2018 21:14:05 +0000 (23:14 +0200)]
Add plot targets to ninja
Michal Sojka [Mon, 24 Sep 2018 21:13:37 +0000 (23:13 +0200)]
Plot graphs from zero and add grid
Michal Sojka [Mon, 24 Sep 2018 19:28:32 +0000 (21:28 +0200)]
test: Report bad accuracy as ACCURACY rather than BAD
Michal Sojka [Mon, 24 Sep 2018 18:33:43 +0000 (20:33 +0200)]
Travis: Suppress libdc1394 error
These are produced by OpenCV and are not relevant for us.
Michal Sojka [Mon, 24 Sep 2018 18:21:48 +0000 (20:21 +0200)]
Travis: Fix (and simplify) cache cleanup command
Previously, only core files were deleted, because -o operator has low
priority.
Michal Sojka [Mon, 24 Sep 2018 17:47:02 +0000 (19:47 +0200)]
Travis: Move before_script before script :)
Michal Sojka [Mon, 24 Sep 2018 17:46:36 +0000 (19:46 +0200)]
Travis: Cleanup cache before uploading
Michal Sojka [Mon, 24 Sep 2018 17:21:31 +0000 (19:21 +0200)]
Revert "Travis: Temporarily ignore test failures"
This reverts commit
b612171e79b15d022903f0a5eaa55f644f287652 .
Michal Sojka [Mon, 24 Sep 2018 17:06:24 +0000 (19:06 +0200)]
Fix CUFFT compilation
Shanigen [Mon, 24 Sep 2018 14:55:20 +0000 (16:55 +0200)]
Repaired the big batch mode for FFTW.
Michal Sojka [Sun, 23 Sep 2018 22:56:16 +0000 (00:56 +0200)]
Attempt to fix big_batch mode
Michal Sojka [Mon, 24 Sep 2018 07:25:53 +0000 (09:25 +0200)]
Ignore clang warning about __VA_ARGS__ in all kcf library
The warning is "token pasting of ',' and __VA_ARGS__ is a GNU extension".
Since we use TRACE macros in other files, we need to ignore the warning
there as well.
Michal Sojka [Sun, 23 Sep 2018 17:02:49 +0000 (19:02 +0200)]
Allow using debug functions in other files than kcf.cpp
I'm using it for debugging of big batch problems in fft*.cpp files.
Michal Sojka [Sun, 23 Sep 2018 13:40:19 +0000 (15:40 +0200)]
Change order of gaussian_correlation arguments
Now, output is first, all the rest are inputs. This makes it easier to
remember which variable receives the output when ones looks at a call site.
Michal Sojka [Sun, 23 Sep 2018 13:34:54 +0000 (15:34 +0200)]
FFT interface fixes for BIG_BATCH mode
More fixes will follow.
Michal Sojka [Sun, 23 Sep 2018 12:41:46 +0000 (14:41 +0200)]
Update KCF_Tracker::max_response
This will be needed by Hercules partner PITOM.
Michal Sojka [Sun, 23 Sep 2018 12:40:46 +0000 (14:40 +0200)]
Update debugging messages
Michal Sojka [Sun, 23 Sep 2018 12:30:52 +0000 (14:30 +0200)]
Fix fftw bug
We need floating point division, not integer division.
Michal Sojka [Sun, 23 Sep 2018 09:27:22 +0000 (11:27 +0200)]
Fix incorrect order of train() arguments
train() is called two time. Before this change, it was once called as
train(input_gray, input_rgb, ...) and once as
train(input_rgb, input_gray, ...)
This unifies the call sites and changes the order of arguments to match
get_features().
Fixes #28.
Michal Sojka [Sun, 23 Sep 2018 07:17:29 +0000 (09:17 +0200)]
Speedup gaussian correlation
This changes sum_over_channels(ifft(xyf)) for ifft(sum_over_channels(xyf)).
Since FFT is linear operation, the result is the same, but ifft is
calculated only once instead of 44 times.
Michal Sojka [Sun, 23 Sep 2018 07:13:43 +0000 (09:13 +0200)]
Fix bugs in some FFT classes
Michal Sojka [Sun, 23 Sep 2018 07:09:07 +0000 (09:09 +0200)]
Move debug support to separate file
Also update printed debug messages.
Michal Sojka [Sun, 23 Sep 2018 07:06:47 +0000 (09:06 +0200)]
Rename MatScaleFeatures.features() to .scale()
The new name represents the meaning of the data correctly.
Michal Sojka [Sat, 22 Sep 2018 21:14:32 +0000 (23:14 +0200)]
Update clang-format config
Michal Sojka [Sat, 22 Sep 2018 17:22:36 +0000 (19:22 +0200)]
Print Mat data with smaller precision (3 digits)
Michal Sojka [Sat, 22 Sep 2018 15:28:12 +0000 (17:28 +0200)]
Make debug messages contain first 10 elements of matrix data
Michal Sojka [Sat, 22 Sep 2018 15:03:18 +0000 (17:03 +0200)]
Avoid Mat allocation in track()
In addition to that, this also shortens num_of_scales to num_scales.