pppoe / mxnet-Cpp-Deployment-Wrapper-Demo

mxnet Deployment in C++ Wrapper Demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This is a repo showing how to do C++ deployment with MXNet.

git clone https://github.com/pppoe/mxnet-Cpp-Deployment-Wrapper-Demo.git
cd mxnet-Cpp-Deployment-Wrapper-Demo
make
./build/main ./build/model/Inception-7-symbol.json ./build/model/Inception-7-0001.params ./build/model/synset.txt ./example.jpg

Example

Input: ./example.jpg
149 0.48231 n02109961 Eskimo dog, husky

We will need a blas backend (OpenBlas/MKL) and OpenCV for image IO.

On Mac, we have the handy homebrew.

brew install opencv3
brew install openblas

Check for the CMakeLists.txt for details. We can set the USE_MKL to True to use MKL if it is installed properly.

Note that the example wrapper mx_model.h/cc is for the inception-v3. Pay attention to the pre-processing code inside the run_with_input_BGR_8UC3(const uint8_t *p_image_data).

There is another sample code repo for iOS deployment: pppoe/WhatsThis-iOS

About

mxnet Deployment in C++ Wrapper Demo


Languages

Language:C++ 99.4%Language:C 0.5%Language:CMake 0.1%Language:Makefile 0.0%