tflite-model-maker-nightly


Nametflite-model-maker-nightly JSON
Version 0.4.4.dev202402230613 PyPI version JSON
download
home_pagehttp://github.com/tensorflow/examples
SummaryTFLite Model Maker: a model customization library for on-device applications.
upload_time2024-02-23 06:13:15
maintainer
docs_urlNone
authorGoogle LLC
requires_python
licenseApache 2.0
keywords tensorflow lite model customization transfer learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TFLite Model Maker

## Overview

The TFLite Model Maker library simplifies the process of adapting and converting
a TensorFlow neural-network model to particular input data when deploying this
model for on-device ML applications.

## Requirements

*   Refer to
    [requirements.txt](https://github.com/tensorflow/examples/blob/master/tensorflow_examples/lite/model_maker/requirements.txt)
    for dependent libraries that're needed to use the library and run the demo
    code.
*   Note that you might also need to install `sndfile` for Audio tasks.
On Debian/Ubuntu, you can do so by `sudo apt-get install libsndfile1`

## Installation

There are two ways to install Model Maker.

*   Install a prebuilt pip package:
    [`tflite-model-maker`](https://pypi.org/project/tflite-model-maker/).

```shell
pip install tflite-model-maker
```

If you want to install nightly version
[`tflite-model-maker-nightly`](https://pypi.org/project/tflite-model-maker-nightly/),
please follow the command:

```shell
pip install tflite-model-maker-nightly
```

*   Clone the source code from GitHub and install.

```shell
git clone https://github.com/tensorflow/examples
cd examples/tensorflow_examples/lite/model_maker/pip_package
pip install -e .
```

TensorFlow Lite Model Maker depends on TensorFlow
[pip package](https://www.tensorflow.org/install/pip). For GPU support, please
refer to TensorFlow's [GPU guide](https://www.tensorflow.org/install/gpu) or
[installation guide](https://www.tensorflow.org/install).

## End-to-End Example

For instance, it could have an end-to-end image classification example that
utilizes this library with just 4 lines of code, each of which representing one
step of the overall process. For more detail, you could refer to
[Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb).

*   Step 1. Import the required modules.

```python
from tflite_model_maker import image_classifier
from tflite_model_maker.image_classifier import DataLoader
```

*   Step 2. Load input data specific to an on-device ML app.

```python
data = DataLoader.from_folder('flower_photos/')
```

*   Step 3. Customize the TensorFlow model.

```python
model = image_classifier.create(data)
```

*   Step 4. Evaluate the model.

```python
loss, accuracy = model.evaluate()
```

*   Step 5. Export to Tensorflow Lite model and label file in `export_dir`.

```python
model.export(export_dir='/tmp/')
```

## Notebook

Currently, we support image classification, text classification and question
answer tasks. Meanwhile, we provide demo code for each of them in demo folder.

*   [Overview for TensorFlow Lite Model Maker](https://www.tensorflow.org/lite/guide/model_maker)
*   [Python API Reference](https://www.tensorflow.org/lite/api_docs/python/tflite_model_maker)
*   [Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb)
*   [Colab for text classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_text_classification.ipynb)
*   [Colab for BERT question answer](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_question_answer.ipynb)
*   [Colab for object detection](https://www.tensorflow.org/lite/tutorials/model_maker_object_detection)

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/tensorflow/examples",
    "name": "tflite-model-maker-nightly",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tensorflow,lite,model customization,transfer learning",
    "author": "Google LLC",
    "author_email": "packages@tensorflow.org",
    "download_url": "https://files.pythonhosted.org/packages/81/d3/47af255c1f43906b0e1b4d64a44f14d3cbfd0155b55b6028b15d3a2bca25/tflite-model-maker-nightly-0.4.4.dev202402230613.tar.gz",
    "platform": null,
    "description": "# TFLite Model Maker\n\n## Overview\n\nThe TFLite Model Maker library simplifies the process of adapting and converting\na TensorFlow neural-network model to particular input data when deploying this\nmodel for on-device ML applications.\n\n## Requirements\n\n*   Refer to\n    [requirements.txt](https://github.com/tensorflow/examples/blob/master/tensorflow_examples/lite/model_maker/requirements.txt)\n    for dependent libraries that're needed to use the library and run the demo\n    code.\n*   Note that you might also need to install `sndfile` for Audio tasks.\nOn Debian/Ubuntu, you can do so by `sudo apt-get install libsndfile1`\n\n## Installation\n\nThere are two ways to install Model Maker.\n\n*   Install a prebuilt pip package:\n    [`tflite-model-maker`](https://pypi.org/project/tflite-model-maker/).\n\n```shell\npip install tflite-model-maker\n```\n\nIf you want to install nightly version\n[`tflite-model-maker-nightly`](https://pypi.org/project/tflite-model-maker-nightly/),\nplease follow the command:\n\n```shell\npip install tflite-model-maker-nightly\n```\n\n*   Clone the source code from GitHub and install.\n\n```shell\ngit clone https://github.com/tensorflow/examples\ncd examples/tensorflow_examples/lite/model_maker/pip_package\npip install -e .\n```\n\nTensorFlow Lite Model Maker depends on TensorFlow\n[pip package](https://www.tensorflow.org/install/pip). For GPU support, please\nrefer to TensorFlow's [GPU guide](https://www.tensorflow.org/install/gpu) or\n[installation guide](https://www.tensorflow.org/install).\n\n## End-to-End Example\n\nFor instance, it could have an end-to-end image classification example that\nutilizes this library with just 4 lines of code, each of which representing one\nstep of the overall process. For more detail, you could refer to\n[Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb).\n\n*   Step 1. Import the required modules.\n\n```python\nfrom tflite_model_maker import image_classifier\nfrom tflite_model_maker.image_classifier import DataLoader\n```\n\n*   Step 2. Load input data specific to an on-device ML app.\n\n```python\ndata = DataLoader.from_folder('flower_photos/')\n```\n\n*   Step 3. Customize the TensorFlow model.\n\n```python\nmodel = image_classifier.create(data)\n```\n\n*   Step 4. Evaluate the model.\n\n```python\nloss, accuracy = model.evaluate()\n```\n\n*   Step 5. Export to Tensorflow Lite model and label file in `export_dir`.\n\n```python\nmodel.export(export_dir='/tmp/')\n```\n\n## Notebook\n\nCurrently, we support image classification, text classification and question\nanswer tasks. Meanwhile, we provide demo code for each of them in demo folder.\n\n*   [Overview for TensorFlow Lite Model Maker](https://www.tensorflow.org/lite/guide/model_maker)\n*   [Python API Reference](https://www.tensorflow.org/lite/api_docs/python/tflite_model_maker)\n*   [Colab for image classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb)\n*   [Colab for text classification](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_text_classification.ipynb)\n*   [Colab for BERT question answer](https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_question_answer.ipynb)\n*   [Colab for object detection](https://www.tensorflow.org/lite/tutorials/model_maker_object_detection)\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "TFLite Model Maker: a model customization library for on-device applications.",
    "version": "0.4.4.dev202402230613",
    "project_urls": {
        "Download": "https://github.com/tensorflow/examples/tags",
        "Homepage": "http://github.com/tensorflow/examples"
    },
    "split_keywords": [
        "tensorflow",
        "lite",
        "model customization",
        "transfer learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c76a08f78c2895b5afa8bd33f177d227408f7d2e0e6f72df03860f03c4c028f7",
                "md5": "43813881661f5fdaa2c88aefdfc8b33e",
                "sha256": "e2c8b0ff5d2cffc2573dd27addd14b5872525d8ebe1e7e83adab0263fbeda836"
            },
            "downloads": -1,
            "filename": "tflite_model_maker_nightly-0.4.4.dev202402230613-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "43813881661f5fdaa2c88aefdfc8b33e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 580378,
            "upload_time": "2024-02-23T06:13:04",
            "upload_time_iso_8601": "2024-02-23T06:13:04.474503Z",
            "url": "https://files.pythonhosted.org/packages/c7/6a/08f78c2895b5afa8bd33f177d227408f7d2e0e6f72df03860f03c4c028f7/tflite_model_maker_nightly-0.4.4.dev202402230613-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "81d347af255c1f43906b0e1b4d64a44f14d3cbfd0155b55b6028b15d3a2bca25",
                "md5": "710c7583fe1ae44e4b6e873494671be5",
                "sha256": "9e1b6f8f8afb9462d06327eede3e85fc8f1f38637ece4f04ef877d4d30b8438b"
            },
            "downloads": -1,
            "filename": "tflite-model-maker-nightly-0.4.4.dev202402230613.tar.gz",
            "has_sig": false,
            "md5_digest": "710c7583fe1ae44e4b6e873494671be5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 326782,
            "upload_time": "2024-02-23T06:13:15",
            "upload_time_iso_8601": "2024-02-23T06:13:15.666629Z",
            "url": "https://files.pythonhosted.org/packages/81/d3/47af255c1f43906b0e1b4d64a44f14d3cbfd0155b55b6028b15d3a2bca25/tflite-model-maker-nightly-0.4.4.dev202402230613.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-23 06:13:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tensorflow",
    "github_project": "examples",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tflite-model-maker-nightly"
}
        
Elapsed time: 0.39184s