Introduction
This tutorial will work as a guide for when you want to use DeepView Converter by itself in a fresh Python environment, without requiring the use of eIQ Portal. These packages are all published on the PyPi repository and can be installed via the standard PIP installation process.
Prerequisites
- Python 3.8 installed
- virtualenv package installed (pip install virtualenv)
- Access to Jenkins (VPN needed for non-office)
Setup
For this guide we will be working with a fresh python environment. To create a new python environment, you will run the command
python -m venv env_name
This will create a folder of the name provided for env_name that contains the base python installation that is used by your computer's environment.
To activate this environment in Windows:
(Windows) C:\> $env_name\Scripts\activate
and in Linux:
(Linux) $ source $env_name\Scripts\activate
The next steps are to install the DeepView packages:
python -m pip install deepview-converter
python -m pip install deepview-converter-rtm
python -m pip install deepview-converter-tflite
python -m pip install deepview-converter-onnx
python -m pip install deepview-rt
This will provide you access to the converter as well as all three plugins (RT, TFLite, ONNX) from within your python environment and allow you use of the deepview-converter command. All plugin installs are optional if they are not needed.
Now you need to provide the converter with the DeepViewRT library. Currently you need to manually set this. First go to the DeepViewRT Downloads Page and download the newest version of DeepViewRT zip or .tar.gz) for your environment
Using WinRar, 7Zip, or some other extraction method, extract the zipped file to a folder.
Windows
For Windows, you will need to provide the .dll file from within that folder. That can be done with the following commands:
cd extracted_folder\bin
set "DEEPVIEW_RT=%CD%\DeepViewRT.dll"
echo %DEEPVIEW_RT%
The echo command should output the correct file and location.
Linux
For Linux, you will need to provide the .so file from with that zipped tarball. That can be done with the following commands.
tar xzvf deepview-rt-latest-linux-x64_64.tar.gz
cd lib
export DEEPVIEW_RT=$(pwd)/libdeepview-rt.so
echo $DEEPVIEW_RT
The echo command should output the correct file and location.
Confirmation that installation of all elements can be done with the --help and --list options:
(pypi_testing) Q:\pypi>deepview-converter --help
deepview-converter 2.5.18
usage: deepview-converter [options]
options:
[-h] [--help] [plugin_name source_type dest_type] Prints this help for a plugin or this help
[-v] [--version] Prints version
[-r] [--reserve] Prints Reserved Params List
[-l] [--list] Lists installed plugins
[-i] [--install] path_to_whl_file Installs a plugin
[-u] [--uninstall] plugin_name Uninstalls a plugin
[--source] source_model [--dest] destination_model [conveter specific parameters] Converts a model
(pypi_testing) Q:\pypi>deepview-converter --list
deepview-converter 2.5.18
--------------- deepview-converter-tflite ---------------
name: deepview-converter-tflite
sanityCheck: ok
summary: DeepView Converter for TensorFlow Lite
author: Au-Zone
version: 2.5.19
inputsSupported: [{'ext': 'h5', 'name': 'Keras'}, {'ext': 'pb', 'name': 'Tensorflow'}, {'ext': 'onnx', 'name': 'ONNX'}, {'ext': 'http', 'name': 'Web Hosted Model'}]
outputsSupported: [{'ext': 'tflite', 'name': 'Tensorflow Lite'}]
path: q:\pypi\pypi_testing\lib\site-packages\deepview_tensorflow\__main__.py
--------------- deepview-converter-rtm ---------------
name: deepview-converter-rtm
sanityCheck: ok
summary: DeepView Converter for DeepViewRT
author: Au-Zone
version: 2.5.23
inputsSupported: [{'ext': 'h5', 'name': 'Keras'}, {'ext': 'pb', 'name': 'Tensorflow'}, {'ext': 'onnx', 'name': 'ONNX'}, {'ext': 'tflite', 'name': 'Tensorflow Lite'}]
outputsSupported: [{'ext': 'rtm', 'name': 'Deepview RT'}]
path: q:\pypi\pypi_testing\lib\site-packages\deepview_rtm\__main__.py
--------------- deepview-converter-onnx ---------------
name: deepview-converter-onnx
sanityCheck: ok
summary: ONNX Converter
author: Au-Zone
version: 2.5.19
inputsSupported: [{'ext': 'h5', 'name': 'Keras'}, {'ext': 'pb', 'name': 'Tensorflow'}, {'ext': 'onnx', 'name': 'ONNX'}]
outputsSupported: [{'ext': 'onnx', 'name': 'ONNX'}]
path: q:\pypi\pypi_testing\lib\site-packages\deepview_onnx\__main__.py
Congratulations! Your python environment is set up for use with the DeepView Converter, please check out some of our other awesome guides for how to effectively use the DeepView Converter.
Comments
0 comments
Please sign in to leave a comment.