Documentation for Task library demos

PiperOrigin-RevId: 335447818
Change-Id: Iaab7231b45b6b240063947a6b89a895844c0f154
This commit is contained in:
Lu Wang 2020-10-05 10:35:01 -07:00 committed by TensorFlower Gardener
parent b4e4c329d0
commit 0c14b17c1f
5 changed files with 34 additions and 2 deletions

View File

@ -50,6 +50,10 @@ API.
## Run inference in Java
See the
[Image Classification reference app](https://github.com/tensorflow/examples/blob/master/lite/examples/image_classification/android/EXPLORE_THE_CODE.md)
for an example of how to use `ImageClassifier` in an Android app.
### Step 1: Import Gradle dependency and other settings
Copy the `.tflite` model file to the assets directory of the Android module

View File

@ -29,6 +29,10 @@ API.
## Run inference in Java
See the
[Text Classification reference app](https://github.com/tensorflow/examples/blob/master/lite/examples/text_classification/android/lib_task_api/src/main/java/org/tensorflow/lite/examples/textclassification/client/TextClassificationClient.java)
for an example of how to use `NLClassifier` in an Android app.
### Step 1: Import Gradle dependency and other settings
Copy the `.tflite` model file to the assets directory of the Android module

View File

@ -34,6 +34,18 @@ For each example, we provide a guide that explains how it works.
#### Android
You can leverage the out-of-box API from TensorFlow Lite Task Library to
[integrate image classification models](../../inference_with_metadata/task_library/image_classifier)
in just a few lines of code. You can also
[build your own custom inference pipleline](../../inference_with_metadata/lite_support)
using the TensorFlow Lite Support Library.
The Android example below demonstrates the implementation for both methods as
[lib_task_api](https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android/lib_task_api)
and
[lib_support](https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android/lib_support),
respectively.
<a class="button button-primary" href="https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android">View
Android example</a>

View File

@ -7,7 +7,16 @@ Use a pre-trained model to category a paragraph into predefined groups.
<img src="images/screenshot.gif" class="attempt-right" style="max-width: 300px">
If you are new to TensorFlow Lite and are working with Android, we recommend
exploring the following example applications that can help you get started.
exploring the guide of TensorFLow Lite Task Library to
[integrate text classification models](../../inference_with_metadata/task_library/nl_classifier).
within just a few lines of code. You can also integrate the model using the
[TensorFlow Lite Interpreter Java API](../../guide/inference#load_and_run_a_model_in_java).
The Android example below demonstrates the implementation for both methods as
[lib_task_api](https://github.com/tensorflow/examples/tree/master/lite/examples/text_classification/android/lib_task_api)
and
[lib_interpreter](https://github.com/tensorflow/examples/tree/master/lite/examples/text_classification/android/lib_interpreter),
respectively.
<a class="button button-primary" href="https://github.com/tensorflow/examples/tree/master/lite/examples/text_classification/android">Android
example</a>

View File

@ -59,6 +59,9 @@
" \u003ctd\u003e\n",
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/tensorflow/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
" \u003c/td\u003e\n",
" \u003ctd\u003e\n",
" \u003ca href=\"https://tfhub.dev/\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/hub_logo_32px.png\" /\u003eSee TF Hub model\u003c/a\u003e\n",
" \u003c/td\u003e\n",
"\u003c/table\u003e"
]
},
@ -745,7 +748,7 @@
"id": "ROS2Ay2jMPCl"
},
"source": [
"The TensorFlow Lite model file could be used in [image classification](https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification) reference app using [TensorFlow Lite Android wrapper code generator](https://www.tensorflow.org/lite/inference_with_metadata/codegen#generate_code_with_tensorflow_lite_android_code_generator). Thus, we could run the retrained float TensorFlow Lite model on the android app."
"See [example applications and guides of image classification](https://www.tensorflow.org/lite/models/image_classification/overview#example_applications_and_guides) for more details about how to integrate the TensorFlow Lite model into mobile apps."
]
},
{