-
Notifications
You must be signed in to change notification settings - Fork 71
Update litert samples readme #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jl45G
wants to merge
2
commits into
google-ai-edge:main
Choose a base branch
from
jl45G:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,82 @@ | ||
| # Google AI Edge LiteRT API Samples | ||
| # **Google AI Edge LiteRT Samples** | ||
|
|
||
| This repository has source code for the Android, iOS, and Python AI Edge samples for the Google AI Edge LiteRT API. | ||
| This repository contains official sample applications and code examples for **LiteRT** (formerly known as TensorFlow Lite), Google's high-performance on-device machine learning framework. | ||
|
|
||
| The samples are organized into two main versions (`interpreter_api/` and `compiled_model_api/`) to demonstrate different API paradigms. | ||
|
|
||
| **Note:** For Generative AI and Large Language Models (LLMs), please refer to the [LiteRT-LM repository](https://github.com/google-ai-edge/LiteRT-LM). | ||
|
|
||
| ## **📂 Repository Structure** | ||
|
|
||
| ### **1\. `compiled_model_api/`** | ||
|
|
||
| This folder contains samples using the **LiteRT CompiledModel API**. This new API is designed for advanced GPU/NPU acceleration, delivering superior ML & GenAI performance. | ||
|
|
||
| * **Key Features:** | ||
| * **Hardware Acceleration**: Specialized for GPU/NPU execution. | ||
| * **Async Execution**: Improved performance for complex pipelines. | ||
| * **Buffer Management**: efficient input/output handling. | ||
| * **Available Samples:** | ||
| * **NPU AOT**: Ahead-of-Time compilation examples. | ||
| * **NPU JIT**: Just-in-Time compilation examples. | ||
| * **Platforms:** Primarily Android (Kotlin/C++). | ||
|
|
||
| ### **2\. `interpreter_api/`** | ||
|
|
||
| This folder contains the CPU samples that use the **Interpreter API**. | ||
|
|
||
| * **Key Features:** | ||
| * Standard `.tflite` model execution. | ||
| * Broad compatibility across all Android/iOS versions. | ||
| * Legacy Task Library usage. | ||
| * **Available Samples:** | ||
| * **Image Classification**: Recognize objects in images/video. | ||
| * **Object Detection**: Locate and label multiple objects. | ||
| * **Image Segmentation**: Separate objects from the background. | ||
| * **Audio Classification**: Identify audio events. | ||
| * **Digit Classification**: Handwritten digit recognition (MNIST). | ||
| * **Platforms:** Android (Kotlin/Java), iOS (Swift/Objective-C), Python (Raspberry Pi/Linux). | ||
|
|
||
| ## **🛠️ Getting Started** | ||
|
|
||
| ### **Prerequisites** | ||
|
|
||
| * **Android**: Android Studio (latest stable version). | ||
| * **iOS**: Xcode (latest version). | ||
| * **Python**: Python 3.9+ and `pip install ai-edge-litert`. | ||
|
|
||
| ### **Running a Sample** | ||
|
|
||
| #### **For Samples Using Compiled Model API** | ||
|
|
||
| 1. Navigate to the `compiled_model_api/` directory. | ||
| 2. Ensure you have a device with a supported NPU (e.g., modern Pixel, Samsung, or devices with MediaTek/Qualcomm chips). | ||
| 3. Follow the specific setup instructions in the sub-folder to enable the specialized hardware delegates. | ||
|
|
||
| #### **For Samples Using Interpreter API** | ||
|
|
||
| 1. Navigate to `interpreter_api/` directory. | ||
| 2. Open the project in Android Studio or Xcode. | ||
| 3. Build and run on your device. | ||
|
|
||
| ## **📚 Documentation** | ||
|
|
||
| * **LiteRT Overview**: [ai.google.dev/edge/litert](https://ai.google.dev/edge/litert) | ||
| * **CompiledModel API Guide**: [LiteRT for Android](https://ai.google.dev/edge/litert/android) | ||
| * **Model Conversion**: [Convert models to LiteRT](https://ai.google.dev/edge/litert/models/convert) | ||
|
|
||
| ## **🤝 Contributing** | ||
|
|
||
| Contributions are welcome\! | ||
|
|
||
| 1. Read [CONTRIBUTING.md](https://www.google.com/search?q=CONTRIBUTING.md). | ||
| 2. Fork the repo and create a branch. | ||
| 3. Submit a Pull Request. | ||
|
|
||
| ## **📄 License** | ||
|
|
||
| Apache License 2.0. See [LICENSE](https://www.google.com/search?q=LICENSE) for details. | ||
|
|
||
| --- | ||
|
|
||
| *Disclaimer: This is a sample repository maintained by Google. It is provided "as is" without warranty of any kind.* | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.