MIVisionX model compiler installation and configuration

MIVisionX model compiler installation and configuration#

The MIVisionX model compiler is used to convert pre-trained Caffe, ONNX, and NNEF neural network models to MIVisionX runtime code that can be used by any application that uses OpenVX. For more information on how to use the model compiler, see Using the MIVisionX model compiler and optimizer.

Use the following commands to install the MIVisionX model compiler:

sudo apt-get -y install python3 python3-pip protobuf-compiler libprotoc-dev
sudo yum -y python3-devel python3-pip protobuf python3-protobuf

Install additional packages:

sudo pip3 install future==1.0.0 pytz==2022.1 numpy==1.23.0

The model compiler files will be saved in /opt/rocm/libexec/mivisionx/model_compiler/python/.

To use the model compiler with Caffe models, install google and protobuff:

sudo pip3 install google==3.0.0 protobuf==3.12.4

ONNX Models are available at ONNX Model Zoo

To use the model compiler with NNEF models, you will need to build the NNEF Python module using the nnef-parser:

git clone -b nnef-v1.0.0 https://github.com/KhronosGroup/NNEF-Tools.git
cd NNEF-Tools/parser/cpp
mkdir -p build && cd build
cmake ../
make
sudo make install
cd ../../../python
sudo python3 setup.py install

NNEF models are available at NNEF Model Zoo