$ show tensorflow/examples
This repository is a comprehensive collection of TensorFlow Lite example applications for on-device machine learning, covering tasks such as image classification, object detection, pose estimation, audio classification, BERT question answering, gesture recognition, and more. It provides complete Android (Kotlin/Java), iOS (Swift), Raspberry Pi, and web implementations, each demonstrating best practices for camera integration, hardware delegate selection, and real-time inference. Additionally, the repository includes the TensorFlow Lite Model Maker library, which offers high-level APIs for training and exporting custom TFLite models from user data, along with research/educational models (DenseNet, pix2pix, NMT). While the codebase shows some duplication across platforms and occasional legacy API usage, it remains a valuable reference for developers building edge ML applications.
The LLM identified 4 files worth highlighting for reuse:
A Swift implementation of the BERT basic tokenizer that performs Unicode normalization, punctuation splitting, and whitespace tokenization. This component is cleanly implemented as a standalone class with only standard Foundation imports, making it easily reusable in any iOS NLP project requiring BERT-compatible tokenization.
A C++ library for programmatically cloning and editing TensorFlow Lite FlatBuffer models (adding/deleting tensors, operators, buffers, and metadata). This is a highly specialized component with minimal dependencies, demonstrating deep knowledge of the TFLite format. It can be extracted and reused in any project requiring runtime model modification without retraining.
A lightweight Python class that implements temporal smoothing of audio classification results using a configurable suppression window and average probability thresholds. This component is self-contained (only depends on NumPy) and can be reused in any audio classification pipeline to reduce false positives and stabilize predictions over time.
A Kotlin helper class that orchestrates on-device transfer learning using TFLite model signatures (train, infer, load). It encapsulates dataset loading, training loop, and model evaluation via TFLite interpreter signature runs. This pattern is reusable for any on-device training application, demonstrating how to perform incremental learning without a server.