Skip to content

Commit

Permalink
Send raw image over WebRTC if no visualisation is available
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-roboflow committed Jan 22, 2025
1 parent 8aae13e commit 891ef4b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,16 @@ def start_loop(loop: asyncio.AbstractEventLoop):
def webrtc_sink(
prediction: Dict[str, WorkflowImageData], video_frame: VideoFrame
) -> None:
if parsed_payload.stream_output[0] not in prediction:
from_inference_queue.sync_put(
video_frame.image
)
return
if prediction[parsed_payload.stream_output[0]] is None:
from_inference_queue.sync_put(
video_frame.image
)
return
from_inference_queue.sync_put(
prediction[parsed_payload.stream_output[0]].numpy_image
)
Expand Down

0 comments on commit 891ef4b

Please sign in to comment.