Skip to content

Worker Factory Interface

app.application.interfaces.detection.worker_factory_interface

View source code

Interface contract for creating detection worker instances.

See Also

Layer: Application. Context: Defines protocol boundaries consumed by application orchestration.

DetectionWorkerFactoryInterface

Bases: Protocol

Create start-ready detection workers behind an interface seam.

Layer: Application. Context: Coordinates use-case behavior through domain services and application contracts.

create(session_id: SessionId, detection_engine: DetectionEngineInterface) -> DetectionWorkerInterface

Create a worker that runs detection for a session.

PARAMETER DESCRIPTION
session_id

Session whose frames the worker will process.

TYPE: SessionId

detection_engine

Model engine used to detect objects in each frame.

TYPE: DetectionEngineInterface

RETURNS DESCRIPTION
DetectionWorkerInterface

Detection worker implementing the application contract.