nicetoolbox.detectors.data_handlers.handler

Abstract base class for modality-specific data handlers.

Each handler is responsible for preparing data of a specific modality (video/frames, audio) from source files into the nicetoolbox_input folder.

Classes

BaseModalityHandler

Abstract base class for modality-specific data handlers.

class nicetoolbox.detectors.data_handlers.handler.BaseModalityHandler(io: SequenceIO, sequence_context: SequenceRuntimeConfig)[source]

Abstract base class for modality-specific data handlers.

Handlers are responsible for: - Detecting if source data exists for their modality - Extracting/copying data to nicetoolbox_input folder - Providing a recipe for downstream loaders

abstract get_recipe() Any[source]

Get the input recipe for this modality’s data loader.

Returns:

Recipe dictionary for constructing a data loader, or None if unavailable.

property is_available: bool

Whether data for this modality was successfully prepared.

abstract property modality_name: str

Return the name of this modality (e.g., ‘video’, ‘audio’).

abstract prepare() None[source]

Prepare data for this modality.