nicetoolbox.detectors.config_handler.Configuration

class nicetoolbox.detectors.config_handler.Configuration(project_folder: Path, machine_specifics_file: Path, run_config_file: Path)[source]

Bases: ProjectConfigHandler

Handles loading and resolving all configurations required for detectors pipeline. This includes: - machine specifics - project config - run configuration file - detectors configuration - dataset properties

Further provides a config factory that produces frozen and resolved runtime configs per video context

Load all static configuration files.

Parameters:
  • project_folder (Path) – Path to the project folder containing nice_project.toml.

  • machine_specifics_file (Path) – Path to machine_specific_paths.toml, may contain placeholders.

  • run_config_file (Path) – Path to detectors_run_file.toml, may contain placeholders.

Methods

get_all_detector_names

Returns all detector names defined in the detectors configuration.

iter_sequence_contexts

Iterate over all videos and yield frozen runtime configurations.

save_experiment_config

save_video_config

Attributes

check_missing_detectors_dependencies

error_level

log_file

log_level

save_csv

visualize

machine_specific_path

run_config_file_path

machine_specific_config

run_config

detectors_config

dataset_properties

predictions_mapping

project_folder

project_config_path

cfg_loader

auto_placeholders

runtime_placeholders

project_config

get_all_detector_names() list[str][source]

Returns all detector names defined in the detectors configuration.

iter_sequence_contexts() Generator[SequenceRuntimeConfig, None, None][source]

Iterate over all videos and yield frozen runtime configurations.

Each yielded SequenceRuntimeConfig is fully resolved and immutable. It should be discarded after the video is processed.

Yields:

SequenceRuntimeConfig for each video defined in the run configuration