Skip to content

Session Settings View Model

app.domain.views.session_settings_view_model

View source code

Module for session settings view model; defines application concepts without UI or infrastructure dependencies.

See Also

Layer: Domain. Context: Defines application concepts without ui or infrastructure dependencies at this architectural boundary.

SessionSettingsViewModel dataclass

UI-ready snapshot of settings (pre-formatted for widget binding).

ATTRIBUTE DESCRIPTION
detection_model_name

Selected detection model name.

TYPE: str

min_detection_confidence

Detection confidence threshold.

TYPE: float

chosen_labels

Comma-separated labels string for direct widget binding.

TYPE: str

tracking_strategy

Selected tracking strategy name.

TYPE: str

tracking_source

Layer used as tracker input.

TYPE: str

reid_embedding_dim

Re-ID embedding size for tracking.

TYPE: int

min_iou

IoU threshold for track matching.

TYPE: float

min_tracker_confidence

Confidence floor for tracked boxes.

TYPE: float

confidence_decay

Per-frame confidence decay value.

TYPE: float

offline_stitching_enabled

Whether broken tracks are bridged offline.

TYPE: bool

max_stitch_gap

Maximum number of missed frames to bridge.

TYPE: int

gsi_smoothness

Gaussian interpolation lengthscale.

TYPE: float

privacy_features_enabled

Whether conservative privacy rules are active.

TYPE: bool

resist_box_shrinking

Whether track boxes resist sudden contractions.

TYPE: bool

shrink_resistance

Damping factor for shrinking box dimensions.

TYPE: float

pre_detection_padding_sec

Backfill duration before the first detection.

TYPE: float

post_detection_padding_sec

Hold duration after the last detection.

TYPE: float

box_safety_padding_pct

Proportional outward privacy-box inflation.

TYPE: float

draw_boxes

Whether detection outlines should be rendered.

TYPE: bool

box_border_width

Preview box outline width in pixels.

TYPE: int

show_preview_mask

Whether the export mask is overlaid in preview.

TYPE: bool

preview_blur_enabled

Whether blur is rendered live in preview.

TYPE: bool

blur_enabled

Whether blur is enabled for export.

TYPE: bool

blur_strength

Blur intensity used for rendering.

TYPE: float

Note

Unlike ProcessingSettings, chosen_labels is pre-joined into a comma-separated string such as "person, cat, dog" so it can be assigned directly to UI widgets without parsing. Created when a session is opened or switched, treated as read-only by domain code, and rebuilt from ProcessingSettings whenever the UI needs a fresh snapshot.

Layer: Domain. Context: Represents application concepts without UI or infrastructure dependencies.

blur_enabled: bool = False class-attribute instance-attribute

blur_strength: float = 15.0 class-attribute instance-attribute

box_border_width: int = 2 class-attribute instance-attribute

box_safety_padding_pct: float = 0.1 class-attribute instance-attribute

chosen_labels: str = 'person, cat, dog' class-attribute instance-attribute

confidence_decay: float = 0.05 class-attribute instance-attribute

detection_model_name: str = 'None' class-attribute instance-attribute

draw_boxes: bool = True class-attribute instance-attribute

gsi_smoothness: float = 10.0 class-attribute instance-attribute

max_stitch_gap: int = 25 class-attribute instance-attribute

min_detection_confidence: float = 0.5 class-attribute instance-attribute

min_iou: float = 0.3 class-attribute instance-attribute

min_tracker_confidence: float = 0.1 class-attribute instance-attribute

offline_stitching_enabled: bool = True class-attribute instance-attribute

post_detection_padding_sec: float = 0.5 class-attribute instance-attribute

pre_detection_padding_sec: float = 0.5 class-attribute instance-attribute

preview_blur_enabled: bool = False class-attribute instance-attribute

privacy_features_enabled: bool = False class-attribute instance-attribute

reid_embedding_dim: int = 256 class-attribute instance-attribute

resist_box_shrinking: bool = True class-attribute instance-attribute

show_preview_mask: bool = False class-attribute instance-attribute

shrink_resistance: float = 0.85 class-attribute instance-attribute

tracking_source: str = 'layer_b' class-attribute instance-attribute

tracking_strategy: str = 'hungarian' class-attribute instance-attribute

__init__(detection_model_name: str = 'None', min_detection_confidence: float = 0.5, chosen_labels: str = 'person, cat, dog', tracking_strategy: str = 'hungarian', tracking_source: str = 'layer_b', reid_embedding_dim: int = 256, min_iou: float = 0.3, min_tracker_confidence: float = 0.1, confidence_decay: float = 0.05, offline_stitching_enabled: bool = True, max_stitch_gap: int = 25, gsi_smoothness: float = 10.0, privacy_features_enabled: bool = False, resist_box_shrinking: bool = True, shrink_resistance: float = 0.85, pre_detection_padding_sec: float = 0.5, post_detection_padding_sec: float = 0.5, box_safety_padding_pct: float = 0.1, draw_boxes: bool = True, box_border_width: int = 2, show_preview_mask: bool = False, preview_blur_enabled: bool = False, blur_enabled: bool = False, blur_strength: float = 15.0) -> None