Dataset Viewer
Auto-converted to Parquet
Search is not available for this dataset
image
imagewidth (px)
90
7.08k
label
class label
381 classes
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
0000be917-02a9-4fe9-8621-1a93cdd94ece
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
101036888-cfac-499a-9394-ed8875447ad1
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
20121f415-3c7f-4f64-b2e6-13f0a6efd540
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
3015f6fe4-632e-4bf2-9967-66d4eb5e1ada
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
4017e062a-d233-4c4f-ad89-016434e88557
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
501c29dff-a791-4105-9989-cc481d541376
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
601e20338-6cd8-4b0d-a46c-ba89c9c56582
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
70235ba59-fd55-4e0a-89a6-76bb3922c138
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
8029906e4-e6f0-4652-8022-9426b68bef70
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
902ffc185-5b98-4a5b-8200-c8c48ad47481
End of preview. Expand in Data Studio

Ukrainain Visual Word Sense Disambiguation Benchmark

Dataset Overview

This dataset is designed for the task of Visual Word Sense Disambiguation, where the goal is to identify, with minimal contextual information, the most appropriate representation of a given ambiguous word from a set of ten images.

Dataset Structure

The dataset is organized into folders, where each folder corresponds to a specific word sense. Each folder contains:

  • 9 images labeled as image_0.png to image_8.png.
  • 1 image labeled image_ground_truth.png, which is the correct image for that sense of the word.

The metadata contains the following fields:

  • uuid: A unique identifier for each word sense.
  • word: homonym in a particular sense;
  • word_definition: The definition of the word sense.
  • trigger: word(s) that help understand a target's by considering its definition and image together;
  • negative_image_paths: A list of image paths that do not correspond to the ground truth.
  • ground_truth_path: The path to the ground truth image.

Example

The dataset contains entries like the following:

{
    "uuid": "b94750d5-7164-4d72-8ba3-aa1f14609b43",
    "word": "автомат",
    "word_definition": "I, а, ч. Пристрій, що виконує певний процес без участі людини.",
    "trigger": "машина",
    "negative_image_paths": [
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_0.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_1.png",
        ...
    ],
    "ground_truth_path": "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_ground_truth.png"
}

Run M-CLIP baseline

import torch
import clip
import transformers
from multilingual_clip import pt_multilingual_clip
from PIL import Image
from sklearn.metrics.pairwise import cosine_similarity

device = "cuda" if torch.cuda.is_available() else "cpu"

image_model_name = "ViT-L/14"
text_model_name = "M-CLIP/XLM-Roberta-Large-Vit-L-14"

image_model, preprocess = clip.load(image_model_name, device=device)
image_model.to(device)

text_model = pt_multilingual_clip.MultilingualCLIP.from_pretrained(text_model_name)
tokenizer = transformers.AutoTokenizer.from_pretrained(text_model_name)

# Sample metadata
sample = {
    "uuid": "b94750d5-7164-4d72-8ba3-aa1f14609b43",
    "word": "автомат",
    "word_definition": "I, а, ч. Пристрій, що виконує певний процес без участі людини.",
    "trigger": "машина",
    "negative_image_paths": [
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_0.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_1.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_2.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_3.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_4.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_5.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_6.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_7.png",
        "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_8.png"
    ],
    "ground_truth_path": "u-vwsd/images/b94750d5-7164-4d72-8ba3-aa1f14609b43/image_ground_truth.png"
}

query = f"{sample['word']} {sample['trigger']}"

with torch.no_grad():
    text_embedding = text_model.forward(query, tokenizer).cpu().numpy()

def encode_image(image_path):
    image = preprocess(Image.open(image_path)).unsqueeze(0).to(device)
    with torch.no_grad():
        return image_model.encode_image(image).cpu().numpy()

image_paths = sample["negative_image_paths"] + [sample["ground_truth_path"]]
image_embeddings = {path: encode_image(path) for path in image_paths}

# Compute similarities
results = [(path, cosine_similarity(image_embeddings[path], text_embedding)[0, 0]) for path in image_paths]
results.sort(key=lambda x: x[1], reverse=True)

# Output top result
top_result = results[0][0]
print(f"Top predicted image: {top_result}")
print(f"Correct? {top_result == sample['ground_truth_path']}")

Citation

@inproceedings{laba-etal-2024-ukrainian,
    title = "{U}krainian Visual Word Sense Disambiguation Benchmark",
    author = "Laba, Yurii  and
      Mohytych, Yaryna  and
      Rohulia, Ivanna  and
      Kyryleyza, Halyna  and
      Dydyk-Meush, Hanna  and
      Dobosevych, Oles  and
      Hryniv, Rostyslav",
    editor = "Romanyshyn, Mariana  and
      Romanyshyn, Nataliia  and
      Hlybovets, Andrii  and
      Ignatenko, Oleksii",
    booktitle = "Proceedings of the Third Ukrainian Natural Language Processing Workshop (UNLP) @ LREC-COLING 2024",
    month = may,
    year = "2024",
    address = "Torino, Italia",
    publisher = "ELRA and ICCL",
    url = "https://aclanthology.org/2024.unlp-1.8/",
    pages = "61--66",
}
Downloads last month
112