Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Machine Learning
  3. libonnx

libonnx

MITC

A lightweight, portable pure C99 ONNX inference engine for embedded devices with hardware acceleration support.

GitHubGitHub
650 stars114 forks0 contributors

What is libonnx?

Libonnx is a lightweight, portable inference engine for ONNX models written in pure C99. It enables running machine learning models on embedded devices and resource-constrained environments while supporting hardware acceleration through custom resolvers. The library provides a simple C API for loading models, running inference, and managing tensors without external dependencies.

Target Audience

Embedded systems developers and engineers who need to deploy ONNX-based machine learning models on resource-constrained devices like microcontrollers, IoT devices, or edge computing platforms.

Value Proposition

Developers choose Libonnx for its minimal footprint, pure C99 implementation that ensures maximum portability, and hardware acceleration support that allows optimization for specific embedded hardware. Unlike heavier frameworks, it's designed specifically for embedded environments where resource efficiency is critical.

Overview

A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.

Use Cases

Best For

  • Deploying ONNX models on microcontrollers and embedded systems
  • Running machine learning inference on resource-constrained edge devices
  • Integrating hardware accelerators with ONNX models in embedded applications
  • Cross-compiling neural network inference for ARM-based embedded platforms
  • Building lightweight computer vision applications for embedded devices
  • Creating portable machine learning solutions without Python or heavy frameworks

Not Ideal For

  • Projects requiring the latest ONNX operator versions or cutting-edge model architectures beyond opset 24
  • Teams with Python-centric ML workflows seeking seamless inference integration without low-level C coding
  • Applications needing out-of-the-box GPU or NPU acceleration without custom resolver implementation
  • High-throughput server-side inference scenarios where advanced features like dynamic batching are essential

Pros & Cons

Pros

Pure C99 Portability

Implemented in pure C99 with no external dependencies, allowing it to be dropped directly into projects and compiled across diverse embedded platforms, as demonstrated by the cross-compilation example for ARM64.

Hardware Acceleration Flexibility

Supports custom hardware accelerators through resolver arrays, enabling optimized inference for specific embedded hardware, mentioned in the context allocation function for passing resolvers.

Lightweight and Embedded-Focused

Designed specifically for resource-constrained environments, making it ideal for microcontrollers and edge devices without the overhead of larger frameworks, as highlighted in the project description.

Simple API Integration

Provides straightforward C functions like onnx_context_alloc_from_file and onnx_run, making integration simple for C-based embedded projects, with clear code snippets in the README.

Cons

Incomplete Operator Coverage

Not all ONNX operators are implemented; the README notes that some tests fail due to unimplemented operators, limiting compatibility with certain models and requiring careful model selection.

Manual Memory Management

Requires explicit allocation and freeing of context and tensors using C functions like onnx_context_free, which can be error-prone and less safe compared to managed languages or higher-level frameworks.

Limited Documentation and Community

Relies heavily on external ONNX documentation and has only a Chinese discussion post for support, indicating a smaller ecosystem and potential hurdles for troubleshooting or advanced use cases.

Frequently Asked Questions

Quick Stats

Stars650
Forks114
Contributors0
Open Issues16
Last commit17 days ago
CreatedSince 2020

Tags

#embedded-systems#library#embedded#deep-learning#hardware-acceleration#portable#lightweight#c#inference#onnx#cross-platform#edge-computing#machine-learning#c99#inference-engine#baremetal

Built With

M
Make
S
SDL2
C
C99

Included in

Machine Learning72.2k
Auto-fetched 15 hours ago

Related Projects

PyTorch - Tensors and Dynamic neural networks in Python with strong GPU accelerationPyTorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Stars101,899
Forks28,473
Last commit15 hours ago
keraskeras

Deep Learning for humans

Stars64,175
Forks19,744
Last commit1 day ago
streamlitstreamlit

Streamlit — A faster way to build and share data apps.

Stars45,326
Forks4,331
Last commit20 hours ago
gradiogradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!

Stars43,191
Forks3,557
Last commit18 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub