[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77794":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":9,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":8,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":8,"createdAt":8,"pushedAt":8,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},77794,"litert-samples","google-ai-edge\u002Flitert-samples","google-ai-edge",null,"https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Flitert-samples","Kotlin",340,100,10,18,0,4,9,28,12,55.31,false,"main","2026-06-12 04:01:22","# **Google AI Edge LiteRT Samples**\n\nThis repository contains official sample applications and code examples for **LiteRT** (formerly known as TensorFlow Lite), Google's high-performance on-device machine learning framework.\n\nThe samples are organized into two main versions (`interpreter_api\u002F` and `compiled_model_api\u002F`) to demonstrate different API paradigms.\n\n**Note:** For Generative AI and Large Language Models (LLMs), please refer to the [LiteRT-LM repository](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002FLiteRT-LM).\n\n## **🔥 What's New**\n\nNew sample app for [Automatic Speech Recognition(ASR)](compiled_model_api\u002Fspeech_recognition) has been added.\n\n## **📂 Repository Structure**\n\n### **1\\. `compiled_model_api\u002F`**\n\nThis folder contains samples using the **LiteRT CompiledModel API**. This new API is designed for advanced GPU\u002FNPU acceleration, delivering superior ML & GenAI performance.\n\n* **Key Features:**  \n  * **Hardware Acceleration**: Specialized for GPU\u002FNPU execution.  \n  * **Async Execution**: Improved performance for complex pipelines.  \n  * **Buffer Management**: efficient input\u002Foutput handling.  \n* **Available Samples:**  \n  * **NPU AOT**: Ahead-of-Time compilation examples.  \n  * **NPU JIT**: Just-in-Time compilation examples.  \n* **Platforms:** Primarily Android (Kotlin\u002FC++).\n\n### **2\\. `interpreter_api\u002F`**\n\nThis folder contains the CPU samples that use the **Interpreter API**.\n\n* **Key Features:**  \n  * Standard `.tflite` model execution.  \n  * Broad compatibility across all Android\u002FiOS versions.  \n  * Legacy Task Library usage.  \n* **Available Samples:**  \n  * **Image Classification**: Recognize objects in images\u002Fvideo.  \n  * **Object Detection**: Locate and label multiple objects.  \n  * **Image Segmentation**: Separate objects from the background.  \n  * **Audio Classification**: Identify audio events.  \n  * **Digit Classification**: Handwritten digit recognition (MNIST).  \n* **Platforms:** Android (Kotlin\u002FJava), iOS (Swift\u002FObjective-C), Python (Raspberry Pi\u002FLinux).\n\n## **🛠️ Getting Started**\n\n### **Prerequisites**\n\n* **Android**: Android Studio (latest stable version).  \n* **iOS**: Xcode (latest version).  \n* **Python**: Python 3.9+ and `pip install ai-edge-litert`.\n\n### **Running a Sample**\n\n#### **For Samples Using Compiled Model API**\n\n1. Navigate to the `compiled_model_api\u002F` directory.  \n2. Ensure you have a device with a supported NPU (e.g., modern Pixel, Samsung, or devices with MediaTek\u002FQualcomm chips).  \n3. Follow the specific setup instructions in the sub-folder to enable the specialized hardware delegates.\n\n#### **For Samples Using Interpreter API**\n\n1. Navigate to `interpreter_api\u002F` directory.  \n2. Open the project in Android Studio or Xcode.  \n3. Build and run on your device.\n\n## **📚 Documentation**\n\n* **LiteRT Overview**: [ai.google.dev\u002Fedge\u002Flitert](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert)  \n* **CompiledModel API Guide**: [LiteRT for Android](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert\u002Fandroid)  \n* **Model Conversion**: [Convert models to LiteRT](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert\u002Fconversion\u002Foverview)\n\n## **🤝 Contributing**\n\nContributions are welcome\\!\n\n1. Read [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Flitert-samples\u002Fblob\u002Fmain\u002FCONTRIBUTING.md).  \n2. Fork the repo and create a branch.  \n3. Submit a Pull Request.\n\n## **📄 License**\n\nApache License 2.0. See [LICENSE](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Flitert-samples\u002Fblob\u002Fmain\u002FLICENSE) for details.\n\n---\n\n*Disclaimer: This is a sample repository maintained by Google. It is provided \"as is\" without warranty of any kind.*\n","这个项目是Google AI Edge LiteRT的官方示例应用和代码库，展示了如何使用LiteRT（以前称为TensorFlow Lite）在设备上进行高性能机器学习。核心功能包括通过两种API范式（解释器API和编译模型API）执行机器学习任务，其中编译模型API特别针对GPU\u002FNPU加速进行了优化，支持异步执行与高效的缓冲区管理；而解释器API则侧重于广泛的兼容性和标准.tflite模型的执行。适合需要在移动设备或嵌入式系统中实现图像分类、物体检测、语音识别等机器学习功能的应用场景。",2,"2026-06-11 03:56:00","trending"]