Skip to content

Commit d02817a

Browse files
committed
Change YOLO into RF-DETR
1 parent 5de3969 commit d02817a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

guides/useful_concepts/running_membrane_in_elixir_application.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Imagine an application that monitors a security camera feed to detect people or
1919

2020
- The Membrane Pipeline which connects to an RTSP stream, decodes the video, and extracts raw frames. It sends these frames to the external process (via a Unix socket or standard input), receives the transformed video back, re-encodes it, and broadcasts the final stream using HLS.
2121

22-
- The OS Process being a Python script running a machine learning model (like YOLO). It reads the raw frames, performs object detection, and outputs metadata (bounding boxes, class labels).
22+
- The OS Process being a Python script running a machine learning model like [RF-DETR](https://github.com/roboflow/rf-detr). It reads raw video frames and performs object segmentation, coloring the pixels that correspond to detected objects.
2323

2424
The pipeline could look similar to this one:
2525

@@ -56,7 +56,7 @@ defmodule MyProject.Pipeline do
5656
|> child(:depayloader, Membrane.H264.RTP.Depayloader)
5757
|> child(:parser, Membrane.H264.Parser)
5858
|> child(:decoder, Membrane.H264.FFmpeg.Decoder)
59-
|> child(:yolo_filter, MyProject.YoloFilter) # filter talking with the side-car Python OS process running YOLO model
59+
|> child(:segmentation_filter, MyProject.ObjectSegmentationFilter) # filter talking with the side-car Python OS process running RF-DETR model
6060
|> child(:encoder, %Membrane.H264.FFmpeg.Encoder{preset: :fast})
6161
|> via_in(:input, options: [encoding: :H264, segment_duration: @segment_duration])
6262
|> child(:hls, hls_config)
@@ -84,7 +84,7 @@ defmodule MyProject.InfrastructureSupervisor do
8484
@impl true
8585
def init(rtsp_url) do
8686
children = [
87-
{MuonTrap.Daemon, ["python", ["run_model.py", "yolo.pth"], [log_output: :debug]], restart: :transient]}
87+
{MuonTrap.Daemon, ["python", ["run_model.py", "rf-detr-large-2026.pth"], [log_output: :debug]], restart: :transient]}
8888
{MyProject.Pipeline, [input_url: rtsp_url], restart: :transient}
8989
]
9090

0 commit comments

Comments
 (0)