aac_datasets.datasets.macs module

class MACS(
root: str | Path | None = None,
subset: str = 'full',
download: bool = False,
transform: Callable[[MACSItem], Any] | None = None,
verbose: int = 0,
force_download: bool = False,
verify_files: bool = False,
*,
clean_archives: bool = True,
flat_captions: bool = False,
)[source]

Bases: AACDataset[MACSItem]

Unofficial MACS PyTorch dataset.

Dataset folder tree
{root}
└── MACS
    ├── audio
    │    └── (3930 wav files, ~13GB)
    ├── LICENCE.txt
    ├── MACS.yaml
    ├── MACS_competence.csv
    └── tau_meta
        ├── fold1_evaluate.csv
        ├── fold1_test.csv
        ├── fold1_train.csv
        └── meta.csv
CARD: ClassVar[MACSCard] = <aac_datasets.datasets.functional.macs.MACSCard object>
property download: bool
get_annotator_id_to_competence_dict() Dict[int, float][source]

Get annotator to competence dictionary.

get_competence(
annotator_id: int,
) float[source]

Get competence value for a specific annotator id.

property root: str
property sr: int
property subset: str
class MACSItem[source]

Bases: TypedDict

Dataclass representing a single MACS item.

annotators_ids: List[str]
audio: Tensor
captions: List[str]
competences: List[float]
dataset: str
duration: float
fname: str
identifier: str
index: int
scene_label: str
sr: int
subset: str
tags: List[List[str]]