Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to perform inference using yolov8 on edgetpu. #2

Open
Arslan-Mehmood1 opened this issue Aug 25, 2023 · 0 comments
Open

How to perform inference using yolov8 on edgetpu. #2

Arslan-Mehmood1 opened this issue Aug 25, 2023 · 0 comments

Comments

@Arslan-Mehmood1
Copy link

Arslan-Mehmood1 commented Aug 25, 2023

I have exported my yolov8 model using ultralytics to edgetpu and tflite formats. I have performed inference of yolov8 edge tpu model on USB coral accelerator. I have the predictions result. I dont know how to parse these predictions Please help out.

Prediction Output:

python3 detect_image.py -m yolov8_int8_edgetpu.tflite -i image.jpg -o inference/detection.jpg
----INFERENCE TIME----
Note: The first inference is slow because it includes loading the model into Edge TPU memory.

Output Details :
[{'name': 'PartitionedCall:0', 'index': 517, 'shape': array([ 1, 251, 33600], dtype=int32), 'shape_signature': array([ 1, 251, 33600], dtype=int32), 'dtype': <class 'numpy.float32'>, 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]

Output Data Shape:
(1, 251, 33600)
Output Data :
[[[6.8984828e-03 8.4312847e-03 1.4987010e-02 ... 9.1422123e-01
9.3176806e-01 9.5353013e-01]
[8.2258508e-03 8.4541356e-03 8.1687719e-03 ... 9.7039759e-01
9.6757478e-01 9.6137410e-01]
[1.3865395e-02 1.7534753e-02 1.8626634e-02 ... 2.2020416e-01
1.8798628e-01 1.2658052e-01]
...
[8.6820194e-07 1.4569782e-06 1.3537380e-06 ... 4.9203813e-05
3.5585672e-05 3.4364115e-05]
[1.6130493e-06 1.2267126e-06 2.5768195e-06 ... 4.6514473e-05
4.1418200e-05 3.8001206e-05]
[4.9328037e-07 1.4711668e-06 1.1877161e-06 ... 3.2545999e-05
3.1352149e-05 2.2766470e-05]]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant