EIM Model on Raspberry Pi 5

Question/Issue:
failed classification the result bounding box is always []

Project ID:
https://studio.edgeimpulse.com/studio/510570/impulse/8/deployment

Context/Use case:
hi All, i try use raspberry pi 5 and camera module v3 with this code:

and this model

https://studio.edgeimpulse.com/studio/510570/impulse/8/deployment

i modify the code to:

model_file = “modelfile.eim” # Trained ML model from Edge Impulse
draw_fps = True # Draw FPS on screen
res_width = 96 # Resolution of camera (width)
res_height = 96 # Resolution of camera (height)
rotation = 0 # Camera rotation (0, 90, 180, or 270)
cam_format = “RGB888” # Color format
img_width = 96 # Resize width to this for inference
img_height = 96 # Resize height to this for inference

and i think the code if use my model is failed to classification with this results:

res {‘result’: {‘bounding_boxes’: []}, ‘timing’: {‘anomaly’: 0, ‘classification’: 1, ‘dsp’: 0, ‘json’: 1, ‘stdin’: 7}}

the bounding_box is always return []

Is there any wrong configuration?

here is my full code inference_raspi_5 - Pastebin.com

maybe @louis or @Eoin can help me?

Thank you

ah, after change from edge_impulse_linux.runner import ImpulseRunner to from edge_impulse_linux.image import ImageImpulseRunner seems working well,

one more question, how to get detailed precision like two number after comma for inferencing time? i got only 0 and or exact number, i want to know like 0.XX.

Thank you

Hello @nugro,

Glad you found your solution.

how to get detailed precision like two number after comma for inferencing time

:thinking: Good question. I am not 100% sure but can you try to change this:

res['timing']['dsp']

to this:

res['timing']['dsp_us']

We are using the microseconds in our C++ sdk but I am not sure this value can be easily retrieved: inferencing-sdk-cpp/classifier/ei_run_classifier.h at master · edgeimpulse/inferencing-sdk-cpp · GitHub

Let me know if this works for you.

Best,

Louis