Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use TensorFlow Lite in embedded system

Shulou Source: shulou.com Published: 2022-06-01 09:01:11 09月26日 Update

How to use TensorFlow Lite in embedded systems, I believe many inexperienced people are helpless about this, for this reason this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.

Today I'm sharing some TensorFlow Lite apps on Android. Let's take a look first!

TensorFlow Lite in Android

The App in the video uses a model called MobileNet. This model is characterized by small size, fast speed (low delay) and low energy consumption. The application scenarios included in this model include:

Target recognition (Maps App and Google Lens may be used)

Face tracking (camera and beauty apps)

fine classification

landmark recognition

The download address of the model is:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/g3doc/models.md

Download a Mobilenet_1.0_224 model package at the above link, which includes:

labels.txt identification file (identification of model training)

mobilenet_v1_0.75_224.tflite file (run directly in TF Lite)

concrete development

declaration dependency

The first step is to add the dependency org.tensorflow:tensorflow-lite:+ to the project's Gradle file.

introduction interpreter

Then, you need to introduce an interpreter into your code:

import org.tensorflow.lite.Interpreter;

This interpreter can load and run models, as described in Phase 1.

Use App Assets to load models

Although you can load models from anywhere, it is recommended that you store them in App assets.

After reading the above, do you know how to use TensorFlow Lite in embedded? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Tags: Model application content file interpreter interpretation embedded method more logo problem run helpless for this code volume small size reason principle map Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Microsoft Xiaomi MySQL OPPO Reno