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.
- Docker
- Docker compose
- Clone this repository
- Run commands below and get into docker container
cd onnxruntime-cpp-example
docker compose up -d
docker exec -it onnxruntime-sample /bin/bash
- 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