https://github.com/yeeking/onnx-juce-example
Minimal example of pytorch - onnx - JUCE vst plugin integration
https://github.com/yeeking/onnx-juce-example
Last synced: 30 days ago
JSON representation
Minimal example of pytorch - onnx - JUCE vst plugin integration
- Host: GitHub
- URL: https://github.com/yeeking/onnx-juce-example
- Owner: yeeking
- License: mit
- Created: 2024-05-29T12:30:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-29T14:43:57.000Z (about 1 year ago)
- Last Synced: 2024-05-30T04:07:42.896Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 15.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# onnx-juce-example
Minimal project that demonstrates loading an onnx model into C++ and accessing it in a JUCE application.
You need the onnxrunmtime. Download a build from here:
https://github.com/microsoft/onnxruntime/releases/
Then edit CMakeLists.txt to reflect the location of the include and lib folders of your build, e.g. if you have it in the current folder:
```
include_directories(./onnxruntime-linux-x64-1.18.0/include/)
link_directories(./onnxruntime-linux-x64-1.18.0/lib/)
```Then you need to download JUCE, or if you already have it, edit CMakeLists.txt to reflect where it is. To download:
```
git clone [email protected]:juce-framework/JUCE.git
```To edit CMakeLists.txt, find this line and change the first JUCE path to where your JUCE folder is:
```
add_subdirectory(./JUCE ./JUCE)
```Finally, you might want to edit the constructor of the plugin so it can find the onnx model. Find this line and edit it to point at an onnx file on your system:
```
std::string modelFile = "../../../../models/big-model.onnx";
```Then you can build the project:
```
cmake -B build .
cmake --build build --config Debug
```