2,185 questions
1
vote
0
answers
24
views
using Google LiteRT from a Tensorflow Lite model
data = tf.keras.utils.image_dataset_from_directory('snails', image_size=(256,256), shuffle=True)
class_names = data.class_names
num_classes = len(class_names)
print("Classes:", class_names)
...
Tooling
0
votes
0
replies
92
views
Looking for a working TensorFlow Lite (.tflite) NSFW detection model for Android
I specifically need:
-A real .tflite file (not .onnx, not .pb, not .pth, not .mlmodel)
-Image classifier model (NOT segmenter or detector)
-Preferably with 5 classes or at least 2: drawings, hentai, ...
2
votes
0
answers
77
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
32
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 "...
2
votes
1
answer
522
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
91
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
41
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
76
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
60
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
120
views
Could not build Objective-C module 'TensorFlowLiteSelectTfOps'
I'm working on an iOS project with TFLite model. For initializing the model, I did:
var options = Interpreter.Options()
options.threadCount = 2
interpreter = try Interpreter(modelPath: modelPath, ...
0
votes
0
answers
18
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
52
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
133
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
191
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
63
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
148
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
38
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
33
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
293
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
47
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
233
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
96
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
201
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
90
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
67
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
126
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
76
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
27
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
321
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
128
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
34
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
48
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
47
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
101
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
61
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
236
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
25
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
336
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
111
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
151
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
70
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 ...
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
155
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
180
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
103
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
250
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). ...