Skip to content

Model Loader

app.ui.qt.workers.model_loader

View source code

Module for model loader; implements the Qt presentation components.

See Also

Layer: Presentation. Context: Implements the qt presentation components at this architectural boundary.

ModelLoadWorker

Bases: QThread

Background worker to load a detection model without freezing the UI.

PARAMETER DESCRIPTION
app

Application used to apply the loaded model and update affected session layers.

TYPE: Application

s_id

Identifier of the session associated with this object.

TYPE: SessionId

model_name

Registered name of the detection model.

TYPE: str

keep_manual

Preserve existing manual annotations when changing the model and refreshing model-generated boxes.

TYPE: bool DEFAULT: True

parent

Optional Qt parent object.

TYPE: QObject | None DEFAULT: None

failed = Signal(object, str, str) class-attribute instance-attribute

finished = Signal(object, str) class-attribute instance-attribute

__init__(app: Application, s_id: SessionId, model_name: str, keep_manual: bool = True, parent: QObject | None = None) -> None

run() -> None

Load the requested model in the worker thread.