nicetoolbox.configs.video_runtime_config¶
Runtime configuration for processing a single video. Created by Configuration factory, discarded after video processing.
Classes
Immutable configuration context for processing a single video. |
- class nicetoolbox.configs.video_runtime_config.SequenceRuntimeConfig(*, log_level: LoggingLevelEnum, log_file: Path, dataset_name: str, video_config: RunConfigVideo, dataset_properties: DatasetConfig, io: DetectorsRunIO, machine: MachineSpecificConfig, detectors_config: DetectorsConfig, predictions_mapping: PredictionsMappingConfig, algorithms: List[str], all_camera_names: List[str])[source]¶
Immutable configuration context for processing a single video.
Created by Configuration.iter_sequence_contexts(), holds all resolved configuration needed for one video. Discarded after processing.
All placeholders (except <cur_component_name> and <cur_algorithm_name> in IO paths) are fully resolved at construction time.
Note: frozen=True only prevents reassignment of top-level attributes. Nested models are mutable but should be treated as immutable by convention.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- get_detector_config(algorithm_name: str) BaseModel[source]¶
Get the pre-resolved configuration for a detector.
- Parameters:
algorithm_name – Name of the algorithm (e.g., ‘hrnetw48’, ‘velocity_body’)
- Returns:
Resolved configuration dict ready for detector initialization. Includes the injected ‘visualize’ flag.
- Raises:
KeyError – If algorithm was not in the selected algorithms for this video
- get_detector_folder(component: str, algorithm: str, folder_type: str) Path[source]¶
Get resolved detector-specific folder path.
The IO paths contain <cur_component_name> and <cur_algorithm_name> placeholders that are resolved here based on the specific detector.
- Parameters:
component – Component name (e.g., ‘body_joints’)
algorithm – Algorithm name (e.g., ‘hrnetw48’)
folder_type – One of ‘output’, ‘visualization’, ‘additional’, ‘run_config’, ‘result’
- Returns:
Resolved Path to the requested folder
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].