File size: 6,461 Bytes
c94c8c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
###
# Pretrain on all data with all losses
###

# Experiment general info
name: "FinalOVPretrain"
rng_seed: 42
num_gpu: 1
mode: "warmup"
note: ""
num_views: 32
# Choose keywords to feature your saving directory
naming_keywords: ["dataloader.batchsize", "task", "note", "time"]
base_dir: "results"
exp_dir: ""
save_frequency: 10

resume: False

stage: ['warmup', 'pretrain']
is_pretrain: True

debug:
  flag: False
  debug_size: 20
  hard_debug: False

logger:
  name: "wandb"
  entity: "yem"
  project: "3DReason"

# dataset details
data:
  note: "all"
  # train: ['ScanNetSpatialRefer','ARKitSceneSpatialRefer','MultiScanSpatialRefer','HMSpatialRefer','RScanSpatialRefer']
  warmup: ['LSUNSpatialRefer']
  train: ['ScanNetSpatialRefer']
  val: ['ScanNetSpatialRefer']
  test: ['ScanNetSpatialRefer']
  # train: ['ScanNetSpatialRefer']
  # val:  ['ScanNetSpatialRefer']
  # test: ['ScanNetSpatialRefer']
  args:
    max_obj_len: 80
    max_seq_len: 50
    num_points: 1024
    pc_type: 'pred'
    sem_type: '607'
    filter_lang: False
    txt_mask_ratio: 0.15
    pc_mask_ratio: 0.1
    rot_aug: True
    mask_strategy: random
    use_scene_cap: False
    max_scene_cap_len: 600
  ScanNetSpatialRefer:
    train:
      # sources: [ 'scanrefer', 'referit3d', 'sgrefer', 'sgcaption' ]
      sources: ['scannet_view_cap']
      referit3d:
        anno_type: ['sr3d', 'nr3d']
        sr3d_plus_aug: True
      sgrefer:
        anno_type: [ 'rel2_gpt', 'rel2_template', 'relm_gpt', 'relm_template', 'star_gpt', 'star_template'] #
      sgcaption:
        anno_type: ['gpt', 'template']
    val:
      sources: ['scannet_view_cap']
      referit3d:
        anno_type: ['sr3d'] # 'nr3d', 'sr3d'
        sr3d_plus_aug: False
      sgrefer:
        anno_type: ['template'] # 'template', 'gpt_chain'
      sgcaption:
        anno_type: ['gpt']
    test:
      sources: ['scannet_view_cap']
      referit3d:
        anno_type: ['sr3d'] # 'nr3d', 'sr3d'
        sr3d_plus_aug: False
      sgrefer:
        anno_type: ['template'] # 'template', 'gpt', 'gpt_chain'
      sgcaption:
        anno_type: ['gpt']
  LSUNSpatialRefer:
    warmup:
      sources: ['lsun_view_cap']
  RScanSpatialRefer:
    train:
      sources: ['3rscan_view_cap']
  MultiScanSpatialRefer:
    train:
      sources: ['anno','rel2_template','rel2_gpt','relm_template','relm_gpt','star_template','star_gpt']
    val:
      sources: [ 'anno', 'rel2_template', 'relm_gpt', 'relm_template', 'star_template', 'star_gpt' ]
    test:
      sources: [ 'anno', 'rel2_template', 'relm_gpt', 'relm_template', 'star_template', 'star_gpt' ]
  ARKitSceneSpatialRefer:
    train:
      sources: ['arkitscenes_view_cap']
  HMSpatialRefer:
    train:
      sources: ['anno','rel2_template','rel2_gpt','relm_template','relm_gpt','star_template','star_gpt']
    val:
      sources: [ 'anno', 'rel2_template', 'relm_gpt', 'relm_template', 'star_template' ]
    test:
      sources: [ 'anno', 'rel2_template', 'relm_gpt', 'relm_template', 'star_template' ]
  use_voxel: False
  scan_family_base: "../PointMapVerse/existing_datasets/ScanNet"
  lsun_base: "../PointMapVerse/existing_datasets/lsun"
  rscan_base: "../PointMapVerse/existing_datasets/3RScan"
  arkitscene_base: '../PointMapVerse/existing_datasets/Arkitscenes'
  multiscan_base: '../PointMapVerse/existing_datasets/MultiScan'
  hm_base: '../PointMapVerse/existing_datasets/HM3D'
  procthor_base: '../PointMapVerse/existing_datasets/ProcThor'
  s3d_base: '../PointMapVerse/existing_datasets/Structured3D'

