Detection lots of pictures

Dear Community,

I am trying to detect 50 images using app_callback, but it seems that the .hef module is reloaded for each detection.

My goal is to simulate an Edge Computing environment with Hailo, where images are processed one by one instead of in batches.

Is there a way to load the model once and keep it running, waiting for new images to be processed as they arrive?

Does Hailo provide an approach similar to YOLOv8 in Python, where we can load the model a single time and continuously infer on incoming images without reloading the .hef file each time?

Any insights or experiences would be greatly appreciated!

Thanks in advance!

Hey @Bianca_Chin,

The app_callback only processes detections, while inference is handled within the pipeline using the hailonet plugin. The model is loaded once at the start and remains active as long as GStreamer is running.

To achieve your requirement, you need to modify the pipeline to support processing a folder of images with specific formats. Once configured, you can provide the folder path, and the pipeline will handle inference on those images automatically.

You will have to do these changes in this file hailo-apps-infra/hailo_apps_infra/gstreamer_app.py at main · hailo-ai/hailo-apps-infra · GitHub

When you install hailo-rpi-examples you can find the file in the virtual envoriment

Let me know if you need any more help!