Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -18,11 +18,38 @@ paperswithcode_id: mapeval-visual
|
|
18 |
|
19 |
This dataset was introduced in [MapEval](https://arxiv.org/abs/2501.00316)
|
20 |
|
|
|
|
|
|
|
|
|
21 |
## Usage
|
22 |
```python
|
23 |
from datasets import load_dataset
|
24 |
-
|
25 |
# Load dataset
|
26 |
-
ds = load_dataset("MapEval/MapEval-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
```
|
28 |
|
|
|
18 |
|
19 |
This dataset was introduced in [MapEval](https://arxiv.org/abs/2501.00316)
|
20 |
|
21 |
+
## Prerequisite
|
22 |
+
|
23 |
+
Download the Vdata.zip and extract in the working directory.
|
24 |
+
|
25 |
## Usage
|
26 |
```python
|
27 |
from datasets import load_dataset
|
28 |
+
import PIL.Image
|
29 |
# Load dataset
|
30 |
+
ds = load_dataset("MapEval/MapEval-Visual", name="benchmark")
|
31 |
+
|
32 |
+
for item in ds["test"]:
|
33 |
+
|
34 |
+
# Start with a clear task description
|
35 |
+
prompt = (
|
36 |
+
"You are a highly intelligent assistant. "
|
37 |
+
"Based on the given image, answer the multiple-choice question by selecting the correct option.\n\n"
|
38 |
+
"Question:\n" + item["question"] + "\n\n"
|
39 |
+
"Options:\n"
|
40 |
+
)
|
41 |
+
|
42 |
+
# List the options more clearly
|
43 |
+
for i, option in enumerate(item["options"], start=1):
|
44 |
+
prompt += f"{i}. {option}\n"
|
45 |
+
|
46 |
+
# Add a concluding sentence to encourage selection of the answer
|
47 |
+
prompt += "\nSelect the best option by choosing its number."
|
48 |
+
|
49 |
+
# Pass the image to the model along with the prompt
|
50 |
+
img = PIL.Image.open(item["context"])
|
51 |
+
|
52 |
+
# Use the prompt as needed
|
53 |
+
print([prompt, img]) # Replace with your processing logic
|
54 |
```
|
55 |
|