TFLiteSample
Aurora OS example to demonstrate the usage of Tensorflow Lite with GPU acceleration via OpenCL. This application utilizes YOLOv3 model for Tensorflow Lite to run image recognition task on a mobile device CPU/GPU. Users are prompted to select an image from the mobile device storage. This image is then passed to the model which performs recognition and classification of known entities. After the model finishes inference the image with highlighted entities is shown on the screen. Additionaly the application provides the ability to test batched matrix multiplication using Tensorflow Lite with optional GPU acceleration.
Terms of Use and Participation
The source code of the project is provided under the license, which allows its use in third-party applications.
The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.
Information about the contributors is specified in the AUTHORS file.
Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.
Project Structure
The project has a standard structure of an application based on C++ and QML for Aurora OS.
- ru.auroraos.TFLiteCheck.pro file describes the project structure for the qmake build system.
- icons directory contains application icons for different screen resolutions.
-
qml directory contains the QML source code and the UI resources.
- cover directory contains the application cover implementations.
- icons directory contains the custom UI icons.
- pages directory contains the application pages.
- TFLiteCheck.qml file provides the application window implementation.
- rpm directory contains the rpm-package build settings. ru.auroraos.TFLiteCheck.spec file is used by rpmbuild tool.
- src directory contains the C++ source code.
- translations directory contains the UI translation files.
-
models folder contains Tensorflow Lite models, label files and their licenses where applicable.
- model-fixed.tflite file is the binary file of Tensorflow Lite model for matrix multiplication with set matrix sizes.
- model-variable.tflite file is the binary file of Tensorflow Lite model for matrix multiplication with unset matrix sizes.
- coco.names MS COCO datased of object names recognized by the YOLOv3 model.
- yolo_v3.tflite LICENSE.mit file is the binary file of Tensorflow Lite model YOLOv3.
- ru.auroraos.TFLiteCheck.desktop file defines the display and parameters for launching the application.
Screenshots
This document in Russian / Перевод этого документа на русский язык
Compatibility
Project is fully compatible with Aurora OS 5 and is partially compatible with Aurora OS 4.
Due to the C++ standard library requirements on the part of Tensorflow Lite, the latest versions of Tensorflow Lite with GPU delegation can only be build in Aurora OS SDK version 5 or newer. Aurora OS SDK version 4 can, however, be used to build Tensorflow Lite without GPU delegation or Tensorflow Lite with GPU delegation prior to version 2.8.3. Tensorflow Lite 2.8.3 with GPU delegation has some limitations:
- Loading YOLOv3 model produces error, therefore it cannot be used in the Aurora OS 4 builds of the example;
On Aurors OS 4 matrix multiplication example can only process batch size of 1.