All Projects → onnx → Onnx Tensorflow

onnx / Onnx Tensorflow

Licence: apache-2.0
Tensorflow Backend for ONNX

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Onnx Tensorflow

Gluon2pytorch
Gluon to PyTorch deep neural network model converter
Stars: ✭ 70 (-91.73%)
Mutual labels:  deep-neural-networks, onnx
Onnx R
R Interface to Open Neural Network Exchange (ONNX)
Stars: ✭ 31 (-96.34%)
Mutual labels:  deep-neural-networks, onnx
Onnx Scala
An ONNX (Open Neural Network eXchange) API and Backend for Typeful, Functional Deep Learning in Scala
Stars: ✭ 68 (-91.96%)
Mutual labels:  deep-neural-networks, onnx
Ngraph
nGraph has moved to OpenVINO
Stars: ✭ 1,322 (+56.26%)
Mutual labels:  deep-neural-networks, onnx
Onnx
Open standard for machine learning interoperability
Stars: ✭ 11,829 (+1298.23%)
Mutual labels:  deep-neural-networks, onnx
Distiller
Neural Network Distiller by Intel AI Lab: a Python package for neural network compression research. https://intellabs.github.io/distiller
Stars: ✭ 3,760 (+344.44%)
Mutual labels:  deep-neural-networks, onnx
Deepc
vendor independent deep learning library, compiler and inference framework microcomputers and micro-controllers
Stars: ✭ 260 (-69.27%)
Mutual labels:  deep-neural-networks, onnx
Yolo2 Pytorch
PyTorch implementation of the YOLO (You Only Look Once) v2
Stars: ✭ 426 (-49.65%)
Mutual labels:  deep-neural-networks, onnx
Quickdraw
Implementation of Quickdraw - an online game developed by Google
Stars: ✭ 805 (-4.85%)
Mutual labels:  deep-neural-networks
Deep Embedded Memory Networks
https://arxiv.org/abs/1707.00836
Stars: ✭ 19 (-97.75%)
Mutual labels:  deep-neural-networks
Poseestimationformobile
💃 Real-time single person pose estimation for Android and iOS.
Stars: ✭ 783 (-7.45%)
Mutual labels:  deep-neural-networks
Variational Autoencoder
Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)
Stars: ✭ 807 (-4.61%)
Mutual labels:  deep-neural-networks
All Classifiers 2019
A collection of computer vision projects for Acute Lymphoblastic Leukemia classification/early detection.
Stars: ✭ 22 (-97.4%)
Mutual labels:  deep-neural-networks
Deep Learning Time Series
List of papers, code and experiments using deep learning for time series forecasting
Stars: ✭ 796 (-5.91%)
Mutual labels:  deep-neural-networks
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-97.28%)
Mutual labels:  deep-neural-networks
Pipecnn
An OpenCL-based FPGA Accelerator for Convolutional Neural Networks
Stars: ✭ 775 (-8.39%)
Mutual labels:  deep-neural-networks
Emotion Recognition Neural Networks
Emotion recognition using DNN with tensorflow
Stars: ✭ 769 (-9.1%)
Mutual labels:  deep-neural-networks
Tf Keras Surgeon
Pruning and other network surgery for trained TF.Keras models.
Stars: ✭ 25 (-97.04%)
Mutual labels:  deep-neural-networks
Deepfake Detection
DeepFake Detection: Detect the video is fake or not using InceptionResNetV2.
Stars: ✭ 23 (-97.28%)
Mutual labels:  deep-neural-networks
Tract
Tiny, no-nonsense, self-contained, Tensorflow and ONNX inference
Stars: ✭ 899 (+6.26%)
Mutual labels:  onnx

TensorFlow Backend for ONNX

Backend Test Status ModelZoo Test Status

Open Neural Network Exchange (ONNX) is an open standard format for representing machine learning models. ONNX is supported by a community of partners who have implemented it in many frameworks and tools.

TensorFlow Backend for ONNX makes it possible to use ONNX models as input for TensorFlow. The ONNX model is first converted to a TensorFlow model and then delegated for execution on TensorFlow to produce the output.

