-
Forgive me if I've just missed it somewhere in the documentation. But how do I connect different stages? I have Intel Realsense camera (which in my case basically outputs color and depth frame) and I want to process it and display the output (or save it, etc ...). I imagine that I should split the app to the following stages.
Is it possible to do it with pipeless? Note that results from the first stage should go to second and third. And then from both join again in the fourth stage. Thanks for your effort! Pipeless seems like really nice project. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Hi @MikiGrit , Stages are connected by default. When you provide a stream with the The frame data that one stage produces is received by the next stage. For example, imagine a stage called Note the There is also a KV store you can use in case you need to maintain some kind of internal state. The KV store helps you communicate data between the hooks o a stage. For example, you can insert some data in the For your use case, I think you can use the KV store to save the analysis: You could use as key the frame id (which is also available in the frame data that the hook receives) plus maybe a suffix like
Finally, about producing 2 outputs from a stage, that's not supported right now. A hook receives the frame data structure and produces the frame data structure. They key here is to isolate processing steps in stages. In your case, I understand the colors processing is isolated from depth, then you can create a stage for each one. I am sorry for this long response, let me know if I was not clear on something. You can definitely implement the use case with Pipeless. If you can share some extra context on the dependencies between each of the steps you need to implement I can help you designing which stages to create. It is all about isolating stages as much as possible. |
Beta Was this translation helpful? Give feedback.
Hi @MikiGrit ,
Stages are connected by default. When you provide a stream with the
stream add
command, you need to provide aframe-path
parameter, where you will list the stages in order (--frame-path stage-1,stage-2,etc
).The frame data that one stage produces is received by the next stage. For example, imagine a stage called
modify
, there you draw a bounding box and set themodified
field of the received frame data. Now, in a stagewhatever
you can access themodified
field of the frame data and it will contain the changes you did. You can find here the available frame data fields: https://www.pipeless.ai/docs/docs/v1/getting-started#frame-data-fieldsNote the
modify
field can only cont…