OpenCV for Unity ver2.4.1 Release!
- Author: Enox Software
- Category: Update
- Tags: OpenCV for Unity
Related posts
Dlib FaceLandmark Detector ver1.2.6 Release!
Version 1.2.6 [Common]Added “sp_human_face_17.dat”, “sp_human_face_17_mobile.dat” and “sp_human_face_6.dat”. [Common]Changed the training dataset of Shape Predictor model. Since the training dataset consists of Flickr CC0 licensed images, the Shape Predictor model files are available for commercial use. [Common]Added BenchmarkExample.
- Author: Enox Software
- Category: Update
- Tags: Dlib FaceLandmark Detector
How to run DNN modules with CUDA backend support on Windows platform?
Overview In 2019, a commit was merged that added the option to use the CUDA backend for inference in OpenCV’s DNN module, resulting in faster inference on Nvidia GPUs. If you wish to use this CUDA backend with OpenCV for Unity, it is necessary to build and set up OpenCV as a dynamic library on your own. This article will provide guidance on the process. Steps Build the OpenCV library with the OPENCV_DNN_CUDA flag enabled. Please refer to the article below for instructions on how to build OpenCV with OPENCV_DNN_CUDA enabled. https://learnopencv.com/how-to-use-opencv-dnn-module-with-nvidia-gpu-on-windows/ https://www.jamesbowley.co.uk/qmd/opencv_cuda_python_windows.html https://medium.com/geekculture/setup-opencv-dnn-module-with-cuda-backend-support-for-windows-7f1856691da3 Build with OPENCV_EXTRA_MODULES_PATH and BUILD_SHARED_LIBS enabled. In addition, it is recommended that you download and build the same revision of the source as the OpenCV git link provided in the ReadMe.pdf. In my environment, I built OpenCV using the following CMake configuration. OPENCV_EXTRA_MODULES_PATH:PATH=C:/Users/xxxxx/opencv_contrib/modules BUILD_SHARED_LIBS:BOOL=ON WITH_CUDA=ON WITH_CUDNN=ON OPENCV_DNN_CUDA=ON CUDA_ARCH_BIN=6.1 CUDA_ARCH_PTXS=6.1 The versions specified for `CUDA_ARCH_BIN` and `CUDA_ARCH_PTXS` (such as 6.1) should match the **Compute Capability** of your GPU. You can check your GPU’s Compute Capability on NVIDIA’s official page: https://developer.nvidia.com/cuda-gpus Copy the built dll files to the Plugins folder. Replace the opencvforunity.dll file in the Extra package with opencvforunity.dll in the Plugins folder. Update the plugin file settings using the Set Plugin Import Settings button. To enable the CUDA backend, change the code as follows. net.setPreferableBackend( Dnn.DNN_BACKEND_CUDA); […]
- Author: Enox Software
- Category: Tips
- Tags: OpenCV for Unity
OpenCV for Unity ver3.0.0 Release!
Version 3.0.0 [Common]Updated OpenCV to version 4.12.0. [Common]Updated FpsMonitor to version 1.0.4. [visionOS]Updated platform support for VisionOS on Unity 2022.3.18f1 and later (beta). [Android]Updated native library libopencvforunity.so for Android to be compatible with 16KB page size. [Common]Added SafeDrawFrameAxes method to OpenCVARUtils. [Common]Added GetFilePathCoroutine, GetFilePathAsync, and GetFilePathTaskAsync methods to OpenCVEnv. [Common]Added IsDebugMode and IsThrowException methods to OpenCVDebug. [Common]Added TextureToMatAsync, RenderTextureToMatAsync, and MatToRenderTextureAsync methods to OpenCVMatUtils. [Common]Added OpenCVForUnityProjectSizeReducerWindow in EditorWindow. [Common]Added a feature to skip unnecessary downloads in OpenCVForUnityExampleAssetsDownloaderWindow. [Common]Added ImshowDNNBlob method to DebugMat. [Common]Added WeChatQRCodeDetectorImageExample and WeChatQRCodeDetectorExample. [Common]Added HomographyToFindAKnownObjectExample. [Common]Added ObjectDetectionDAMOYOLOExample. [Common]Removed FaceDetectionResnetSSDExample due to incompatibility with the latest OpenCV. [Common]Changed namespaces under org/unity from UnityUtils to UnityIntegration, split Utils class into function-specific classes, and marked old classes as deprecated. [Common]Changed Operator in Mat class to deprecated.
- Author: Enox Software
- Category: Update
