From d31636de2449f49f1e15700734c0e0b1afb1c360 Mon Sep 17 00:00:00 2001 From: Ross Lote <1877650+RossLote@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:56:30 +0000 Subject: [PATCH] Allow easier inheritance of pipeline --- inference/core/interfaces/stream/inference_pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inference/core/interfaces/stream/inference_pipeline.py b/inference/core/interfaces/stream/inference_pipeline.py index d08e366926..896e066206 100644 --- a/inference/core/interfaces/stream/inference_pipeline.py +++ b/inference/core/interfaces/stream/inference_pipeline.py @@ -282,7 +282,7 @@ def init( on_prediction = partial(multi_sink, sinks=[on_prediction, al_sink]) on_pipeline_start = active_learning_middleware.start_registration_thread on_pipeline_end = active_learning_middleware.stop_registration_thread - return InferencePipeline.init_with_custom_logic( + return cls.init_with_custom_logic( video_reference=video_reference, on_video_frame=on_video_frame, on_prediction=on_prediction, @@ -422,7 +422,7 @@ def init_with_yolo_world( f"Could not initialise yolo_world/{model_size} due to lack of sufficient dependencies. " f"Use pip install inference[yolo-world] to install missing dependencies and try again." ) from error - return InferencePipeline.init_with_custom_logic( + return cls.init_with_custom_logic( video_reference=video_reference, on_video_frame=on_video_frame, on_prediction=on_prediction, @@ -642,7 +642,7 @@ def init_with_workflow( profiler=profiler, profiling_directory=profiling_directory, ) - return InferencePipeline.init_with_custom_logic( + return cls.init_with_custom_logic( video_reference=video_reference, on_video_frame=on_video_frame, on_prediction=on_prediction,