yuzawa-san/onnxruntime-java
yuzawa-san/onnxruntime-java has 36 GitHub stars and 2 forks. Star changes are not measured yet. Last checked 2026-11-10 03:08 UTC. Last push 2026-11-04.
A type-safe, lightweight, modern, and performant binding Java binding of Microsoft's ONNX Runtime
측정된 스타 증가
- in 24h
- 업데이트 지연
- in 7 days
- 업데이트 지연
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalonnxruntime-java
by @yuzawa-san
This is an performant and modern Java binding to Microsoft's ONNX Runtime which uses Java's new Foreign Function & Memory API (a.k.a. Project Panama).
This project's goals are to provide a type-safe, lightweight, and performant binding which abstracts a lot of the native and C API intricacies away behind a Java-friendly interface. This is loosely coupled to the upstream project and built off of the public (and stable) C API.
The minimum supported Java version is 23, since the FFI API was first stabilized in that version. There are other fine bindings which use JNI and are capable of supporting earlier Java versions.
Usage
This project is released to Maven Central and can be used in your project.
Artifacts
The library is currently built for Linux, Windows, MacOS and for arm64 and x86_64. These were chosen since the upstream projects publishes artifacts for these enviroments. Here are the artifacts published listed below. Snapshot releases are periodically released for testing and experimentation.
onnxruntime
[!WARNING] Prior versions used the
com.jyuzawa:onnxruntimeMaven coordinates with a bastardized version of semver. Please upgrade to thecom.jyuzawa:onnxruntime-api. See "Versioning" below for details.
The binding with no native libraries. For use as a implementation dependency.
The native library (from Microsoft) will need to be provided at runtime using one of the next two artifacts.
Alternatively, the Java library path (java.library.path) will be used if neither of those artifacts is provided.
This allows users to "bring their own" shared library.
Versioning
This library's version string will be ${ORT_UPSTREAM_VERSION}-${THIS_REPO_VERSION}.
The first part indicates the minimum upstream native library this Java API supports, so please use the corresponding (or older) version.
The second part of the version (THIS_REPO_VERSION) may get incremented if we add additional changes to the API but still target the same minimum upstream version.
This API has a validation to make sure the shared library is minor version compatible with this library.
onnxruntime-cpu
A collection of native libraries with CPU support for a several common OS/architecture combinations. For use as an optional runtime dependency. Include one of the OS/Architecture classifiers like linux-x86_64 to provide specific support.
onnxruntime-gpu
A collection of native libraries with GPU (CUDA) support for a several common OS/architecture combinations. For use as an optional runtime dependency. Include one of the OS/Architecture classifiers like linux-x86_64 to provide specific support.
In your library
There is an example library in the onnxruntime-sample-library directory.
The library should use the onnxruntime as a implementation dependency.
This puts the burden of providing a native library on your end user.
In your application
There is an example application in the onnxruntime-sample-application directory.
The library should use the onnxruntime as a implementation dependency.
The application needs to have acccess to the native library.
You have the option providing it via a runtime dependency using either a classifier variant from onnxruntime-cpu or onnxruntime-gpu.
Otherwise, the Java library path will be used to load the native library.
The example application can be ran:
./gradlew onnxruntime-sample-application:run
JVM Arguments
Since this uses a native library, this will require the runtime to have the --enable-native-access JVM option, likely --enable-native-access=ALL-UNNAMED.
Execution Providers
Only those which are exposed in the C API are supported. If you wish to use another execution provider which is present in the C API, but not in any of the artifacts from the upstream project, you can choose to bring your own onnxruntime shared library to link against.
관련 프로젝트 살펴보기
tensorflow/tensorflow
모두를 위한 오픈소스 머신러닝 프레임워크
201,427 스타huggingface/transformers
🤗 Transformers: 텍스트, 비전, 오디오, 멀티모달 분야의 최첨단 머신러닝 모델을 위한 모델 정의 프레임워크로, 추론과 학습을 모두 지원합니다.
168,711 스타AUTOMATIC1111/stable-diffusion-webui
Stable Diffusion 웹 UI
165,289 스타Comfy-Org/ComfyUI
그래프와 노드로 구성된 인터페이스를 갖춘, 가장 강력하고 모듈성이 뛰어난 확산 모델 GUI, API, 백엔드입니다. 세계에서 가장 빠른 로컬 추론 엔진입니다.
146,271 스타