-
Notifications
You must be signed in to change notification settings - Fork 1
/
global_parameters.py
73 lines (67 loc) · 2.6 KB
/
global_parameters.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import os
# Fill the paths
DEFAULT_DATASET_DIR = "./datasets/" # where the datasets folders are
DEFAULT_CKPT_DIR = "../data/models/" # where the training checkpoints and logs will be saved
DEFAULT_MODEL_DIR = "../data/pretrain_models/" # where the pretrained models are
SSD_DIR = "../data/feats/" # where the HowTo100M S3D features are
HOWTO_FEATURES_PATH = os.path.join(SSD_DIR, "s3d_features", "howto100m_s3d_features")
# Map from dataset name to folder name
dataset2folder = {
"ivqa": "iVQA",
"msrvtt": "MSRVTT-QA",
"msvd": "msvd",
"activitynet": "ActivityNet-QA",
"howto100m": "HowTo100M",
"howtovqa": "HowToVQA69M",
"how2qa": "How2QA",
"nextqa": "nextqa"
}
# Datasets
IVQA_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["ivqa"]
) # Path where iVQA is downloaded
MSRVTT_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["msrvtt"]
) # Path where MSRVTT-QA is downloaded
MSVD_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["msvd"]
) # Path where MSVD-QA is downloaded
ACT_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["activitynet"]
) # Path where ActivityNet-QA is downloaded
HOWTO_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["howto100m"]
) # Path where HowTo100M is downloaded
HOWTOVQA_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["howtovqa"]
) # Path where HowToVQA69M is downloaded / generated
HOW2QA_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["how2qa"]
) # Path where How2QA is downloaded
NEXTQA_PATH = os.path.join(
DEFAULT_DATASET_DIR, dataset2folder["nextqa"]
) # Path where How2QA is downloaded
# Models
S3D_PATH = os.path.join(
DEFAULT_MODEL_DIR, "s3d_howto100m.pth"
) # Path to S3D checkpoint
S3D_DICT_PATH = os.path.join(
DEFAULT_MODEL_DIR, "s3d_dict.npy"
) # Path to S3D dictionary
PUNCTUATOR_PATH = os.path.join(
DEFAULT_MODEL_DIR, "INTERSPEECH-T-BRNN.pcl"
) # Path to Punctuator2 checkpoint
TRANSFORMERS_PATH = os.path.join(
DEFAULT_MODEL_DIR, "transformers"
) # Path where the transformers checkpoints will be saved
# Question-answer Generation
punct_dir = os.path.join(
SSD_DIR, "punct"
) # Path where the punctuated clips will be created (1 file per unique video)
QG_REPO_DIR = "" # Path where the question generation repo is cloned
answers_dir = os.path.join(
SSD_DIR, "ans"
) # Path where the extracted answers will be saved (1 file per unique video)
qas_dir = os.path.join(
SSD_DIR, "qas"
) # Path where the generated question-answers will be saved (1 file per unique video)