2019-10-15 22:58:02 +00:00
# ONNX Runtime Samples and Tutorials
Here you will find various samples, tutorials, and reference implementations for using ONNX Runtime.
For a list of available dockerfiles and published images to help with getting started, see [this page ](../dockerfiles/README.md ).
2020-06-25 23:09:17 +00:00
**General**
2019-10-15 22:58:02 +00:00
* [Python ](#Python )
* [C# ](#C )
* [C/C++ ](#CC )
2019-12-10 16:28:47 +00:00
* [Java ](#Java )
2020-05-19 03:08:36 +00:00
* [Node.js ](#Nodejs )
2020-06-25 23:09:17 +00:00
**Integrations**
* [Azure Machine Learning ](#azure-machine-learning )
* [Azure IoT Edge ](#azure-iot-edge )
* [Azure Media Services ](#azure-media-services )
* [Azure SQL Edge and Managed Instance ](#azure-sql )
* [Windows Machine Learning ](#windows-machine-learning )
* [ML.NET ](#mlnet )
2019-10-15 22:58:02 +00:00
***
## Python
**Inference only**
2020-06-25 23:09:17 +00:00
* [CPU: Basic ](https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/inference_demos/simple_onnxruntime_inference.ipynb )
* [CPU: Resnet50 ](https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/inference_demos/resnet50_modelzoo_onnxruntime_inference.ipynb )
* [ONNX-Ecosystem Docker image ](https://github.com/onnx/onnx-docker/tree/master/onnx-ecosystem/inference_demos )
* [ONNX Runtime Server: SSD Single Shot MultiBox Detector ](https://github.com/onnx/tutorials/blob/master/tutorials/OnnxRuntimeServerSSDModel.ipynb )
* [NUPHAR EP samples ](../docs/python/notebooks/onnxruntime-nuphar-tutorial.ipynb )
2019-10-15 22:58:02 +00:00
**Inference with model conversion**
2019-12-25 23:58:56 +00:00
* [SKL Pipeline: Train, Convert, and Inference ](https://microsoft.github.io/onnxruntime/python/tutorial.html )
* [Keras: Convert and Inference ](https://microsoft.github.io/onnxruntime/python/auto_examples/plot_dl_keras.html#sphx-glr-auto-examples-plot-dl-keras-py )
2019-10-15 22:58:02 +00:00
**Other**
2020-06-09 00:27:55 +00:00
* [Running ONNX model tests ](../docs/Model_Test.md )
2019-12-25 23:58:56 +00:00
* [Common Errors with explanations ](https://microsoft.github.io/onnxruntime/python/auto_examples/plot_common_errors.html#sphx-glr-auto-examples-plot-common-errors-py )
2019-10-15 22:58:02 +00:00
## C#
2020-06-25 23:09:17 +00:00
* [Inference Tutorial ](../docs/CSharp_API.md#getting-started )
2020-08-07 20:36:36 +00:00
* [ResNet50 v2 Tutorial ](../csharp/sample/Microsoft.ML.OnnxRuntime.ResNet50v2Sample )
2020-08-14 00:05:01 +00:00
* [Faster R-CNN Tutorial ](../csharp/sample/Microsoft.ML.OnnxRuntime.FasterRcnnSample )
2019-10-15 22:58:02 +00:00
## C/C++
2020-06-25 23:09:17 +00:00
* [C: SqueezeNet ](../csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/C_Api_Sample.cpp )
2020-07-09 06:17:50 +00:00
* [C++: model-explorer ](./c_cxx/model-explorer ) - single and batch processing
2020-06-25 23:09:17 +00:00
* [C++: SqueezeNet ](../csharp/test/Microsoft.ML.OnnxRuntime.EndToEndTests.Capi/CXX_Api_Sample.cpp )
2020-07-09 06:17:50 +00:00
* [C++: MNIST ](./c_cxx/MNIST )
2019-12-10 16:28:47 +00:00
## Java
* [Inference Tutorial ](../docs/Java_API.md#getting-started )
2020-05-19 03:08:36 +00:00
* [MNIST inference ](../java/src/test/java/sample/ScoreMNIST.java )
## Node.js
2020-05-27 20:30:22 +00:00
### Samples
2020-06-25 23:09:17 +00:00
In each sample's implementation subdirectory, run
```
npm install
node ./
```
2020-05-27 20:30:22 +00:00
* [Basic Usage ](./nodejs/01_basic-usage/ ) - a demonstration of basic usage of ONNX Runtime Node.js binding.
2020-05-19 03:08:36 +00:00
2020-05-27 20:30:22 +00:00
* [Create Tensor ](./nodejs/02_create-tensor/ ) - a demonstration of basic usage of creating tensors.
<!--
* [Create Tensor (Advanced) ](./nodejs/03_create-tensor-advanced/ ) - a demonstration of advanced usage of creating tensors.
2020-05-19 03:08:36 +00:00
-->
2020-05-27 20:30:22 +00:00
* [Create InferenceSession ](./nodejs/04_create-inference-session/ ) - shows how to create `InferenceSession` in different ways.
2020-06-25 23:09:17 +00:00
---
2020-05-27 20:30:22 +00:00
2020-06-25 23:09:17 +00:00
## Azure Machine Learning
**Inference and deploy through AzureML**
*For aditional information on training in AzureML, please see [AzureML Training Notebooks ](https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml/training )*
* Inferencing on **CPU** using [ONNX Model Zoo ](https://github.com/onnx/models ) models:
* [Facial Expression Recognition ](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-facial-expression-recognition-deploy.ipynb )
* [MNIST Handwritten Digits ](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-inference-mnist-deploy.ipynb )
* [Resnet50 Image Classification ](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-modelzoo-aml-deploy-resnet50.ipynb )
* Inferencing on **CPU** with **PyTorch** model training:
* [MNIST ](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-train-pytorch-aml-deploy-mnist.ipynb )
* Inferencing on **CPU** with model conversion for existing (CoreML) model:
* [TinyYolo ](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/onnx/onnx-convert-aml-deploy-tinyyolo.ipynb )
* Inferencing on **GPU** with **TensorRT** Execution Provider (AKS):
* [FER+ ](../docs/python/notebooks/onnx-inference-byoc-gpu-cpu-aks.ipynb )
## Azure IoT Edge
**Inference and Deploy with Azure IoT Edge**
* [Intel OpenVINO ](http://aka.ms/onnxruntime-openvino )
* [NVIDIA TensorRT on Jetson Nano (ARM64) ](http://aka.ms/onnxruntime-arm64 )
* [ONNX Runtime with Azure ML ](https://github.com/Azure-Samples/onnxruntime-iot-edge/blob/master/AzureML-OpenVINO/README.md )
## Azure Media Services
[Video Analysis through Azure Media Services using using Yolov3 to build an IoT Edge module for object detection ](https://github.com/Azure/live-video-analytics/tree/master/utilities/video-analysis/yolov3-onnx )
## Azure SQL
[Deploy ONNX model in Azure SQL Edge ](https://docs.microsoft.com/en-us/azure/azure-sql-edge/deploy-onnx )
## Windows Machine Learning
[Examples of inferencing with ONNX Runtime through Windows Machine Learning ](https://docs.microsoft.com/en-us/windows/ai/windows-ml/tools-and-samples#samples )
## ML.NET
[Object Detection with ONNX Runtime in ML.NET ](https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/object-detection-onnx )