Metadata-Version: 2.1
Name: tflite2onnx
Version: 0.3.2
Summary: Convert TensorFlow Lite models to ONNX
Home-page: https://jackwish.net/tflite2onnx
Author: 王振华(Zhenhua WANG)
Author-email: i@jackwish.net
License: Apache License 2.0
Project-URL: Bug Reports, https://github.com/jackwish/tflite2onnx/issues
Project-URL: Source, https://github.com/jackwish/tflite2onnx
Description: tflite2onnx - Convert TensorFlow Lite models to ONNX
        ====================================================
        
        [![Build and Test](https://github.com/jackwish/tflite2onnx/workflows/Build%20and%20Test/badge.svg)](https://github.com/jackwish/tflite2onnx/actions?query=workflow%3A%22Build+and+Test%22)
        [![Sanity](https://github.com/jackwish/tflite2onnx/workflows/Sanity/badge.svg)](https://github.com/jackwish/tflite2onnx/actions?query=workflow%3ASanity)
        [![Coverage](https://codecov.io/gh/jackwish/tflite2onnx/branch/master/graph/badge.svg)](https://codecov.io/gh/jackwish/tflite2onnx)
        
        `tflite2onnx` converts TensorFlow Lite (TFLite) models (`*.tflite`) to ONNX models (`*.onnx`),
        with data layout and quantization semantic properly handled (check the [introduction blog][intro] for detail).
        
        **Highlights**
        
        * If you'd like to convert a TensorFlow model (frozen graph `*.pb`, `SavedModel`
        or whatever) to ONNX, try [`tf2onnx`](https://github.com/onnx/tensorflow-onnx).
        Or, you can firstly [convert][tf2tflite] it to a TFLite (`*.tflite`) model,
        and then convert the TFLite model to ONNX.
        
        * It's significant to understand the use cases of `tflite2onnx`, which helps us
        to decide how to shape `tflite2onnx` - what features we take as first priority for example.
        **Please help to provide some input in [this issue](https://github.com/jackwish/tflite2onnx/issues/32)**
        
        * Support of this tool is by _best effort_ - we have very limited resouce,
        i.e. basically off time effort by the maintainers.
        So we encourage you to deep dive into your issue and then discuss with us to figure out a solution.
        Please [join](#contributing) to improve!
        
        
        ## Installation
        
        Install via [pip][pypi] `pip install tflite2onnx`.
        
        Or install from source to get latest features (please try out with [virtualenv](https://virtualenv.pypa.io)):
        
        1. Download the repo: `git clone https://github.com/jackwish/tflite2onnx.git && cd tflite2onnx`
        2. Build the package: `./scripts/build-wheel.sh`
        3. Install the built package: `pip install assets/dist/tflite2onnx-*.whl`
        
        Or you can just add the code tree to your `$PYTHONPATH`.
        (Command line tool is not avaiable in this mode.)
        
        ```sh
        export PYTHONPATH=$(pwd):${PYTHONPATH}
        ```
        
        
        ## Usage
        
        ### Python Interface
        
        ```py
        import tflite2onnx
        
        tflite_path = '/path/to/original/tflite/model'
        onnx_path = '/path/to/save/converted/onnx/model'
        
        tflite2onnx.convert(tflite_path, onnx_path)
        ```
        
        `tflite2onnx` now supports *explicit layout*, check the
        [test example](https://github.com/jackwish/tflite2onnx/blob/master/tests/test_explicit_layout.py).
        
        
        ### Command Line
        
        ```sh
        tflite2onnx /path/to/original/tflite/model /path/to/save/converted/onnx/model
        ```
        
        
        ## Documentation
        
        * [FAQ](docs/faq.md)
        * [Release note](docs/release-notes.md)
        * [Contribution guide](docs/contribution-guide.md)
        * [Introduction blog - the background, design and implementation][intro]
        * [How to enable a new operator](docs/how-to-enable-new-operator.md)
        * [Data layout semantic](docs/data-layout-semantic.md)
        
        
        ## Contributing
        
        * If something seems wrong to you, [report bugs](https://github.com/jackwish/tflite2onnx/issues/new?assignees=&labels=bug&template=bug-report.md&title=).
        * If some operators are not supported yet, you may [request a new operator](https://github.com/jackwish/tflite2onnx/issues/new?assignees=&labels=operator%2C+help+wanted&template=request-operator.md&title=Operator+request%3A).
        * It would be great if you can help to enable new operators, please join us with [How to enable a new operator](docs/how-to-enable-new-operator.md).
        * Feel free to open any other related discussions.
        
        Check [contribution guide](docs/contribution-guide.md) for more.
        
        
        ## License
        
        Apache License Version 2.0.
        
        [intro]: https://jackwish.net/2020/Convert-TensorFlow-Lite-models-to-ONNX.html
        [pypi]: https://pypi.org/project/tflite2onnx
        [github]: https://github.com/jackwish/tflite2onnx
        [tf2tflite]: https://www.tensorflow.org/lite/convert
        
Keywords: tflite,onnx,deep-learning
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <4,>=3.5.*
Description-Content-Type: text/markdown
