Skip to content

Simple onnxruntime example using C++ API. Inferring MNIST dataset samples and show results.

Notifications You must be signed in to change notification settings

k2-gc/onnxruntime-cpp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onnxruntime-cpp-example

Introduction

This repository introduces how to run onnx model using onnxruntime C++ API. Using sample MNIST data, the code shows a simple example and inference results.

NOTICE: If you are a beginner in Deep Learning for image processing doamin, my another repository may help you to understand how to train models of image classification with Pytorch.

Prerequisites

  • Docker
  • Docker compose

Usage

  1. Clone this repository
  2. Run commands below and get into docker container
cd onnxruntime-cpp-example
docker compose up -d
docker exec -it onnxruntime-sample /bin/bash
  1. In docker container, build sample app and run.
mkdir build && cd build
wget https://github.com/k2-gc/Simple-CNN-Example/releases/download/v0.1/best.onnx
cmake ..
make -j$(nproc)
./sample_app 

About

Simple onnxruntime example using C++ API. Inferring MNIST dataset samples and show results.

Topics

Resources

Stars

Watchers

Forks