nicetoolbox.detectors.data_handlers.handler.BaseModalityHandler

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

Bases: ABC

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

Methods

get_recipe

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

prepare

Prepare data for this modality.

Attributes

is_available

Whether data for this modality was successfully prepared.

modality_name

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

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.