Skip to content

Helpers

app.infrastructure.detection.model.helpers

View source code

Module for helpers; implements concrete processing and I/O behind application-facing contracts.

See Also

Layer: Infrastructure. Context: Implements concrete processing and i/o behind application-facing contracts at this architectural boundary.

DETECTION_MODEL_PROVIDER_ALL = 'all' module-attribute

DETECTION_MODEL_PROVIDER_TORCH = 'torch' module-attribute

DETECTION_MODEL_PROVIDER_YOLO = 'yolo' module-attribute

DETECTION_MODEL_PROVIDER_MTCNN = 'mtcnn' module-attribute

get_available_detection_model_names_as_str() -> list[str]

Return list of all available model names (Dummy, Torch, YOLO variants).

get_detection_model_provider_options() -> list[tuple[str, str]]

Return provider dropdown options in display order.

RETURNS DESCRIPTION
list[tuple[str, str]]

(provider_id, display_label) pairs in the order used by the model selector.

resolve_detection_model_provider(model_name: str) -> str

Map a model name to its provider/family identifier.

PARAMETER DESCRIPTION
model_name

Registered model name to classify.

TYPE: str

RETURNS DESCRIPTION
str

Provider identifier ("all", "torch", "yolo", or "mtcnn").

get_detection_model_names_as_view_model_by_provider_id(provider_id: str = DETECTION_MODEL_PROVIDER_ALL) -> list[ModelSelectionViewModel]

Retrieves a list of available detection model with their display names.