You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm convert yolov8 model to tflite. I get float16.tflite and float32.tflite files.
Then I'm trying to use this tfiles to detect object using tensor flow lite python example
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm convert yolov8 model to tflite. I get float16.tflite and float32.tflite files.
Then I'm trying to use this tfiles to detect object using tensor flow lite python example
import tensorflow as tf
import cv2
model_path = "last11_06_float32.tflite"
interpreter = tf.lite.Interpreter(model_path=model_path)
interpreter.allocate_tensors()
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
input_shape = input_details[0]['shape']
image = cv2.imread("111.png")
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image_resized = cv2.resize(image_rgb, (800, 800))
input_image = np.expand_dims(image_resized, axis=0)
input_data = np.array(input_image.reshape(input_shape), dtype=np.float32)
interpreter.set_tensor(input_details[0]['index'], input_data)
interpreter.invoke()
Problem is that I can't get detect results in good format (class, bounding box)
Can you please provide how correctly get detect results?
Best Regards,
Alex
Beta Was this translation helpful? Give feedback.
All reactions