data_aug:
  aug_list: ['scene_aug']
  scene_aug:
    translation:
      enabled: False
      value: [1.0, 1.0, 1.0]
      p: 1.0
    scaling:
      enabled: False
      p: 1.0
      value: [0.9, 1.1]
    flip:
      enabled: False
      p: 0.5
    rotation:
      enabled: True
      p: 1.0
      axis_align: True
      value: [0.0, 0.0, 1.0]
      shuffle: True
    color_jitter: False
    order_shuffle: False
  obj_aug:
    translation:
      enabled: False
      value: [0.1, 0.1, 0.1]
      p: 1.0
    rotation:
      enabled: False
      p: 1.0
      axis_align: False
      value: [0.0, 0.0, 0.1]
      shuffle: True
    random_jitter:
      enabled: False
      value: 0.01
      accord_to_size: False
      p: 1.0
    pts_shuffle: True

# task details: 'Pretrain', 'scanqa', 'spatialrefer'
task: 'Pretrain'
# 'MaskDatasetWrapper', 'ScanFamilyDatasetWrapper', 'MaskMVDatasetWrapper'
data_wrapper:
  warmup: 'SceneDatasetWrapper'
  train: 'SceneDatasetWrapper'
  val: 'SceneDatasetWrapper'
  test: 'SceneDatasetWrapper'

# Training details
trainer: "OpenVocabTrainer"
ckpt_path: ""
pretrain_ckpt_path: ""

# dataloader details
dataloader:
  batchsize: 256
  num_workers: 2
  balance_dataset: False
  filter_empty_annotations: False

solver:
  gradient_accumulation_steps: 1
  epochs_per_save: 20
  epochs_per_eval: 1
  lr: 1e-4
  grad_norm: 5.0
  warmup_epochs: 100
  epochs: 100
  optim:
    name: 'AdamW'
    args:
      betas: [0.9, 0.98]
      weight_decay: 0.05
  sched:
    name: 'warmup_cosine'
    args:
      warmup_steps: 500
      minimum_ratio: 0.1
eval:
  train:
    name: 'PretrainEval'
  val:
    name: 'ScanReferEval'
  save: False


# Model details
model:
  name: OpenVocab
  language:
    # This part could be further optimized to be using
    # huggingface yaml config files
    name: 'SigLIPLanguageEncoder' 
    args:
      weights: 'fg-clip-base'
      # hidden_size: 768
      # num_hidden_layers: 4
      # num_attention_heads: 12
      # type_vocab_size: 2
    lr: 1e-4
  vision:
    name: 'fg-clip-base'
    args:
        backbone: 'pointnet++'
        hidden_size: 768
        freeze: True
        path: 'pretrained_weights/pointnetpp-open-bert'
        num_attention_heads: 12
        spatial_dim: 5
        num_layers: 4
        dim_loc: 6
        dim_feedforward: 2048
        attn_type: spatial
        pairwise_rel_type: 'center'
        use_matmul_label: False
        lang_type: 'bert'
        lang_path: 'pretrained_weights/607_text_embeddings'
    lr: 1e-4
  grounding:
    name: 'UnifiedSpatialCrossEncoderV2'
    args:
      hidden_size: 768
      num_attention_heads: 12
      num_layers: 4
      dim_feedforward: 2048
      dim_loc: 6
    lr: 1e-4
  inter: before
  heads:
    head_list: []
    pretrain_head:
      name: 'OVPretrainHead'
      args:
        hidden_size: 768
        vocab_size: 30522
  loss_type: 'ListLoss'
  loss_list: [
    'WarmUpPM_loss'
  ]
  vis_loss_list: [
    'WarmUpPM_loss'
  ]