Code Monkey home page Code Monkey logo

dgtest's Introduction

MIVisionX DGtest

MIVisionX DGtest is a tutorial program for those who are new to MIOpen & OpenVX. It runs inference on the MNIST dataset using MIOpen & OpenVX.

Explanation

The program is divided into four parts:

1. annmodule

annmodule is created by the AMD model compiler. You can convert your own trained caffemodel to openvx graph using the model-compiler. See the below section for the detailed instruction. Once the conversion is done, the corresponding c++ codes will be generated including annmodule which contains the information about your pre-trained caffemodel.

2. Userinterface

Userinterface class is for the gui functionality of the DGtest. It has the palette and the result window to draw the image and show the result output.

3. DGtest

DGtest class is where you actually run the inference. Using annAddToGraph() function in annmodule, it adds weights, input tensor, and output tensor to the graph. If it was successful, it preprocess the image and process the graph (runs the inference) using vxProcessGraph() function.

See the OpenVX documentation for detailed explanation about OpenVX API calls.

Pre-requisites

  1. Build & Install MIVisionX
  2. OpenCV 3.1 or higher

Build using Cmake on Linux (Ubuntu 16.04 64bit)

 mkdir build
 cd build
 cmake ..
 make

Usage

 Usage: ./DGtest [weights.bin]\n"
 
 [weights.bin]
     The name of the weights file to be used for the inference. It is created by running caffemodel converter.
     See the belows section for using your own caffemodel.

Testing with your own Caffemodel

You can test your own trained MNIST caffemodel using the model compiler

1. Convert your caffemodel->NNIR->openvx using the model compiler.
2. From the generated files, copy 
    
     annmodule.cpp
     annmodule.h
     weights.bin
     
   to the DGtest folder.
3. Build the program again.
     make

Example

./DGTest ../data/weights.bin

dgtest's People

Contributors

hansely123 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.