-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog
More file actions
261 lines (259 loc) · 19 KB
/
log
File metadata and controls
261 lines (259 loc) · 19 KB
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
root@di-20260306200757-4vmqz:~/code/D-FINE_train/D-FINE# python train.py -c ../config/volleyball_s_obj2coco_neg_d_q100_freeze.yml -
-use-amp --seed 0 -t weights/dfine_s_obj2coco.pth
Not init distributed mode.
cfg:
{'_collate_fn': None,
'_criterion': None,
'_ema': None,
'_evaluator': None,
'_lr_scheduler': None,
'_lr_warmup_scheduler': None,
'_model': None,
'_optimizer': None,
'_postprocessor': None,
'_scaler': None,
'_train_batch_size': None,
'_train_dataloader': None,
'_train_dataset': None,
'_train_shuffle': None,
'_val_batch_size': None,
'_val_dataloader': None,
'_val_dataset': None,
'_val_shuffle': None,
'_writer': None,
'batch_size': None,
'checkpoint_freq': 12,
'clip_max_norm': 0.1,
'device': '',
'ema_decay': 0.9999,
'ema_warmups': 2000,
'epochs': 160,
'find_unused_parameters': False,
'last_epoch': -1,
'num_workers': 0,
'output_dir': './output/exp_s_obj2coco_neg_d_q100',
'print_freq': 100,
'resume': None,
'seed': 0,
'summary_dir': None,
'sync_bn': False,
'task': 'detection',
'tuning': 'weights/dfine_s_obj2coco.pth',
'use_amp': True,
'use_ema': True,
'yaml_cfg': {'DFINE': {'backbone': 'HGNetv2',
'decoder': 'DFINETransformer',
'encoder': 'HybridEncoder'},
'DFINECriterion': {'alpha': 0.75,
'gamma': 2.0,
'losses': ['vfl', 'boxes', 'local'],
'matcher': {'alpha': 0.25,
'gamma': 2.0,
'type': 'HungarianMatcher',
'weight_dict': {'cost_bbox': 5,
'cost_class': 2,
'cost_giou': 2}},
'reg_max': 32,
'weight_dict': {'loss_bbox': 5,
'loss_ddf': 1.5,
'loss_fgl': 0.15,
'loss_giou': 2,
'loss_vfl': 1}},
'DFINEPostProcessor': {'num_top_queries': 300},
'DFINETransformer': {'box_noise_scale': 1.0,
'cross_attn_method': 'default',
'eval_idx': -1,
'feat_channels': [256, 256, 256],
'feat_strides': [8, 16, 32],
'hidden_dim': 256,
'label_noise_ratio': 0.5,
'layer_scale': 1,
'neg_iou_threshold': 0.3,
'num_denoising': 100,
'num_layers': 3,
'num_levels': 3,
'num_neg_random': 50,
'num_points': [3, 6, 3],
'num_queries': 100,
'query_select_method': 'default',
'reg_max': 32,
'reg_scale': 4},
'HGNetv2': {'freeze_at': -1,
'freeze_norm': False,
'local_model_dir': 'weight/hgnetv2/',
'name': 'B0',
'pretrained': False,
'return_idx': [1, 2, 3],
'use_lab': True},
'HybridEncoder': {'act': 'silu',
'depth_mult': 0.34,
'dim_feedforward': 1024,
'dropout': 0.0,
'enc_act': 'gelu',
'expansion': 0.5,
'feat_strides': [8, 16, 32],
'hidden_dim': 256,
'in_channels': [256, 512, 1024],
'nhead': 8,
'num_encoder_layers': 1,
'use_encoder_idx': [2]},
'__include__': ['../D-FINE/configs/dfine/custom/objects365/dfine_hgnetv2_s_obj2custom.yml'],
'checkpoint_freq': 12,
'clip_max_norm': 0.1,
'config': '../config/volleyball_s_obj2coco_neg_d_q100_freeze.yml',
'criterion': 'DFINECriterion',
'ema': {'decay': 0.9999,
'start': 0,
'type': 'ModelEMA',
'warmups': 2000},
'epochs': 160,
'eval_spatial_size': [640, 640],
'evaluator': {'iou_types': ['bbox'], 'type': 'CocoEvaluator'},
'exp_name': 'baseline',
'find_unused_parameters': False,
'lr_scheduler': {'gamma': 0.1,
'milestones': [500],
'type': 'MultiStepLR'},
'lr_warmup_scheduler': {'type': 'LinearWarmup',
'warmup_duration': 500},
'model': 'DFINE',
'num_classes': 1,
'optimizer': {'betas': [0.9, 0.999],
'lr': 0.00025,
'params': [{'lr': 0.000125,
'params': '^(?=.*backbone)(?!.*norm|bn).*$'},
{'lr': 0.000125,
'params': '^(?=.*backbone)(?=.*norm|bn).*$',
'weight_decay': 0.0},
{'params': '^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn|bias)).*$',
'weight_decay': 0.0}],
'type': 'AdamW',
'weight_decay': 0.000125},
'output_dir': './output/exp_s_obj2coco_neg_d_q100',
'postprocessor': 'DFINEPostProcessor',
'print_freq': 100,
'print_method': 'builtin',
'print_rank': 0,
'project_name': 'D-FINE',
'remap_mscoco_category': False,
'scaler': {'enabled': True, 'type': 'GradScaler'},
'seed': 0,
'sync_bn': False,
'task': 'detection',
'test_only': False,
'train_dataloader': {'collate_fn': {'base_size': 640,
'base_size_repeat': 10,
'ema_restart_decay': 0.9999,
'stop_epoch': 56,
'type': 'BatchImageCollateFunction'},
'dataset': {'ann_file': '../coco/converted/annotations/train_with_negatives.json',
'img_folder': '../coco/images',
'return_masks': False,
'transforms': {'ops': [{'p': 0.5,
'type': 'RandomPhotometricDistort'},
{'fill': 0,
'type': 'RandomZoomOut'},
{'p': 0.8,
'type': 'RandomIoUCrop'},
{'min_size': 1,
'type': 'SanitizeBoundingBoxes'},
{'type': 'RandomHorizontalFlip'},
{'size': [640,
640],
'type': 'Resize'},
{'min_size': 1,
'type': 'SanitizeBoundingBoxes'},
{'dtype': 'float32',
'scale': True,
'type': 'ConvertPILImage'},
{'fmt': 'cxcywh',
'normalize': True,
'type': 'ConvertBoxes'}],
'policy': {'epoch': 56,
'name': 'stop_epoch',
'ops': ['RandomPhotometricDistort',
'RandomZoomOut',
'RandomIoUCrop']},
'type': 'Compose'},
'type': 'CocoDetection'},
'drop_last': True,
'num_workers': 36,
'shuffle': True,
'total_batch_size': 32,
'type': 'DataLoader'},
'tuning': 'weights/dfine_s_obj2coco.pth',
'use_amp': True,
'use_ema': True,
'use_focal_loss': True,
'use_wandb': False,
'val_dataloader': {'collate_fn': {'type': 'BatchImageCollateFunction'},
'dataset': {'ann_file': '../coco/converted/annotations/val.json',
'img_folder': '../coco/images',
'return_masks': False,
'transforms': {'ops': [{'size': [640,
640],
'type': 'Resize'},
{'dtype': 'float32',
'scale': True,
'type': 'ConvertPILImage'},
{'fmt': 'cxcywh',
'normalize': True,
'type': 'ConvertBoxes'}],
'type': 'Compose'},
'type': 'CocoDetection'},
'drop_last': False,
'num_workers': 12,
'shuffle': False,
'total_batch_size': 64,
'type': 'DataLoader'}}}
Tuning checkpoint from weights/dfine_s_obj2coco.pth
Load model.state_dict, {'missed': ['decoder.denoising_class_embed.weight'], 'unmatched': ['decoder.enc_score_head.weight', 'decoder.enc_score_head.bias', 'decoder.dec_score_head.0.weight', 'decoder.dec_score_head.0.bias', 'decoder.dec_score_head.1.weight', 'decoder.dec_score_head.1.bias', 'decoder.dec_score_head.2.weight', 'decoder.dec_score_head.2.bias']}
/root/code/D-FINE_train/D-FINE/src/core/workspace.py:178: FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.
return module(**module_kwargs)
Initial lr: [0.000125, 0.000125, 0.00025, 0.00025]
building train_dataloader with batch_size=32...
building val_dataloader with batch_size=64...
------------------------------------- Calculate Flops Results -------------------------------------
Notations:
number of parameters (Params), number of multiply-accumulate operations(MACs),
number of floating-point operations (FLOPs), floating-point operations per second (FLOPS),
fwd FLOPs (model forward propagation FLOPs), bwd FLOPs (model backward propagation FLOPs),
default model backpropagation takes 2.00 times as much computation as forward propagation.
Total Training Params: 10.18 M
fwd MACs: 11.4484 GMACs
fwd FLOPs: 22.9977 GFLOPS
fwd+bwd MACs: 34.3452 GMACs
fwd+bwd FLOPs: 68.9932 GFLOPS
---------------------------------------------------------------------------------------------------
{'Model FLOPs:22.9977 GFLOPS MACs:11.4484 GMACs Params:10176661'}
------------------------------------------Start training-------------------------------------------
Epoch: [0/160] [ 0/52] eta: 0:43:28 lr: 0.000000 loss: 44.4600 (44.4600) loss_vfl: 0.1466 (0.1466) loss_bbox: 2.4914 (2.4914) loss_giou: 3.2710 (3.2710) loss_fgl: 0.1369 (0.1369) loss_vfl_aux_0: 0.1653 (0.1653) loss_bbox_aux_0: 2.5058 (2.5058) loss_giou_aux_0: 3.2736 (3.2736) loss_fgl_aux_0: 0.1369 (0.1369) loss_ddf_aux_0: 0.0299 (0.0299) loss_vfl_aux_1: 0.1566 (0.1566) loss_bbox_aux_1: 2.4880 (2.4880) loss_giou_aux_1: 3.2701 (3.2701) loss_fgl_aux_1: 0.1366 (0.1366) loss_ddf_aux_1: 0.0020 (0.0020) loss_vfl_pre: 0.1804 (0.1804) loss_bbox_pre: 2.4698 (2.4698) loss_giou_pre: 3.3138 (3.3138) loss_vfl_enc_0: 0.0775 (0.0775) loss_bbox_enc_0: 2.4658 (2.4658) loss_giou_enc_0: 3.3507 (3.3507) loss_vfl_dn_0: 1.3027 (1.3027) loss_bbox_dn_0: 0.4056 (0.4056) loss_giou_dn_0: 1.0151 (1.0151) loss_fgl_dn_0: 1.1246 (1.1246) loss_ddf_dn_0: 0.5900 (0.5900) loss_vfl_dn_1: 1.4590 (1.4590) loss_bbox_dn_1: 0.2216 (0.2216) loss_giou_dn_1: 0.8267 (0.8267) loss_fgl_dn_1: 0.9559 (0.9559) loss_ddf_dn_1: 0.0424 (0.0424) loss_vfl_dn_2: 1.8535 (1.8535) loss_bbox_dn_2: 0.1911 (0.1911) loss_giou_dn_2: 0.7121 (0.7121) loss_fgl_dn_2: 0.9716 (0.9716) loss_ddf_dn_2: 0.0000 (0.0000) loss_vfl_dn_pre: 1.3184 (1.3184) loss_bbox_dn_pre: 0.3921 (0.3921) loss_giou_dn_pre: 1.0087 (1.0087) loss_fgl_dn_pre: 0.0000 (0.0000) loss_ddf_dn_pre: 0.0000 (0.0000) time: 50.1691 data: 46.6536 max mem: 13778
Epoch: [0/160] [51/52] eta: 0:00:01 lr: 0.000013 loss: 43.4019 (43.3127) loss_vfl: 0.1902 (0.2002) loss_bbox: 2.1711 (2.2637) loss_giou: 3.2481 (3.2027) loss_fgl: 0.1266 (0.1296) loss_vfl_aux_0: 0.1815 (0.2074) loss_bbox_aux_0: 2.1861 (2.2767) loss_giou_aux_0: 3.2618 (3.2183) loss_fgl_aux_0: 0.1353 (0.1338) loss_ddf_aux_0: 0.0422 (0.0400) loss_vfl_aux_1: 0.1908 (0.2032) loss_bbox_aux_1: 2.1768 (2.2606) loss_giou_aux_1: 3.2541 (3.2061) loss_fgl_aux_1: 0.1281 (0.1299) loss_ddf_aux_1: 0.0033 (0.0031) loss_vfl_pre: 0.1772 (0.2080) loss_bbox_pre: 2.1714 (2.2512) loss_giou_pre: 3.2650 (3.2377) loss_vfl_enc_0: 0.0724 (0.0938) loss_bbox_enc_0: 2.2728 (2.3034) loss_giou_enc_0: 3.3031 (3.2860) loss_vfl_dn_0: 1.6211 (1.4321) loss_bbox_dn_0: 0.2723 (0.3572) loss_giou_dn_0: 0.8703 (0.9608) loss_fgl_dn_0: 1.1304 (1.1088) loss_ddf_dn_0: 0.3460 (0.4181) loss_vfl_dn_1: 1.9102 (1.6434) loss_bbox_dn_1: 0.1628 (0.2011) loss_giou_dn_1: 0.6014 (0.7469) loss_fgl_dn_1: 1.0277 (0.9850) loss_ddf_dn_1: 0.0385 (0.0384) loss_vfl_dn_2: 2.2617 (2.0158) loss_bbox_dn_2: 0.1303 (0.1668) loss_giou_dn_2: 0.5068 (0.6426) loss_fgl_dn_2: 1.0222 (0.9930) loss_ddf_dn_2: 0.0000 (0.0000) loss_vfl_dn_pre: 1.6465 (1.4471) loss_bbox_dn_pre: 0.2643 (0.3449) loss_giou_dn_pre: 0.8678 (0.9553) loss_fgl_dn_pre: 0.0000 (0.0000) loss_ddf_dn_pre: 0.0000 (0.0000) time: 0.4883 data: 0.0506 max mem: 19562
Epoch: [0/160] Total time: 0:01:16 (1.4755 s / it)
Averaged stats: lr: 0.000013 loss: 43.4019 (43.3127) loss_vfl: 0.1902 (0.2002) loss_bbox: 2.1711 (2.2637) loss_giou: 3.2481 (3.2027) loss_fgl: 0.1266 (0.1296) loss_vfl_aux_0: 0.1815 (0.2074) loss_bbox_aux_0: 2.1861 (2.2767) loss_giou_aux_0: 3.2618 (3.2183) loss_fgl_aux_0: 0.1353 (0.1338) loss_ddf_aux_0: 0.0422 (0.0400) loss_vfl_aux_1: 0.1908 (0.2032) loss_bbox_aux_1: 2.1768 (2.2606) loss_giou_aux_1: 3.2541 (3.2061) loss_fgl_aux_1: 0.1281 (0.1299) loss_ddf_aux_1: 0.0033 (0.0031) loss_vfl_pre: 0.1772 (0.2080) loss_bbox_pre: 2.1714 (2.2512) loss_giou_pre: 3.2650 (3.2377) loss_vfl_enc_0: 0.0724 (0.0938) loss_bbox_enc_0: 2.2728 (2.3034) loss_giou_enc_0: 3.3031 (3.2860) loss_vfl_dn_0: 1.6211 (1.4321) loss_bbox_dn_0: 0.2723 (0.3572) loss_giou_dn_0: 0.8703 (0.9608) loss_fgl_dn_0: 1.1304 (1.1088) loss_ddf_dn_0: 0.3460 (0.4181) loss_vfl_dn_1: 1.9102 (1.6434) loss_bbox_dn_1: 0.1628 (0.2011) loss_giou_dn_1: 0.6014 (0.7469) loss_fgl_dn_1: 1.0277 (0.9850) loss_ddf_dn_1: 0.0385 (0.0384) loss_vfl_dn_2: 2.2617 (2.0158) loss_bbox_dn_2: 0.1303 (0.1668) loss_giou_dn_2: 0.5068 (0.6426) loss_fgl_dn_2: 1.0222 (0.9930) loss_ddf_dn_2: 0.0000 (0.0000) loss_vfl_dn_pre: 1.6465 (1.4471) loss_bbox_dn_pre: 0.2643 (0.3449) loss_giou_dn_pre: 0.8678 (0.9553) loss_fgl_dn_pre: 0.0000 (0.0000) loss_ddf_dn_pre: 0.0000 (0.0000)
Traceback (most recent call last):
File "/root/code/D-FINE_train/D-FINE/train.py", line 113, in <module>
main(args)
File "/root/code/D-FINE_train/D-FINE/train.py", line 75, in main
solver.fit()
File "/root/code/D-FINE_train/D-FINE/src/solver/det_solver.py", line 108, in fit
test_stats, coco_evaluator = evaluate(
^^^^^^^^^
File "/workspace/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/code/D-FINE_train/D-FINE/src/solver/det_engine.py", line 201, in evaluate
results = postprocessor(outputs, orig_target_sizes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/code/D-FINE_train/D-FINE/src/zoo/dfine/postprocessor.py", line 48, in forward
scores, index = torch.topk(scores.flatten(1), self.num_top_queries, dim=-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: selected index k out of range
There was an error running python
root@di-20260306200757-4vmqz:~/code/D-FINE_train/D-FINE#