tensorflow-lite

pip3 can't download the latest tflite-runtime

pip3 can't download the latest tflite-runtime Question: The current version of tflite-runtime is 2.11.0: https://pypi.org/project/tflite-runtime/ Here is a testing for downloading the tflite-runtime to the tmp folder: mkdir -p /tmp/test cd /tmp/test echo "tflite-runtime == 2.11.0" > ./test.txt pip3 download -r ./test.txt Here is the error: ERROR: Could not find a version that satisfies the …

Total answers: 2

Tensorflow Lite, Image size is zero error

Tensorflow Lite, Image size is zero error Question: Actually, my question is very simple. I would like to use my own data in tensorflow lite model. So, i wrote these line of codes: root_path = r"C:Users90531Desktopdatasetb" image_path = os.path.join(os.path.dirname(root_path), ‘1602854451425’) data = DataLoader.from_folder(image_path) Also, this is the error that I encountered: File "C:Users90531AppDataRoamingPythonPython39site-packagestensorflow_exampleslitemodel_makercoredata_utilimage_dataloader.py", line 73, …

Total answers: 2

Image count is zero

Image count is zero Question: I am trying to create image classification model using tensorflow lite for android app here: https://www.tensorflow.org/tutorials/images/classification However, I am using my local directory. Here is my code: import matplotlib.pyplot as plt import numpy as np import os import PIL import tensorflow as tf from tensorflow import keras from tensorflow.keras import …

Total answers: 2

How to continue training with checkpoints using object_detector.EfficientDetLite4Spec tensorflow lite

How to continue training with checkpoints using object_detector.EfficientDetLite4Spec tensorflow lite Question: Preciously I have set my EfficientDetLite4 model "grad_checkpoint=true" in config.yaml. And it had successfully generated some checkpoints. However, I can’t figure out how to use these checkpoints when I want to continue training based on them. Every time I train the model it just …

Total answers: 1

ValueError: Image size is zero in Google Colab

ValueError: Image size is zero in Google Colab Question: I’m learning ML model training following this tutorial from Tensorflow. I have uploaded my own dataset from my computer to a folder named "sample_arrow" in Google Colab and specified the path to it: image_path = ‘sample_arrow’ The folder contains images, the size is not 0. But …

Total answers: 2

(-5:Bad argument) in function 'rectangle' – Can't parse 'pt1'. Sequence item with index 0 has a wrong type

(-5:Bad argument) in function 'rectangle' – Can't parse 'pt1'. Sequence item with index 0 has a wrong type Question: As I detect my tflite file, the problem happened. The command I wrote. python detect.py –weights ./checkpoints/yolov4-tiny-tf.tflite –size 416 –model yolov4 –image D:yolov4trainingtensorflow-yolov4-tflite-masterdatarice.jpg –framework tflite –tiny true And the wrong message: cv2.rectangle(image, c1, c2, bbox_color, bbox_thick) …

Total answers: 4

ValueError: Cannot set tensor: Dimension mismatch. Got 3 but expected 4 for input 0

ValueError: Cannot set tensor: Dimension mismatch. Got 3 but expected 4 for input 0 Question: I am new to TF and Keras. I have model trained and saved using following code from tensorflow.keras.preprocessing.image import ImageDataGenerator import tensorflow as tf from tensorflow.python.keras.optimizer_v2.rmsprop import RMSprop train_data_gen = ImageDataGenerator(rescale=1 / 255) validation_data_gen = ImageDataGenerator(rescale=1 / 255) # Flow …

Total answers: 2

How to redress/improve my CNN model? How to handle validation accuracy frozen problem?

How to redress/improve my CNN model? How to handle validation accuracy frozen problem? Question: The validation set accuracy is frozen at 0.0909. Is this underfitting? How to address the issue to get better model accuracy. The model is later converted to tflite to be deployed at android. My model: model = Sequential([ Conv2D(filters=32, kernel_size=(3, 3), …

Total answers: 1

Tensorflow Lite Android Object Detection — Mobile SSD models are expected to have exactly 4 outputs, found 8

Tensorflow Lite Android Object Detection — Mobile SSD models are expected to have exactly 4 outputs, found 8 Question: PROBLEM ENCOUNTERED: E/AndroidRuntime: FATAL EXCEPTION: main Process: org.tensorflow.lite.examples.detection, PID: 14719 java.lang.AssertionError: Error occurred when initializing ObjectDetector: Mobile SSD models are expected to have exactly 4 outputs, found 8 Problem Description Android Application Source: TensorFlow Lite Object …

Total answers: 2

Encountered unresolved custom op: TensorListFromTensor. Node number 4 (TensorListFromTensor) failed to prepare

Encountered unresolved custom op: TensorListFromTensor. Node number 4 (TensorListFromTensor) failed to prepare Question: I am new to Tensor flow and machine learning. Here I am trying to create a text classification of my own. I am facing below issue. I am getting below error while loading tflite model on Android. Process: org.tensorflow.lite.examples.textclassification, PID: 12031 java.lang.IllegalStateException: …

Total answers: 2