aac_metrics.classes.evaluate module

class DCASE2023Evaluate(
preprocess: bool = True,
cache_path: str | Path | None = None,
java_path: str | Path | None = None,
tmp_path: str | Path | None = None,
device: str | device | None = 'cuda_if_available',
verbose: int = 0,
)[source]

Bases: Evaluate

Evaluate candidates with multiple references with DCASE2023 Audio Captioning metrics.

For more information, see dcase2023_evaluate().

class DCASE2024Evaluate(
preprocess: bool = True,
cache_path: str | Path | None = None,
java_path: str | Path | None = None,
tmp_path: str | Path | None = None,
device: str | device | None = 'cuda_if_available',
verbose: int = 0,
)[source]

Bases: Evaluate

Evaluate candidates with multiple references with DCASE2024 Audio Captioning metrics.

For more information, see dcase2024_evaluate().

class Evaluate(
preprocess: bool | Callable[[list[str]], list[str]] = True,
metrics: str | Iterable[str] | Iterable[AACMetric] = 'default',
cache_path: str | Path | None = None,
java_path: str | Path | None = None,
tmp_path: str | Path | None = None,
device: str | device | None = 'cuda_if_available',
verbose: int = 0,
)[source]

Bases: list[AACMetric], AACMetric[tuple[dict[str, Tensor], dict[str, Tensor]]]

Evaluate candidates with multiple references with custom metrics.

For more information, see evaluate().

compute() tuple[dict[str, Tensor], dict[str, Tensor]][source]
full_state_update: ClassVar[bool | None] = False
higher_is_better: ClassVar[bool | None] = None
is_differentiable: ClassVar[bool | None] = False
reset() None[source]
tolist() list[AACMetric][source]
training: bool
update(
candidates: list[str],
mult_references: list[list[str]],
) None[source]