File size: 1,100 Bytes
190bdac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## Video Augmented Texts Data

### VATEX

Each video contains 10 captions. In `vatex.zip`, there are:

* `test/`: a folder containing all available videos
* `vatex_public_test_english_v1.1.json`: JSON file containing all captions

Example data loading:

```py
import os
import json

path = 'vatex_public_test_english_v1.1.json'
d = json.load(open(path, 'r'))

captions = {v['videoID']: v['enCap'] for v in d}

for vname in captions:
    video_path = os.path.join('test', vname+'.mp4')  # path to the video
    captions = captions[vname]  # a list of 10 str
```

### MSR-VTT

Each video contains 1 caption. There are two files for MSR-VTT:

* `MSRVTT.zip`: contains all videos
* `MSRVTT_JSFUSION_test.csv`: contains all captions

Example data loading:

```py
import os
import pandas as pd

path = 'MSRVTT_JSFUSION_test.csv'
df = pd.read_csv(path)

vid_id_list = df['video_id'].tolist()
caption_list = df['sentence'].tolist()

for vid_id, caption in zip(vid_id_list, caption_list):
    video_path = os.path.join('MSRVTT', 'videos', 'all', vid_id+'.mp4')
    captions = [caption]  # a list of 1 str
```