Hello,
I try to use a YOLO model on 8 camera streams in parallel on the Metis PCIe card. 20-30 fps per camera stream is all I need. With the 548 fps end-to-end stated for YOLOv8s in https://axelera.ai/metis-aipu-benchmarks, it should be possible to reach ~68 fps per camera.
As a small test I wrote a python script, which creates a inference stream with 8 videos as input:
from axelera.app import config, display, inf_tracers
from axelera.app.stream import create_inference_stream
def run(window, stream):
for frame_result in stream:
window.show(frame_result.image, frame_result.meta, frame_result.stream_id)
fps = stream.get_all_metrics()s'end_to_end_fps']
print(fps.value)
def main():
tracers = inf_tracers.create_tracers('core_temp', 'end_to_end_fps', 'cpu_usage')
stream = create_inference_stream(
network="yolov5s-v7-coco",
sources=e
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
str(config.env.framework / "media/traffic1_1080p.mp4"),
],
tracers=tracers,
)
print(stream.sources)
with display.App(visible=True) as app:
wnd = app.create_window("App", (900, 600))
app.start_thread(run, (wnd, stream), name='InferenceThread')
app.run(interval=1 / 10)
stream.stop()
if __name__ == "__main__":
main()
The tracers report end-to-end fps of ~80 fps, similar to when I run it only with one video as an input. But the output shown in the window is very shaky, I guess less than 10 fps per camera.
Probably I am using the stream interface of the python API wrong. Can someone please help me with this issue? What is the recommended way to run inference on multiple camera streams (or videos as a test) in parallel?
Thanks
Maximilian