Commit Graph

15525 Commits

Author SHA1 Message Date
David Geldreich
7c334f45c6 trainAuto: uses parallel_for_ to dispatch all parameters combination to test 2017-08-08 13:27:02 +02:00
Alexander Alekhin
2f4a3e40eb Merge pull request #9287 from dkurt:tensorflow_unit_tests 2017-08-03 12:21:23 +00:00
Alexander Alekhin
15aa0df23c Merge pull request #9297 from alalek:akaze_remove_rand 2017-08-03 09:21:22 +00:00
Jiri Horner
3166d0c667 Merge pull request #9249 from hrnr:akaze_part3
[GSOC] Speeding-up AKAZE, part #3 (#9249)

* use finding of scale extremas from fast_akaze

* incorporade finding of extremas and subpixel refinement from Hideaki Suzuki's fast_akaze (https://github.com/h2suzuki/fast_akaze)
* use opencv parallel framework
* do not search for keypoints near the border, where we can't compute sensible descriptors (bugs fixed in ffd9ad99f4, 2c5389594b), but the descriptors were not 100% correct. this is a better solution

this version produces less keypoints with the same treshold. It is more effective in pruning similar keypoints (which do not bring any new information), so we have less keypoints, but with high quality. Accuracy is about the same.

* incorporate bugfix from upstream

* fix bug in subpixel refinement
* see commit db3dc22981e856ca8111f2f7fe57d9c2e0286efc in Pablo's repo

* rework finding of scale space extremas

* store just keypoints positions
* store positions in uchar mask for effective spatial search for neighbours
* construct keypoints structs at the very end

* lower inlier threshold in test

* win32 has lower accuracy
2017-08-03 08:35:07 +00:00
dkurt
339793143c Unit tests for TensorFlow importer 2017-08-03 11:29:48 +03:00
Alexander Alekhin
8be1ba708e features2d: don't use rand(), because it is not thread-safe
Results are not stable with srand()
2017-08-02 23:48:54 +03:00
Alexander Alekhin
0bd357e7ec Merge pull request #9296 from dkurt:halide_device_interface 2017-08-02 20:26:30 +00:00
Alexander Alekhin
d8c70e2e73 Merge pull request #9286 from alalek:rect_size_empty 2017-08-02 20:20:16 +00:00
dkurt
b1ef44b1ac Replace halide_opencl_device_interface 2017-08-02 20:38:30 +03:00
Aleksandr Rybnikov
8d6b8b45b6 Added ELU and test for it 2017-08-02 11:13:59 +03:00
Alexander Alekhin
321c0ec533 core: empty() for Rect/Size templates
Check for empty objects via .area() is not a good practice due overflows
2017-08-01 17:19:18 +03:00
Alexander Alekhin
4ad45af53f Merge pull request #9253 from jbms:fix/image-decoding-tempfile 2017-08-01 13:47:15 +00:00
Alexander Alekhin
37a7e08b38 Merge pull request #9097 from piotr-semenov:fix/cv_rect_monoid_identity 2017-08-01 13:06:37 +00:00
Alexander Alekhin
bab4bc0968 Merge pull request #9284 from ipuustin:dnn-opencl-fixes 2017-08-01 13:06:01 +00:00
Alexander Alekhin
f6c4901b8f Merge pull request #9279 from alalek:ocl_fix_program_cache 2017-08-01 13:05:43 +00:00
Jiri Horner
bb6496d9e5 Merge pull request #8951 from hrnr:akaze_part2
[GSOC] Speeding-up AKAZE, part #2 (#8951)

* feature2d: instrument more functions used in AKAZE

* rework Compute_Determinant_Hessian_Response

* this takes 84% of time of Feature_Detection
* run everything in parallel
* compute Scharr kernels just once
* compute sigma more efficiently
* allocate all matrices in evolution without zeroing

* features2d: add one bigger image to tests

* now test have images: 600x768, 900x600 and 1385x700 to cover different resolutions

* explicitly zero Lx and Ly

* add Lflow and Lstep to evolution as in original AKAZE code

* reworked computing keypoints orientation

integrated faster function from https://github.com/h2suzuki/fast_akaze

* use standard fastAtan2 instead of getAngle

* compute keypoints orientation in parallel

