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
task_categories:
|
| 4 |
+
- video-classification
|
| 5 |
+
- visual-question-answering
|
| 6 |
+
- question-answering
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
size_categories:
|
| 10 |
+
- n<1K
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# MORSE-500 Benchmark
|
| 14 |
+
|
| 15 |
+
<table>
|
| 16 |
+
<tr>
|
| 17 |
+
<td style="padding: 0;">
|
| 18 |
+
<a href="https://morse-500.github.io">
|
| 19 |
+
<img src="https://img.shields.io/badge/Website-1E90FF?style=for-the-badge&logo=firefox&logoColor=ffffff&labelColor" alt="Website">
|
| 20 |
+
</a>
|
| 21 |
+
</td>
|
| 22 |
+
<td style="padding: 0;">
|
| 23 |
+
<a href="https://huggingface.co/datasets/video-reasoning/morse-500">
|
| 24 |
+
<img src="https://img.shields.io/badge/Data-D5A848?style=for-the-badge&logo=huggingface&logoColor=ffffff&labelColor" alt="Data">
|
| 25 |
+
</a>
|
| 26 |
+
</td>
|
| 27 |
+
<td style="padding: 0;">
|
| 28 |
+
<a href="https://huggingface.co/datasets/video-reasoning/morse-500-view">
|
| 29 |
+
<img src="https://img.shields.io/badge/View-D5A848?style=for-the-badge&logo=huggingface&logoColor=ffffff&labelColor" alt="Viewer">
|
| 30 |
+
</a>
|
| 31 |
+
</td>
|
| 32 |
+
<td style="padding: 0;">
|
| 33 |
+
<a href="https://github.com/morse-benchmark/morse-500">
|
| 34 |
+
<img src="https://img.shields.io/badge/Code-000000?style=for-the-badge&logo=github&logoColor=white" alt="Code">
|
| 35 |
+
</a>
|
| 36 |
+
</td>
|
| 37 |
+
<td style="padding: 0;">
|
| 38 |
+
<a href="https://arxiv.org/abs/TBA">
|
| 39 |
+
<img src="https://img.shields.io/badge/arXiv-TBA-b31b1b.svg?style=for-the-badge" alt="arXiv">
|
| 40 |
+
</a>
|
| 41 |
+
</td>
|
| 42 |
+
</tr>
|
| 43 |
+
</table>
|
| 44 |
+
|
| 45 |
+
## π₯ News
|
| 46 |
+
- **May 15, 2025**: We release **`MORSE-500`**, 500 programmatically generated videos across six reasoning categories: abstract, mathematical, physical, planning, spatial, and temporal, to stress-test multimodal reasoning. Frontier models including OpenAI o3 and Gemini 2.5 Pro score lower than 25% accuracy (see π[`Leaderboard`](https://morse-500.github.io/#leaderboard)).
|
| 47 |
+
- **Visit π€ Data: [`morse-500`](https://huggingface.co/datasets/video-reasoning/morse-500) for newer updates**
|
| 48 |
+
|
| 49 |
+
## π¦ Resource
|
| 50 |
+
- π Websie: [`morse-500`](https://morse-500.github.io)
|
| 51 |
+
- π€ Data: [`morse-500`](https://huggingface.co/datasets/video-reasoning/morse-500)
|
| 52 |
+
- π€ Video Viewer: [`morse-500-view`](https://huggingface.co/datasets/video-reasoning/morse-500-view)
|
| 53 |
+
- π» Code: [`morse-500`](https://github.com/morse-benchmark/morse-500)
|
| 54 |
+
- π Paper: [`arXiv:TBA`](https://arxiv.org/abs/xxx)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
## β¨ Key Features
|
| 58 |
+
|
| 59 |
+
| Aspect | Details |
|
| 60 |
+
| --- | --- |
|
| 61 |
+
| **Fresh & Portable** | 500 newly cooked video clips + CSV metadata that runs fast |
|
| 62 |
+
| **Scalable Difficulty** | Videos are generated programmatically so we can dial up complexity and release harder versions as models improve |
|
| 63 |
+
| **Diverse Categories** | Spanning *Abstract, Mathematical, Physical, Planning, Spatial, Temporal (+ Causal)* β a vibrant mix of the reasoning types that matter |
|
| 64 |
+
| **Pure Visual Reasoning** | Questions are baked right into the videos. No text crutches, no shortcuts β if you can't see it, you can't solve it |
|
| 65 |
+
| **Developer-Friendly** | A β[-view](https://huggingface.co/datasets/video-reasoning/morse-500-view)β subset streams directly on **Hugging Face**, making browsing and debugging smoother than a sunny afternoon |
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
## π Dataset Structure
|
| 69 |
+
|
| 70 |
+
- `test.csv`: Contains the dataset metadata, including video file name, query, ground_truth, question_text, and category
|
| 71 |
+
- `test.zip`: Contains all MP4 video files
|
| 72 |
+
- `test_sz512.zip`: Contains MP4 video files resized to 512px for longside while keeping the original aspect ratio
|
| 73 |
+
|
| 74 |
+
## β‘ Quick Start
|
| 75 |
+
|
| 76 |
+
```bash
|
| 77 |
+
### In bash ###
|
| 78 |
+
# download the videos
|
| 79 |
+
git clone https://huggingface.co/datasets/video-reasoning/morse-500
|
| 80 |
+
|
| 81 |
+
# unzip the videos
|
| 82 |
+
cd morse-500
|
| 83 |
+
# unzip test.zip -d test # original size
|
| 84 |
+
unzip test_sz512.zip -d test_sz512 # long side resized to 512
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
### In python ###
|
| 88 |
+
# load dataset metadata ("idx", "video", "query", "question_text", "ground_truth", "category")
|
| 89 |
+
from datasets import load_dataset
|
| 90 |
+
dataset = load_dataset('video-reasoning/morse-500')
|
| 91 |
+
dataset = dataset['test']
|
| 92 |
+
video_root = 'test_sz512' # use the resize videos
|
| 93 |
+
|
| 94 |
+
# run your model on the benchmark
|
| 95 |
+
for i, example in enumerate(dataset):
|
| 96 |
+
video_path = f"{video_root}/" + example["video"]
|
| 97 |
+
print(f"Processing {i} {video_path}")
|
| 98 |
+
query = "Answer the question in this video."
|
| 99 |
+
gt = example['ground_truth']
|
| 100 |
+
|
| 101 |
+
# if your model has video support
|
| 102 |
+
answer = query_video(model_name, video_path, query)
|
| 103 |
+
# otherwise query with image frames, default 2 fps capped at 32 total frames
|
| 104 |
+
# answer = query_video_frames(model_name, video_path, query, fps=2, max_num_frames=32)
|
| 105 |
+
|
| 106 |
+
print(f"Answer: {answer}")
|
| 107 |
+
print(f"GT: {gt}")
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
Example query_video function
|
| 111 |
+
```python
|
| 112 |
+
model_name = "xxx"
|
| 113 |
+
openai_api_key = "xxx"
|
| 114 |
+
openai_api_base = "xxx"
|
| 115 |
+
client = OpenAI(
|
| 116 |
+
api_key=openai_api_key,
|
| 117 |
+
base_url=openai_api_base,
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
def encode_b64(file_path):
|
| 122 |
+
with open(file_path, "rb") as file:
|
| 123 |
+
return base64.b64encode(file.read()).decode("utf-8")
|
| 124 |
+
|
| 125 |
+
base64_video = encode_b64(video_path)
|
| 126 |
+
video_url = f"data:video/mp4;base64,{base64_video}"
|
| 127 |
+
|
| 128 |
+
response = client.chat.completions.create(
|
| 129 |
+
model=model_name,
|
| 130 |
+
messages=[
|
| 131 |
+
{
|
| 132 |
+
"role": "user",
|
| 133 |
+
"content": [
|
| 134 |
+
{
|
| 135 |
+
"type": "text",
|
| 136 |
+
"text": query
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "video_url",
|
| 140 |
+
"video_url": {"url": video_url},
|
| 141 |
+
},
|
| 142 |
+
],
|
| 143 |
+
}
|
| 144 |
+
],
|
| 145 |
+
)
|
| 146 |
+
|
| 147 |
+
result = response.choices[0].message.content
|
| 148 |
+
print(result)
|
| 149 |
+
```
|
| 150 |
+
## More scripts can be found on Github https://github.com/morse-benchmark/morse-500
|