Can Google's AutoML export trained models for offline inference?

AutoML seems great. One big question is that - can we export the trained model for offline inference, such as with tensorflow or tensoflow lite?

Input images with dynamic dimensions in Tensorflow-lite

I have a tensorflow model that takes input images of varying size: inputs = layers.Input(shape=(128,None,1), name='x_input') <tf.Tensor 'x_input:0' shape=(?, 128, ?, 1) dtype=float32> When I...

Converting Bitmap to ByteBuffer (float) in Tensorflow-lite Android

In tensorflow-lite android demo code for image classification, the images are first converted to ByteBuffer format for better performance.This conversion from bitmap to floating point format and...

how to fix "There is at least 1 reference to internal data in the interpreter in the form of a numpy array or slice" and run inference on tf.lite

I'm trying to run inference using tf.lite on an mnist keras model that I optimized by doing post-training-quantization according to this RuntimeError: There is at least 1 reference to internal...

Using cpp tflite API in coral dev-board

I am trying to use the cpp tflite API to query a model on the dev-board. The code was tested with a usb-stick and works ok , however , on the dev-board I get an error on this...

Pytorch: Convert 2D-CNN model to tflite

I'd like to convert a model (eg Mobilenet V2) from pytorch to tflite in order to run it on a mobile device. Has anyone managed to do so? All I found, was a method that uses ONNX to convert the...

Raspberry Pi GPIO pin issue in tflite object detection

I have successfully trained my custom model and used it for object detection. However, I am facing a slight issue regarding the if-else condition on my custom model. I only have one object/class...

I need to normalize a bitmap and store it in a TensorImage. Is there any way to do this?

Bitmap holds only integer values (0-255). I need to divide each pixel value by 255. The bitmap is converted to a TensorImage and then getBuffer() is called when passing it to the interpreter that...

How can I add text-to-speech in tensorflow lite object detection android based application?

I am trying to build an app that will help visually impaired individuals detect objects/hurdles in their way. So using the TensorFlow library and the android text-to-speech once an object is...

Tensorflow - Train.py - ValueError: ('%s is not decorated with @add_arg_scope', ('nets.mobilenet.mobilenet', 'depth_multiplier'))

I'm trying to make a custom object-detection model following this tutorial: https://towardsdatascience.com/custom-object-detection-using-tensorflow-from-scratch-e61da2e10087 Everything worked fine...

reshape.cc:55 stretch_dim != -1. Node number X (RESHAPE) failed to prepare

I'm new to all this, and I need some help with running inference using a custom tflite yolov3 tiny model. The error I am getting is: File...

Tensorflow lite runtime does not install on pi4 running Ubuntu 20.04 LTS and python 3.8.2

I have a pi4 running ubuntu 20.04 LTS and python 3.8.2. I have installed the Coral USB TPU accelerator. Now I am trying to install the Tensorflow Lite Runtime from the below link for arm64 and...

Android - TFLite OD - Cannot copy to a TensorFlowLite tensor (normalized_input_image_tensor) with 307200 bytes from a Java Buffer with 4320000 bytes

I'm trying to run my own custom model for object detection. I created my dataset from Google cloud - Vision (https://console.cloud.google.com/vision/) (I boxed and labeled the images) and it...

Flutter TFLite Error: "metal_delegate.h" File Not Found

I am trying to use the Tensorflow Lite ML Model with my project, and, unfortunately, I face an error while running my project: ↳ ** BUILD FAILED ** Xcode's output: ↳ ...

ValueError: Expect x to be a non-empty array or dataset (Tensor Flow lite model maker on Collab)

I am following this tutorial on creating a custom Model using TensorFlow lite Model Maker on Collab. import pathlib path = pathlib.Path('/content/employee_pics') count =...

TPU USB Accelerator to Coral Board

I am facing a problem of connecting TPU USB accelerator to Coral Dev Board. I follow the instruction in here but there is no success. I have tried to look for the port and this is the result on...

Standard TFlite object detection model not working in MLKit

If I use the Pre-Trained TFLite Object detection model in MLKit, I get the following error: CalculatorGraph::Run() failed in Run: Calculator::Open() for node "BoxClassifierCalculator"...

Google Meet background Blur

I was curious of the new "turn on/off" background blur functionality of Google Meet (currently in test). I have investigated a bit and it seems it is using Tensorflow Lite...

Android studio 4.1 Build Fail

I installed Android Studio 4.1. I get the "build fail" error. PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to...

ValueError: Structure of Python function inputs does not match input_signature

System information OS Platform and Distribution :CentOS Linux release 7.7.1908 -TensorFlow version:2.3.0 I try to convert the tensorflow offical image caption model to TFLite model I try to...

TFLiteConverter representative_dataset from keras.preprocessing.image_dataset_from_directory dataset

I've got a dataset coming in via train_ds = tf.keras.preprocessing.image_dataset_from_directory( data_dir, validation_split=validation_split, subset="training", seed=seed, ...

ValueError: Failed to parse the model: Only models with a single subgraph are supported, model had X subgraphs

When I try to convert my saved model to a tflite model I get this error and I do not know how to progress past here. My saved_model is for mobilenet_ssd_v2 and I created it through this...

How can I use COCOAPI/PyCOCOTools to evaluate the performance of Tensorflow Lite models

I have used the Tensorflow Object Detection API to train models on a custom dataset. The tensorflow object detection API also allows evaluating the trained models on a test set and gives results...

"ValueError: cannot reshape array of size 278540 into shape (256,128,3,3)" Conversion YOLOv3 .weights to .pb

I have trained a YOLO v3 Object Detection Model. To incorporate into my flutter application I am trying to convert it to .tflite, with .pb needed as intermediate. I am getting this error with...

tflite Didn't find op for builtin opcode 'STRIDED_SLICE' version '6'

Hi i am trying to upload tflite to android studio but Didn't find op for builtin opcode 'STRIDED_SLICE' version '6' comes out. here is python code to convert .h5 file to...

Gradle - Null extracted folder for artifact: ResolvedArtifact

I've the following line in my gradle android project inside the module build.gradle dependencies { // a lot of dependencies implementation...

Fixing incorrect boundingBox coordinates?

I'm working on an object detection application for Android (in Java) using Google ML and CameraX. I'm also using a Tensorflow model, which can be found here. My issue is that the coordinates of my...

Why I got AttributeError: 'NoneType' object has no attribute 'label_map'

I am new to ML and CV filed. Just used Train a salad detector with TensorFlow Lite Model Maker on colab to train my custom model for tensorflow lite. But got this problem. AttributeError:...

Output tensor size mismatch with SSD FPN Models on mobile

I am trying to get different SSD Models from Tensorflow 2 to work in Android. The example .tflite file works fine, but different other models i've converted and tried all seem to have the same...

Unable to load tensorflow tflite model in android studio

I have trained a TensorFlow model and convert it to TensorFlow lite using the below code: # Convert the model import tensorflow as tf import numpy as np # path to the SavedModel directory is...