Model compiler installation and configuration#
The following describes installing and setting up the model compiler & optimizer and neural net models for Linux.
Prerequisites#
- Linux - Ubuntu 20.04 / 22.04 
- CentOS 7 / 8 
- RHEL 8 / 9 
 
- MIVisionX installed as described in Installation 
- Install Linux Packages - Ubuntu - sudo apt-get -y install python3 python3-pip protobuf-compiler libprotoc-dev 
- CentOS/RHEL - sudo yum -y python3-devel python3-pip protobuf python3-protobuf 
 
- Install PIP3 and Python Packages - sudo pip3 install future==1.0.0 pytz==2022.1 numpy==1.23.0 
Note
MIVisionX installs model compiler scripts at /opt/rocm/libexec/mivisionx/model_compiler/python/
Setting up neural networks#
The following lists the requirements and steps to configure supported neural nets for use with model compiler.
Caffe#
- protobuf 
- google - sudo pip3 install google==3.0.0 protobuf==3.12.4 
ONNX#
- protobuf 
- onnx - sudo pip3 install protobuf==3.12.4 onnx==1.12.0 - Note - ONNX Models are available at ONNX Model Zoo 
NNEF#
- nnef-parser - Build the nnef python module - 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 - Note - NNEF models are available at NNEF Model Zoo