ys-zong/VL-ICL
收藏资源简介:
--- license: mit task_categories: - image-to-text - text-to-image tags: - In-context learning - ICL - Multimodal - Vision-Language - VLLMs size_categories: - 1K<n<10K --- # VL-ICL Bench VL-ICL Bench: The Devil in the Details of Benchmarking Multimodal In-Context Learning [[Webpage]](https://ys-zong.github.io/VL-ICL/) [[Paper]](https://arxiv.org/abs/2403.13164) [[Code]](https://github.com/ys-zong/VL-ICL) ## Image-to-Text Tasks In all image-to-text tasks `image` is a list of image paths (typically one item - for interleaved cases there are two items). ### Fast Open-Ended MiniImageNet Frozen introduces the task of fast concept binding for MiniImageNet. The benchmark has a fixed structure so only the given support examples can be used for a given query example. We store all support images in the `support` directory and all query images in the `query` directory. We provide a `support.json` file with information about the support images, but these do not need to be used. Because of the fixed structure of the benchmark, all needed information is stored inside `query.json` file. This file includes information about the query image, the list of artificial `classes` that can be used for constructing the task with the given query image, as well as five examples for each class (we store the image paths and the caption that refers to all these examples). We used the 5-way 5-shot setting, but we are free to take only the query example class and between one and four other classes. For our experiments we use a 2-way setting. For each class we can take up to 5 support examples. We have 200 query examples and total of 5000 support examples, but we can extend it for up to 2500 query examples with the corresponding number of support examples. Source of data: https://fh295.github.io/frozen.html ### CLEVR Count Induction We repurpose the CLEVR dataset to construct tasks where we try to count the number of objects with a given characteristic, for example all large objects. The available attributes are shape, size, material and colour. The specified criterion is included within the `question`, for example `shape: large`, and the count itself is in the `answer`. We have 800 images in the support set and 200 in the query set. Source of data: https://cs.stanford.edu/people/jcjohns/clevr/ ### Operator Induction The goal of this task is to predict what is the result. There is text in the image saying `A ? B`, where A and B are digits between 0 and 9. We randomly split all available options into 80 support and 60 query examples. For constructing the tasks we sample the images completely randomly, we sample the operation which `?` represents, and then take the corresponding answer. We store 3 answers for each example in a list for the support examples: `[A+B, A-B, AxB]`, and the result can be accessed with the appropriate index. The `question` that we ask is always `What is the result of the following mathematical expression?`. We generated the images using PIL library, using Arial font with size 100 on images of size 256x256. We store the `operator` for each query example, and we have 20 examples for each operator. ### Interleaved Operator Induction We also include an alternative interleaved version of operator induction where we input the two digits as separate images. The `question` that we ask is `What is the result of the following mathematical expression?`. ### TextOCR In TextOCR the goal is to recognize the text that is shown in the red rectangle. In our version of TextOCR there is always only one red rectangle in an image. We take the original training set for setting aside 800 support examples and the validation set for 200 query examples. We use the largest text in the image to simplify the task, and we make sure to filter out all cases that are not valid (marked as `.` in the annotation). We also filter out the rotated images. The `question` asked is `What text is shown in the red box?` and the answer is the text itself. We maintain various metadata, including the image and annotation id, width, height, box coordinates, points for the text, overall area. Source of data: https://textvqa.org/textocr/ ### MiniImageNet Matching In this variation of MiniImageNet we try to predict if two examples are from the same class. We have 400 query pairs and 1600 support pairs, evenly distributed between same and different classes. Each support pair includes a pair of examples from the same class and a pair of examples from different classes. The `question` is always `Do the two images satisfy the induced relationship?` and the `answer` is either `Yes` or `No`. We used our earlier Fast Open-Ended MiniImageNet to create this matching dataset. Source of data: https://fh295.github.io/frozen.html ## Text-to-Image Tasks ### Fast Open-Ended T2I MiniImageNet We introduce a variation of Fast Open-Ended MiniImageNet where the goal is to generate an image of the imaginary class as given by the support examples. The details are similar to our other version of Fast Open-Ended MiniImageNet, but the question is instead `Generate a ` followed by the name of the imaginary class. We store the imaginary class in `task_label` field, and the real-world label in `answer` for the query examples (the support set examples have there the imaginary class). The labels were obtained from the real-world version of the benchmark. These labels can be used to assess if the generated image represents the desired imaginary class. Source of data: https://fh295.github.io/frozen.html ### CoBSAT We reuse the CoBSAT benchmark for few-shot image generation tasks. We have 800 support and 200 query examples, and these are organized in such a way that for each of the 100 scenarios (defined by the task -- e.g. colour, and the choice of the latent variable -- e.g. object value), we have 8 support and 2 query examples. When sampling the support examples, we need to ensure that these share the same `task` and value of the latent variable `latent`, which can be either the value of `attribute` or `object`. The `question` has the value of the latent variable and defines what image should be generated. The `image` is the generated image. The `answer` is a list [value of the latent variable, value of the non-latent variable]. For each image we also store the values of the `object`, `attribute`. Source of data: https://github.com/UW-Madison-Lee-Lab/CoBSAT ## Text ICL Variations We have also released the text variations of CLEVR, Operator Induction, and interleaved Operator Induction datasets to reproduce the comparison of multimodal and text ICL (Figure 7). You can either use the `query.json` in `{dataset}_text/` folder for "text support set + text query", or use the `query.json` in `{dataset}/` folder for "text support set + multimodal query".
VL-ICL Bench 数据集概述
数据集基本信息
- 许可证:MIT
- 任务类别:
- 图像到文本
- 文本到图像
- 标签:
- 情境学习(In-context learning, ICL)
- 多模态(Multimodal)
- 视觉语言(Vision-Language, VLLMs)
- 数据集大小:1K<n<10K
图像到文本任务
Fast Open-Ended MiniImageNet
- 任务描述:快速概念绑定任务,固定结构,仅使用给定的支持示例。
- 数据结构:支持图像存储在
support目录,查询图像存储在query目录。query.json文件包含查询图像信息、人工类别列表及每个类别的五个示例。 - 设置:5-way 5-shot,实验使用 2-way 设置。
- 数据量:200 查询示例,5000 支持示例,可扩展至 2500 查询示例。
CLEVR Count Induction
- 任务描述:重新利用 CLEVR 数据集,构造计数任务,例如计算具有特定特征(形状、大小、材质、颜色)的对象数量。
- 数据结构:支持集 800 图像,查询集 200 图像。
question包含特定特征,answer包含计数结果。
Operator Induction
- 任务描述:预测图像中数学表达式的结果,图像显示
A ? B,A 和 B 是 0 到 9 之间的数字。 - 数据结构:80 支持示例,60 查询示例。支持示例存储 3 个答案列表
[A+B, A-B, AxB],查询示例存储操作符。
Interleaved Operator Induction
- 任务描述:与 Operator Induction 类似,但两个数字作为单独的图像输入。
TextOCR
- 任务描述:识别红色矩形框内的文本。
- 数据结构:800 支持示例,200 查询示例。使用图像中最大的文本,过滤无效和旋转的图像。
MiniImageNet Matching
- 任务描述:预测两个示例是否来自同一类别。
- 数据结构:400 查询对,1600 支持对,均匀分布在相同和不同类别之间。
文本到图像任务
Fast Open-Ended T2I MiniImageNet
- 任务描述:生成给定支持示例的虚构类别的图像。
- 数据结构:与 Fast Open-Ended MiniImageNet 类似,但问题变为
Generate a加上虚构类别的名称。
CoBSAT
- 任务描述:用于少样本图像生成任务。
- 数据结构:800 支持示例,200 查询示例,100 个场景,每个场景 8 个支持示例和 2 个查询示例。
文本 ICL 变体
- 数据集:CLEVR、Operator Induction、Interleaved Operator Induction 的文本变体,用于多模态和文本 ICL 的比较。




