Installation#
This topic provides instructions for installing MIVisionX and related packages.
Prerequisites#
The following are the hardware and OS requirements of the MIVisionX library. Refer to System Requirements for additional information.
Hardware#
- CPU: AMD64 
- GPU: AMD Radeon Graphics 
- APU: AMD Radeon Mobile/Embedded 
Note
Some modules in MIVisionX can be built for CPU only. To take advantage of advanced features and modules we recommend using AMD GPUs or APUs.
Operating Systems#
- Linux - Ubuntu - 22.04 or 24.04 
- RedHat - 8 or 9 
- SLES - 15-SP5 
 
- Windows 10 or 11 
- macOS Ventura 13 or Sonoma 14 
Compiler#
- AMD Clang++ 
Libraries#
- CMake - Version 3.10 and above 
- Half-precision floating-point(half) library - Version 1.12.0 
- MIOpen 
- MIGraphX 
- RPP 
- pkg-config 
- OpenCV - Version 3.X or 4.X 
- FFmpeg - Version 4.4.2 and above 
Linux installation#
The installation process uses the following steps:
- ROCm-supported hardware install verification 
- Install ROCm 6.0.0 or later with amdgpu-install with - --usecase=rocm
- Install either from existing Packages or by building Source files as described below 
Installation from packages#
Install MIVisionX runtime, development, and test packages.
- Runtime package - - mivisionxonly provides the dynamic libraries and executables
- Development package - - mivisionx-dev/- mivisionx-develprovides the libraries, executables, header files, and samples
- Test package - - mivisionx-testprovides- ctestto verify installation
Ubuntu#
sudo apt-get install mivisionx mivisionx-dev mivisionx-test
CentOS / RedHat#
sudo yum install mivisionx mivisionx-devel mivisionx-test
SLES#
sudo zypper install mivisionx mivisionx-devel mivisionx-test
- Package install supports HIP backend 
- CentOS/RedHat/SLES requires FFMPEG & OpenCV Dev packages manual install 
Installation from source files#
For your convenience a setup script is provided, MIVisionX-setup.py, which installs all required dependencies:
python MIVisionX-setup.py --directory [setup directory - optional (default:~/)]
                          --opencv    [OpenCV Version - optional (default:4.6.0)]
                          --ffmpeg    [FFMPEG V4.4.2 Installation - optional (default:ON) [options:ON/OFF]]
                          --amd_rpp   [MIVisionX VX RPP Dependency Install - optional (default:ON) [options:ON/OFF]]
                          --neural_net[MIVisionX Neural Net Dependency Install - optional (default:ON) [options:ON/OFF]]
                          --inference [MIVisionX Neural Net Inference Dependency Install - optional (default:ON) [options:ON/OFF]]
                          --developer [Setup Developer Options - optional (default:OFF) [options:ON/OFF]]
                          --reinstall [Remove previous setup and reinstall (default:OFF)[options:ON/OFF]]
                          --backend   [MIVisionX Dependency Backend - optional (default:HIP) [options:HIP/OCL/CPU]]
                          --rocm_path [ROCm Installation Path - optional (default:/opt/rocm ROCm Installation Required)]
- Install ROCm before running the setup script 
- This script only needs to be executed once 
- ROCm upgrade requires the setup script to be rerun 
Using MIVisionX-setup.py#
- Clone MIVisionX git repository 
git clone https://github.com/ROCm/MIVisionX.git
Note
MIVisionX supports two GPU backends: HIP and OPENCL. Refer to the following instructions for installing with HIP backend. Refer to OPENCL GPU backend for instructions on installing with OpenCL backend.
Instructions for building MIVisionX with the HIP GPU backend (default backend)#
- Run the setup script to install all the dependencies required by the HIP GPU backend: - cd MIVisionX python MIVisionX-setup.py 
- Run the following commands to build MIVisionX with the HIP GPU backend: - mkdir build-hip cd build-hip cmake ../ make -j8 sudo make install 
- Run tests - test option instructions - make test 
Windows#
- Windows SDK 
- Visual Studio 2019 or later 
- Install the latest AMD drivers 
- Install OpenCL SDK 
- Install OpenCV 4.6.0 - Set - OpenCV_DIRenvironment variable to- OpenCV/buildfolder
- Add - %OpenCV_DIR%\x64\vc14\binor- %OpenCV_DIR%\x64\vc15\binto your- $PATH
 
Using Visual Studio#
Use MIVisionX.sln to build for x64 platform
Important
Some modules in MIVisionX are only supported on Linux
macOS#
Refer to macOS build instructions
Important
macOS only supports MIVisionX CPU backend
Verify installation#
Linux / macOS#
The installer will copy:
Executables into
/opt/rocm/bin
Libraries into
/opt/rocm/lib
Header files into
/opt/rocm/include/mivisionx
Apps, & Samples folder into
/opt/rocm/share/mivisionx
Documents folder into
/opt/rocm/share/doc/mivisionx
Model Compiler, and Toolkit folder into
/opt/rocm/libexec/mivisionx
Verify with sample application#
Canny Edge Detection
export PATH=$PATH:/opt/rocm/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib
runvx /opt/rocm/share/mivisionx/samples/gdf/canny.gdf
Note
- More samples are available at - ../samples/README.md#samples
- For macOS use - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/rocm/lib
Verify with mivisionx-test package#
Test package will install ctest module to test MIVisionX. Use the following steps to test package install:
mkdir mivisionx-test && cd mivisionx-test
cmake /opt/rocm/share/mivisionx/test/
ctest -VV
Windows#
- MIVisionX.slnbuilds the libraries & executables in the folder- MIVisionX/x64
- Use - RunVXto test the build
./runvx.exe ADD_PATH_TO/MIVisionX/samples/gdf/skintonedetect.gdf
Docker#
MIVisionX provides developers with docker images for Ubuntu 20.04 / 22.04. Using docker images developers can quickly prototype and build applications without having to be locked into a single system setup or lose valuable time figuring out the dependencies of the underlying software.
For more information about the Docker files used to build MIVisionX containers and a suggested workflow, see MIVisionX Docker documentation.
MIVisionX docker#
Tested configurations#
Known issues#
- OpenCV 4.X support for some apps missing 
- MIVisionX Package install requires manual prerequisites installation
- FFMPEG 
- OpenCV 
 
 
MIVisionX dependency map#
Docker Image: 
sudo docker build -f docker/ubuntu20/{DOCKER_LEVEL_FILE_NAME}.dockerfile -t {mivisionx-level-NUMBER} .
 New component added to the level New component added to the level
 Existing component from the previous level Existing component from the previous level
| Build Level | MIVisionX Dependencies | Modules | Libraries and Executables | Docker Tag | 
| Level_1 | cmake  | amd_openvx   | 
 | |
| Level_2 | ROCm HIP  | amd_openvx  | 
 | |
| Level_3 | OpenCV  | amd_openvx  | 
 | |
| Level_4 | MIOpen  | amd_openvx  | 
 | |
| Level_5 | AMD RPP  | amd_openvx  | 
 | 
Note
OpenVX and the OpenVX logo are trademarks of the Khronos Group Inc.