--- license: cc-by-nc-sa-4.0 task_categories: - zero-shot-classification - zero-shot-image-classification language: - ar - el - en - hi - ja - ko - te - th - uk - zh tags: - multimodal - representation learning - multilingual pretty_name: Symile-M3 size_categories: - 10M, # text containing w words (one per language) separated by underscores 'text': 'σπιτάκι πουλιών_ドーム_प्रयोगशाला कोट_мавпа-павук_gown', # target word class name in English (key in translations.json) 'cls': 'dome', # class ID from translations.json (0 to 999) 'cls_id': 538, # target word (class name in the language of the audio) 'target_text': 'ドーム' } ``` The dataset includes a `translations.json` file that maps ImageNet class names across all supported languages. Each entry contains: - The English class name as the key - Translations for all supported languages (`ar`, `el`, `en`, `hi`, `ja`, `ko`, `te`, `th`, `uk`, `zh-CN`) - The ImageNet synset ID - A unique class ID (0-999) Example structure: ```json { "tench": { "synset_id": "n01440764", "cls_id": 0, "ar": "سمك البنش", "el": "είδος κυπρίνου", "en": "tench", "hi": "टेंच", "ja": "テンチ", "ko": "텐치", "te": "టెంచ్", "th": "ปลาเทนช์", "uk": "линь", "zh-CN": "丁鱥" } } ``` ## Dataset Variants We release three variants of the dataset: - Symile-M3-2 with 2 languages: English (`en`) and Greek (`el`). - Symile-M3-5 with 5 languages: English (`en`), Greek (`el`), Hindi (`hi`), Japanese (`ja`), and Ukrainian (`uk`). - Symile-M3-10 with 10 languages: Arabic (`ar`), Greek (`el`), English (`en`), Hindi (`hi`), Japanese (`ja`), Korean (`ko`), Telugu (`te`), Thai (`th`), Ukrainian (`uk`), and Chinese (`zh-CN`). Each variant is available in four sizes: - Large (`l`): 10M training samples, 500K validation samples, 500K test samples - Medium (`m`): 5M training samples, 250K validation samples, 250K test samples - Small (`s`): 1M training samples, 50K validation samples, 50K test samples - Extra Small (`xs`): 500K training samples, 25K validation samples, 25K test samples ## Usage Before using the dataset, ensure you have the required audio and image processing libraries installed: ```bash pip install librosa soundfile pillow ``` To load a specific version of Symile-M3, use a configuration name following the pattern `symile-m3-{num_langs}-{size}` where: - `num_langs` is `2`, `5`, or `10` - `size` is `xs`, `s`, `m`, or `l` For example, to load the `xs` version of Symile-M3-5: ```python from datasets import load_dataset dataset = load_dataset("arsaporta/symile-m3", "symile-m3-5-xs") print(dataset['train'][0]) # access first train sample print(len(dataset['train'])) # get number of train samples ``` To process the dataset without loading it entirely into memory, use streaming mode to load samples one at a time: ```python from datasets import load_dataset dataset = load_dataset("arsaporta/symile-m3", "symile-m3-5-xs", streaming=True) print(next(iter(dataset['train']))) ``` To download the dataset for offline use: ```python import os from datasets import load_dataset from huggingface_hub import snapshot_download local_dir = "./symile-m3-5-xs" # where to save # download parquet files snapshot_download( repo_id="arsaporta/symile-m3", repo_type="dataset", local_dir=local_dir, allow_patterns=["symile-m3-5-xs/*"] # which configuration to download ) # load the downloaded parquet files dataset = load_dataset( "parquet", data_files={ "train": os.path.join(data_dir, "train-*.parquet"), "validation": os.path.join(data_dir, "val-*.parquet"), "test": os.path.join(data_dir, "test-*.parquet") } ) ``` ## Citation ``` @inproceedings{saporta2024symile, title = {Contrasting with Symile: Simple Model-Agnostic Representation Learning for Unlimited Modalities} author = {Saporta, Adriel and Puli, Aahlad and Goldstein, Mark and Ranganath, Rajesh} booktitle = {Advances in Neural Information Processing Systems}, year = {2024} } ```