pipeless-ai / pipeless

An open-source computer vision framework to build and deploy apps in minutes
https://pipeless.ai
Apache License 2.0
707 stars 32 forks source link

Error while running onnx runtime #146

Open arunbpf opened 3 months ago

arunbpf commented 3 months ago

Hi,

I am trying to run onnx-yolo example using miguelaeh/pipeless docker image. Stage is created successfully, but when adding a stream and running the pipeline, I am getting the below error.

ERROR pipeless_ai::stages::languages::python] Error executing hook: AttributeError: 'numpy.ndarray' object has no attribute 'get'
[2024-06-13T06:40:27Z WARN  pipeless_ai::pipeline] No frame returned from path execution, skipping frame forwarding to the output (if any)

Looks like there is no output frame coming from the runtime, not sure why. I was able to use the same input video with the yolo example (pytorch) successfully and get the output video. I am using file input and output. Would really appreciate any help regarding this issue.

miguelaeh commented 3 months ago

Hello @arunbpf ,

I guess there is some error in the post-processing code. Maybe we have some typo I the example. Taking a quick look it could be happening in this line: https://github.com/pipeless-ai/pipeless/blob/a23652b75e380a782ad9e5ee4ab876bde3ec9bde/examples/onnx-yolo/post-process.py#L9 in the model_output.get.

Could you try adding a print before that line to see the actual content of model_output? It seems like it is directly a numpy array and not a dict. You should have the stage locally in a folder so you can directly modify the code there.