* fix visual studio warnings

* replace some wrapped functions with direct calls to OpenCV functions

* improved readability for people familiar with opencv
* do not same image twice in base level

* rework diffusity stencil

* use one pass stencil for diffusity from https://github.com/h2suzuki/fast_akaze
* improve locality in Create_Scale_Space

* always compute determinat od hessian and spacial derivatives

* this needs to be computed always as we need derivatives while computing descriptors
* fixed tests of AKAZE with KAZE descriptors which have been affected by this

Currently it computes all first and second order derivatives together and the determiant of the hessian. For descriptors it would be enough to compute just first order derivates, but it is not probably worth it optimize for scenario where descriptors and keypoints are computed separately, since it is already very inefficient. When computing keypoint and descriptors together it is faster to do it the current way (preserves locality).

* parallelize non linear diffusion computation

* do multiplication right in the nlp diffusity kernel

* rework kfactor computation

* get rid of sharing buffers when creating scale space pyramid, the performace impact is neglegible

* features2d: initialize TBB scheduler in perf tests

* ensures more stable output
* more reasonable profiles, since the first call of parallel_for_ is not getting big performace hit

* compute_kfactor: interleave finding of maximum and computing distance

* no need to go twice through the data

* start to use UMats in AKAZE to leverage OpenCl in the future

* fixed bug that prevented computing determinant for scale pyramid of size 1 (just the base image)
* all descriptors now support writing to uninitialized memory
* use InputArray and OutputArray for input image and descriptors, allows to make use UMAt that user passes to us

* enable use of all existing ocl paths in AKAZE

* all parts that uses ocl-enabled functions should use ocl by now

* imgproc: fix dispatching of IPP version when OCL is disabled

* when OCL is disabled IPP version should be always prefered (even when the dst is UMat)

* get rid of copy in DeterminantHessian response

* this slows CPU version considerably
* do no run in parallel when running with OCL

* store derivations as UMat in pyramid

* enables OCL path computing of determint hessian
* will allow to compute descriptors on GPU in the future

* port diffusivity to OCL

* diffusivity itself is not a blocker, but this saves us downloading and uploading derivations

* implement kernel for nonlinear scalar diffusion step

* download the pyramid from GPU just once

we don't want to downlaod matrices ad hoc from gpu when the function in AKAZE needs it. There is a HUGE mapping overhead and without shared memory support a LOT of unnecessary transfers.

This maps/downloads matrices just once.

* fix bug with uninitialized values in non linear diffusion

* this was causing spurious segfaults in stitching tests due to propagation of NaNs
* added new test, which checks for NaNs (added new debug asserts for NaNs)
* valgrind now says everything is ok

* add nonlinear diffusion step OCL implementation

* Lt in pyramid changed to UMat, it will be downlaoded from GPU along with Lx, Ly
* fix bug in pm_g2 kernel. OpenCV mangles dimensions passed to OpenCL, so we need to check for boundaries in each OCL kernel.

* port computing of determinant to OCL

* computing of determinant is not a blocker, but with this change we don't need to download all spatial derivatives to CPU, we only download determinant
* make Ldet in the pyramid UMat, download it from CPU together with the other parts of the pyramid
* add profiling macros

* fix visual studio warning

* instrument non_linear_diffusion

* remove changes I have made to TEvolution

* TEvolution is used only in KAZE now

* Revert "features2d: initialize TBB scheduler in perf tests"

This reverts commit ba81e2a711.
2017-08-01 12:46:01 +00:00
Ismo Puustinen
c2de5cf735 dnn: force floating point literals to be float.
In OpenCL code in activations.cl, make the type of floating point
literals to be float. Otherwise the values will be interpreted as
doubles, causing Beignet to have type conversion issues.
2017-08-01 15:02:24 +03:00
Alexander Alekhin
2959e7aba9 Merge pull request #9188 from arrybn:mobilenet_ssd_sample 2017-08-01 11:12:54 +00:00
Aleksandr Rybnikov
ce1cc352d9 MobileNet SSD sample 2017-08-01 12:30:27 +03:00
Alexander Alekhin
d34eec3ab3 Merge pull request #9278 from alalek:ts_perf_threads 2017-07-31 16:21:51 +00:00
Jeremy Maitin-Shepard
2be955a0ef loadsave: check for errors when using temp file
Previously, the return value of fwrite and fclose were not properly
checked, leading to possible silent truncation of the data if writing
failed, e.g. due to lack of disk space.

