baiqili
commited on
Commit
·
f83e3db
1
Parent(s):
d5e6794
added readme.md
Browse files- README.md +67 -0
- data.jsonl +0 -0
README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TimeBlind Benchmark
|
| 2 |
+
|
| 3 |
+
TimeBlind: A video VQA benchmark for evaluating temporal understanding in vision-language models.
|
| 4 |
+
|
| 5 |
+
<p align="center">
|
| 6 |
+
|
| 7 |
+
[🏠**Home Page**(coming soon)]() | [🤗**HuggingFace**](https://huggingface.co/datasets/BaiqiL/TimeBlind) | [**📖Paper**(coming soon)]() | [🖥️ **Code**](https://github.com/Baiqi-Li/TimeBlind)
|
| 8 |
+
|
| 9 |
+
</p>
|
| 10 |
+
|
| 11 |
+
## Setup
|
| 12 |
+
|
| 13 |
+
```bash
|
| 14 |
+
git clone https://github.com/Baiqi-Li/TimeBlind.git
|
| 15 |
+
cd TimeBlind
|
| 16 |
+
git clone https://huggingface.co/datasets/BaiqiL/TimeBlind
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Data Format
|
| 20 |
+
|
| 21 |
+
Each sample in `TimeBlind/data.jsonl` contains:
|
| 22 |
+
- `index`: unique sample index (0, 1, 2, ...)
|
| 23 |
+
- `video_path`: path to video file (e.g., `TimeBlind/videos/vid_00000_0.mp4`)
|
| 24 |
+
- `question`: the question
|
| 25 |
+
- `answer`: the ground truth answer
|
| 26 |
+
- `type`: `"yes_no"` or `"multiple_choice"`
|
| 27 |
+
|
| 28 |
+
## Evaluation
|
| 29 |
+
|
| 30 |
+
see evaluate.py in our github page for more details!
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
import json
|
| 34 |
+
from utils import _load_json_list, build_answers, get_scores, add_question_suffix
|
| 35 |
+
|
| 36 |
+
data = _load_json_list("TimeBlind/data.jsonl")
|
| 37 |
+
predictions = []
|
| 38 |
+
|
| 39 |
+
for sample in data:
|
| 40 |
+
video_path = sample["video_path"]
|
| 41 |
+
question = add_question_suffix(sample["question"], sample["type"])
|
| 42 |
+
|
| 43 |
+
# Replace with your model inference
|
| 44 |
+
model_output = your_model(video_path, question)
|
| 45 |
+
|
| 46 |
+
predictions.append({
|
| 47 |
+
"index": sample["index"],
|
| 48 |
+
"video_path": video_path,
|
| 49 |
+
"question": question,
|
| 50 |
+
"model_output": model_output,
|
| 51 |
+
})
|
| 52 |
+
|
| 53 |
+
json.dump(predictions, open("predictions.json", "w"), indent=2)
|
| 54 |
+
|
| 55 |
+
answers = build_answers(predictions, data)
|
| 56 |
+
scores = get_scores(answers)
|
| 57 |
+
print(scores) # {'Q_Acc': ..., 'V_Acc': ..., 'Acc': ..., 'I_Acc': ...}
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## Metrics
|
| 61 |
+
I-Acc serves as our primary metric.
|
| 62 |
+
|
| 63 |
+
- **Acc**: Binary VQA accuracy
|
| 64 |
+
- **Q_Acc**: Question accuracy
|
| 65 |
+
- **V_Acc**: Video accuracy
|
| 66 |
+
- **I_Acc**: **Instance accuracy**
|
| 67 |
+
|
data.jsonl
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|