# onnx-runner
**Repository Path**: xgpxg/onnx-runner
## Basic Information
- **Project Name**: onnx-runner
- **Description**: No description available
- **Primary Language**: Rust
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2024-11-06
- **Last Updated**: 2025-01-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## onnx-runner


Use [ORT](https://github.com/pykeio/ort) to run ONNX model.
Currently, only YOLO models are supported, and other ONNX models may be supported in the
future
## Features
- Run Yolo's ONNX model for object detect
- Support multiple image input sources: File, Http(s), Camera, RTSP
- Support custom models
- Support sending detection results to files or HTTP api
## Install
### Requirements
- If you want to use CPU to run onnx-runner, nothing to install
- If you want to use GPU to run onnx-runner, you need install CUDA 12.x and CUDNN 9.x
### Windows
- Download latest
version: [onnx-runner-0.1.2-windows.tar.gz](https://github.com/xgpxg/onnx-runner/releases/download/v0.1.2/onnx-runner-v0.1.2-windows.tar.gz)
- Or download from release page: [Releases](https://github.com/xgpxg/onnx-runner/releases)
- Extract `onnx-runner-{version}-windows.tar.gz` to your path. The compressed package already includes the necessary
dependencies for running ONNX and OpenCV. You don't need to download any other dependencies
- Run onnx-runner `` with CMD or PowerShell
```shell
onnx-runner.exe -m -i --show
```
### Ubuntu
- Download and install
```shell
# Download latest package
wget https://github.com/xgpxg/onnx-runner/releases/download/v0.1.2/onnx-runner_0.1.2_amd64.deb
# Install package
sudo apt -f install ./onnx-runner_0.1.2_amd64.deb
```
Noteļ¼The OpenCV will be installed by default
- Run onnx-runner
```shell
onnx-runner -m -i --show
```
### Other Linux
- Download latest
version: [onnx-runner-v0.1.2-linux.tar.gz](https://github.com/xgpxg/onnx-runner/releases/download/v0.1.2/onnx-runner-v0.1.2-linux.tar.gz)
- Extract `onnx-runner-{version}-linux.tar.gz` to your path.
- Copy `libonnxruntime.so` to /usr/lib
- Install `Opencv`
- Run onnx-runner
```shell
onnx-runner -m -i --show
```
### MacOS
Not currently supported
## usage
### CLI
```shell
onnx-runner -m yolov8n.onnx -i image.jpg --show
```
For more information, see help:
```shell
onnx-runner -h
Usage: onnx-runner.exe [OPTIONS] --model --input
Options:
-m, --model YOLO onnx model file path, support version: v5, v7, v8, v10, and v11
-i, --input Input source, like image file, http image, camera, or rtsp
--yolo-version The number of YOLO version, like 5, 7 ,8 ,10, or 11. Specifically, for YOLO 10, it needs to be set up [default: 8]
--show Optional, should the detection results be displayed in the gui window, default is false
-n, --names Optional, multiple category names, each category separated directly by commas
-t, --threshold Optional, confidence threshold for detection results [default: 0.5]
-o, --output