Fixes issue #9251.
2017-07-31 09:02:42 -07:00
Alexander Alekhin
16fb74425e ocl: fix program cache key 2017-07-31 17:24:08 +03:00
Alexander Alekhin
3786d30320 Merge pull request #9225 from paroj:reproject_cpp 2017-07-31 14:11:37 +00:00
Alexander Alekhin
50b9a5afa9 ts(perf): initialize ThreadPool 2017-07-31 16:51:08 +03:00
Alexander Alekhin
06a9c16961 Merge pull request #9275 from alalek:cmake_protobuf_optional 2017-07-31 12:03:54 +00:00
Alexander Alekhin
d22506092e Merge pull request #9274 from alalek:ipp_meanstddev 2017-07-31 12:02:59 +00:00
Alexander Alekhin
728bd68977 Merge pull request #9272 from tomoaki0705:fixCudaBuild 2017-07-31 12:02:40 +00:00
Alexander Alekhin
cbced23de4 cmake: don't include protobuf on disabled DNN module 2017-07-31 14:18:59 +03:00
Alexander Alekhin
e58a778bd5 core(stat): disable IPP optimization in meanStdDev (cn > 1) 2017-07-31 14:09:18 +03:00
Tomoaki Teshima
1c49796e8e guad for CUDA correctly 2017-07-31 18:42:36 +09:00
Alexander Alekhin
46f05f2db6 python: disable assertion in NumpyAllocator 2017-07-30 14:44:11 +03:00
Alexander Alekhin
15a6586062 python: stitching simple test 2017-07-30 14:44:10 +03:00
Alexander Alekhin
fffd0f5b68 Merge pull request #9241 from alalek:tlsSlotsSize 2017-07-30 09:53:39 +00:00
Alexander Alekhin
34f9c039c5 Merge pull request #9238 from alalek:valgrind_fixes 2017-07-27 14:33:01 +00:00
Alexander Alekhin
d35422b523 core(tls): hide assertions from Thread Sanitizer 2017-07-27 17:31:51 +03:00
Alexander Alekhin
68ef903a7c core(tls): don't use tlsSlots without synchronization 2017-07-26 22:45:55 +03:00
Alexander Alekhin
06407b4d14 Merge pull request #9233 from LaurentBerger:dnndoc 2017-07-26 16:25:28 +00:00
Alexander Alekhin
12213f9985 flann: fix out of buffer access 2017-07-26 18:17:03 +03:00
Alexander Alekhin
caa5e3b4c5 imgproc: fix vectorized code of accumulate 2017-07-26 17:21:46 +03:00
Alexander Alekhin
2e17251160 calib3d: fix invalid memory access 2017-07-26 17:21:46 +03:00
Alexander Alekhin
3f102e5d3a dnn: protobuf shutdown 2017-07-26 17:21:46 +03:00
Alexander Alekhin
aad6d28e13 ts: don't run large videoio test (valgrind) 2017-07-26 17:21:46 +03:00
Alexander Alekhin
1650c664bc ts: don't run imgcodecs tests on large images (valgrind) 2017-07-26 17:21:46 +03:00
Alexander Alekhin
d17b099994 ts: don't run DNN tests with large models (valgrind) 2017-07-26 17:21:46 +03:00
Alexander Alekhin
bf0173bf38 ts: update valgrind suppressions 2017-07-26 17:21:45 +03:00
Alexander Alekhin
b4e300b78b Merge pull request #9236 from dkurt:fix_json_bool 2017-07-26 13:08:13 +00:00
Alexander Alekhin
402a77e7f7 Merge pull request #9237 from alalek:fix_winrt_build 2017-07-26 10:42:49 +00:00
Alexander Alekhin
2ca561f104 Merge pull request #9217 from alalek:cleanup_3rdparty 2017-07-26 10:38:28 +00:00
dkurt
583b327523 Fix JSON booleans without quotes 2017-07-26 12:51:06 +03:00
LaurentBerger
69fd57bc96 update tutorial link for dnn 2017-07-25 19:32:17 +02:00