OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Play With Tflite

Play With Tflite is a public repository of C++ sample projects for TensorFlow Lite inference on Linux, Android and Windows. It demonstrates image, video and camera inputs, with delegate options including Edge TPU, XNNPACK, GPU and NNAPI.

Independent OpenViST project profile, based on linked sources.

Play With Tflite — Starting a cross-platform TensorFlow Lite inference project from sample code
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use the repository when you need native C++ TensorFlow Lite examples and are prepared to build and configure them for a supported platform.

Who it is for

  • C++ developers building or adapting TensorFlow Lite inference applications.
  • Developers comparing delegate configurations across Linux, Android or Windows targets.

Documented uses

  • Build a native TensorFlow Lite inference sample.
  • Adapt examples to accept images, videos or camera input.
  • Configure examples for CPU, GPU, DSP or Edge TPU inference through listed delegates.
Before you choose

Requirements & limits

The repository is public and lists an Apache-2.0 license.

  • OpenCV 4.x is a documented build requirement.
  • Linux builds use CMake and make; Windows instructions specify Visual Studio 2019, and Android instructions use Android Studio.
  • Delegate selection may require additional libraries or platform-specific configuration.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Build a Linux TensorFlow Lite sample

Prepare and build the documented MobileNet V2 classification example on Linux.

Before you start

  • OpenCV 4.x
  • A Linux environment
  • Repository submodules, prebuilt libraries and model resources

Steps

  1. Clone the repository and enter its directory.

  2. Initialize submodules, download prebuilt libraries and download model resources using the repository scripts.

  3. Enter pj_tflite_cls_mobilenet_v2, create a build directory, and run cmake .. followed by make.

  4. The README shows ./main as the example invocation.

Expected outcome

A built sample executable for the documented Linux example, with the README showing how to invoke it using the default image.

Guide limitations

  • The instructions require OpenCV 4.x.
  • Delegate-specific dependencies and configuration may be needed when selecting an accelerator.
Source-based practical guide

Choose an input for a sample executable

Use the documented command-line input forms to select a default image, file or camera.

Before you start

  • A built sample executable
  • For file input, an image or video in a listed format; for camera input, a camera device

Steps

  1. Run ./main without an argument to use the default image set in main.cpp.

  2. Pass a .jpg, .png or .bmp path for image input, or a .mp4, .avi or .webm path for video input.

  3. Pass a camera index such as 0 to select a camera.

Expected outcome

The sample is invoked with the documented default-image, image-file, video-file or camera input form.

Guide limitations

  • The input instructions describe how to invoke the executable; they do not specify inference output details.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 November 2026
Original website title
iwatake2222/play_with_tflite · Official homepage title · retained in its source language