Open fasih0001 opened 1 month ago
In the function you posted:
def hook(frame_data, _):
frame = frame_data['original']
mask = frame_data.get('output', [])
threshold_value = 0.3 # Adjust this value as needed
mask = cv.threshold(output[0], threshold_value, 1, cv.THRESH_BINARY)[1] # Single mask
if len(mask) > 0:
h, w = mask.shape
output[0]
is not defined as the error says
This error is still there :
Unable to link new uridecodebin pad to videoconvert sink pad
and I cannot understand this warning as I have provided a stream uri through the pipeless add stream command:
pipeless_ai::stages::inference::onnx] No inference input data was provided. Did you forget to add it at your pre-process hook?
Can you help me rewrite the post processing hook in the correct way? I think, all the issues I'm facing is due to post processing processing hook. In the code, I am trying to segment the frames and then draw bounding boxes over the binary masks.
@miguelaeh can you help me with it?
Unable to link new uridecodebin pad to videoconvert sink pad
To debug this you can set the GST_DEBUG=3
env var, it should show more information about why it cannot be linked.
pipeless_ai::stages::inference::onnx] No inference input data was provided. Did you forget to add it at your pre-process hook?
This is because you are setting frame_data['input'] = input_frame
in your pre-process instead of frame_data['inference_input'] = input_frame
Error Description I am trying to run a custom segmentation model on pipeless that was converted to onnx file to segment out the objects and then draw bounding box on the binary masks produced as output of the model. I have written the pre-processing and post-processing python scripts. They seem fine and I have tried them on a single image independently using the onnx model and output is correct. So when I run inference on the pipeless I get the following error: I'm using the rtsp streaming protocol for the live stream. I have provided a rtsp stream using the following command: pipeless add stream --input-uri "rtsp://<>" --output-uri "screen" --frame-path "Inference" The following error occurs:
The pre and post processing scripts I have written Pre-Processing:
Post-Processing: