CLI tool
onnx/onnx-tensorflow avatar
onnx/onnx-tensorflow

onnx-tf pins TensorFlow 2.8.0 in prose, ships no TensorFlow in its metadata, and tells you to migrate to the converter that replaced it

Tensorflow Backend for ONNX

1,330 stars299 forksPythonNOASSERTION

At a glance

What is it?
The ONNX to TensorFlow converter still installs from pip and still documents a production install path, while its own opening note declares the repo unmaintained and slated for deprecation, its newest tag is from 2022, and its dev setup asks for TensorFlow 2.8 or newer. Three different TensorFlow stories in one repository, plus a test suite that verifies conversion but explicitly not execution.
Who is it for?
Treat onnx-tf as a maintained fork of deprecated code. If you are converting an ONNX model to TensorFlow today, the honest first move is to check the op coverage table for your model and to try tf2onnx in the reverse direction, because the ONNX to TensorFlow code was merged there and the repo itself says so.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 84 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • onnx/onnx-tensorflow1,330 ★ · +2
Star history
Repository2026-09-112026-11-15
onnx/onnx-tensorflow1.3k1.3k

2 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The opening line deprecates the repo, and the newest tag predates the last push by four years

The first line under the title is a status notice: this repo is no longer maintained and will be deprecated, and anyone interested in becoming the owner should contact the ONNX Steering Committee. Underneath that sits a full production install section, a migration section, and a test suite, which is the central tension in this repository. The dates sharpen it. The branch was last pushed on 2026-08-23, while the newest release is v1.10.0 from 2022-03-17, with v1.9.0 and v1.8.0 in the two years before that. So the branch still receives commits and the published artifacts stopped four years earlier, which means anyone installing from pip is installing code that has not been released since 2022. The migration note says the project joined forces with Microsoft to co-develop the ONNX TensorFlow frontend and that current users should move to tf-onnx, where that code was merged.

TensorFlow 2.8.0 is a hard pin in the prose and absent from install_requires

The production install section states two things in consecutive sentences. Users have their own preferences about which TensorFlow variant they run, so the installation script does not explicitly require tensorflow, and it is the user's responsibility to make the proper variant available. Then it says the project requires TensorFlow version == 2.8.0, an exact pin with an equality sign. Nothing in the packaging carries that constraint. The declared dependencies are the ONNX requirement, PyYAML, tensorflow_addons, and tensorflow_probability. TensorFlow is not among them, by design, so `pip install onnx-tf` completes happily into an environment with no TensorFlow at all, and the version conflict surfaces later at import or conversion time rather than at install time. The Development section adds a third version of the same fact, asking for TensorFlow >= 2.8.0 along with tensorflow-probability and tensorflow-addons, and noting that TensorFlow 1.x is no longer supported.

An environment variable decides whether the ONNX floor is enforced

The ONNX dependency is computed at build time rather than written down. setup.py opens `ONNX_VERSION_NUMBER` from the repository root and builds `onnx>=` plus whatever that file contains, which is how the release gets a known good floor without anyone editing a list of dependencies. The branch that skips it is keyed on an environment variable:

python
if os.getenv('TRAVIS'):
  # On travis, we install from source, therefore no need to specify version.
  onnx_dep = "onnx"
else:
  with open(os.path.join(TOP_DIR, 'ONNX_VERSION_NUMBER')) as onnx_version_file:
    onnx_version = onnx_version_file.read().strip()
    onnx_dep = "onnx>=" + onnx_version

So on continuous integration the dependency becomes a bare `onnx` with no floor, because that pipeline installs ONNX from source, and everywhere else it becomes a floor read from a text file. The switch is a variable named after a CI provider that no longer runs the project, which means anyone reproducing a build locally has to know to leave it unset. The prose version of the same rule is friendlier: the supported ONNX release is whatever that one file says, and users need not think about it.

setup.py writes the version into the source tree, and records None without a git checkout

The package version is not a literal in setup.py. It is read from the `VERSION_NUMBER` file at the top of the tree, then the commit hash is collected separately:

python
try:
  git_version = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
                                        cwd=TOP_DIR).decode('ascii').strip()
except (OSError, subprocess.CalledProcessError):
  git_version = None

Both values are then written into `onnx_tf/version.py`, a file the header comment marks as generated and not to be edited. Three consequences follow from that arrangement. The version string inside an installed copy is whatever the VERSION_NUMBER file said at install time. The commit hash is None whenever the install happens outside a git working tree, which is exactly the case for a source distribution or an unpacked tarball, so a shipped package can legitimately carry `git_version = None`. And because the write targets the source directory, installing in editable mode, which the development instructions tell you to do with `pip install -e .`, mutates the checkout rather than a build copy.

The model zoo tests prove conversion and explicitly skip execution

The unit suite runs with:

bash
pip install pytest tabulate
python -m unittest discover test

Only `test_onnx_backend.py` genuinely needs pytest and tabulate, so the other tests carry two install requirements they do not use. Running the full suite is expensive: significant hardware resources, and typically 15 to 45 minutes depending on hardware. The model zoo suite is heavier and structurally different. It verifies whether models can be validated against the ONNX specification and converted to a TensorFlow representation, and then says model inferencing on the converted model is not tested currently. That is the single most useful sentence in the testing section for anyone deciding whether to trust a conversion: the pipeline proves the graph translates, and nothing proves the translated graph computes the same numbers. Set up also requires Git LFS, assumes the model zoo repository has been cloned into the project directory, and per model downloads, converts, reports, and deletes.

