小臣子吃大橙子
commited on
Commit
•
7a614a3
1
Parent(s):
0c2fc95
update README
Browse files- README.md +209 -8
- README_zh.md +211 -0
- captions_v1.2.0_20231217.csv +0 -0
- hard_list_v1.2.1_20240206.json +0 -1
- knowledge_v1.2.2_20240212_release.json +0 -3
- problem_v1.2.2_20240212_release_hf.json → overview.png +2 -2
- problem_v1.2.2_20240212_release.json +0 -3
README.md
CHANGED
@@ -2,11 +2,212 @@
|
|
2 |
license: mit
|
3 |
language:
|
4 |
- zh
|
5 |
-
pretty_name:
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: mit
|
3 |
language:
|
4 |
- zh
|
5 |
+
pretty_name: MULTI-Benchmark
|
6 |
+
viewer: False
|
7 |
+
---
|
8 |
+
|
9 |
+
# 🖼️ MULTI-Benchmark: Multimodal Understanding Leaderboard with Text and Images
|
10 |
+
|
11 |
+
<div align="center">
|
12 |
+
|
13 |
+
![MULTI](./overview.png)
|
14 |
+
|
15 |
+
🌐 [Website](https://OpenDFM.github.io/MULTI-Benchmark/) | 📃 [Paper](https://arxiv.org/abs/2402.03173/) | 🤗 [Dataset](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark) | 🎯 [Leaderboard]() (Coming Soon)
|
16 |
+
|
17 |
+
[简体中文](./README_zh.md) | English
|
18 |
+
|
19 |
+
</div>
|
20 |
+
|
21 |
+
## 🔥 News
|
22 |
+
|
23 |
+
- **[Cooming Soon]** We will release the official evaluation platform.
|
24 |
+
- **[2024.2.19]** We release the [HuggingFace Page](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/).
|
25 |
+
- **[2024.2.6]** We publish our [paper](https://arxiv.org/abs/2402.03173/) on arXiv.
|
26 |
+
- **[2023.12.7]** We release the [code](https://github.com/OpenDFM/MULTI-Benchmark/tree/main/eval) of our benchmark evaluation.
|
27 |
+
- **[2023.12.5]** We release the [GitHub Page](https://OpenDFM.github.io/MULTI-Benchmark/).
|
28 |
+
|
29 |
+
## 📖 Overview
|
30 |
+
|
31 |
+
Rapid progress in multimodal large language models (MLLMs) highlights the need to introduce challenging yet realistic benchmarks to the academic community, while existing benchmarks primarily focus on understanding simple natural images and short context. In this paper, we present***MULTI***, as a cutting-edge benchmark for evaluating MLLMs on understanding complex tables and images, and reasoning with long context. **MULTI** provides multimodal inputs and requires responses that are either precise or open-ended, reflecting real-life examination styles. **MULTI** includes over 18,000 questions and challenges MLLMs with a variety of tasks, ranging from formula derivation to image detail analysis and cross-modality reasoning. We also introduce***MULTI-Elite***, a 500-question selected hard subset, and ***MULTI-Extend***, with more than 4,500 external knowledge context pieces. Our evaluation indicates significant potential for MLLM advancement, with GPT-4V achieving a **63.7%** accuracy rate on **MULTI**, in contrast to other MLLMs scoring between **28.5%** and **55.3%**. **MULTI** serves not only as a robust evaluation platform but also paves the way for the development of expert-level AI.
|
32 |
+
|
33 |
+
## 🏆 Leaderboard
|
34 |
+
|
35 |
+
| Modality | Model | Version | Overall | MULTI-Elite |
|
36 |
+
|:--------:|:-------------:| -------------------------- |:-------:|:-----------:|
|
37 |
+
| 🖼️ | GPT-4V | gpt-4-vision-preview | 63.7 | 14.0 |
|
38 |
+
| 🖼️ | Yi-VL | Yi-34B-Chat | 55.3 | 26.2 |
|
39 |
+
| 🖼️ | Gemini Vision | gemini-pro-vision | 53.7 | 12.4 |
|
40 |
+
| 📃 | Gemini | gemini-pro | 52.2 | 10.5 |
|
41 |
+
| 📃 | GPT-4 | gpt-4-1106-preview | 50.2 | 5.8 |
|
42 |
+
| 📃 | DFM-2.0 | dfm-2.0-70b-preview | 49.7 | 18.0 |
|
43 |
+
| 🖼️ | InternVL | InternVL-Chat-Chinese-V1.1 | 44.9 | 20.7 |
|
44 |
+
| 🖼️ | Qwen-VL | Qwen-VL-Chat | 39.0 | 10.5 |
|
45 |
+
| 📃 | ChatGPT | gpt-3.5-turbo-1106 | 35.9 | 4.7 |
|
46 |
+
| 🖼️ | VisCPM | VisCPM-Chat | 33.4 | 13.0 |
|
47 |
+
| 📃 | MOSS | moss-moon-003-sft | 32.6 | 13.1 |
|
48 |
+
| 🖼️ | VisualGLM | visualglm-6b | 31.1 | 12.8 |
|
49 |
+
| 🖼️ | Chinese-LLaVA | Chinese-LLaVA-Cllama2 | 28.5 | 12.3 |
|
50 |
+
|
51 |
+
For more details, please visit our [leaderboard]() (Coming Soon).
|
52 |
+
|
53 |
+
## ⏬ Download
|
54 |
+
|
55 |
+
You can download the dataset from the [HuggingFace Page](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark). Current [version](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/blob/main/MULTI_v1.2.2_20240212_release.zip) is `v1.2.2`. Unzip the files and put them under `data`.
|
56 |
+
|
57 |
+
```
|
58 |
+
wget https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/resolve/main/MULTI_v1.2.2_20240212_release.zip
|
59 |
+
unzip MULTI_v1.2.2_20240212_release.zip -d ./data/
|
60 |
+
```
|
61 |
+
|
62 |
+
The structure of `data` should be something like:
|
63 |
+
|
64 |
+
```
|
65 |
+
data
|
66 |
+
├── images # folder containing images
|
67 |
+
├── problem_v1.2.2_20240212_release.json # MULTI
|
68 |
+
├── knowledge_v1.2.2_20240212_release.json # MULTI-Extend
|
69 |
+
├── hard_list_v1.2.1_20240206.json # MULTI-Elite
|
70 |
+
└── captions_v1.2.0_20231217.csv # image captions generated by BLIP-6.7b
|
71 |
+
```
|
72 |
+
|
73 |
+
## 📝 How to Evaluate
|
74 |
+
|
75 |
+
We provide a unified evaluation framework in `eval`. Each file in `eval/models` contains an evaluator specified to one M/LLM, and implements a `generate_answer` method to receive a question as input and give out the answer of it.
|
76 |
+
|
77 |
+
```shell
|
78 |
+
cd eval
|
79 |
+
python eval.py -h # to list all supported arguments
|
80 |
+
python eval.py -l # to list all supported models
|
81 |
+
```
|
82 |
+
|
83 |
+
### Environment Preparation Before Usage
|
84 |
+
|
85 |
+
Each evaluator requires its unique environment setting, and a universal environment may not work for all evaluators. **Just follow the official guide.** If the corresponding model runs well, then so should it fit in our framework.
|
86 |
+
|
87 |
+
You just need to install another two packages to run the evaluation code:
|
88 |
+
|
89 |
+
```shell
|
90 |
+
pip install tiktoken tqdm
|
91 |
+
```
|
92 |
+
|
93 |
+
If you just want to generate data for a specific setting (using `--debug` argument), this line above is all you need.
|
94 |
+
|
95 |
+
### Running Evaluation
|
96 |
+
|
97 |
+
For a quick start, see these examples:
|
98 |
+
|
99 |
+
Test GPT-4V model on whole MULTI with multimodal input, using MULTI-Extend as external knowledge:
|
100 |
+
|
101 |
+
```shell
|
102 |
+
python eval.py \
|
103 |
+
--problem_file ../data/problem_v1.2.2_20240212_release.json \
|
104 |
+
--knowledge_file ../data/knowledge_v1.2.2_20240212_release.json \
|
105 |
+
--questions_type 0,1,2,3 \
|
106 |
+
--image_type 0,1,2 \
|
107 |
+
--input_type 2 \
|
108 |
+
--model gpt-4v \
|
109 |
+
--model_version gpt-4-vision-preview \
|
110 |
+
--api_key sk-************************************************
|
111 |
+
```
|
112 |
+
|
113 |
+
Test Qwen-VL model on MULTI-Elite with image caption input, skip all questions not containing images, evaluate only multiple-choice questions, automatically set cuda device:
|
114 |
+
|
115 |
+
```shell
|
116 |
+
python eval.py \
|
117 |
+
--problem_file ../data/problem_v1.2.2_20240212_release.json \
|
118 |
+
--subset ../data/hard_list_v1.2.1_20240206.json \
|
119 |
+
--caption_file ../data/captions_v1.2.0_20231217.csv \
|
120 |
+
--questions_type 0,1 \
|
121 |
+
--image_type 1,2 \
|
122 |
+
--input_type 1 \
|
123 |
+
--model qwen-vl \
|
124 |
+
--model_dir ../models/Qwen-VL-Chat
|
125 |
+
```
|
126 |
+
|
127 |
+
The evaluation script will generate a folder named `results` under the root directory, and the result will be saved in `../results/EXPERIMENT_NAME`. During the evaluation, the script will save checkpoints in `../results/EXPERIMENT_NAME/checkpoints`, you can delete them after the evaluation is done. If the evaluation is interrupted, you can continue from the last checkpoint:
|
128 |
+
|
129 |
+
```shell
|
130 |
+
python eval.py \
|
131 |
+
--checkpoint_dir ../results/EXPERIMENT_NAME
|
132 |
+
```
|
133 |
+
|
134 |
+
Most of the arguments are saved in `../results/EXPERIMENT_NAME/args.json`, so you can continue the evaluation without specifying all the arguments again. Please note that `--api_key` is not saved in `args.json` for security reasons, so you need to specify it again.
|
135 |
+
|
136 |
+
```shell
|
137 |
+
python eval.py \
|
138 |
+
--checkpoint_dir ../results/EXPERIMENT_NAME \
|
139 |
+
--api_key sk-************************************************
|
140 |
+
```
|
141 |
+
|
142 |
+
For more details of arguments, please use `python eval.py -h`, and refer to `args.py` and `eval.py`.
|
143 |
+
|
144 |
+
### Add Support for Your Models
|
145 |
+
|
146 |
+
It's recommended to read the code of the other given evaluators in `eval/models` before your implementation.
|
147 |
+
|
148 |
+
Create `class YourModelEvaluator` and implement `generate_answer(self, question:dict)` to match the design supported in `eval.py` and `eval.sh`, which is anticipated to largely ease the coding process.
|
149 |
+
|
150 |
+
**Do not forget to add their references into `args.py` for the convenience of usage.**
|
151 |
+
|
152 |
+
You can execute `model_tester.py` in the `eval` folder to check the correctness of you implementation. Various problems including implementation errors, small bugs in code, and even wrong environment settings may cause failure of the evaluation. The examples provided in the file cover most kinds of cases presented in our benchmark. Feel free to change the code in it to debug your code😊
|
153 |
+
|
154 |
+
```shell
|
155 |
+
python model_tester.py <args> # args are similar to the default settings above
|
156 |
+
```
|
157 |
+
|
158 |
+
### Create Captions and OCR Data for Images
|
159 |
+
|
160 |
+
Generate captions or OCR data for images, and save them in csv with format below:
|
161 |
+
|
162 |
+
```
|
163 |
+
../data/images/czls/502_1.png,a cartoon drawing of a man standing in front of a large block
|
164 |
+
../data/images/czls/525_1.png,a chinese newspaper with the headline, china's new year
|
165 |
+
...
|
166 |
+
```
|
167 |
+
|
168 |
+
We provide two example scripts to generate captions (`image_caption.py`) and OCR data (`image_ocr.py`) for images.
|
169 |
+
|
170 |
+
## 📮 How to Submit
|
171 |
+
|
172 |
+
You need to first prepare a UTF-8 encoded JSON file with the following format:
|
173 |
+
|
174 |
+
```
|
175 |
+
{
|
176 |
+
"czsx_0_0": {
|
177 |
+
"question_id": "czsx_0_0",
|
178 |
+
"question_image_number": 1,
|
179 |
+
"image_list": [...], # optional
|
180 |
+
"input_message": ..., # optional
|
181 |
+
"prediction": "C"
|
182 |
+
},
|
183 |
+
...
|
184 |
+
}
|
185 |
+
```
|
186 |
+
|
187 |
+
If you evaluate the model with our official code, you can simply zip the experiment result folder `results/EXPERIMENT_NAME`.
|
188 |
+
|
189 |
+
Then, you can submit your result to our [evaluation platform](https://wj.sjtu.edu.cn/q/89UmRAJn) (Coming Soon).
|
190 |
+
|
191 |
+
You are also welcome to pull a request and contribute your code to our evaluation code. We will be very grateful for your contribution!
|
192 |
+
|
193 |
+
**[Notice]** Thank you for being so interested in the **MULTI** dataset! As the automated evaluation platform is not yet online, please fill in [this questionnaire](https://wj.sjtu.edu.cn/q/89UmRAJn) to get the evaluation results, your information will be kept strictly confidential, so please feel free to fill it out. 🤗
|
194 |
+
|
195 |
+
|
196 |
+
## 📑 Citation
|
197 |
+
|
198 |
+
If you find our work useful, please cite us!
|
199 |
+
|
200 |
+
```
|
201 |
+
@misc{zhu2024multi,
|
202 |
+
title={{MULTI}: Multimodal Understanding Leaderboard with Text and Images},
|
203 |
+
author={Zichen Zhu and Yang Xu and Lu Chen and Jingkai Yang and Yichuan Ma and Yiming Sun and Hailin Wen and Jiaqi Liu and Jinyu Cai and Yingzi Ma and Situo Zhang and Zihan Zhao and Liangtai Sun and Kai Yu},
|
204 |
+
year={2024},
|
205 |
+
eprint={2402.03173},
|
206 |
+
archivePrefix={arXiv},
|
207 |
+
primaryClass={cs.CL}
|
208 |
+
}
|
209 |
+
```
|
210 |
+
|
211 |
+
## 📧 Contact Us
|
212 |
+
|
213 |
+
If you have any questions, please feel free to contact us via email `[email protected]` and `[email protected]`
|
README_zh.md
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- zh
|
5 |
+
pretty_name: MULTI-Benchmark
|
6 |
+
viewer: False
|
7 |
+
---
|
8 |
+
|
9 |
+
# 🖼️ MULTI-Benchmark: Multimodal Understanding Leaderboard with Text and Images
|
10 |
+
|
11 |
+
<div align="center">
|
12 |
+
|
13 |
+
![MULTI](./overview.png)
|
14 |
+
|
15 |
+
🌐 [网站](https://OpenDFM.github.io/MULTI-Benchmark/) | 📃 [论文](https://arxiv.org/abs/2402.03173/) | 🤗 [数据](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark) | 🎯 [榜单]() (即将上线)
|
16 |
+
|
17 |
+
简体中文 | [English](./README.md)
|
18 |
+
|
19 |
+
</div>
|
20 |
+
|
21 |
+
## 🔥 新闻
|
22 |
+
|
23 |
+
- **[即将上线]** 我们将发布官方评测平台。
|
24 |
+
- **[2024.2.19]** 我们发布了[HuggingFace页面](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/)。
|
25 |
+
- **[2024.2.6]** 我们在arXiv上发布了我们的[论文](https://arxiv.org/abs/2402.03173/)。
|
26 |
+
- **[2023.12.7]** 我们发布了我们的基准评测[代码](https://github.com/OpenDFM/MULTI-Benchmark/tree/main/eval)。
|
27 |
+
- **[2023.12.5]** 我们发布了[GitHub页面](https://OpenDFM.github.io/MULTI-Benchmark/)。
|
28 |
+
|
29 |
+
## 📖 介绍
|
30 |
+
|
31 |
+
在多模态大型语言模型(MLLMs)迅速进步的背景下,提出具有挑战性且符合现实场景的基准测试变得尤为重要,而现有的基准测试主要关注于理解简单的自然图像和短文本。在本文中,我们介绍了***MULTI***,作为一个前沿的基准测试,用于评测MLLMs在理解复杂的表格和图像、以及进行长文本推理的能力。**MULTI**提供多模态输入,并要求回答是精确的或开放式的,反映了现实生活中的考试风格。**MULTI**包括超过 18,000 个问题,挑战MLLMs进行多种任务,从公式推导到图像细节分析和跨模态推理。我们还引入了***MULTI-Elite***,一个精心挑选的包含500个问题的难题子集,以及***MULTI-Extend***,包含超过 4,500 个外部知识上下文。我们的评测显示了MLLMs进步的巨大潜力,GPT-4V在**MULTI**上的准确率达到了 **63.7%**,而其他MLLMs的得分介于 **28.5%** 和 **55.3%** 之间。**MULTI**不仅作为一个稳健的评测平台,也为专家级AI的发展指明了道路。
|
32 |
+
|
33 |
+
## 🏆 Leaderboard
|
34 |
+
|
35 |
+
| 模态 | 模型 | 版本 | 总体 | MULTI-Elite |
|
36 |
+
|:----:|:-------------:| -------------------------- |:----:|:-----------:|
|
37 |
+
| 🖼️ | GPT-4V | gpt-4-vision-preview | 63.7 | 14.0 |
|
38 |
+
| 🖼️ | Yi-VL | Yi-34B-Chat | 55.3 | 26.2 |
|
39 |
+
| 🖼️ | Gemini Vision | gemini-pro-vision | 53.7 | 12.4 |
|
40 |
+
| 📃 | Gemini | gemini-pro | 52.2 | 10.5 |
|
41 |
+
| 📃 | GPT-4 | gpt-4-1106-preview | 50.2 | 5.8 |
|
42 |
+
| 📃 | DFM-2.0 | dfm-2.0-70b-preview | 49.7 | 18.0 |
|
43 |
+
| 🖼️ | InternVL | InternVL-Chat-Chinese-V1.1 | 44.9 | 20.7 |
|
44 |
+
| 🖼️ | Qwen-VL | Qwen-VL-Chat | 39.0 | 10.5 |
|
45 |
+
| 📃 | ChatGPT | gpt-3.5-turbo-1106 | 35.9 | 4.7 |
|
46 |
+
| 🖼️ | VisCPM | VisCPM-Chat | 33.4 | 13.0 |
|
47 |
+
| 📃 | MOSS | moss-moon-003-sft | 32.6 | 13.1 |
|
48 |
+
| 🖼️ | VisualGLM | visualglm-6b | 31.1 | 12.8 |
|
49 |
+
| 🖼️ | Chinese-LLaVA | Chinese-LLaVA-Cllama2 | 28.5 | 12.3 |
|
50 |
+
|
51 |
+
更多详情,请访问我们的[排行榜]()(即将推出)。
|
52 |
+
|
53 |
+
## ⏬ 下载
|
54 |
+
|
55 |
+
您可以从[HuggingFace页面](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark)下载数据集。最新[版本](https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/blob/main/MULTI_v1.2.2_20240212_release.zip)为`v1.2.2`。解压文件并将它们放置在`data`下。
|
56 |
+
|
57 |
+
```
|
58 |
+
wget https://huggingface.co/datasets/OpenDFM/MULTI-Benchmark/resolve/main/MULTI_v1.2.2_20240212_release.zip
|
59 |
+
unzip MULTI_v1.2.2_20240212_release.zip -d ./data/
|
60 |
+
```
|
61 |
+
|
62 |
+
`data` 的结构应该如下所示:
|
63 |
+
|
64 |
+
```
|
65 |
+
data
|
66 |
+
├── images # 包含图片的文件夹
|
67 |
+
├── problem_v1.2.2_20240212_release.json # MULTI
|
68 |
+
├── knowledge_v1.2.2_20240212_release.json # MULTI-Extend
|
69 |
+
├── hard_list_v1.2.1_20240206.json # MULTI-Elite
|
70 |
+
└── captions_v1.2.0_20231217.csv # 由BLIP-6.7b生成的图片描述
|
71 |
+
```
|
72 |
+
|
73 |
+
## 📝 如何评测
|
74 |
+
|
75 |
+
我们在`eval`中提供了一个统一的评测框架。`eval/models`中的每个文件都包含了一个针对某个M/LLM的评测器,并实现了一个`generate_answer`方法来接收问题输入并输出答案。
|
76 |
+
|
77 |
+
```shell
|
78 |
+
cd eval
|
79 |
+
python eval.py -h # 列出所有支持的参数
|
80 |
+
python eval.py -l # 列出所有支持的模型
|
81 |
+
```
|
82 |
+
|
83 |
+
### 使用前的环境准备
|
84 |
+
|
85 |
+
每个模型都需要其独特的环境设置,通用环境可能不适用于所有模型的评测。**按照官方文档操作即可。** 如果相应的模型运行良好,那么它应该也适合我们的框架。
|
86 |
+
|
87 |
+
您只需要安装另外两个包来运行评测代码:
|
88 |
+
|
89 |
+
```shell
|
90 |
+
pip install tiktoken tqdm
|
91 |
+
```
|
92 |
+
|
93 |
+
如果您只是想为特定设置生成数据(使用`--debug`参数),上面这行代码就是您所需要的一切。
|
94 |
+
|
95 |
+
### 运行评测
|
96 |
+
|
97 |
+
请参考这些示例以便快速开始:
|
98 |
+
|
99 |
+
在MULTI上测试GPT-4V模型,采用多模态输入,并使用MULTI-Extend作为外部知识:
|
100 |
+
|
101 |
+
```shell
|
102 |
+
python eval.py \
|
103 |
+
--problem_file ../data/problem_v1.2.2_20240212_release.json \
|
104 |
+
--knowledge_file ../data/knowledge_v1.2.2_20240212_release.json \
|
105 |
+
--questions_type 0,1,2,3 \
|
106 |
+
--image_type 0,1,2 \
|
107 |
+
--input_type 2 \
|
108 |
+
--model gpt-4v \
|
109 |
+
--model_version gpt-4-vision-preview \
|
110 |
+
--api_key sk-************************************************
|
111 |
+
```
|
112 |
+
|
113 |
+
在MULTI-Elite上测试Qwen-VL模型,使用图片描述输入,跳过所有不包含图片的问题,仅评测选择题,自动设置cuda设备:
|
114 |
+
|
115 |
+
```shell
|
116 |
+
python eval.py \
|
117 |
+
--problem_file ../data/problem_v1.2.2_20240212_release.json \
|
118 |
+
--subset ../data/hard_list_v1.2.1_20240206.json \
|
119 |
+
--caption_file ../data/captions_v1.2.0_20231217.csv \
|
120 |
+
--questions_type 0,1 \
|
121 |
+
--image_type 1,2 \
|
122 |
+
--input_type 1 \
|
123 |
+
--model qwen-vl \
|
124 |
+
--model_dir ../models/Qwen-VL-Chat
|
125 |
+
```
|
126 |
+
|
127 |
+
测脚本将在根目录下生成`results`文件夹,结果将保存在`../results/EXPERIMENT_NAME`中。评测过程中,脚本将在`../results/EXPERIMENT_NAME/checkpoints`中保存检查点,评测完成后您可以删除它们。如果评测被中断,您可以从最后一个检查点继续:
|
128 |
+
|
129 |
+
```shell
|
130 |
+
python eval.py \
|
131 |
+
--checkpoint_dir ../results/EXPERIMENT_NAME
|
132 |
+
```
|
133 |
+
|
134 |
+
大多数参数都保存在`../results/EXPERIMENT_NAME/args.json`中,因此您可以继续评测而无需再次指定所有参数。请注意,出于安全原因,`--api_key`不会保存在`args.json`中,因此您需要再次指定它。
|
135 |
+
|
136 |
+
```shell
|
137 |
+
python eval.py \
|
138 |
+
--checkpoint_dir ../results/EXPERIMENT_NAME \
|
139 |
+
--api_key sk-************************************************
|
140 |
+
```
|
141 |
+
|
142 |
+
有关参数的更多详细信息,请使用`python eval.py -h`并参考`args.py`和`eval.py`。
|
143 |
+
|
144 |
+
### 为您的模型增加支持
|
145 |
+
|
146 |
+
建议在此之前阅读`eval/models`中其他评测器的代码。
|
147 |
+
|
148 |
+
创建`class YourModelEvaluator`并实现 `generate_answer(self, question:dict)`以匹配`eval.py`和`eval.sh`中支持的设计,这预计将大大简化代码实现过程。
|
149 |
+
|
150 |
+
**不要忘记将它们的调用方式添加到`args.py`中,以方便使用。**
|
151 |
+
|
152 |
+
您可以在`eval`文件夹中执行`model_tester.py`来检查您的实现的正确性。各种问题,包括实现错误、代码中的小错误,甚至错误的环境设置都可能导致评测失败。文件中提供的示例覆盖了我们基准测试中呈现的大多数情况类型。随意更改其中的代码以调试您的代码😊
|
153 |
+
|
154 |
+
```shell
|
155 |
+
python model_tester.py <args> # args 类似于上面的默认设置
|
156 |
+
```
|
157 |
+
|
158 |
+
### 为图片创建描述和OCR数据
|
159 |
+
|
160 |
+
为图片生成描述或OCR数据,并以下面的格式保存在csv中:
|
161 |
+
|
162 |
+
```
|
163 |
+
../data/images/czls/502_1.png,a cartoon drawing of a man standing in front of a large block
|
164 |
+
../data/images/czls/525_1.png,a chinese newspaper with the headline, china's new year
|
165 |
+
...
|
166 |
+
```
|
167 |
+
|
168 |
+
我们提供了两个示例脚本来为图片生成标题(`image_caption.py`)和OCR数据(`image_ocr.py`)。
|
169 |
+
|
170 |
+
## 📮 如何提交
|
171 |
+
|
172 |
+
您需要首先准备一个UTF-8编码的JSON文件,格式如下:
|
173 |
+
|
174 |
+
```
|
175 |
+
{
|
176 |
+
"czsx_0_0": {
|
177 |
+
"question_id": "czsx_0_0",
|
178 |
+
"question_image_number": 1,
|
179 |
+
"image_list": [...],
|
180 |
+
"input_message": ...,
|
181 |
+
"prediction": "C"
|
182 |
+
},
|
183 |
+
...
|
184 |
+
}
|
185 |
+
```
|
186 |
+
如果您使用我们的官方代码评测模型,可以直接压缩实验结果文件夹`./results/EXPERIMENT_NAME`。
|
187 |
+
|
188 |
+
然后,您可以将你的结果提交到我们的[评测平台]()(即将推出)。
|
189 |
+
|
190 |
+
欢迎拉取请求(Pull Request)并贡献您的代码到我们的评测代码中。我们感激不尽!
|
191 |
+
|
192 |
+
**[提示]** 感谢您对 MULTI 数据集的关注!由于自动评测平台尚未上线,请填写[此问卷](https://wj.sjtu.edu.cn/q/89UmRAJn)以获取评测结果,您的个人信息将被严格保密,请放心填写。🤗
|
193 |
+
|
194 |
+
## 📑 引用
|
195 |
+
|
196 |
+
如果您觉得我们的工作有用,请引用我们!
|
197 |
+
|
198 |
+
```
|
199 |
+
@misc{zhu2024multi,
|
200 |
+
title={{MULTI}: Multimodal Understanding Leaderboard with Text and Images},
|
201 |
+
author={Zichen Zhu and Yang Xu and Lu Chen and Jingkai Yang and Yichuan Ma and Yiming Sun and Hailin Wen and Jiaqi Liu and Jinyu Cai and Yingzi Ma and Situo Zhang and Zihan Zhao and Liangtai Sun and Kai Yu},
|
202 |
+
year={2024},
|
203 |
+
eprint={2402.03173},
|
204 |
+
archivePrefix={arXiv},
|
205 |
+
primaryClass={cs.CL}
|
206 |
+
}
|
207 |
+
```
|
208 |
+
|
209 |
+
## 📧 联系我们
|
210 |
+
|
211 |
+
如果你有任何问题,请随时通过电子邮件联系我们 `[email protected]` 和 `[email protected]`
|
captions_v1.2.0_20231217.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
hard_list_v1.2.1_20240206.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
["gzsw_36_0", "czwl_311_0", "gzls_365_0", "gzyy_119_0", "gzls_252_0", "gzdl_30_1", "czzz_314_0", "gzzz_440_0", "gzwl_635_0", "gzwl_695_0", "czyw_57_0", "shxc_550_0", "czdl_326_0", "czsx_433_0", "dxjsj_346_0", "czhx_99_0", "gzyw_35_0", "shxc_775_0", "gzsx_490_0", "gzhx_377_0", "gzhx_618_0", "dxjsj_297_0", "gzsw_285_0", "gzhx_433_0", "czsw_269_2", "gzhx_229_0", "gzls_348_0", "gzdl_369_0", "gzwl_144_0", "gzsw_152_0", "gzhx_436_2", "shxc_36_0", "gzwl_238_0", "gzhx_374_0", "dxjsj_6_3", "shjk_7100_0", "czsw_194_1", "czzz_95_0", "gzsx_361_0", "gzdl_205_1", "gzdl_212_0", "czwl_107_0", "gzls_707_0", "czdl_285_0", "gzdl_212_2", "czyy_53_0", "czyw_4_2", "shxc_829_0", "shxc_251_0", "gzls_85_0", "shjk_644_0", "gzsx_183_0", "czls_274_0", "gzls_675_0", "gzdl_198_0", "czdl_154_0", "dxjsj_545_0", "gzsw_518_0", "czwl_227_0", "shxc_746_0", "shxc_1373_0", "gzhx_188_0", "gzls_247_0", "gzls_2_0", "shjk_7172_0", "gzwl_380_0", "czsx_425_0", "gzwl_28_0", "shjk_3867_0", "gzhx_303_0", "gzsw_301_0", "gzls_309_0", "czhx_317_2", "gzzz_656_0", "czls_336_0", "gzyw_1_0", "dxjsj_186_0", "gzsx_90_0", "gzls_50_0", "gzhx_175_1", "shjk_2057_0", "shxc_423_0", "czls_358_0", "gzls_647_0", "gzls_611_0", "czyw_27_2", "gzwl_486_0", "czdl_18_5", "czzz_120_0", "shjk_3896_0", "gzwl_289_0", "shxc_1344_0", "shjk_2662_0", "dxjsj_91_0", "shxc_1315_0", "gzhx_337_0", "gzls_404_0", "gzsw_467_0", "gzyy_30_3", "dxjsj_347_0", "dxjsj_274_0", "czwl_271_1", "czzz_215_0", "czhx_314_4", "gzsw_127_0", "gzsx_126_1", "gzsx_484_0", "czls_51_1", "shxc_1191_0", "czwl_221_0", "gzsx_155_0", "czsx_219_0", "shjk_1868_0", "czwl_272_0", "czsx_364_0", "czyy_7_0", "gzhx_560_0", "czyy_51_0", "czls_189_0", "gzyy_24_4", "gzhx_242_0", "shxc_88_0", "gzwl_106_0", "gzdl_200_0", "gzhx_541_3", "shxc_696_0", "gzsw_129_0", "gzwl_696_0", "shjk_819_0", "gzls_136_0", "gzdl_43_1", "czsx_181_0", "shjk_1773_0", "czls_52_0", "dxjsj_133_0", "czdl_275_0", "gzsw_477_0", "czwl_305_0", "czsw_201_0", "gzsx_106_0", "gzls_256_0", "gzwl_117_0", "gzsx_330_0", "czhx_246_0", "gzhx_469_2", "gzsx_19_0", "gzzz_432_0", "shjk_1483_0", "czdl_134_0", "gzzz_383_0", "gzyy_5_0", "gzzz_712_0", "czdl_274_0", "gzls_28_0", "gzhx_350_0", "czwl_267_0", "gzdl_301_0", "gzyy_142_0", "gzhx_22_0", "gzwl_518_0", "czdl_50_0", "czls_491_0", "gzhx_528_0", "gzsx_231_0", "gzls_474_0", "gzhx_378_0", "gzzz_477_0", "czhx_292_0", "shxc_301_0", "czhx_268_0", "czhx_80_0", "gzsw_26_0", "gzwl_561_0", "czsx_184_0", "gzzz_637_0", "czsw_150_0", "shjk_7217_0", "czyw_29_0", "gzyy_28_4", "czsx_111_0", "czzz_28_0", "gzsw_511_0", "czsw_477_0", "czsx_352_0", "gzwl_732_0", "gzyy_15_0", "gzls_148_0", "czyy_13_0", "gzdl_343_0", "gzsw_179_0", "gzzz_433_0", "gzls_628_0", "gzdl_96_1", "dxjsj_325_0", "gzls_25_0", "gzhx_347_2", "gzzz_790_0", "gzzz_785_0", "gzwl_205_0", "gzwl_541_0", "czsw_475_4", "gzls_288_0", "gzsx_581_0", "shjk_231_0", "czsx_168_0", "czyy_71_0", "gzdl_140_1", "gzyy_128_0", "gzhx_602_0", "gzhx_238_0", "czdl_66_0", "gzls_437_0", "czdl_199_0", "gzhx_328_0", "gzhx_358_0", "gzzz_752_0", "gzdl_70_0", "czzz_189_0", "gzsw_68_0", "gzls_539_0", "gzhx_791_0", "gzdl_428_2", "shjk_1034_0", "shjk_4650_0", "czls_427_0", "czdl_287_0", "czyy_26_0", "czhx_105_0", "gzdl_165_3", "gzsx_388_0", "czdl_208_0", "shxc_906_0", "shjk_6282_0", "gzwl_448_0", "czwl_195_0", "gzyw_26_0", "gzhx_426_0", "shxc_410_0", "gzzz_136_0", "gzhx_91_0", "gzdl_81_0", "czsx_217_0", "gzls_324_0", "czsx_62_0", "czdl_381_0", "gzyw_15_0", "gzhx_582_0", "gzyy_117_0", "czzz_326_0", "czsw_316_0", "gzls_71_0", "czyw_28_6", "gzls_36_0", "dxjsj_193_0", "czyy_12_0", "czwl_239_0", "shjk_4487_0", "gzhx_681_1", "gzyy_41_0", "gzsx_448_0", "gzdl_31_0", "czhx_161_4", "dxjsj_522_0", "gzsx_253_0", "czhx_214_0", "czyw_1_0", "gzwl_400_0", "dxjsj_409_0", "shjk_1889_0", "czyy_25_0", "czsx_80_0", "shjk_7230_0", "gzwl_493_0", "dxjsj_160_0", "czzz_89_0", "czdl_269_2", "gzsx_428_0", "gzyw_19_0", "czwl_76_0", "czzz_190_0", "gzwl_160_0", "gzsx_477_1", "gzsw_250_0", "czzz_1_0", "gzsw_245_0", "gzsw_80_0", "gzzz_125_0", "shxc_1116_0", "gzsx_542_0", "czzz_196_0", "shjk_3320_0", "czsx_186_0", "czls_535_0", "gzhx_206_0", "gzzz_189_0", "shxc_651_0", "czsx_106_0", "gzls_121_0", "czls_190_0", "gzdl_212_1", "dxjsj_384_0", "gzzz_801_0", "gzwl_161_0", "czyw_12_0", "gzwl_169_0", "shjk_2690_0", "gzls_422_0", "shxc_198_0", "gzzz_796_0", "shjk_5042_0", "gzhx_87_0", "gzwl_16_0", "gzzz_797_0", "shjk_7184_0", "gzzz_401_0", "czsw_151_1", "shxc_161_0", "czdl_233_0", "czsw_137_1", "gzhx_469_0", "czdl_339_0", "shxc_9_0", "czls_320_0", "gzzz_476_1", "shjk_1825_0", "gzhx_349_0", "shxc_1379_0", "gzyw_27_0", "shjk_181_0", "gzsw_472_0", "gzls_356_0", "shxc_1288_0", "czdl_333_0", "czyy_38_0", "shxc_1185_0", "gzdl_405_0", "czsx_336_0", "czsx_385_0", "gzzz_115_0", "gzzz_260_0", "dxjsj_130_0", "shxc_923_0", "czsw_137_0", "gzsw_438_2", "czsx_351_0", "gzsx_91_0", "gzwl_231_0", "gzwl_576_0", "dxjsj_539_0", "gzwl_396_0", "shxc_1121_0", "gzhx_506_0", "czls_299_0", "gzhx_731_0", "czsx_342_0", "shxc_1031_0", "gzdl_179_1", "czsw_268_1", "gzdl_8_1", "gzwl_394_0", "czdl_73_0", "gzhx_715_0", "shxc_478_0", "czsx_204_0", "dxjsj_134_0", "gzdl_393_0", "gzsx_196_0", "gzdl_277_1", "gzwl_275_0", "czyy_54_0", "shjk_1062_0", "czls_511_0", "czsx_199_0", "gzyw_38_0", "dxjsj_399_0", "czhx_46_3", "czls_238_0", "czzz_319_0", "czyy_32_0", "czls_354_2", "gzzz_660_0", "shxc_1198_0", "czdl_269_1", "gzsx_304_0", "shjk_1901_0", "czsw_38_0", "czls_83_0", "czsx_338_0", "gzhx_371_0", "gzwl_306_0", "gzsw_233_0", "czyw_28_4", "czhx_137_0", "czdl_121_0", "czzz_216_0", "czsx_220_0", "czzz_57_0", "gzwl_135_0", "gzwl_251_2", "gzzz_368_0", "czhx_250_0", "shjk_4695_0", "gzwl_512_0", "gzyy_84_0", "gzsx_572_0", "dxjsj_549_0", "shjk_196_0", "shxc_378_0", "gzzz_249_0", "gzzz_640_0", "czls_326_0", "gzzz_455_0", "czyw_6_0", "dxjsj_425_0", "gzsw_434_0", "gzyw_45_0", "gzyy_115_0", "czyw_24_0", "gzsw_214_0", "gzwl_14_0", "shjk_1002_0", "dxjsj_465_0", "gzzz_538_0", "shxc_711_0", "dxjsj_380_0", "gzhx_125_0", "shjk_4376_0", "gzyy_97_0", "gzsw_261_0", "gzls_426_0", "czsx_435_0", "gzzz_364_0", "czzz_218_0", "gzhx_471_0", "gzzz_108_0", "gzdl_140_0", "gzwl_72_0", "gzwl_631_0", "shxc_720_0", "gzwl_590_0", "gzzz_755_0", "shxc_1209_0", "gzsx_83_0", "shjk_3826_0", "czzz_67_0", "czsw_324_0", "shjk_656_0", "gzzz_27_0", "czzz_101_0", "gzhx_360_0", "gzsx_348_0", "gzhx_393_0", "gzdl_423_0", "gzsw_263_0", "gzls_149_0", "gzdl_40_0", "gzwl_166_0", "shjk_4556_0", "gzsx_43_0", "gzhx_130_0", "shjk_612_0", "gzls_573_0", "gzhx_185_0", "gzhx_636_0", "gzhx_474_0", "gzyy_37_0", "gzwl_649_0", "gzdl_354_0", "gzyy_24_3", "czdl_308_0", "gzhx_541_2", "czzz_240_0", "gzwl_275_1", "gzhx_45_0", "gzdl_195_0", "gzzz_638_0", "dxjsj_441_0", "czhx_351_0", "gzsw_545_0", "czsw_325_0", "gzsw_383_0", "czsw_293_0", "gzwl_627_0", "gzzz_184_0", "dxjsj_497_0", "gzwl_170_0", "shjk_98_0", "czsx_388_0", "czdl_126_0", "gzdl_176_1", "gzzz_479_0", "gzhx_293_0", "czyw_28_3", "gzyw_56_0", "czls_540_0", "shjk_2717_0", "gzzz_734_0", "gzls_621_0", "czhx_51_1", "gzyy_29_0"]
|
|
|
|
knowledge_v1.2.2_20240212_release.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d8814c98fec303191e2047807787271869284928e1424a144f6eeb2daea453d6
|
3 |
-
size 13619988
|
|
|
|
|
|
|
|
problem_v1.2.2_20240212_release_hf.json → overview.png
RENAMED
File without changes
|
problem_v1.2.2_20240212_release.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:76c4759aa18e0443bd27a434eb2de479afaa4fd637dc3dc87b1f55f404c00527
|
3 |
-
size 11992872
|
|
|
|
|
|
|
|