Skip to content

Commit

Permalink
Merge pull request #967 from roboflow/fix/send-raw-image-over-webrtc-…
Browse files Browse the repository at this point in the history
…if-no-visualisation-available

Send raw image over WebRTC if no visualisation is available
  • Loading branch information
grzegorz-roboflow authored Jan 22, 2025
2 parents 8aae13e + 8d3875d commit af73997
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ 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 af73997

Please sign in to comment.