pritamqu commited on
Commit
550bb8f
·
verified ·
1 Parent(s): eebca7e

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) [year] [fullname]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -1,3 +1,65 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ pretty_name: VCRBench
6
+ ---
7
+
8
+ # VCRBench: Exploring Long-form Causal Reasoning Capabilities of Large Video Language Models
9
+
10
+ <a href='https://arxiv.org/abs/2505.08455'><img src='https://img.shields.io/badge/arXiv-paper-red'></a>
11
+ <a href='https://pritamqu.github.io/VCRBench/'><img src='https://img.shields.io/badge/project-VCRBench-blue'></a>
12
+ <a href='https://huggingface.co/datasets/pritamqu/VCRBench'><img src='https://img.shields.io/badge/huggingface-datasets-green'></a>
13
+ <a href='https://github.com/pritamqu/VCRBench'><img src='https://img.shields.io/badge/github-repository-purple'></a>
14
+ <a href='https://pritamqu.github.io/VCRBench/#leaderboard'><img src='https://img.shields.io/badge/vcrbench-leaderboard-yellow'></a>
15
+
16
+
17
+ Authors: [Pritam Sarkar](https://pritamsarkar.com) and [Ali Etemad](https://www.aiimlab.com/ali-etemad)
18
+
19
+ This repository provides the official implementation of **[VCRBench](https://arxiv.org/abs/2505.08455)**.
20
+
21
+ ![](./sample.png)
22
+
23
+ ## Usage
24
+
25
+ ```
26
+ from dataset import VCRBench
27
+ dataset=VCRBench(question_file="pp.json",
28
+ video_root="./",
29
+ mode='video',
30
+ )
31
+
32
+ for sample in dataset:
33
+ print(sample['question'], )
34
+ print(sample['answer'], )
35
+ print('*'*10)
36
+
37
+ break
38
+
39
+ ```
40
+
41
+
42
+ ### Licensing Information
43
+
44
+ This dataset incorporates samples from [CrossTask](https://github.com/DmZhukov/CrossTask/blob/master/LICENSE) that are subject to their respective original licenses. Users must adhere to the terms and conditions specified by these licenses.
45
+ This project does not impose any additional constraints beyond those stipulated in the original licenses. Users must ensure their usage complies with all applicable laws and regulations.
46
+ This repository is released under the **MIT**. See [LICENSE](LICENSE) for details.
47
+
48
+ ### Citation Information
49
+
50
+ If you find this work useful, please use the given bibtex entry to cite our work:
51
+
52
+ ```
53
+ @misc{sarkar2025vcrbench,
54
+ title={VCRBench: Exploring Long-form Causal Reasoning Capabilities of Large Video Language Models},
55
+ author={Pritam Sarkar and Ali Etemad},
56
+ year={2025},
57
+ eprint={2505.08455},
58
+ archivePrefix={arXiv},
59
+ primaryClass={cs.CV},
60
+ }
61
+ ```
62
+
63
+
64
+ ### Contact
65
+ For any queries please create an issue at [VCRBench](https://github.com/pritamqu/VCRBench).
data.json ADDED
The diff for this file is too large to render. See raw diff
 
data.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d8c59f734969fa0494c702350454e7096113f303f3cee253219487f1b861236
3
+ size 22475
dataset.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import torch
3
+ import os
4
+ import json
5
+
6
+ PROMPT='''The given video consists of multiple short clips, each showing a different segment needed to complete the task: {goal}.
7
+ These clips are randomly shuffled, and your job is to arrange them in the correct order to complete the task: {goal}.
8
+ The clip numbers are mentioned at the beginning of each clip as Clip 1, Clip 2, and so on.
9
+ In order to solve this task, first, you should identify the activity that is performed in each clip, and then use your reasoning and common sense to arrange these clips to successfully complete the task.
10
+
11
+ The final output should be in this format:
12
+
13
+ Correct order: <mention the Clip numbers separated by a comma>
14
+ '''
15
+
16
+ pp_prompts=dict(
17
+ default=PROMPT,
18
+ rrd="",
19
+ )
20
+ valid_modes=list(pp_prompts.keys())
21
+
22
+ class VCRBench(torch.utils.data.Dataset):
23
+ """basic dataset for inference"""
24
+
25
+ def __init__(
26
+ self,
27
+ question_file,
28
+ video_root,
29
+ mode='default',
30
+ video_load_fn=None,
31
+ load_video_kwargs={}
32
+ ) -> None:
33
+ super(VCRBench, self).__init__()
34
+ self.data = json.load(open(question_file))
35
+ self.video_load_fn = video_load_fn
36
+ self.load_video_kwargs = load_video_kwargs
37
+ assert mode in valid_modes, print(f"choose from: {valid_modes}")
38
+ self.mode = mode
39
+ self.prompt = pp_prompts[mode]
40
+ self.video_root = os.path.join(video_root, 'videos')
41
+
42
+ def __len__(self) -> int:
43
+ return len(self.data)
44
+
45
+ def prepare_question(self, sample):
46
+ if self.mode in ['default']:
47
+ prompt=self.prompt.format(goal=sample['goal'])
48
+ elif self.mode in ['rrd']:
49
+ prompt=sample['goal']
50
+ else:
51
+ raise ValueError()
52
+ return prompt
53
+
54
+ def prepare_answer(self, sample):
55
+ gt = [o+1 for o in sample['ground_truth']]
56
+ return gt
57
+
58
+ def prepare_sample(self, sample):
59
+ video_file = os.path.join(self.video_root, sample['video_file'])
60
+ if self.video_load_fn:
61
+ video = self.video_load_fn(video_file, **self.load_video_kwargs)
62
+ else:
63
+ video = video_file
64
+
65
+ return {'video': video,
66
+ 'video_file': sample['video_file'],
67
+ 'qid': sample['qid'],
68
+ 'question': self.prepare_question(sample),
69
+ 'answer': self.prepare_answer(sample)}
70
+
71
+ def __getitem__(self, i):
72
+ sample = self.data[i]
73
+ return self.prepare_sample(sample)
74
+
75
+
76
+ if __name__=='__main__':
77
+
78
+ dataset=VCRBench(question_file="./data.json",
79
+ video_root="./",
80
+ mode='default',
81
+ )
82
+
83
+ for sample in dataset:
84
+ print(f"question: {sample['question']}")
85
+ print(f"video file: {sample['video_file']}")
86
+ print(f"answer: {sample['answer']}")
87
+ print('*'*10)
88
+
89
+ break
90
+
91
+
sample.png ADDED

Git LFS Details

  • SHA256: 0264c446b5f24846cc1c4765a559488ea55f8e2210597cf194647c7f135f6634
  • Pointer size: 132 Bytes
  • Size of remote file: 1.17 MB
videos/video_1.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f027c389de93e459876bd42b1bd7e70af51230beda8dc083fe2234d67d664691
3
+ size 1143523
videos/video_10.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6829bf588a19dd4f0d782a76e0fc9dd34e90e4189aab2220902cd6b6fb7e2768
3
+ size 583140
videos/video_100.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0162965b5f33af2880d0657b1601dd120536c6bdd240cbe33704fac56311756
3
+ size 12361072
videos/video_101.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e276805dd1f7fc34e54c52aa6f40a3fe81ce6ed0952d3b4c7bd4f9bda73740e
3
+ size 12410354
videos/video_102.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:507cf6aa6fb593b4fefdf54de1ff2d8db180e2256abada813bd37b1bf22d846a
3
+ size 12409135
videos/video_103.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bdfed06572e47f10ecd0842f28864d1c5dea91912d9e41ef211ec6bcb075c45
3
+ size 1755828
videos/video_104.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:391aab1dd1a2b395137e7b3662572830a97203c3c211dfbdc217e75970c96522
3
+ size 2796992
videos/video_105.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fbc28aa4abe7f018a74f3810a4148a94583f324b379a766838a596a18f95b66
3
+ size 2212459
videos/video_106.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:624ca6f8f75b5a9dd95b65eb6fc641476681bd4754cdce0107fd1490c9de2ecc
3
+ size 2210588
videos/video_107.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3dc1bb8d1deace95e4e71aa3755f890af677f4d3bc93424e2d7e20c909a47059
3
+ size 2211163
videos/video_108.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dff5075d41ab0e816fcdcfb8d1e9a09092c08e9cef0b3028a76205b53aa3b7dd
3
+ size 5402337
videos/video_109.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10e0c26ca22798d608c100f4789cca61d0b51d0eb991d328d25379b18fbd8bbc
3
+ size 5417348
videos/video_11.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0272f6f598fd4ab841b9e20ec62166e31cd5566b47e34e79a0d6db2a2b25c094
3
+ size 580656
videos/video_110.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84a49e21fcc4b3b2de2470685da7bedafd92f805dee6058da8218228ba6c701e
3
+ size 5414959
videos/video_111.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98d7cb95d5d828f6a05f9e1a2b068f3daa58573d6de2f22cb8f794afd2fe0dfa
3
+ size 1974742
videos/video_112.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:457585e46f58a05c1896887ab39d6029ed3421a9187a8827c006cbaa6986fb3c
3
+ size 1976202
videos/video_113.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c0ecbdaa00faf784c68b9192eb2bff818c71b5dc25367fc6ff4b419e9fcd9ac
3
+ size 1966890
videos/video_114.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c68397c74ebf84ebba8ea980aae12ef8acc4d8f8d6651325666521286fa351c6
3
+ size 1963353
videos/video_115.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08a4d3b4d082861fdf721484149390074f6156b80630fe61e81f9cae868824b3
3
+ size 9852032
videos/video_116.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a41ecc720bb61f34d739e8e12399fa0e670448c1e1abe825a8966b1944ea343e
3
+ size 1771661
videos/video_117.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8191d614e4b8bcf7c039acbeef167fb546bfe5a3b100bb352e073733c1bcc2fa
3
+ size 9535032
videos/video_118.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db0148631ce020d2746132d8b2bebc59969d187973ea6f951c1ccdd64589058b
3
+ size 11861020
videos/video_119.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c023b0f30759beafaea21395e29bbc5a851b47e67184ca73f89e5650a4af17f
3
+ size 2430801
videos/video_12.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e9c3c21f490d16e9513618376fb42633e483d454efe2a595566763438d7983b
3
+ size 2178478
videos/video_120.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:767d9833282d6385308be2908ca67b510cba0ae5fa3e479214e81693672769db
3
+ size 2421917
videos/video_121.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7ae9e0feef9429b59743de87327efe3bd0543fe4e5e1756a5b88fa30e9f3833
3
+ size 2367949
videos/video_122.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5f395db0631c9f74ff5d274b14bd2d588ca14ee51ffca83237d311602df1efb
3
+ size 2364114
videos/video_123.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce521f1e1c231ca5384d1e23294ba49272e030b172879bd33a825726e296e8ac
3
+ size 2362321
videos/video_124.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f0a5218557d3f349e44521f1e4de44cad6f88d5cc36cd2aa28e778fd9f7a7f4
3
+ size 2355186
videos/video_125.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ef94407e698c7020ed987e7f8dcfce3f4ca6e1c3cc2e1449fcc68b456821592
3
+ size 4779922
videos/video_126.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efe021303bcafc3a5affa135fcdcc2ceb8ed79d5025f02433d4dbd952d3d3558
3
+ size 4783024
videos/video_127.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:acd6563eb21c9d8a29545cbc5ed973ef4cf2715efed4cf68062aab9ee098a7f4
3
+ size 4781657
videos/video_128.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6ae9056d3a2d10c2c3f944b284e189a09db92330fdb6f4491af5f933bb7375a
3
+ size 7063845
videos/video_129.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e60c81572759fda9ea73cab104fc21dc7b79e934df3839762103a9a916f8a9
3
+ size 7064395
videos/video_13.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6d8f77ae35de0b8b5c92c09f07a6de557e59dbed054675c0010477896b0b181
3
+ size 2184439
videos/video_130.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5601df468421e0526e80fa3f4fb529185fd424fe74c2d67c0f4b795c0d7b6ca
3
+ size 7037298
videos/video_131.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4df9f678c58fb27e9e4d033d4a10e5e7bf7f64a4dbec16f7204267255b8f7c76
3
+ size 7058181
videos/video_132.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d238bd06b2f86dc46a5112219ad5a6793b1172e7fccc47531faab94d285c5dca
3
+ size 2710115
videos/video_133.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbabf64dafe9a4487361a6846ea20288e9ec899772e295abd013eb1bda3ba96e
3
+ size 2714066
videos/video_134.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7cbb627f3d22b0f12ccb3e0d3e8e3000f003afd00c40c7073ff5f15f81dca9a
3
+ size 2716619
videos/video_135.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c87ad7d5e5c26e703692c2e52e2db52fde91bf6eba89887ef7ff4ba59f5fd75b
3
+ size 2717527
videos/video_136.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0d17168f219df06bc00410464c350498a5e8fa2f00dbcce8406e3985aa4435d
3
+ size 2011904
videos/video_137.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04f8c63e6faafa93b9c157982739d2ac73a2705cc6375d341e96efa34fa16500
3
+ size 2011704
videos/video_138.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06bf0a1b65d38ae34cd3a575b9a64367d6c583db55e49463cecb2d17517cbb4e
3
+ size 2009735