Skip to content

Commit

Permalink
MIVisionX 1.3.0 - Release updates (#133)
Browse files Browse the repository at this point in the history
* Readme Updates - 1.3.0

* New Logo added

* NNIR Bug Fix
  • Loading branch information
kiritigowda authored Jun 4, 2019
1 parent 3d4857e commit 00028fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/GPUOpen-ProfessionalCompute-Libraries/MIVisionX.svg?branch=master)](https://travis-ci.org/GPUOpen-ProfessionalCompute-Libraries/MIVisionX)


<p align="center"><img width="60%" src="docs/images/MIVisionX.png" /></p>

MIVisionX toolkit is a comprehensive computer vision and machine intelligence libraries, utilities and applications bundled into a single toolkit. AMD MIVisionX delivers highly optimized open source implementation of the Khronos OpenVX™ and OpenVX™ Extensions along with Convolution Neural Net Model Compiler & Optimizer supporting ONNX, and Khronos NNEF™ exchange formats. The toolkit allows for rapid prototyping and deployment of optimized workloads on a wide range of computer hardware, including small embedded x86 CPUs, APUs, discrete GPUs, and heterogeneous servers.
MIVisionX toolkit is a set of comprehensive computer vision and machine intelligence libraries, utilities, and applications bundled into a single toolkit. AMD MIVisionX delivers highly optimized open source implementation of the Khronos OpenVX™ and OpenVX™ Extensions along with Convolution Neural Net Model Compiler & Optimizer supporting ONNX, and Khronos NNEF™ exchange formats. The toolkit allows for rapid prototyping and deployment of optimized workloads on a wide range of computer hardware, including small embedded x86 CPUs, APUs, discrete GPUs, and heterogeneous servers.

* [AMD OpenVX](#amd-openvx)
* [AMD OpenVX Extensions](#amd-openvx-extensions)
Expand All @@ -31,7 +30,7 @@ MIVisionX toolkit is a comprehensive computer vision and machine intelligence li
AMD OpenVX ([amd_openvx](amd_openvx#amd-openvx-amd_openvx)) is a highly optimized open source implementation of the <a href="https://www.khronos.org/openvx/" target="_blank">Khronos OpenVX</a> computer vision specification. It allows for rapid prototyping as well as fast execution on a wide range of computer hardware, including small embedded x86 CPUs and large workstation discrete GPUs.

## AMD OpenVX Extensions
The OpenVX framework provides a mechanism to add new vision functions to OpenVX by 3rd party vendors. This project has below OpenVX [modules](amd_openvx_extensions#amd-openvx-extensions-amd_openvx_extensions) and utilities to extend [amd_openvx](amd_openvx#amd-openvx-amd_openvx) project, which contains the AMD OpenVX Core Engine.
The OpenVX framework provides a mechanism to add new vision functions to OpenVX by 3rd party vendors. This project has below mentioned OpenVX [modules](amd_openvx_extensions#amd-openvx-extensions-amd_openvx_extensions) and utilities to extend [amd_openvx](amd_openvx#amd-openvx-amd_openvx) project, which contains the AMD OpenVX Core Engine.

* [amd_loomsl](amd_openvx_extensions/amd_loomsl): AMD Radeon Loom stitching library for live 360 degree video applications
* [amd_nn](amd_openvx_extensions/amd_nn#openvx-neural-network-extension-library-vx_nn): OpenVX neural network module
Expand Down Expand Up @@ -91,6 +90,8 @@ MIVisionX provides you with tools for accomplishing your tasks throughout the wh
* install `libprotobuf-dev` and `protobuf-compiler` needed for vx_nn
* [OpenCV 3.4](https://github.com/opencv/opencv/releases/tag/3.4.0)
* Set `OpenCV_DIR` environment variable to `OpenCV/build` folder
* [FFMPEG n4.0.4](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.0.4) - Optional
* FFMPEG is required for amd_media & mv_deploy modules

#### Prerequisites setup script for Linux - `MIVisionX-setup.py`

Expand All @@ -107,9 +108,10 @@ For the convenience of the developer, we here provide the setup script which wil
````
python MIVisionX-setup.py --directory [setup directory - optional]
--installer [Package management tool - optional (default:apt-get) [options: Ubuntu:apt-get;CentOS:yum]]
--miopen [MIOpen Version - optional (default:1.7.1)]
--miopen [MIOpen Version - optional (default:1.8.1)]
--ffmpeg [FFMPEG Installation - optional (default:no) [options:Install ffmpeg - yes]]
````
**Note:** use `--installer yum` for CentOS
**Note:** use `--installer yum` for **CentOS**

##### Refer to [Wiki](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/wiki/Suggested-development-workflow) page for developer instructions.

Expand Down Expand Up @@ -166,9 +168,10 @@ cd MIVisionX
````
python MIVisionX-setup.py --directory [setup directory - optional]
--installer [Package management tool - optional (default:apt-get) [options: Ubuntu:apt-get;CentOS:yum]]
--miopen [MIOpen Version - optional (default:1.7.1)]
--miopen [MIOpen Version - optional (default:1.8.1)]
--ffmpeg [FFMPEG Installation - optional (default:no) [options:Install ffmpeg - yes]]
````
**Note:** Use `--installer yum` for CentOS
**Note:** Use `--installer yum` for **CentOS**
````
mkdir build
cd build
Expand All @@ -189,6 +192,7 @@ sudo make install
* [MIOpen](https://github.com/ROCmSoftwarePlatform/MIOpen) -- make sure to use `-DMIOPEN_BACKEND=OpenCL` option with cmake
* install [protobuf](https://github.com/protocolbuffers/protobuf/releases/tag/v3.5.2)
* install [OpenCV](https://github.com/opencv/opencv/releases/tag/3.3.0)
* install [FFMPEG n4.0.4](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.0.4) - Optional
* build and install (using `cmake` and `% make install`)
* executables will be placed in `bin` folder
* libraries will be placed in `lib` folder
Expand All @@ -197,10 +201,6 @@ sudo make install
* add the installed library path to LD_LIBRARY_PATH environment variable (default `/opt/rocm/mivisionx/lib`)
* add the installed executable path to PATH environment variable (default `/opt/rocm/mivisionx/bin`)

##### Build `annInferenceApp` using `Qt Creator`
* build [annInferenceApp.pro](apps/cloud_inference/client_app/annInferenceApp.pro) using Qt Creator
* or use [annInferenceApp.py](apps/cloud_inference/client_app/annInferenceApp.py) for simple tests

## Verify the Installation

### Linux
Expand Down
Binary file modified docs/images/MIVisionX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 1 addition & 14 deletions model_compiler/python/nnir.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,22 +275,20 @@ def updateLocals(self):
for node in self.nodes:
for output in node.outputs:
count+=1
input = self.tensor_dict[node.inputs[0]]
if node.type in ['sum', 'add', 'sub', 'mul', 'muladd', 'batch_norm', 'relu', 'leaky_relu', 'softmax']:
input = self.tensor_dict[node.inputs[0]]
local = IrTensor()
local.setName(output)
local.setInfo(input.type, input.shape)
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['global_avg_pool']:
input = self.tensor_dict[node.inputs[0]]
local = IrTensor()
local.setName(output)
local.setInfo(input.type, [input.shape[0], input.shape[1], 1, 1])
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['conv', 'avg_pool', 'max_pool', 'lrn']:
input = self.tensor_dict[node.inputs[0]]
pads = node.attr.get('pads')
strides = node.attr.get('strides')
dilations = node.attr.get('dilations')
Expand All @@ -315,7 +313,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['conv_transpose']:
input = self.tensor_dict[node.inputs[0]]
pads = node.attr.get('pads')
strides = node.attr.get('strides')
dilations = node.attr.get('dilations')
Expand Down Expand Up @@ -351,7 +348,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['concat']:
input = self.tensor_dict[node.inputs[0]]
axis = node.attr.get('axis')
if axis == 1:
shape = [input.shape[0], 0, input.shape[2], input.shape[3]]
Expand All @@ -373,7 +369,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['slice']:
input = self.tensor_dict[node.inputs[0]]
shape = [input.shape[0], input.shape[1] // len(node.outputs), input.shape[2], input.shape[3]]
for name in node.outputs:
local = IrTensor()
Expand All @@ -382,7 +377,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['reshape']:
input = self.tensor_dict[node.inputs[0]]
param = node.attr.get('shape')
if not param:
param = self.tensor_dict[node.inputs[1]].shape
Expand Down Expand Up @@ -417,7 +411,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['transpose']:
input = self.tensor_dict[node.inputs[0]]
axes = node.attr.get('axes')
if axes == [0, 2, 3, 1]:
format = 'NHWC'
Expand All @@ -433,14 +426,12 @@ def updateLocals(self):
local.setFormat(format)
self.addLocal(local)
elif node.type in ['copy']:
input = self.tensor_dict[node.inputs[0]]
local = IrTensor()
local.setName(output)
local.setInfo(input.type, input.shape)
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['crop']:
input = self.tensor_dict[node.inputs[0]]
reference = self.tensor_dict[node.inputs[1]]
axis = node.attr.get('axis')
out_shape = []
Expand All @@ -455,7 +446,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['permute']:
input = self.tensor_dict[node.inputs[0]]
order = node.attr.get("order")
if input.format == 'NCHW' and order == [0, 2, 3, 1]:
format = 'NHWC'
Expand All @@ -471,7 +461,6 @@ def updateLocals(self):
local.setFormat(format)
self.addLocal(local)
elif node.type in ['flatten']:
input = self.tensor_dict[node.inputs[0]]
axis = node.attr.get("axis")
if axis == 0:
shape = [1, input.shape[0]*input.shape[1]*input.shape[2]*input.shape[3], 1, 1]
Expand All @@ -485,7 +474,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['prior_box']:
input = self.tensor_dict[node.inputs[0]]
dim = 1 #for min_size
if node.attr.get("max_size") > 0:
dim += 1
Expand All @@ -501,7 +489,6 @@ def updateLocals(self):
local.setFormat(input.format)
self.addLocal(local)
elif node.type in ['crop_and_resize']:
input = self.tensor_dict[node.inputs[0]]
shape = node.attr.get('shape')
scaleFactor = node.attr.get('scale')
width = shape[0]
Expand Down

0 comments on commit 00028fa

Please sign in to comment.