diff --git a/README.md b/README.md index 112e61e1..886ce575 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ The GoCV package provides Go language bindings for the [OpenCV 4](http://opencv. The GoCV package supports the latest releases of Go and OpenCV (v4.5.0) on Linux, macOS, and Windows. We intend to make the Go language a "first-class" client compatible with the latest developments in the OpenCV ecosystem. +GoCV supports [CUDA](https://en.wikipedia.org/wiki/CUDA) for hardware acceleration using Nvidia GPUs. Check out the [CUDA README](./cuda/README.md) for more info on how to use GoCV with OpenCV/CUDA. + GoCV also supports [Intel OpenVINO](https://software.intel.com/en-us/openvino-toolkit). Check out the [OpenVINO README](./openvino/README.md) for more info on how to use GoCV with the Intel OpenVINO toolkit. ## How to use diff --git a/cuda/README.md b/cuda/README.md index 2c91e01f..b94f72a0 100644 --- a/cuda/README.md +++ b/cuda/README.md @@ -1,17 +1,18 @@ -# Cuda +# CUDA -In order to use the cuda package, the cuda toolkit from nvidia needs to be installed on the host system. - CUDA backend for DNN module requires CC (Compute Capability) 5.3 or higher. Check your GPU https://developer.nvidia.com/cuda-gpus +In order to use the GoCV `cuda` package, the CUDA toolkit from nvidia needs to be installed on the host system. + +The CUDA backend for DNN module requires CC (Compute Capability) 5.3 or higher. Check your GPU https://developer.nvidia.com/cuda-gpus Please see https://docs.nvidia.com/cuda/index.html for more information. -Furthermore opencv must be compiled with cuda support. +Furthermore opencv must be compiled with CUDA support. -GoCV supports using the Cuda as a backend for the OpenCV deep neural network (DNN) module. +GoCV also supports using CUDA as a backend for the OpenCV deep neural network (DNN) module. ## How to use -This code loads a Caffe model, and then uses Cuda to prepare it for execution on the GPU: +This code loads a Caffe model, and then uses CUDA to prepare it for execution on the GPU: ```go net := gocv.ReadNet("/path/to/your/model.caffemodel", "/path/to/your/config.proto") @@ -24,20 +25,21 @@ net.SetPreferableBackend(gocv.NetBackendType(gocv.NetBackendCUDA)) net.SetPreferableTarget(gocv.NetTargetType(gocv.NetTargetCUDA)) ``` -## Install Cuda +## Installing CUDA + Download and install packages from https://developer.nvidia.com/cuda-downloads - example 'cuda_10.2.89_440.33.01_linux.run' +For example, download 'cuda_10.2.89_440.33.01_linux.run' Download and install packages from https://developer.nvidia.com/rdp/cudnn-archive - example 'cuDNN Runtime Library for Ubuntu18.04 (Deb)' and 'cuDNN Developer Library for Ubuntu18.04 (Deb)' +For example the 'cuDNN Runtime Library for Ubuntu18.04 (Deb)' and 'cuDNN Developer Library for Ubuntu18.04 (Deb)' -## Compiling opencv with cuda +## Compiling OpenCV with CUDA -For now we have included the make target `install_cuda` that compiles opencv with cuda. (For more details on the compilation process please see the `Makefile`) +We have included the make target `install_cuda` that compiles OpenCV with CUDA support. (For more details on the compilation process please see the `Makefile`) -Simply issue the command `make install_cuda` and you should be good to go. +Run the command `make install_cuda` and you should be good to go. If you need static opencv libraries @@ -50,6 +52,6 @@ Then finally verify that it is all working You should see something along the lines of: - gocv version: 0.19.0 + gocv version: 0.25.0 cuda information: Device 0: "GeForce MX150" 2003Mb, sm_61, Driver/Runtime ver.10.0/10.0