I’m currently working on running YOLOX-tiny on the Hailo-8 accelerator using C++, referencing the hailo-ai/Hailo-Application-Code-Examples GitHub repository.
My setup uses the imx8 CPU, and the code is based on the following example:Hailo-Application-Code-Examples/runtime/cpp/object_detection
/object_detection.cpp
I’m working on a task that requires running inference on two images simultaneously.
Currently, I’m running inference twice in a loop, one image at a time. Each inference takes around 18 milliseconds, so processing two images takes 36 milliseconds, which exceeds my target of 33 milliseconds.
To improve this, I’m considering running inference with a batch size of 2, hoping that processing both images together will reduce the overall latency.
However, the object_detection.cpp example only shows how to process a single image.
Could anyone guide me on how to modify the code to process two images at once, i.e., how to perform batched inference with a batch size of 2?