Tracking Worker
app.application.managers.tracking_workerCentralizes tracking worker lifecycle transitions per session.
See Also
TrackingWorkerFactoryAdapter— constructs workers behind the application contractTrackingService— requests tracking workers for use cases
Layer: Application. Context: Coordinates session-scoped lifecycles for application workers and resources.
TrackingWorkerManager
Canonical owner for tracking worker start/stop/switch transitions.
| PARAMETER | DESCRIPTION |
|---|---|
app_adapter
|
Adapter that exposes application operations through the expected interface.
TYPE:
|
worker_factory
|
Factory used to create the worker managed by this class. |
__init__(app_adapter: UIApplicationInterface, worker_factory: TrackingWorkerFactoryInterface) -> None
get_tracked_data(s_id: SessionId) -> ListOfBoxesByFrameIndexAsDict
Return the tracking worker's results for a session.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose results are requested.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ListOfBoxesByFrameIndexAsDict
|
Tracked boxes grouped by frame index. |
| RAISES | DESCRIPTION |
|---|---|
TrackingWorkerNotFoundException
|
If the session has no tracking worker. |
start(s_id: SessionId, strategy_name: str, source_layer_name: str) -> None
Start tracking for a session using detections from a supported source layer.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session to track.
TYPE:
|
strategy_name
|
Tracking algorithm to run.
TYPE:
|
source_layer_name
|
Source layer A or B containing detections.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TrackingWorkerAlreadyRunningException
|
If the session already has an active tracker. |
EmptyLayerException
|
If the selected source layer contains no detections. |
UnsupportedLayerException
|
If the source layer is not A or B. |
stop(s_id: SessionId) -> None
Stop and detach the session's tracking worker, if present.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose tracking worker should stop.
TYPE:
|
switch_active_session(old_s_id: SessionId | None, new_s_id: SessionId, strategy_name: str, source_layer_name: str) -> None
Switch the tracking worker to the active session.
| PARAMETER | DESCRIPTION |
|---|---|
old_s_id
|
Previously active session, or
TYPE:
|
new_s_id
|
Session that should become active.
TYPE:
|
strategy_name
|
Tracking algorithm to use for the new active session.
TYPE:
|
source_layer_name
|
Detection layer from which tracking should start.
TYPE:
|