* dnn: Add a Vulkan based backend
This commit adds a new backend "DNN_BACKEND_VKCOM" and a
new target "DNN_TARGET_VULKAN". VKCOM means vulkan based
computation library.
This backend uses Vulkan API and SPIR-V shaders to do
the inference computation for layers. The layer types
that implemented in DNN_BACKEND_VKCOM include:
Conv, Concat, ReLU, LRN, PriorBox, Softmax, MaxPooling,
AvePooling, Permute
This is just a beginning work for Vulkan in OpenCV DNN,
more layer types will be supported and performance
tuning is on the way.
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/vulkan: Add FindVulkan.cmake to detect Vulkan SDK
In order to build dnn with Vulkan support, need installing
Vulkan SDK and setting environment variable "VULKAN_SDK" and
add "-DWITH_VULKAN=ON" to cmake command.
You can download Vulkan SDK from:
https://vulkan.lunarg.com/sdk/home#linux
For how to install, see
https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.htmlhttps://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.htmlhttps://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html
respectively for linux, windows and mac.
To run the vulkan backend, also need installing mesa driver.
On Ubuntu, use this command 'sudo apt-get install mesa-vulkan-drivers'
To test, use command '$BUILD_DIR/bin/opencv_test_dnn --gtest_filter=*VkCom*'
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: dynamically load Vulkan runtime
No compile-time dependency on Vulkan library.
If Vulkan runtime is unavailable, fallback to CPU path.
Use environment "OPENCL_VULKAN_RUNTIME" to specify path to your
own vulkan runtime library.
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: Add a python script to compile GLSL shaders to SPIR-V shaders
The SPIR-V shaders are in format of text-based 32-bit hexadecimal
numbers, and inserted into .cpp files as unsigned int32 array.
* dnn/Vulkan: Put Vulkan headers into 3rdparty directory and some other fixes
Vulkan header files are copied from
https://github.com/KhronosGroup/Vulkan-Docs/tree/master/include/vulkan
to 3rdparty/include
Fix the Copyright declaration issue.
Refine OpenCVDetectVulkan.cmake
* dnn/Vulkan: Add vulkan backend tests into existing ones.
Also fixed some test failures.
- Don't use bool variable as uniform for shader
- Fix dispathed group number beyond max issue
- Bypass "group > 1" convolution. This should be support in future.
* dnn/Vulkan: Fix multiple initialization in one thread.
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)
* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.
* Add coditional iclusion of hpx_main.hpp to cpp cpu modules
* Remove start/stop version of hpx backend
* created new decoder and encoder for PFM
pfm file format stores binary RGB or grayscale float images.
* added test for pfm codec
* replaced large with short licence header
* little/big-endian-check is now compile time
* fixed width/height confusion, improved big/little endian recognition, fixed scaling issue and Improved signature check
* adapted tests to handle float images well
* removed data-dependency: lena.pfm
the lena image is now loaded is pam and converted to pfm.
* fixed bug in endianess detection macro
* Added endianess detection for android and win
* removed fancy endianess detection
endianess detection will be implemented in cmake scripts soonish.
* fixed minor warnings
* fixed stupid elif defined bug
* silenced some implicit cast warnings
* replaced std::to_string with std::stringstream solution
std::to_string variant did not build on android.
* replaced new endianess macros with existing ones
* improved readability
* remove unnecessary defines from vsx_utils
* fix v_load_expand, load lower 64bit
* use vec_ld, vec_st with alignment load/store on all types except 64bit
* map v_extract to v_rotate_right
* update license header
* enable VSX by default on clang since #11167
Update for MSMF-based VideoCapture and VideoWriter (#11092)
* MSMF based VideoCapture updated to handle video stream formats different from RGB24
* MSMF based VideoWriter updated to handle video frame top-bottom line ordering regardless of output format
* Fixed race condition in MSMF based VideoCapture
* Refactored MSMF based VideoCapture and VideoWriter
* Disabled frame rate estimation for MP43
* Removed test for unsupported avi container from MSMF VideoWriter tests
* Enabled MSMF-based VideoIO by default
- Recommended compiler checks:
- GCC: CV_GCC
- Clang: CV_CLANG
- fixed problem with CMAKE_CXX_COMPILER_ID=Clang/AppleClang mess on MacOSX
Details: cmake --help-policy CMP0025
- do not declare Clang as GCC compiler
- allow installing samples sources on all platforms
even if BUILD_EXAMPLES is disabled, fixed minor
issues in sources installation process
- use 'example_<group>_<name>' scheme for target and binary file naming
- use single function for sample executable creation
* Do not build protobuf if dnn is disabled
* Added BUILD_LIST cmake option to the cache
* Moved protobuf to the top level
* Fixed static build
* Fixed world build
* fixup! Fixed world build
Documentation generation refactoring (#10621)
* Documentation build updates:
- disable documentation by default, do not add to ALL target
- combine Doxygen and Javadoc
- optimize Doxygen html
* javadoc: fix path in build directory
* cmake: fix "Documentation" status line