tflite

Parse TFLite models (*.tflite) EASILY with Python. Check the API at https://zhenhuaw.me/tflite/docs/

https://github.com/zhenhuaw-me/tflite

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

pip tensorflow tflite
Last synced: 9 months ago · JSON representation

Repository

Parse TFLite models (*.tflite) EASILY with Python. Check the API at https://zhenhuaw.me/tflite/docs/

Basic Info
  • Host: GitHub
  • Owner: zhenhuaw-me
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage: https://zhenhuaw.me/tflite
  • Size: 15.8 MB
Statistics
  • Stars: 102
  • Watchers: 3
  • Forks: 23
  • Open Issues: 3
  • Releases: 4
Topics
pip tensorflow tflite
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Easily Parse TFLite Models with Python

Build and Test Download

This tflite package parses TensorFlow Lite (TFLite) models (*.tflite), which are built by TFLite converter. For background, please refer to Introducing TFLite Parser Python Package.

Usage

Install the package and use it like what you build from the TensorFlow codebase. It's recommended to install the version that same as the TensorFlow that generates the TFLite model.

sh pip install tensorflow==2.3.0 pip install tflite==2.3.0

The raw API of tflite can be found in this documentation. The MobileNet test can serve as a usage example of parsing models.

Enhancements

The generated python package is not friendly to use sometimes. We have introduced several enhancements:

  • Easy import: A single import tflite (example) to replace importing every classes and funtions in tflite (example).
  • Builtin opcode helper: The opcode is encoded as digits which is hard to parse for human. Two APIs added to make it easy to use.

Compatibility Handling

TensorFlow sometimes leaves compability hanlding of the TFLite model to the users. As these are API breaking change that can be easily fixed, we do this in the tflite package.

Contributing Updates

As the operator definition may change across different TensorFlow versions, this package needs to be updated accordingly. If you notice that the package is out of date, please feel free to contribute new versions. This is pretty simple, instructions as below.

  1. Fork the repository, and download it.
  2. Install additional depdendency via pip install -r requirements.txt. And install flatbuffer compiler (you may need to manually build it).
  3. Generate the code for update. Tools have been prepared, there are prompt for actions.
    1. Download schema.fbs for a new version.
    2. Update the builtin operator mapping.
    3. Update the classes and functions import of submodules.
    4. Update the API document.
    5. Update the versioning in __init__.py.
    6. Build and test (simply pytest) around. Don't forget to re-install the newly built tflite package before testing it.
  4. Push your change and open Pull Request.
  5. The maintainer will take the responsibility to upload change to PyPI when merged.

Resources

License

Apache License Version 2.0 as TensorFlow's.

Disclaimer

The schema.fbs is obtained from TensorFlow directly. Maintainer of this package had tried to contact TensorFlow maintainers for licensing issues, but received no reply. Ownership or maintainship is open to transfer or close if there were any issue.

Owner

  • Name: Zhenhua WANG (王振华)
  • Login: zhenhuaw-me
  • Kind: user
  • Company: @Nvidia

A b[i|y]te of ML.sys|Arch|VM.

GitHub Events

Total
  • Release event: 1
  • Watch event: 3
  • Issue comment event: 6
  • Push event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 3
  • Issue comment event: 6
  • Push event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 121
  • Total Committers: 4
  • Avg Commits per committer: 30.25
  • Development Distribution Score (DDS): 0.025
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
王振华 (Zhenhua WANG) i@j****t 118
ebraheemabbas 5****s 1
Thibaut Vercueil t****v@g****m 1
Lukas Geiger l****4@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 13
  • Total pull requests: 7
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 12 days
  • Total issue authors: 11
  • Total pull request authors: 5
  • Average comments per issue: 1.23
  • Average comments per pull request: 2.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 18 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 5.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • zhenhuaw-me (3)
  • sjzhuo (1)
  • surajpandey353 (1)
  • CzakoZoltan08 (1)
  • korabelnikov (1)
  • bmabir17 (1)
  • ed-mr (1)
  • handsomeRobot (1)
  • badenh (1)
  • leaf918 (1)
  • vipcxj (1)
  • hhloz (1)
Pull Request Authors
  • ebraheemabbas (2)
  • zhenhuaw-me (2)
  • janjongboom (1)
  • lgeiger (1)
  • thibthibaut (1)
Top Labels
Issue Labels
stale (5) wontfix (3) good first issue (2)
Pull Request Labels
stale (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 64,247 last-month
  • Total docker downloads: 715
  • Total dependent packages: 22
  • Total dependent repositories: 168
  • Total versions: 18
  • Total maintainers: 2
  • Total advisories: 1
pypi.org: tflite

Parsing TensorFlow Lite Models (*.tflite) Easily

  • Versions: 18
  • Dependent Packages: 22
  • Dependent Repositories: 168
  • Downloads: 64,247 Last month
  • Docker Downloads: 715
Rankings
Dependent packages count: 0.6%
Dependent repos count: 1.2%
Downloads: 2.1%
Docker downloads count: 2.4%
Average: 3.7%
Stargazers count: 7.4%
Forks count: 8.6%
Maintainers (2)
Last synced: 10 months ago

Dependencies

.github/workflows/build.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/stale.yml actions
  • actions/stale v3 composite
requirements.txt pypi
  • GitPython *
  • build *
  • flatbuffers *
  • numpy *
  • pdoc3 *
  • pytest *
  • twine *
pyproject.toml pypi