Converting Models from ONNX to TensorFlow

Use CLI

Command Line Interface Documentation

From ONNX to TensorFlow: onnx-tf convert -i /path/to/input.onnx -o /path/to/output

Convert Programmatically

From ONNX to TensorFlow

Migrating from onnx-tf to tf-onnx

We have joined force with Microsoft to co-develop ONNX TensorFlow frontend. For current onnx-tf frontend users, please migrate to use tf-onnx (https://github.com/onnx/tensorflow-onnx) where our code had been merged into.

ONNX Model Inference with TensorFlow Backend

import onnx
from onnx_tf.backend import prepare

onnx_model = onnx.load("input_path")  # load onnx model
output = prepare(onnx_model).run(input)  # run the loaded model

More Tutorials

Running an ONNX model using TensorFlow

Production Installation

ONNX-TF requires ONNX (Open Neural Network Exchange) as an external dependency, for any issues related to ONNX installation, we refer our users to ONNX project repository for documentation and help. Notably, please ensure that protoc is available if you plan to install ONNX via pip.

The specific ONNX release version that we support in the master branch of ONNX-TF can be found here. This information about ONNX version requirement is automatically encoded in setup.py, therefore users needn't worry about ONNX version requirement when installing ONNX-TF.

To install the latest version of ONNX-TF via pip, run pip install onnx-tf.

Because users often have their own preferences for which variant of TensorFlow to install (i.e., a GPU version instead of a CPU version), we do not explicitly require tensorflow in the installation script. It is therefore users' responsibility to ensure that the proper variant of TensorFlow is available to ONNX-TF. Moreover, we require TensorFlow version == 2.3.1.

Development

Coverage Status

ONNX-TensorFlow Op Coverage Status

API

ONNX-TensorFlow API

Installation

  • Install ONNX master branch from source.
  • Install TensorFlow >= 2.3.1 and tensorflow-addons. (Note for TensorFlow 1.x please refer the tf-1.x branch)
  • Run git clone https://github.com/onnx/onnx-tensorflow.git && cd onnx-tensorflow.
  • Run pip install -e ..

Folder Structure

  • onnx_tf: main source code file.
  • test: test files.

Code Standard

  • Format code
pip install yapf
yapf -rip --style="{based_on_style: google, indent_width: 2}" $FilePath$
  • Install pylint
pip install pylint
wget -O /tmp/pylintrc https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/tools/ci_build/pylintrc
  • Check format
pylint --rcfile=/tmp/pylintrc myfile.py

Documentation Standard

Google Style Python Docstrings

Testing

Unit Tests

To perfom unit tests:

pip install pytest tabulate
python -m unittest discover test

Note: Only the ONNX backend tests found in test_onnx_backend.py require the pytest and tabulate packages.

Testing requires significant hardware resources, but nonetheless, we highly recommend that users run through the complete test suite before deploying onnx-tf. The complete test suite typically takes between 15 and 45 minutes to complete, depending on hardware configurations.

Model Zoo Tests

The tests in test_modelzoo.py verify whether the ONNX Model Zoo models can be successfully validated against the ONNX specification and converted to a TensorFlow representation. Model inferencing on the converted model is not tested currently.

Prerequisites

The model zoo uses Git LFS (Large File Storage) to store ONNX model files. Make sure that Git LFS is installed on your operating system.

Running

By default, the tests assume that the model zoo repository has been cloned into this project directory. The model zoo directory is scanned for ONNX models. For each model found: download the model, convert the model to TensorFlow, generate a test status, and delete the model. By default, the generated test report is created in the system temporary directory. Run python test/test_modelzoo.py -h for help on command line options.

git clone https://github.com/onnx/models
python test/test_modelzoo.py

Testing all models can take at least an hour to complete, depending on hardware configuration and model download times. If you expect to test some models frequently, we recommend using Git LFS to download those models before running the tests so the large files are cached locally.

Reports

When making code contributions, the model zoo tests are run when a commit is merged. Generated test reports are published on the onnx-tensorflow wiki.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].