![]() |
iVS3D v2.0.9
|
We build and test iVS3D on Ubuntu 22.04, Ubuntu 24.04 and Debian 12. Thus, for other distributions, the following instructions might need to be adjusted.
Install Qt 5.15.2 according to the instructions on their official website. Please add the Qt binary folder to your PATH variable, this is necessary for compiling translations and ui files using tools provided in the Qt installation, e.g.:
Download prebuilt OpenCV packages or build it from source. Make sure you include the contrib modules as they contain algorithms required by our optical flow plugins and many more. Your OpenCV build should contain a file OpenCVConfig.cmake, usually it is located in lib/cmake/opencv4. This is your OpenCV_DIR.
To utilize GPU acceleration in iVS3D, you need an OpenCV build which supports CUDA. In this case download NVIDIA CUDA Toolkit API as well. See the CUDA acceleration section below for more information.
Make sure to install the shared libraries of [Ffmpeg] as iVS3D dynamically links against them.
For the Neural Network based plugins, you need to download Onnxruntime 1.18.0 or later GPU (make sure to select the version according to your CUDA version) as well.
Clone iVS3D recursively to include the neural network models for our plugins.
We utilize CMake Presets to simplify the configuration process. To list the available presets, run:
You can create your own presets to switch configurations easily. For more information, see the Custom CMake Presets section below.
Decide which preset you want to use, e.g. release or debug, and run the following command to configure your build:
Do not worry if some components are marked as NO, this is expected if you do not have the required dependencies installed. For example, the NeuralNet component requires the Onnxruntime library to be installed, which is optional.
Instead of specifying the -D OpenCV_DIR option, you can also set the
OpenCV_DIRenvironment variable to the path of your OpenCV installation. This will be used by CMake to find the OpenCVConfig.cmake file.
Then, build and install your configuration:
Your iVS3D installation will be located in the build/<preset name>/bin folder.
If you want to use a custom install location, you can specify it in the
CMAKE_INSTALL_PREFIXoption when configuring your build. For example:
Use cmake -L --preset <preset name> to see all available configurations:
CMake configuration options are added using the -D flag. Following options are available when configuring your iVS3D build:
| Option | Type | Default value | Description |
|---|---|---|---|
| Build_Plugins | BOOL | ON | Enable compilation of plugins |
| Build_Tests | BOOL | OFF | Compile test suite |
| Build_Examples | BOOL | OFF | Compile example applications |
| CMAKE_BUILD_TYPE | STRING | Release | Use Debug to include debug symbols |
| CMAKE_INSTALL_PREFIX | STRING | build/<preset name>/install | install location |
| Install_Models | BOOL | ON | Copy onnx models for plugins to install location |
| OpenCV_DIR | PATH | Path to OpenCVConfig.cmake | |
| Update_Translations | BOOL | OFF | Regenerate translation files from source code (runs lupdate) |
| WITH_CUDA | BOOL | ON | Use CUDA to accelerate computations on the GPU. This requires CUDA, CUDNN and an OpenCV build with CUDA support to be installed! |
| Onnxruntime_ROOT_DIR | PATH | Optional! Path to the onnxruntime installation. See Neural network inference using Onnxruntime for more information. |
As there are many different configuration options we provide a set of CMake Presets to simplify the configuration process. You can find them in the CMakePresets.json file in the root directory of the iVS3D repository. Additionally, you can create your own presets by creating a CMakeUserPresets.json file in the same directory. To create a preset which inherits from the linux-debug default, adds a custom install location, and disables CUDA, you can use the following example:
Also, you can define build presets in the CMakeUserPresets.json file. Take a look at the default CMakePresets.json file for examples. The build presets can be used to specify additional build flags such as the number of jobs (processors) to use.
To enable CUDA acceleration, you need to install
WITH_CUDA option to OFF when configuring your build. Make sure the versions of cuDNN and CUDA are compatible with each other. Also, ensure that your GPU supports the CUDA version you are installing and opencv was built with this cuda version as well.
To utilize neural networks in iVS3D, you can use the Onnxruntime library. This is optional and not required for the basic functionality of iVS3D. If you want to use neural networks, download Onnxruntime-gpu >= 1.18 from the official GitHub Release. Unzip the folder and specify its installation path using the Onnxruntime_ROOT_DIR option when configuring your build.
With this configured correctly, the NerualNet component will be enabled and you can use the SemanticSegmentation and VisualSimilarity plugins.
Make sure to downlaod the onnxruntime-gpu version, even if you do not have a GPU, as it contains the necessary headers for compilation of the plugins. The CPU version does not contain these headers and will result in compilation errors. Also, ensure that the version of Onnxruntime is compatible with the CUDA version you have installed, if you are using CUDA acceleration (use onnxruntime 1.18.0 for CUDA 12.0).
Documentation Development using VSCode