2,186 questions
2
votes
0
answers
36
views
Issue Replicating TF-Lite Conv2D Quantized Inference Output
I am trying to reproduce the exact layer-wise output of a quantized EfficientNet model (TFLite model, TensorFlow 2.17) by re-implementing Conv2D, DepthwiseConv2D, FullyConnected, Add, Mul, Sub and ...
2
votes
0
answers
25
views
Serial connection fails on very minor changes to tinyML voice keyword detection project (zephyr rtos, TFLM)
Below is the code snippet on dummy.cpp file, which is included in my main.c:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "dummy.h"
#include "...
1
vote
1
answer
260
views
Play Console warning: “Library that does not support 16 KB: base/lib/x86_64/libtensorflowlite_jni.so” when uploading AAB with TensorFlow Lite
I’m uploading my Android App Bundle (AAB) to Google Play Console and getting this warning:
Library that does not support 16 KB:
base/lib/x86_64/libtensorflowlite_jni.so after upgrading the lib
...
0
votes
0
answers
73
views
Compiling Tensorflow/tflite C++ for ios
I want to build a framework for iOS so that I can run inference in C++ on both Android and iOS via Flutter.
So far I have managed to compile the libs for Android and succesfully loaded a model on my ...
0
votes
0
answers
34
views
Tensorflow lite not able to train model on device calling a signature function
I am trying to use tensorflow lite to call a train() signature function in my tflite model. I keep getting this error:
java.lang.IllegalStateException: Model initialization failed. The TensorFlow ...
0
votes
0
answers
71
views
Tensorflow lite sample code does not work from the tutorials
https://ai.google.dev/edge/litert/models/signatures#java
I have the model generated, I have the model loaded. I verified this because I can see the signatures that are available:
I don't know what ...
0
votes
0
answers
54
views
How to train tensorFlow AI model for Android in .task format
I am trying to retrain MediaPipe Gusture Recognition model with new dataset. But I am not able to install MediaPipe Model Maker and tflite-support libraries in any of work environments like colab, my ...
0
votes
0
answers
50
views
Could not build Objective-C module 'TensorFlowLiteSelectTfOps'
I'm working on an iOS project where I need to use both TensorFlowLiteSwift and TensorFlowLiteSelectTfOps. I installed them via CocoaPods by including the following in my Podfile:
pod '...
0
votes
0
answers
17
views
Inverting back resized and Grayscaled TensorBuffer
I have a bg removal model that takes in 512x512 RGB image and outputs a 512x512 Grayscale.
How can i resize it back to original Widths and Heights, and invert this creepy Grayscale back to RGB?
...
2
votes
1
answer
51
views
Pytorcch segmentation model not working after being converted to TFLite and being deployed on Android
I have trained a YOLOv8 instance segmentation model using Ultralytics. I then tried to convert it to TFLite using model.export(format=tflite)
I then placed it here
Future<void> analyzeImage(...
1
vote
0
answers
131
views
Model ouput of Android(Kotlin) tflite model not matching Python output for same input
I have already asked this question over on Google Ai for Devs, but have not received an answer, so I will try my luck here. I am currently working on testing inference speeds of different object ...
0
votes
1
answer
161
views
Tensorflow Lite (LiteRn) Deployment in Android using Kotlin, Error 'FULLY_CONNECTED' version '12' not found
I am trying to integrate deep learning model to my android application. But I am getting stuck on running the model in my application.
I have created a model that uses tensorflow for detecting the ...
0
votes
0
answers
54
views
Mismatch Between Quantized TFLite Layer Outputs and Expected Mathematical Values When Using get_tensor()
I am trying to extract intermediate outputs from a quantized TFLite model using the TFLite interpreter. The goal is to verify that the model's intermediate outputs match the mathematically expected ...
0
votes
0
answers
129
views
Compilation of the model using tflite micro
I am trying to build a model using tflite micro but it is not working. All the files I have added but linking is not working. Can anyone help in this?
Makebuild files. txt
GNU nano 7.2 ...
0
votes
0
answers
34
views
Different Model Outputs on Python and Flutter
I'm having trouble because the TensorFlow Lite model produces very different outputs in Python and on Android, even though I'm providing the same input in both. On the Flutter side, I'm using the ...
1
vote
0
answers
23
views
Error when converting .onnx to tensorflow lite
I want to convert an .onnx file to tflite file but it is giving me this error .
AttributeError: module 'tensorflow.python.framework.type_spec' has no attribute '_NAME_TO_TYPE_SPEC'
here is my code:
...
0
votes
1
answer
226
views
Limelight Detector Notebook suddenly not working. Any ideas?
I've been trying to train a custom detector model for a LimeLight3A through the Google Colab notebook they provided. I successfully trained one on April 4th, but since then any of my attempts at ...
1
vote
1
answer
38
views
How can I convert a TensorFlow 1 "BigGAN" model on Kaggle to TensorFlow Lite format?
How can I convert a TensorFlow 1 "BigGAN" model on Kaggle to TensorFlow Lite format?
https://www.tensorflow.org/hub/tutorials/biggan_generation_with_tf_hub?hl=ja
I am trying to implement the ...
-1
votes
1
answer
222
views
Tensorflow Lite vs tflite
My understanding is that tflite was developed to avoid installing the full package of Tensorflow in embedded system such Raspberry Pi, saving processing and power resources.
Following the directions ...
2
votes
1
answer
84
views
Running tflm on bare metal and experiencing an output tensor issue
I have my own custom trained tflite model that I trained and converted to a C++ source file. As part of the project, it is meant to run on a Zync-7000 and I am doing it with a bare metal ...
-1
votes
2
answers
79
views
Saving and Loading Images for Tensorflow Lite
Planning on using Tensorflow Lite for image classification.
To test the model, using Fashion-MNIST database to create the model following a Tensorflow basic example from their website. Created and ...
-1
votes
1
answer
182
views
Installing TensorflowLite (LiteRT) in Raspberry Pi Zero W
Trying to install TensorFlow Lite (liteRT) in Raspberry Pi Zero W but not working. Following these directions:
https://ai.google.dev/edge/litert/microcontrollers/python
https://pypi.org/project/ai-...
1
vote
1
answer
78
views
How can I save a model with input shape (1, None, None, 3) with None fixed to 256?
I have questions about a model obtained from TensorFlow Hub.
I am trying to use "movenet" with the following source code.
https://www.kaggle.com/models/google/movenet/tensorFlow2
(1) The ...
0
votes
1
answer
60
views
How can I save a TFLite model with a fixed input shape after using interpreter.resize_input_tensor?
I am trying to run inference using the TFLite model of multipose-lightning-tflite-float16 distributed by movenet.
https://www.kaggle.com/models/google/movenet/tfLite
However, this model cannot be used ...
2
votes
1
answer
115
views
Xcode SwiftUI Preview fails due to TensorFlowLiteC. Can it be excluded or fixed?
When trying to preview a SwiftUI View, the preview canvas crashes with a linker error for TensorFlowLiteC. This library does not need to be loaded for Preview.
Is there a way to work around this like ...
0
votes
0
answers
69
views
How to handle tflite model to prevent "Phase Script Execution Failed" error in React Native App (Not Expo)
The beginning of the app.tsx file for my react native app looks like this:
import {PaintStyle, Skia} from '@shopify/react-native-skia';
import React, {useEffect} from 'react';
import {StyleSheet, Text}...
0
votes
0
answers
22
views
Unknown type name when opening Runner.xcworkspace within Xcode error
Whenever I try to build my app in Xcode, TflitePlugin has many errors such as unknown type name "TfLiteTensor" and unknown type name "TfLiteModel". I would imagine this is caused ...
1
vote
2
answers
279
views
Select TensorFlow op(s), included in the given model, is(are) not supported by this interpreter. when trying load the model in flutter
getting this error while trying to load a tf model I converted to tflite so I can use it in my app
I did what the message suggests and added the org.tensorflow:tensorflow-lite-select-tf-ops dep in the ...
1
vote
0
answers
109
views
Tflite Detection Postprocess Explanation
I am trying to replicate the working of TFLITE_DETECTION_POSTPROCESS layer for a custom object detection model.
Does anyone has any reference for TFLITE_DETECTION_POSTPROCESS layer implementation in ...
2
votes
0
answers
29
views
Same output with different inputs in facenet machine learning model in iOS using tensorflow lite
I am implementing face recognition and clustering application in iOS, For that first I have detected faces from image and cropped face images using MLKit, That works well.
Now I am giving cropped face ...
0
votes
0
answers
44
views
java.lang.AssertionError: "Does not support data type INT32" in Android Studio
I am developing an application in Android Studio using a TensorFlow Lite model. When running the app, I encounter the following error:
java.lang.AssertionError: TensorFlow Lite does not support data ...
0
votes
0
answers
43
views
Failed to run model, Interpreter busy
I was trying to create a TFLite live object detection project by cloning from this repo. I've followed all the instructions provided by the plugin properly. But Tflite.detectObjectOnFrame() giving an ...
0
votes
0
answers
83
views
How to process pose, left hand, right hand, and face landmarks in the correct order using MediaPipe?
I am working on a project where I need to process pose landmarks, left hand landmarks, right hand landmarks, and face landmarks in a specific order using MediaPipe. However, the landmarks are not ...
0
votes
0
answers
54
views
Should I run tf-lite models on front-end or back-end on a Flutter app
I am building an app that uses a tf-lite model called MoveNet which recognizes 17 body key points, as well as my own tf-lite model on top of that (lets call it PoseClassifier) to classify poses based ...
0
votes
0
answers
220
views
Why am I unable to use TensorFlow Lite with ML Model Binding in my Android project?
I'm building an Android app using TensorFlow Lite with ML Model Binding. I've followed the required setup but can't get the TensorFlow Lite model to work in my MainActivity. Specifically, the IDE ...
1
vote
0
answers
24
views
Cannot copy from a TensorFlowLite tensor (StatefulPartitionedCall:8: Android app
Error message:
java.lang.IllegalArgumentException: Cannot copy from a TensorFlowLite tensor (StatefulPartitionedCall:8) with 393216 bytes to a Java Buffer with 512 bytes.
I took gpt2 head model from ...
2
votes
1
answer
316
views
How to preprocess an image to match TFLite model input shape [1, 640, 640, 3] in Flutter?
Problem:
I am working on a Flutter project where I need to run a TensorFlow Lite (TFLite) object detection model. The model has specific input and output shape requirements, and I am encountering ...
0
votes
0
answers
69
views
Why are the probabilities always the same with MobileNet V2 model (mobilenet_v2_1.4_224.tflite)?
I am implementing a TensorFlow Lite model in my Android application using the mobilenet_v2_1.4_224.tflite model, which I downloaded from the TensorFlow GitHub repository:
MobileNet from TensorFlow ...
0
votes
1
answer
98
views
Error - undefined module "org.tensorflow:tensorflow-lite:+" when building aosp bundled with custom system app
Building aosp for target 'lunch sdk_phone_x86_64'
I have included a custom system app which uses tensorflow hence within the Android.bp this is the dependency declaration.
static_libs: [
"...
1
vote
0
answers
104
views
How to Integrate ESP32-CAM with Chirale_TensorFlowLite for Al-Based Human Detection?
I am working on a project using an ESP32-CAM to detect humans and control appliances like a fan and a light based on Al inference. For this, I am using the Chirale_TensorFlowLite library to run a ...
0
votes
1
answer
146
views
Getting "Unable to resolve" error when trying to load .bin file in react-native expo
I am trying to use Tensorflow for one of my project, and i have two .bin files that i want to load locally. I added them in assets folder, and now using code like:
const modelWeights1 = await require('...
1
vote
0
answers
59
views
How to set the name of a custom operator in TensorFlow Lite
I'm trying to create a custom operator in TFLite, wrapping up scipy's lfilter function. The goal being to bind it to its implementation in C++ when invoking the TFLite interpreter (from the equivalent ...
0
votes
0
answers
78
views
Large app size for using 'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly'
I am using -
'TensorFlowLiteSwift'
'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly'
using pod for running my Tflite model in the iOS app. However, the app size is extremely large, almost 202 MB. If ...
1
vote
0
answers
28
views
Is VertexAI Edge TFLite GPU Enabled?
I am running my TFLite model on mobile, using react-native-fast-tflite to handle the file for mobile app development.
I updated my config to enable CoreML:
[
'react-native-fast-tflite',
...
1
vote
1
answer
146
views
ML model from Edge Impulse runs 5 times slower after porting it from Arduino IDE to ESP-IDF on ESP32
I've been struggling with this one for a while so here we go :
I've been trying to match the speed of inference for an ML model I generated with Edge Impulse originnaly to Arduino, then to ESP-IDF for ...
1
vote
1
answer
60
views
Importing OpenCV and TensorFlow Lite into ns-3.38
I am currently working on a project that involves using OpenCV and TensorFlow Lite within the ns-3.38 simulation environment. Despite several attempts, I am facing difficulties with configuring and ...
0
votes
1
answer
178
views
Yolo pose estimation output processing in Android Tensorflow Lite API
Im trying to implement yolo11n-pose_float16.tflite model to Android Kotlin project. But I cant get correct keypoints on output because there is something I did wrong. I want to draw only the skeleton ...
1
vote
1
answer
94
views
Model conversion from TensorFlow to TensorFlow Lite did not work because not all parameters were quantized to int8
I've tried to convert a TensorFlow model to .tflite, I found the parameters of the .tflite are not all int8, while some parameters also float32. Only the dense parameters are int8, while the conv2d ...
0
votes
1
answer
230
views
Quantization Aware Training: ValueError: `to_quantize` can only either be a keras Sequential or Functional model
I'm Trying to test Quantization Aware Training from TensorFlow Lite. The following source code creates an AI model (variable: model) trained with the MNIST dataset (just 1 epoch for testing purpose). ...
0
votes
1
answer
864
views
ValueError: `to_quantize` can only either be a keras Sequential or Functional model
I'm currently learning TinyML with Tensorflow Lite and Tensorflow Lite for Micro.
I'm working with the book "Hands-on TinyML" from R. Banerjee.
I'm trying to quantize a model but it ...