nicetoolbox.detectors.config_handler

Functions

flatten_list

Classes

Configuration

Handles loading and resolving all configurations required for detectors pipeline.

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

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.

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