Android Studio ML Model Binding がツールで利用可能に
を使用して、グラフィカル ユーザー インターフェースを介して LiteRT モデルをインポートできます。
行うことができます。Android Studio が自動的に
モデル メタデータに基づいてラッパークラスを生成する。
LiteRT コード生成ツールは、実行可能なファイルです。
メタデータに基づいて自動的にモデル インターフェースを生成します。現在、
Java で Android をサポートします。ラッパーコードを使用すると
ByteBuffer と直接やり取りします。代わりに、デベロッパーは
Bitmap や Rect などの型付きオブジェクトを含む LiteRT モデル。
Android Studio のユーザーは、
Android Studio ML Binding。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-24 UTC。"],[],[],null,["# LiteRT inference with metadata\n\nInferencing [models with metadata](../../models/metadata) can be as easy as just\na few lines of code. LiteRT metadata contains a rich description of\nwhat the model does and how to use the model. It can empower code generators to\nautomatically generate the inference code for you, such as using the [Android\nStudio ML Binding feature](../metadata/codegen#mlbinding) or [LiteRT\nAndroid code generator](../metadata/codegen#codegen). It can also be used to\nconfigure your custom inference pipeline.\n\nTools and libraries\n-------------------\n\nLiteRT provides varieties of tools and libraries to serve different\ntiers of deployment requirements as follows:\n\n### Generate model interface with Android code generators\n\nThere are two ways to automatically generate the necessary Android wrapper code\nfor LiteRT model with metadata:\n\n1. [Android Studio ML Model Binding](./codegen#mlbinding) is tooling available\n within Android Studio to import LiteRT model through a graphical\n interface. Android Studio will automatically configure settings for the\n project and generate wrapper classes based on the model metadata.\n\n2. [LiteRT Code Generator](./codegen#codegen) is an executable that\n generates model interface automatically based on the metadata. It currently\n supports Android with Java. The wrapper code removes the need to interact\n directly with `ByteBuffer`. Instead, developers can interact with the\n LiteRT model with typed objects such as `Bitmap` and `Rect`.\n Android Studio users can also get access to the codegen feature through\n [Android Studio ML Binding](./codegen#mlbinding).\n\n### Build custom inference pipelines with the LiteRT Support Library\n\n[LiteRT Support Library](./lite_support) is a cross-platform library\nthat helps to customize model interface and build inference pipelines. It\ncontains varieties of util methods and data structures to perform pre/post\nprocessing and data conversion. It is also designed to match the behavior of\nTensorFlow modules, such as TF.Image and TF.Text, ensuring consistency from\ntraining to inferencing.\n\nExplore pretrained models with metadata\n---------------------------------------\n\nBrowse [Kaggle Models](https://www.kaggle.com/models?framework=tfLite) to\ndownload pretrained models with metadata for both vision and text tasks. Also\nsee different options of [visualizing the\nmetadata](../../models/metadata#visualize_the_metadata).\n\nLiteRT Support GitHub repo\n--------------------------\n\nVisit the [LiteRT Support GitHub\nrepo](https://github.com/tensorflow/tflite-support) for more examples and source\ncode."]]