How to convert .pb to TFLite format?

I am making a wild guess here, maybe you entered input_arrays=input. Which may not be true. Use this script to find the name of the input and output arrays of the frozen inference graph import tensorflow as tf gf = tf.GraphDef() m_file = open(‘frozen_inference_graph.pb’,’rb’) gf.ParseFromString(m_file.read()) with open(‘somefile.txt’, ‘a’) as the_file: for n in gf.node: the_file.write(n.name+’\n’) … Read more

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

The problem is that you are passing tuples with floats into the function’s parameters as the points. Here is the error reproduced: import cv2 import numpy as np img = np.zeros((600, 600), ‘uint8’) c1 = 50.2, 12.4 c2 = 88.8, 40.8 cv2.rectangle(img, c1, c2, (255, 0, 0), -1) Output: Traceback (most recent call last): File … Read more