Questions tagged [tensorflow-lite]
TensorFlow Lite is a toolkit for Android and iOS that provides Machine Learning capabilities on-device.
1,995
questions
0
votes
1
answer
11
views
Building TensorFlow Lite with all TF ops?
How can I build the C++ TensorFlow Lite runtime library with all the select TF operators? I can't feed in a model at build time to selectively build a subset.
I'd like a cross-platform solution but ...
0
votes
1
answer
24
views
Unable to get output from Tensorflow lite object detection model in C
I trained an Tensorflow Lite object detection model with Yolo architecture in Python. Now I am trying to do the inference in C but I cannot make it work after the interpreter is invoked.
The main.c ...
0
votes
0
answers
12
views
Tensorflow Lite ARM cmake
I want to build tf lite for a ARM. I have the following cmake config:
tensorflowlite.toolchain.cmake:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(GNU_MACHINE "aarch64-...
0
votes
0
answers
19
views
on running flutter project tflite is giving error
How to solve it. Help
I am facing these issues.
0
votes
0
answers
28
views
Tensorflow Lite Facemesh in Flutter
I'm building a mobile app which basically should create a facemesh from a live camera video and apply some filters/makeup to it.
I wanted to use Flutter as the mobile framework in combination with ...
0
votes
0
answers
14
views
Tnesorflowlite ':finish' configuration error
I keep getting this "Cannot query the value of property 'namespace' because configuration of project ':finish' has not completed yet." error and I'm not sure how to fix it. I've tried ...
0
votes
1
answer
20
views
Building Tensorflow Lite for Linux x86_64 using bazel
As the title says im trying to build TFLite(R2.2) for Linux x86_64, i already have it working for Macosx x86_64, but i cant seem to find any options within the bazel build configs to change the build ...
1
vote
1
answer
30
views
Tensorflow 2 SSD MobileNet model breaks during conversion to tflite
I've been trying to follow this process to run an object detector (SSD MobileNet) on the Google Coral Edge TPU:
Edge TPU model workflow
I've successfully trained and evaluated my model with the Object ...
0
votes
1
answer
35
views
Cannot assign variable in Tensorflow-Lite: "incompatible with expected resource"
I'm trying to compile a stateful graph in TensorFlow-lite. I'm on tensorflow 2.8.1. As an example below, I've used cumulative sum:
@dataclass
class CumulativeSum:
cumsum: tf.Variable ...
0
votes
0
answers
41
views
The TensorFlow Objet Detection Analysis results of the evaluation of a model (API Evaluation Metrics)
I created a dataset of approximately 200 flower images to detect the dead part of a flower. I used tensorflow-lite and the AI pretrained model EfficientDet-lite2 to train my model. I tested it with a ...
0
votes
1
answer
54
views
Computing Bounding Boxes from a Mask-Image (Tensorflow or other)
I'm looking for ways to convert a mask (a Height x Width boolean image) into a series of bounding boxes (see example picture below, which I hand-drew), with boxes encircling the "islands of truth&...
0
votes
0
answers
25
views
Optimized model creation with TensorFlow Lite Model Maker
I am working on creating a custom model for image classification. The model will run on a microcontroller. So the goal is to make the model as small as possible while still being some what accurate. ...
0
votes
1
answer
12
views
is it possible to convert tflite to tf model?
I converted the TF model, which was a float, into a Tflite model, which was an integer, so that I could make inferences on the Edge device. Tflite is a lightweight model, and it is simple to deploy. ...
0
votes
0
answers
37
views
@tensorflow/tfjs-tflite won't load
I tried to load up into a local webpage @tensorflow/tfjs-tflite in the following configuration:
import "@tensorflow/tfjs-backend-cpu";
import * as tf from "@tensorflow/tfjs-core";
...
0
votes
1
answer
29
views
Tflite Object detection android app with custom dataset Crash immediately after running
I tried to run object detection TensorFlow lite with a custom dataset but I got these errors. After training my dataset and converting it to .tflite format and metadata I put it in the asserts folder ...
0
votes
0
answers
13
views
How to run Deep_sort on yolov4-tiny on webcam?
I am trying to run deep-sort for real-time object tracking on yolov4-tiny model on webcam from this github repository.
https://github.com/theAIGuysCode/yolov4-deepsort
But there is only command for ...
0
votes
0
answers
24
views
TypeError: '>' not supported between instances of 'function' and 'int' using tensorflow_lite
I am using this code in tensorflow and it is working fine but not working in tensorflow_lite. can anyone explain how i can write below code without getting this error.
TypeError: '>' not supported ...
5
votes
0
answers
103
views
+100
How to add Metadata in the Tensorflow Lite for a model taken from Github?
I have used this project from Github: https://github.com/nicknochnack/TFODCourse
The project contains a model that can detect License Plate on a given Vehicle image. The Github repo also contains code ...
0
votes
0
answers
18
views
function' object has no attribute 'flatten' using tensorflow_lite
In the tensor flow i used y.flatten() and it is working fine but not in tensorflow_lite
I am getting an error while using y.flatten() in tensor-flow_lite.
function 'object has no attribute 'flatten'.
1
vote
1
answer
39
views
TensorFlow Lite in Qt with cmake in WSL
I want to work with tensorflow lite in the qt creator (cmake), which is running in the WSL. The project is to be build for arm. I have found this tutorial: https://www.tensorflow.org/lite/guide/...
0
votes
0
answers
23
views
TFLite C++ Interpreter array input and array output
I have no problem to make a inference when the input and output are a single value. But I don't know how to do it when the input and output are array. e.g. input shape is (1,2,2) and output shape is (...
0
votes
1
answer
34
views
getting java.lang.IllegalArgumentException: The size of byte buffer and the shape do not match
MainActivity.kt :
https://gist.github.com/0xN1nja/537ec6ad7d00c2284d7788f92de0a600
Model :
Error :
Process: com.example.qutubcomplexmonumentspredictiontensorflowlite, PID: 12674
java.lang....
0
votes
1
answer
20
views
how to fix "the size of byte buffer and the shape dont match" in kotlin tflite
im getting :
Process: com.example.qutubcomplexmonumentspredictiontensorflowlite, PID: 24696
java.lang.IllegalArgumentException: The size of byte buffer and the shape do not match.
at ...
0
votes
0
answers
19
views
Failed to load model from 'file:///android_asset/merged_frozen_graph.pb' In Android Studio
Hey I am trying to use tensor flow to get image description in my android app. But I am getting an error I tried hard searching but after many hours I didn't found any solution.
this is he error
java....
0
votes
0
answers
40
views
How to determine the memory allocation size of a tensorflow lite model after loading it
I'm trying to figure out how to get the size of a tensorflow lite model after loading it in memory. So far I've tried the code below with a model and its quantized version.
On the hard drive the model ...
0
votes
1
answer
20
views
How to find input and output arrays for Tensorflow frozen graph
I'm trying to find input arrays and output arrays for the frozen graph so that I can convert may model to Tensorflow-lite.
There is a tool available to visualise the frozen graph which is netron["...
0
votes
1
answer
72
views
Tensorflow Lite Android: Both GPU delegate and NNAPI delegate are slower than CPU
I am currently evaluating and comparing the performance of some tensorflow models on different smartphones. I am testing the MNIST and CIFAR10 databases. The strange thing is, when i try to speed up ...
0
votes
0
answers
49
views
How to use custom tensorflow lite models in flutter?
I am working on a flutter project that requires some machine learning. I have my model already trained and ready to be used.
How to integrate this Tensorflow lite model with flutter?
I have tried ...
0
votes
0
answers
18
views
Any tutorial code for how to use TensorFlowLiteC api (iOS)?
I come across a project that need to use TensorFlowLiteC static library in swift code project. Is there any tutorial teach me how to use it? Thankyou.
What I found online are TensorFlowLite library in ...
0
votes
1
answer
35
views
How to run Channel first tflite model in Android
I am able to run my custom tflite model in android but the output is totally wrong. I suspect it is due to my model needs input shape [1, 3, 640, 640] but the code makes channel last ByteBuffer. I ...
2
votes
0
answers
37
views
Record Audio along with sound classification in android using tensorflow
I am using AudioClassifier to classify the sound from mic of the phone.
'val classifier = AudioClassifier.createFromFile(this, MODEL_FILE)'
'val tensor = classifier.createInputTensorAudio()'
...
0
votes
1
answer
38
views
Altering a variable within a .tflite model in Xcode?
I'm trying to implement the Neural Style Transfer model by https://arxiv.org/pdf/1610.07629.pdf in an iOS app. The paper uses this conditional instance norm layer to allow a single model to learn ...
-1
votes
0
answers
30
views
How to make predictions with tflite model with float array as input on Android
im working on a android app that integrates a tensor flow lite model that has as input 42 float values and 19 possible output classes
Im trying to do something like this:
public static float[] ...
0
votes
0
answers
23
views
Tensorflow Lite model run does not change the output buffer
The Problem
I have been working on implementing a super resolution model with Tensorflow Lite. I have an empty bitmap 4x the size of the input bitmap (which is bmp):
Bitmap out = Bitmap.createBitmap(...
0
votes
0
answers
35
views
how to link delegate with edgetpu compiler to compile
[Solve]
I found a post on edgetpu officail github, flex delegate is still unsupported.
Another post also metioned that 5D transpose operation is still unsupported; Currently there are no plans in ...
0
votes
0
answers
13
views
TF1 google cloud ai-platform disable training for models using tf runtime 1.15 starting from september 2022
currently we are using tf object detection api (tf1 1.15) to train MobileDet object detection model using a custom dataset. We train this model on the google cloud platform using the ai-platform ...
0
votes
0
answers
40
views
Error Tensorflow lite model -android studio
I'm trying to import a tensorflow lite model ( inception V3 model for detecting a lesions in a retinal images)
into my android studio. I've followed a tutorial . i got this erreur , i don't know how ...
1
vote
0
answers
30
views
Building TensorFlow Lite for Java Desktop without Android
As the title says im attempting to build TensorFlow Lite for Java Desktop without Android. There doesn't seem to be any official guide or build on the Tensorflow Github / Website. Does anyone know of ...
0
votes
0
answers
34
views
How to save simple math operations using a Tensorflow model?
I have some gray images to process. I don´t need to predict anything, only process the image with some math functions that I would use NumPy in another circumstance.
The problem is that I need it to ...
0
votes
0
answers
29
views
tflite trained models with python
I have a trained model, called model.tflite, and well as jpeg datasets of membership card, I am fairly new to training a models, I am using pycharm with python 3.9
what I want to achieve is to
how to ...
0
votes
1
answer
40
views
How to do tf.reshape with shape dynamiclly?
i am working on tensorflow 2.x. I want to accept an Integer as one of the Multi-Inputs, and in some stage of the model, i need to do tf.reshape with shape set by the Integer of Input. It is more like:
...
0
votes
1
answer
121
views
How to create output object for Xamarin.TensorFlow.Lite Interpreter.RunForMultipleInputsOutputs() when model is objection detection type
I am stuck trying to figure out the magic Object for working with Xamarin.TensorFlow.Lite Interpreter.RunForMultipleInputsOutputs().
My object detection model outputs the following (exported from ...
0
votes
0
answers
27
views
Per-tensor post training quantization for tf2
Model trained using tf2 is going to be run on hardware which has performance benefits if model quantized 'per-tensor'. But there is no any option for TFLiteConverter to make it 'per-tensor' for tf2. I ...
0
votes
0
answers
30
views
quantized tflite model running out of memory but regular model is working fine
I'm using a model for auto image enhancement google-research/maxim and it is working perfectly as the researchers have merged my pull. So I was working with quantization of model and got the answer ...
0
votes
0
answers
32
views
How do I prepend a keras preprocessing layer to a saved Tensorflow model?
I'm running the EfficientDet neural network on device using Tensorflow Lite. I'm trying to center crop and resize the image in the model instead of doing it on the CPU.
I have a saved model trained on ...
0
votes
0
answers
44
views
Tensorflow-Lite not recognizing interpreter
This is my code:
#include <iostream>
#include <cstdio>
#include <iomanip>
#include "src/VideoProcessing.h"
#include <opencv2/opencv.hpp>
#include <opencv2/videoio....
0
votes
0
answers
24
views
SSD monilenet v2 model : how to decode the results of raw output?
I finally have fist SSD_mobilnet_v2 model started.
[https://tfhub.dev/iree/lite-model/ssd_mobilenet_v2_100/fp32/default/1
But compare with other models of SSD_mobilnet_v1, the outoput is not decoded ...
0
votes
0
answers
81
views
ESP32-S3 TensorFlow Lite Model Issues
I worked with the new ESP32-S3 Development Board and an I2S microphone in order to create a simple voice recognition system. The software and firmware behind this are based on this project: Voice ...
0
votes
0
answers
56
views
Convert LSTM Model to TensorFlow Lite for integration in Flutter app
I have trained an LSTM Model in python to predict future prices in order to integrate it later in a flutter app. The training and conversion were successful but as soon as i run the converted model in ...
0
votes
1
answer
51
views
How to quantize pre-trained JAX model to TfLite model using tf.lite?
I have a pre-trained JAX model for MAXIM: Image Enhancement. Now to reduce the runtime and use it in production, I'll have to quantize the weights. I have 2 options since there is no direct conversion ...