The folder structure section names two of the nine top level directories

The documentation describes the layout in one line: `onnx_tf` for the main source code, `test` for the tests. The repository root carries considerably more. Alongside those two sit `doc/`, `example/`, `third_party/`, `util/`, `.github/`, and the loose files MANIFEST.in, setup.cfg, VERSION_NUMBER, ONNX_VERSION_NUMBER, and Versioning.md. Two absences are worth noticing. Nothing anywhere describes `third_party/`, which is the directory where vendored code lives and where the licensing question usually hides, and nothing describes `util/`. The examples directory holds five files, and their names are more revealing than the layout: `onnx_to_tf.py` and `relu.py` for the forward direction, `train_onnx_model.py` for the opposite one, and two files called `test_mnist_onnxruntime_stepping.py` and `test_model_large_stepping.py` that sit in `example/` while carrying a test prefix.

Op coverage is a link to another file, and unsupported operators have no documented behaviour

The answer to whether your model will convert is a pointer rather than a sentence. Coverage is tracked as a per operator table in `doc/support_status.md`, the API surface in `doc/API.md`, and the command line reference in `doc/CLI.md`. The tool is one console script, registered in setup.py as `onnx-tf=onnx_tf.cli:main`, and the documented invocation takes an input path and an output path: `onnx-tf convert -i /path/to/input.onnx -o /path/to/output`. What none of that documents is what happens when a model uses an operator the converter does not implement. There is no documented error message, no partial conversion behaviour, and no fallback path, only the coverage table to read before you try. One environment prerequisite gets an explicit flag in the install section, marked as notable: `protoc` has to be available if you plan to install ONNX itself through pip, with ONNX installation problems referred to the ONNX project rather than solved here.

Four authors share one contact address, and the license field comes back empty

The packaging metadata is explicit about who wrote this. The author field reads Arpith Jacob, Tian Jin, Gheorghe-Teodor Bercea, and Wenhao Hu, while the single author_email field is one address at IBM. So the project has a named team and a one person contact point, which matters for a repository that asks a steering committee for a new owner. The license picture has three parts that do not agree. The repository's license field comes back as NOASSERTION, no assertion either way. setup.py declares `license='Apache License 2.0'`. A LICENSE file sits at the root of the tree. Those are compatible readings rather than a proven conflict, but nothing in the project resolves them, so anyone with a compliance question should read the LICENSE file rather than the metadata field. One more small inconsistency: the documentation links all point at `blob/master/` paths while the default branch is main.

Editorial conclusion

Treat onnx-tf as a maintained fork of deprecated code. If you are converting an ONNX model to TensorFlow today, the honest first move is to check the op coverage table for your model and to try tf2onnx in the reverse direction, because the ONNX to TensorFlow code was merged there and the repo itself says so. If you must use this package, install it into an environment where TensorFlow 2.8.0 is already the version you want, since nothing in the metadata will enforce it, and expect the conversion to be the only part the tests actually prove. Read the README's first line as a routing notice rather than a footnote.

Frequently asked questions

Is onnx-tf still maintained, and what should I use instead?

The README states that the repo is no longer maintained and will be deprecated, and it asks anyone interested in owning it to contact the ONNX Steering Committee. Users of this frontend are pointed to tf-onnx, where the code was merged.

Which TensorFlow version does onnx-tf require?

The README states that TensorFlow version == 2.8.0 is required and that TensorFlow 1.x is no longer supported, yet tensorflow is deliberately absent from the install requirements, so installing onnx-tf does not pull a version for you.

How do I convert an ONNX model to TensorFlow with onnx-tf?

From a shell, run onnx-tf convert -i /path/to/input.onnx -o /path/to/output. In Python, load the model with onnx.load, then call prepare(onnx_model).run(input) after importing prepare from onnx_tf.backend.

Do the onnx-tf tests confirm that a converted model actually runs?

No. The model zoo tests check that models validate against the ONNX specification and convert to a TensorFlow representation, and the README states that model inferencing on the converted model is not tested currently.

What has to be installed before the onnx-tf test suite runs?

pytest and tabulate, installed with pip install pytest tabulate, and then the suite runs with python -m unittest discover test. Only test_onnx_backend.py actually needs those two packages, and the complete suite typically takes 15 to 45 minutes.

How is onnx-tf different from tf2onnx?

They convert in opposite directions. onnx-tensorflow turns ONNX models into TensorFlow models, and tf2onnx turns TensorFlow models into ONNX models. The README names them as the two TensorFlow converter projects serving different purposes in the ONNX community.

Official sources

  1. Issues
  2. onnx/onnx-tensorflow on GitHub
  3. README
  4. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/onnx-onnx-tensorflow.svg)](https://hysenlabs.com/projects/onnx-onnx-tensorflow)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/onnx-onnx-tensorflow.svg)](https://hysenlabs.com/projects/onnx-onnx-tensorflow)

Was this useful?