RunsenXu commited on
Commit
9db30e8
·
verified ·
1 Parent(s): 28a7b5f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -3
README.md CHANGED
@@ -42,11 +42,11 @@ This repo contains evaluation code for the paper "[MMSI-Bench: A Benchmark for M
42
 
43
 
44
  ## 🔔News
45
- <!-- **🔥[2025-05-31]: MMSI-Bench has been supported in the [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) repository.** -->
46
 
47
- **🔥[2025-05-30]: We released the ArXiv paper.**
48
 
49
- ## Load Dataset
50
  ```
51
  from datasets import load_dataset
52
 
@@ -54,6 +54,42 @@ mmsi_bench = load_dataset("RunsenXu/MMSI-Bench")
54
  print(mmsi_bench)
55
  ```
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  ## Evaluation
59
  Please refer to the [evaluation guidelines](https://github.com/open-compass/VLMEvalKit/blob/main/docs/en/Quickstart.md) of [VLMEvalKit](https://github.com/open-compass/VLMEvalKit)
 
42
 
43
 
44
  ## 🔔News
45
+ **🔥[2025-06-9]: MMSI-Bench has been supported in the [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) repository.**
46
 
47
+ **🔥[2025-05-30]: We released the ArXiv paper.**
48
 
49
+ ## Load Dataset
50
  ```
51
  from datasets import load_dataset
52
 
 
54
  print(mmsi_bench)
55
  ```
56
 
57
+ ## After downloading the parquet file, read each record, decode images from binary, and save them as JPG files.
58
+ ```
59
+ import pandas as pd
60
+ import os
61
+
62
+ df = pd.read_parquet('MMSI_Bench.parquet')
63
+
64
+ output_dir = './images'
65
+ os.makedirs(output_dir, exist_ok=True)
66
+
67
+ for idx, row in df.iterrows():
68
+ id_val = row['id']
69
+ images = row['images']
70
+ question_type = row['question_type']
71
+ question = row['question']
72
+ answer = row['answer']
73
+ thought = row['thought']
74
+
75
+ image_paths = []
76
+ if images is not None:
77
+ for n, img_data in enumerate(images):
78
+ image_path = f"{output_dir}/{id_val}_{n}.jpg"
79
+ with open(image_path, "wb") as f:
80
+ f.write(img_data)
81
+ image_paths.append(image_path)
82
+ else:
83
+ image_paths = []
84
+
85
+ print(f"id: {id_val}")
86
+ print(f"images: {image_paths}")
87
+ print(f"question_type: {question_type}")
88
+ print(f"question: {question}")
89
+ print(f"answer: {answer}")
90
+ print(f"thought: {thought}")
91
+ print("-" * 50)
92
+ ```
93
 
94
  ## Evaluation
95
  Please refer to the [evaluation guidelines](https://github.com/open-compass/VLMEvalKit/blob/main/docs/en/Quickstart.md) of [VLMEvalKit](https://github.com/open-compass/VLMEvalKit)