# Yolov8 INT8 Tflite output

**URL:** <https://discuss.roboflow.com/t/yolov8-int8-tflite-output/3044>\
**Category:** 🤝  Community Help\
**Created:** [August 26, 2023, 6:58pm UTC](https://discuss.roboflow.com/t/yolov8-int8-tflite-output/3044 "2023-08-26T18:58:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Russo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mark_russo/32/2481_2.png) [@Mark\_Russo](https://discuss.roboflow.com/u/Mark_Russo)\
**Post date:** [August 26, 2023, 6:58pm UTC](https://discuss.roboflow.com/t/yolov8-int8-tflite-output/3044/1 "2023-08-26T18:58:13Z")

</div>

I created a Yolov8 INT8 as follows:  
yolo export model=yolov8n.pt data=coco128.yaml format=tflite int8

I followed the instructions to get the output:

# Load the TFLite model

interpreter = tf.lite.Interpreter(model\_path=“/content/drive/MyDrive/Model/yolov8n\_saved\_model/yolov8n\_full\_integer\_quant.tflite”)

interpreter.allocate\_tensors()

# Get input and output tensors.

input\_details = interpreter.get\_input\_details()

output\_details = interpreter.get\_output\_details()

# Load and preprocess an image

image = Image.open(“/content/dog.jpeg”)

image = image.resize((640, 640)) # Resize to the model’s expected input size

# Convert image to INT8 data type

input\_data = np.array(image, dtype=np.int8) # Convert image data to INT8

input\_data = np.expand\_dims(input\_data, axis=0) # Add batch dimension

# Run inference

interpreter.set\_tensor(input\_details[0][‘index’], input\_data)

interpreter.invoke()

# Get the output results

output\_data = [interpreter.get\_tensor(output\_details[i][‘index’]) for i in range(len(output\_details))]

The shape of my output is:  
Output Shape: (1, 84, 8400)

I would like to loop though the data and just print the class and score, not interested in the bounding box. Is there a way to do that ?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [September 6, 2023, 9:54am UTC](https://discuss.roboflow.com/t/yolov8-int8-tflite-output/3044/2 "2023-09-06T09:54:16Z")

</div>

Hi @Mark_Russo

Generally, on the Roboflow forum, we only have the capacity to provide support for issues and questions about Roboflow. I think you might get the best answer on places like Stack Overflow about this.
