123sio commited on
Commit
3180bd1
·
1 Parent(s): 5ed88ce
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. work_dir_h/PWOOD/a_noise/0.1/20250307_082134.log +558 -0
  2. work_dir_h/PWOOD/a_noise/0.1/20250307_082134.log.json +1 -0
  3. work_dir_h/PWOOD/a_noise/0.1/20250307_082733.log +558 -0
  4. work_dir_h/PWOOD/a_noise/0.1/20250307_082733.log.json +1 -0
  5. work_dir_h/PWOOD/a_noise/0.1/20250307_090925.log +0 -0
  6. work_dir_h/PWOOD/a_noise/0.1/20250307_090925.log.json +0 -0
  7. work_dir_h/PWOOD/a_noise/0.1/gmm.py +468 -0
  8. work_dir_h/PWOOD/a_noise/0.3/20250307_115752.log +558 -0
  9. work_dir_h/PWOOD/a_noise/0.3/20250307_115752.log.json +1 -0
  10. work_dir_h/PWOOD/a_noise/0.3/20250307_120102.log +0 -0
  11. work_dir_h/PWOOD/a_noise/0.3/20250307_120102.log.json +0 -0
  12. work_dir_h/PWOOD/a_noise/0.3/a_gmm_noise_3.py +468 -0
  13. work_dir_h/PWOOD/ablation/0.015/20250301_190048.log +0 -0
  14. work_dir_h/PWOOD/ablation/0.015/20250301_190048.log.json +0 -0
  15. work_dir_h/PWOOD/ablation/0.015/20250302_070552.log +0 -0
  16. work_dir_h/PWOOD/ablation/0.015/20250302_070552.log.json +0 -0
  17. work_dir_h/PWOOD/ablation/0.015/lr_0.03.py +465 -0
  18. work_dir_h/PWOOD/ablation/0.01_topk/20250221_000012.log +0 -0
  19. work_dir_h/PWOOD/ablation/0.01_topk/20250221_000012.log.json +0 -0
  20. work_dir_h/PWOOD/ablation/0.01_topk/lr_h2rv2_mcl_adamw_dota15_20p.py +465 -0
  21. work_dir_h/PWOOD/ablation/0.025/20250301_231440.log +0 -0
  22. work_dir_h/PWOOD/ablation/0.025/20250301_231440.log.json +0 -0
  23. work_dir_h/PWOOD/ablation/0.025/20250302_073702.log +557 -0
  24. work_dir_h/PWOOD/ablation/0.025/20250302_073702.log.json +1 -0
  25. work_dir_h/PWOOD/ablation/0.025/20250302_074526.log +0 -0
  26. work_dir_h/PWOOD/ablation/0.025/20250302_074526.log.json +0 -0
  27. work_dir_h/PWOOD/ablation/0.025/lr_0.025.py +465 -0
  28. work_dir_h/PWOOD/ablation/dior/0.01/20250302_195659.log +0 -0
  29. work_dir_h/PWOOD/ablation/dior/0.01/20250302_195659.log.json +0 -0
  30. work_dir_h/PWOOD/ablation/dior/0.01/lr_0.01.py +465 -0
  31. work_dir_h/PWOOD/ablation/dior/0.015/20250302_195657.log +0 -0
  32. work_dir_h/PWOOD/ablation/dior/0.015/20250302_195657.log.json +0 -0
  33. work_dir_h/PWOOD/ablation/dior/0.015/lr_0.015.py +465 -0
  34. work_dir_h/PWOOD/ablation/middle/20250221_072638.log +0 -0
  35. work_dir_h/PWOOD/ablation/middle/20250221_072638.log.json +0 -0
  36. work_dir_h/PWOOD/ablation/middle/gmm.py +465 -0
  37. work_dir_h/PWOOD/ablation/ntopk/20250222_105501.log.json +0 -0
  38. work_dir_h/PWOOD/ablation/ntopk/gmm_ntopk.py +465 -0
  39. work_dir_h/PWOOD/ablation/topk_0.03/20250221_073944.log +0 -0
  40. work_dir_h/PWOOD/ablation/topk_0.03/20250221_073944.log.json +0 -0
  41. work_dir_h/PWOOD/ablation/topk_0.03/lr_0.03.py +465 -0
  42. work_dir_h/PWOOD/base/10p/20250221_202352.log +0 -0
  43. work_dir_h/PWOOD/base/10p/20250221_202352.log.json +0 -0
  44. work_dir_h/PWOOD/base/10p/mcl_fcos_adamw_dota15_10p.py +453 -0
  45. work_dir_h/PWOOD/base/20p/20250221_204914.log +0 -0
  46. work_dir_h/PWOOD/base/20p/20250221_204914.log.json +0 -0
  47. work_dir_h/PWOOD/base/20p/mcl_fcos_adamw_dota15_20p.py +453 -0
  48. work_dir_h/PWOOD/base/30p/20250221_215902.log +0 -0
  49. work_dir_h/PWOOD/base/30p/20250221_215902.log.json +0 -0
  50. work_dir_h/PWOOD/base/30p/mcl_fcos_adamw_dota15_30p.py +453 -0
work_dir_h/PWOOD/a_noise/0.1/20250307_082134.log ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-03-07 08:21:34,598 - mmrotate - INFO - Environment info:
2
+ ------------------------------------------------------------
3
+ sys.platform: linux
4
+ Python: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]
5
+ CUDA available: True
6
+ GPU 0,1: NVIDIA GeForce RTX 3090
7
+ CUDA_HOME: /usr/local/cuda
8
+ NVCC: Cuda compilation tools, release 11.3, V11.3.58
9
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
10
+ PyTorch: 1.13.1+cu116
11
+ PyTorch compiling details: PyTorch built with:
12
+ - GCC 9.3
13
+ - C++ Version: 201402
14
+ - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
15
+ - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
16
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
17
+ - LAPACK is enabled (usually provided by MKL)
18
+ - NNPACK is enabled
19
+ - CPU capability usage: AVX2
20
+ - CUDA Runtime 11.6
21
+ - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
22
+ - CuDNN 8.3.2 (built against CUDA 11.5)
23
+ - Magma 2.6.1
24
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
25
+
26
+ TorchVision: 0.14.1+cu116
27
+ OpenCV: 4.11.0
28
+ MMCV: 1.7.2
29
+ MMCV Compiler: GCC 9.3
30
+ MMCV CUDA Compiler: 11.6
31
+ MMRotate: 0.3.4+7833b87
32
+ ------------------------------------------------------------
33
+
34
+ 2025-03-07 08:21:35,870 - mmrotate - INFO - Distributed training: True
35
+ 2025-03-07 08:21:37,280 - mmrotate - INFO - Config:
36
+ angle_version = 'le90'
37
+ detector = dict(
38
+ type='SemiRotatedFCOS',
39
+ backbone=dict(
40
+ type='ResNet',
41
+ depth=50,
42
+ num_stages=4,
43
+ out_indices=(0, 1, 2, 3),
44
+ frozen_stages=1,
45
+ zero_init_residual=False,
46
+ norm_cfg=dict(type='BN', requires_grad=True),
47
+ norm_eval=True,
48
+ style='pytorch',
49
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
50
+ neck=dict(
51
+ type='FPN',
52
+ in_channels=[256, 512, 1024, 2048],
53
+ out_channels=256,
54
+ start_level=1,
55
+ add_extra_convs='on_output',
56
+ num_outs=5,
57
+ relu_before_extra_convs=True),
58
+ bbox_head=dict(
59
+ type='SemiRotatedFCOSHeadH2RV2MCL',
60
+ num_classes=16,
61
+ in_channels=256,
62
+ stacked_convs=4,
63
+ feat_channels=256,
64
+ strides=[8, 16, 32, 64, 128],
65
+ center_sampling=True,
66
+ center_sample_radius=1.5,
67
+ norm_on_bbox=True,
68
+ centerness_on_reg=True,
69
+ square_cls=[1, 9, 11],
70
+ resize_cls=[1],
71
+ scale_angle=False,
72
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
73
+ loss_cls=dict(
74
+ type='FocalLoss',
75
+ use_sigmoid=True,
76
+ gamma=2.0,
77
+ alpha=0.25,
78
+ loss_weight=1.0),
79
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
80
+ loss_centerness=dict(
81
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
82
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
83
+ train_cfg=None,
84
+ test_cfg=dict(
85
+ nms_pre=2000,
86
+ min_bbox_size=0,
87
+ score_thr=0.05,
88
+ nms=dict(iou_thr=0.1),
89
+ max_per_img=2000))
90
+ model = dict(
91
+ type='H2RV2MCLTeacher',
92
+ model=dict(
93
+ type='SemiRotatedFCOS',
94
+ backbone=dict(
95
+ type='ResNet',
96
+ depth=50,
97
+ num_stages=4,
98
+ out_indices=(0, 1, 2, 3),
99
+ frozen_stages=1,
100
+ zero_init_residual=False,
101
+ norm_cfg=dict(type='BN', requires_grad=True),
102
+ norm_eval=True,
103
+ style='pytorch',
104
+ init_cfg=dict(
105
+ type='Pretrained', checkpoint='torchvision://resnet50')),
106
+ neck=dict(
107
+ type='FPN',
108
+ in_channels=[256, 512, 1024, 2048],
109
+ out_channels=256,
110
+ start_level=1,
111
+ add_extra_convs='on_output',
112
+ num_outs=5,
113
+ relu_before_extra_convs=True),
114
+ bbox_head=dict(
115
+ type='SemiRotatedFCOSHeadH2RV2MCL',
116
+ num_classes=16,
117
+ in_channels=256,
118
+ stacked_convs=4,
119
+ feat_channels=256,
120
+ strides=[8, 16, 32, 64, 128],
121
+ center_sampling=True,
122
+ center_sample_radius=1.5,
123
+ norm_on_bbox=True,
124
+ centerness_on_reg=True,
125
+ square_cls=[1, 9, 11],
126
+ resize_cls=[1],
127
+ scale_angle=False,
128
+ bbox_coder=dict(
129
+ type='DistanceAnglePointCoder', angle_version='le90'),
130
+ loss_cls=dict(
131
+ type='FocalLoss',
132
+ use_sigmoid=True,
133
+ gamma=2.0,
134
+ alpha=0.25,
135
+ loss_weight=1.0),
136
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
137
+ loss_centerness=dict(
138
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
139
+ loss_ss_symmetry=dict(
140
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
141
+ train_cfg=None,
142
+ test_cfg=dict(
143
+ nms_pre=2000,
144
+ min_bbox_size=0,
145
+ score_thr=0.05,
146
+ nms=dict(iou_thr=0.1),
147
+ max_per_img=2000)),
148
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),
149
+ train_cfg=dict(
150
+ iter_count=0,
151
+ burn_in_steps=12800,
152
+ sup_weight=1.0,
153
+ unsup_weight=1.0,
154
+ weight_suppress='exp',
155
+ logit_specific_weights=dict(),
156
+ cls_channels=16),
157
+ test_cfg=dict(inference_on='teacher'))
158
+ img_norm_cfg = dict(
159
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
160
+ common_pipeline = [
161
+ dict(
162
+ type='Normalize',
163
+ mean=[123.675, 116.28, 103.53],
164
+ std=[58.395, 57.12, 57.375],
165
+ to_rgb=True),
166
+ dict(type='Pad', size_divisor=32),
167
+ dict(type='DefaultFormatBundle'),
168
+ dict(
169
+ type='Collect',
170
+ keys=['img', 'gt_bboxes', 'gt_labels'],
171
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
172
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
173
+ 'img_norm_cfg', 'tag'))
174
+ ]
175
+ strong_pipeline = [
176
+ dict(type='DTToPILImage'),
177
+ dict(
178
+ type='DTRandomApply',
179
+ operations=[
180
+ ColorJitter(
181
+ brightness=[0.6, 1.4],
182
+ contrast=[0.6, 1.4],
183
+ saturation=[0.6, 1.4],
184
+ hue=[-0.1, 0.1])
185
+ ],
186
+ p=0.8),
187
+ dict(type='DTRandomGrayscale', p=0.2),
188
+ dict(
189
+ type='DTRandomApply',
190
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
191
+ dict(type='DTToNumpy'),
192
+ dict(type='ExtraAttrs', tag='unsup_strong')
193
+ ]
194
+ weak_pipeline = [
195
+ dict(type='RResize', img_scale=(1024, 1024)),
196
+ dict(
197
+ type='RRandomFlip',
198
+ flip_ratio=[0.25, 0.25, 0.25],
199
+ direction=['horizontal', 'vertical', 'diagonal'],
200
+ version='le90'),
201
+ dict(type='ExtraAttrs', tag='unsup_weak')
202
+ ]
203
+ unsup_pipeline = [
204
+ dict(type='LoadImageFromFile'),
205
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
206
+ dict(
207
+ type='STMultiBranch',
208
+ unsup_strong=[
209
+ dict(type='DTToPILImage'),
210
+ dict(
211
+ type='DTRandomApply',
212
+ operations=[
213
+ ColorJitter(
214
+ brightness=[0.6, 1.4],
215
+ contrast=[0.6, 1.4],
216
+ saturation=[0.6, 1.4],
217
+ hue=[-0.1, 0.1])
218
+ ],
219
+ p=0.8),
220
+ dict(type='DTRandomGrayscale', p=0.2),
221
+ dict(
222
+ type='DTRandomApply',
223
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
224
+ 2.0])]),
225
+ dict(type='DTToNumpy'),
226
+ dict(type='ExtraAttrs', tag='unsup_strong')
227
+ ],
228
+ unsup_weak=[
229
+ dict(type='RResize', img_scale=(1024, 1024)),
230
+ dict(
231
+ type='RRandomFlip',
232
+ flip_ratio=[0.25, 0.25, 0.25],
233
+ direction=['horizontal', 'vertical', 'diagonal'],
234
+ version='le90'),
235
+ dict(type='ExtraAttrs', tag='unsup_weak')
236
+ ],
237
+ common_pipeline=[
238
+ dict(
239
+ type='Normalize',
240
+ mean=[123.675, 116.28, 103.53],
241
+ std=[58.395, 57.12, 57.375],
242
+ to_rgb=True),
243
+ dict(type='Pad', size_divisor=32),
244
+ dict(type='DefaultFormatBundle'),
245
+ dict(
246
+ type='Collect',
247
+ keys=['img', 'gt_bboxes', 'gt_labels'],
248
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
249
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
250
+ 'flip_direction', 'img_norm_cfg', 'tag'))
251
+ ],
252
+ is_seq=True)
253
+ ]
254
+ sup_pipeline = [
255
+ dict(type='LoadImageFromFile'),
256
+ dict(type='LoadAnnotations', with_bbox=True),
257
+ dict(type='AddNoise', p=0.1),
258
+ dict(type='RResize', img_scale=(1024, 1024)),
259
+ dict(
260
+ type='RRandomFlip',
261
+ flip_ratio=[0.25, 0.25, 0.25],
262
+ direction=['horizontal', 'vertical', 'diagonal'],
263
+ version='le90'),
264
+ dict(type='ExtraAttrs', tag='sup_weak'),
265
+ dict(
266
+ type='Normalize',
267
+ mean=[123.675, 116.28, 103.53],
268
+ std=[58.395, 57.12, 57.375],
269
+ to_rgb=True),
270
+ dict(type='Pad', size_divisor=32),
271
+ dict(type='DefaultFormatBundle'),
272
+ dict(
273
+ type='Collect',
274
+ keys=['img', 'gt_bboxes', 'gt_labels'],
275
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
276
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
277
+ 'img_norm_cfg', 'tag'))
278
+ ]
279
+ test_pipeline = [
280
+ dict(type='LoadImageFromFile'),
281
+ dict(
282
+ type='MultiScaleFlipAug',
283
+ img_scale=(1024, 1024),
284
+ flip=False,
285
+ transforms=[
286
+ dict(type='RResize'),
287
+ dict(
288
+ type='Normalize',
289
+ mean=[123.675, 116.28, 103.53],
290
+ std=[58.395, 57.12, 57.375],
291
+ to_rgb=True),
292
+ dict(type='Pad', size_divisor=32),
293
+ dict(type='DefaultFormatBundle'),
294
+ dict(type='Collect', keys=['img'])
295
+ ])
296
+ ]
297
+ dataset_type = 'DOTAv15WSOODDataset'
298
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
299
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
300
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
301
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
302
+ 'container-crane')
303
+ data = dict(
304
+ samples_per_gpu=3,
305
+ workers_per_gpu=5,
306
+ train=dict(
307
+ type='SemiDataset',
308
+ sup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadAnnotations', with_bbox=True),
313
+ dict(type='AddNoise', p=0.1),
314
+ dict(type='RResize', img_scale=(1024, 1024)),
315
+ dict(
316
+ type='RRandomFlip',
317
+ flip_ratio=[0.25, 0.25, 0.25],
318
+ direction=['horizontal', 'vertical', 'diagonal'],
319
+ version='le90'),
320
+ dict(type='ExtraAttrs', tag='sup_weak'),
321
+ dict(
322
+ type='Normalize',
323
+ mean=[123.675, 116.28, 103.53],
324
+ std=[58.395, 57.12, 57.375],
325
+ to_rgb=True),
326
+ dict(type='Pad', size_divisor=32),
327
+ dict(type='DefaultFormatBundle'),
328
+ dict(
329
+ type='Collect',
330
+ keys=['img', 'gt_bboxes', 'gt_labels'],
331
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
332
+ 'img_shape', 'pad_shape', 'scale_factor',
333
+ 'flip', 'flip_direction', 'img_norm_cfg',
334
+ 'tag'))
335
+ ],
336
+ ann_file='data/train_20p_labeled/annfiles/',
337
+ img_prefix='data/train_20p_labeled/images/',
338
+ version='le90',
339
+ classes=('plane', 'baseball-diamond', 'bridge',
340
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
341
+ 'ship', 'tennis-court', 'basketball-court',
342
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
343
+ 'harbor', 'swimming-pool', 'helicopter',
344
+ 'container-crane')),
345
+ unsup=dict(
346
+ type='DOTAv15WSOODDataset',
347
+ pipeline=[
348
+ dict(type='LoadImageFromFile'),
349
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
350
+ dict(
351
+ type='STMultiBranch',
352
+ unsup_strong=[
353
+ dict(type='DTToPILImage'),
354
+ dict(
355
+ type='DTRandomApply',
356
+ operations=[
357
+ ColorJitter(
358
+ brightness=[0.6, 1.4],
359
+ contrast=[0.6, 1.4],
360
+ saturation=[0.6, 1.4],
361
+ hue=[-0.1, 0.1])
362
+ ],
363
+ p=0.8),
364
+ dict(type='DTRandomGrayscale', p=0.2),
365
+ dict(
366
+ type='DTRandomApply',
367
+ operations=[
368
+ dict(
369
+ type='DTGaussianBlur',
370
+ rad_range=[0.1, 2.0])
371
+ ]),
372
+ dict(type='DTToNumpy'),
373
+ dict(type='ExtraAttrs', tag='unsup_strong')
374
+ ],
375
+ unsup_weak=[
376
+ dict(type='RResize', img_scale=(1024, 1024)),
377
+ dict(
378
+ type='RRandomFlip',
379
+ flip_ratio=[0.25, 0.25, 0.25],
380
+ direction=['horizontal', 'vertical', 'diagonal'],
381
+ version='le90'),
382
+ dict(type='ExtraAttrs', tag='unsup_weak')
383
+ ],
384
+ common_pipeline=[
385
+ dict(
386
+ type='Normalize',
387
+ mean=[123.675, 116.28, 103.53],
388
+ std=[58.395, 57.12, 57.375],
389
+ to_rgb=True),
390
+ dict(type='Pad', size_divisor=32),
391
+ dict(type='DefaultFormatBundle'),
392
+ dict(
393
+ type='Collect',
394
+ keys=['img', 'gt_bboxes', 'gt_labels'],
395
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
396
+ 'img_shape', 'pad_shape',
397
+ 'scale_factor', 'flip',
398
+ 'flip_direction', 'img_norm_cfg',
399
+ 'tag'))
400
+ ],
401
+ is_seq=True)
402
+ ],
403
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
404
+ img_prefix='data/train_20p_unlabeled/images/',
405
+ version='le90',
406
+ classes=('plane', 'baseball-diamond', 'bridge',
407
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
408
+ 'ship', 'tennis-court', 'basketball-court',
409
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
410
+ 'harbor', 'swimming-pool', 'helicopter',
411
+ 'container-crane'),
412
+ filter_empty_gt=False)),
413
+ val=dict(
414
+ type='DOTAv15WSOODDataset',
415
+ pipeline=[
416
+ dict(type='LoadImageFromFile'),
417
+ dict(
418
+ type='MultiScaleFlipAug',
419
+ img_scale=(1024, 1024),
420
+ flip=False,
421
+ transforms=[
422
+ dict(type='RResize'),
423
+ dict(
424
+ type='Normalize',
425
+ mean=[123.675, 116.28, 103.53],
426
+ std=[58.395, 57.12, 57.375],
427
+ to_rgb=True),
428
+ dict(type='Pad', size_divisor=32),
429
+ dict(type='DefaultFormatBundle'),
430
+ dict(type='Collect', keys=['img'])
431
+ ])
432
+ ],
433
+ img_prefix='data/val/images/',
434
+ ann_file='data/val/annfiles/',
435
+ version='le90',
436
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
437
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
438
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
439
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
440
+ 'container-crane')),
441
+ test=dict(
442
+ type='DOTAv15WSOODDataset',
443
+ pipeline=[
444
+ dict(type='LoadImageFromFile'),
445
+ dict(
446
+ type='MultiScaleFlipAug',
447
+ img_scale=(1024, 1024),
448
+ flip=False,
449
+ transforms=[
450
+ dict(type='RResize'),
451
+ dict(
452
+ type='Normalize',
453
+ mean=[123.675, 116.28, 103.53],
454
+ std=[58.395, 57.12, 57.375],
455
+ to_rgb=True),
456
+ dict(type='Pad', size_divisor=32),
457
+ dict(type='DefaultFormatBundle'),
458
+ dict(type='Collect', keys=['img'])
459
+ ])
460
+ ],
461
+ img_prefix='data/vis_val/images/',
462
+ ann_file='data/vis_val/annfiles/',
463
+ version='le90',
464
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
465
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
466
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
467
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
468
+ 'container-crane')),
469
+ sampler=dict(
470
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
471
+ custom_hooks = [
472
+ dict(type='NumClassCheckHook'),
473
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
474
+ ]
475
+ evaluation = dict(
476
+ type='SubModulesDistEvalHook',
477
+ interval=3200,
478
+ metric='mAP',
479
+ save_best='mAP')
480
+ optimizer = dict(
481
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
482
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
483
+ lr_config = dict(
484
+ policy='step',
485
+ warmup='linear',
486
+ warmup_iters=500,
487
+ warmup_ratio=0.3333333333333333,
488
+ step=120000)
489
+ runner = dict(type='IterBasedRunner', max_iters=120000)
490
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
491
+ log_config = dict(
492
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
493
+ dist_params = dict(backend='nccl')
494
+ log_level = 'INFO'
495
+ load_from = None
496
+ resume_from = None
497
+ workflow = [('train', 1)]
498
+ opencv_num_threads = 0
499
+ mp_start_method = 'fork'
500
+ custom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)
501
+ work_dir = 'work_dir/h2rv2_mcl/a_noise/0.1/'
502
+ auto_resume = False
503
+ gpu_ids = range(0, 2)
504
+
505
+ 2025-03-07 08:21:37,281 - mmrotate - INFO - Set random seed to 42, deterministic: True
506
+ 2025-03-07 08:21:56,941 - mmrotate - INFO - Start running, host: yangxue@think4proj-105-234, work_dir: /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.1
507
+ 2025-03-07 08:21:56,942 - mmrotate - INFO - Hooks will be executed in the following order:
508
+ before_run:
509
+ (VERY_HIGH ) StepLrUpdaterHook
510
+ (NORMAL ) CheckpointHook
511
+ (NORMAL ) MeanTeacher
512
+ (LOW ) SubModulesDistEvalHook
513
+ (VERY_LOW ) TextLoggerHook
514
+ --------------------
515
+ before_train_epoch:
516
+ (VERY_HIGH ) StepLrUpdaterHook
517
+ (NORMAL ) NumClassCheckHook
518
+ (LOW ) IterTimerHook
519
+ (LOW ) SubModulesDistEvalHook
520
+ (VERY_LOW ) TextLoggerHook
521
+ --------------------
522
+ before_train_iter:
523
+ (VERY_HIGH ) StepLrUpdaterHook
524
+ (LOW ) IterTimerHook
525
+ (LOW ) SubModulesDistEvalHook
526
+ --------------------
527
+ after_train_iter:
528
+ (ABOVE_NORMAL) OptimizerHook
529
+ (NORMAL ) CheckpointHook
530
+ (NORMAL ) MeanTeacher
531
+ (LOW ) IterTimerHook
532
+ (LOW ) SubModulesDistEvalHook
533
+ (VERY_LOW ) TextLoggerHook
534
+ --------------------
535
+ after_train_epoch:
536
+ (NORMAL ) CheckpointHook
537
+ (LOW ) SubModulesDistEvalHook
538
+ (VERY_LOW ) TextLoggerHook
539
+ --------------------
540
+ before_val_epoch:
541
+ (NORMAL ) NumClassCheckHook
542
+ (LOW ) IterTimerHook
543
+ (VERY_LOW ) TextLoggerHook
544
+ --------------------
545
+ before_val_iter:
546
+ (LOW ) IterTimerHook
547
+ --------------------
548
+ after_val_iter:
549
+ (LOW ) IterTimerHook
550
+ --------------------
551
+ after_val_epoch:
552
+ (VERY_LOW ) TextLoggerHook
553
+ --------------------
554
+ after_run:
555
+ (VERY_LOW ) TextLoggerHook
556
+ --------------------
557
+ 2025-03-07 08:21:56,942 - mmrotate - INFO - workflow: [('train', 1)], max: 120000 iters
558
+ 2025-03-07 08:21:56,942 - mmrotate - INFO - Checkpoints will be saved to /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.1 by HardDiskBackend.
work_dir_h/PWOOD/a_noise/0.1/20250307_082134.log.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_info": "sys.platform: linux\nPython: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]\nCUDA available: True\nGPU 0,1: NVIDIA GeForce RTX 3090\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 11.3, V11.3.58\nGCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nPyTorch: 1.13.1+cu116\nPyTorch compiling details: PyTorch built with:\n - GCC 9.3\n - C++ Version: 201402\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - CUDA Runtime 11.6\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\n - CuDNN 8.3.2 (built against CUDA 11.5)\n - Magma 2.6.1\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, \n\nTorchVision: 0.14.1+cu116\nOpenCV: 4.11.0\nMMCV: 1.7.2\nMMCV Compiler: GCC 9.3\nMMCV CUDA Compiler: 11.6\nMMRotate: 0.3.4+7833b87", "config": "angle_version = 'le90'\ndetector = dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000))\nmodel = dict(\n type='H2RV2MCLTeacher',\n model=dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(\n type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(\n type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(\n type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000)),\n semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),\n train_cfg=dict(\n iter_count=0,\n burn_in_steps=12800,\n sup_weight=1.0,\n unsup_weight=1.0,\n weight_suppress='exp',\n logit_specific_weights=dict(),\n cls_channels=16),\n test_cfg=dict(inference_on='teacher'))\nimg_norm_cfg = dict(\n mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)\ncommon_pipeline = [\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\nstrong_pipeline = [\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n]\nweak_pipeline = [\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n]\nunsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1,\n 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg', 'tag'))\n ],\n is_seq=True)\n]\nsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.1),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\ntest_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n]\ndataset_type = 'DOTAv15WSOODDataset'\nclasses = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')\ndata = dict(\n samples_per_gpu=3,\n workers_per_gpu=5,\n train=dict(\n type='SemiDataset',\n sup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.1),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor',\n 'flip', 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n ann_file='data/train_20p_labeled/annfiles/',\n img_prefix='data/train_20p_labeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n unsup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[\n dict(\n type='DTGaussianBlur',\n rad_range=[0.1, 2.0])\n ]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape',\n 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n is_seq=True)\n ],\n ann_file='data/train_20p_unlabeled/empty_annfiles/',\n img_prefix='data/train_20p_unlabeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane'),\n filter_empty_gt=False)),\n val=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/val/images/',\n ann_file='data/val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n test=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/vis_val/images/',\n ann_file='data/vis_val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n sampler=dict(\n train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))\ncustom_hooks = [\n dict(type='NumClassCheckHook'),\n dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)\n]\nevaluation = dict(\n type='SubModulesDistEvalHook',\n interval=3200,\n metric='mAP',\n save_best='mAP')\noptimizer = dict(\n type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)\noptimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))\nlr_config = dict(\n policy='step',\n warmup='linear',\n warmup_iters=500,\n warmup_ratio=0.3333333333333333,\n step=120000)\nrunner = dict(type='IterBasedRunner', max_iters=120000)\ncheckpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)\nlog_config = dict(\n _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])\ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\nload_from = None\nresume_from = None\nworkflow = [('train', 1)]\nopencv_num_threads = 0\nmp_start_method = 'fork'\ncustom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)\nwork_dir = 'work_dir/h2rv2_mcl/a_noise/0.1/'\nauto_resume = False\ngpu_ids = range(0, 2)\n", "seed": 42, "exp_name": "gmm.py"}
work_dir_h/PWOOD/a_noise/0.1/20250307_082733.log ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-03-07 08:27:33,797 - mmrotate - INFO - Environment info:
2
+ ------------------------------------------------------------
3
+ sys.platform: linux
4
+ Python: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]
5
+ CUDA available: True
6
+ GPU 0,1: NVIDIA GeForce RTX 4090
7
+ CUDA_HOME: /usr/local/cuda
8
+ NVCC: Cuda compilation tools, release 11.8, V11.8.89
9
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
10
+ PyTorch: 1.13.1+cu116
11
+ PyTorch compiling details: PyTorch built with:
12
+ - GCC 9.3
13
+ - C++ Version: 201402
14
+ - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
15
+ - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
16
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
17
+ - LAPACK is enabled (usually provided by MKL)
18
+ - NNPACK is enabled
19
+ - CPU capability usage: AVX2
20
+ - CUDA Runtime 11.6
21
+ - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
22
+ - CuDNN 8.3.2 (built against CUDA 11.5)
23
+ - Magma 2.6.1
24
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
25
+
26
+ TorchVision: 0.14.1+cu116
27
+ OpenCV: 4.11.0
28
+ MMCV: 1.7.2
29
+ MMCV Compiler: GCC 9.3
30
+ MMCV CUDA Compiler: 11.6
31
+ MMRotate: 0.3.4+7833b87
32
+ ------------------------------------------------------------
33
+
34
+ 2025-03-07 08:27:35,019 - mmrotate - INFO - Distributed training: True
35
+ 2025-03-07 08:27:36,388 - mmrotate - INFO - Config:
36
+ angle_version = 'le90'
37
+ detector = dict(
38
+ type='SemiRotatedFCOS',
39
+ backbone=dict(
40
+ type='ResNet',
41
+ depth=50,
42
+ num_stages=4,
43
+ out_indices=(0, 1, 2, 3),
44
+ frozen_stages=1,
45
+ zero_init_residual=False,
46
+ norm_cfg=dict(type='BN', requires_grad=True),
47
+ norm_eval=True,
48
+ style='pytorch',
49
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
50
+ neck=dict(
51
+ type='FPN',
52
+ in_channels=[256, 512, 1024, 2048],
53
+ out_channels=256,
54
+ start_level=1,
55
+ add_extra_convs='on_output',
56
+ num_outs=5,
57
+ relu_before_extra_convs=True),
58
+ bbox_head=dict(
59
+ type='SemiRotatedFCOSHeadH2RV2MCL',
60
+ num_classes=16,
61
+ in_channels=256,
62
+ stacked_convs=4,
63
+ feat_channels=256,
64
+ strides=[8, 16, 32, 64, 128],
65
+ center_sampling=True,
66
+ center_sample_radius=1.5,
67
+ norm_on_bbox=True,
68
+ centerness_on_reg=True,
69
+ square_cls=[1, 9, 11],
70
+ resize_cls=[1],
71
+ scale_angle=False,
72
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
73
+ loss_cls=dict(
74
+ type='FocalLoss',
75
+ use_sigmoid=True,
76
+ gamma=2.0,
77
+ alpha=0.25,
78
+ loss_weight=1.0),
79
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
80
+ loss_centerness=dict(
81
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
82
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
83
+ train_cfg=None,
84
+ test_cfg=dict(
85
+ nms_pre=2000,
86
+ min_bbox_size=0,
87
+ score_thr=0.05,
88
+ nms=dict(iou_thr=0.1),
89
+ max_per_img=2000))
90
+ model = dict(
91
+ type='H2RV2MCLTeacher',
92
+ model=dict(
93
+ type='SemiRotatedFCOS',
94
+ backbone=dict(
95
+ type='ResNet',
96
+ depth=50,
97
+ num_stages=4,
98
+ out_indices=(0, 1, 2, 3),
99
+ frozen_stages=1,
100
+ zero_init_residual=False,
101
+ norm_cfg=dict(type='BN', requires_grad=True),
102
+ norm_eval=True,
103
+ style='pytorch',
104
+ init_cfg=dict(
105
+ type='Pretrained', checkpoint='torchvision://resnet50')),
106
+ neck=dict(
107
+ type='FPN',
108
+ in_channels=[256, 512, 1024, 2048],
109
+ out_channels=256,
110
+ start_level=1,
111
+ add_extra_convs='on_output',
112
+ num_outs=5,
113
+ relu_before_extra_convs=True),
114
+ bbox_head=dict(
115
+ type='SemiRotatedFCOSHeadH2RV2MCL',
116
+ num_classes=16,
117
+ in_channels=256,
118
+ stacked_convs=4,
119
+ feat_channels=256,
120
+ strides=[8, 16, 32, 64, 128],
121
+ center_sampling=True,
122
+ center_sample_radius=1.5,
123
+ norm_on_bbox=True,
124
+ centerness_on_reg=True,
125
+ square_cls=[1, 9, 11],
126
+ resize_cls=[1],
127
+ scale_angle=False,
128
+ bbox_coder=dict(
129
+ type='DistanceAnglePointCoder', angle_version='le90'),
130
+ loss_cls=dict(
131
+ type='FocalLoss',
132
+ use_sigmoid=True,
133
+ gamma=2.0,
134
+ alpha=0.25,
135
+ loss_weight=1.0),
136
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
137
+ loss_centerness=dict(
138
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
139
+ loss_ss_symmetry=dict(
140
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
141
+ train_cfg=None,
142
+ test_cfg=dict(
143
+ nms_pre=2000,
144
+ min_bbox_size=0,
145
+ score_thr=0.05,
146
+ nms=dict(iou_thr=0.1),
147
+ max_per_img=2000)),
148
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),
149
+ train_cfg=dict(
150
+ iter_count=0,
151
+ burn_in_steps=12800,
152
+ sup_weight=1.0,
153
+ unsup_weight=1.0,
154
+ weight_suppress='exp',
155
+ logit_specific_weights=dict(),
156
+ cls_channels=16),
157
+ test_cfg=dict(inference_on='teacher'))
158
+ img_norm_cfg = dict(
159
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
160
+ common_pipeline = [
161
+ dict(
162
+ type='Normalize',
163
+ mean=[123.675, 116.28, 103.53],
164
+ std=[58.395, 57.12, 57.375],
165
+ to_rgb=True),
166
+ dict(type='Pad', size_divisor=32),
167
+ dict(type='DefaultFormatBundle'),
168
+ dict(
169
+ type='Collect',
170
+ keys=['img', 'gt_bboxes', 'gt_labels'],
171
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
172
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
173
+ 'img_norm_cfg', 'tag'))
174
+ ]
175
+ strong_pipeline = [
176
+ dict(type='DTToPILImage'),
177
+ dict(
178
+ type='DTRandomApply',
179
+ operations=[
180
+ ColorJitter(
181
+ brightness=[0.6, 1.4],
182
+ contrast=[0.6, 1.4],
183
+ saturation=[0.6, 1.4],
184
+ hue=[-0.1, 0.1])
185
+ ],
186
+ p=0.8),
187
+ dict(type='DTRandomGrayscale', p=0.2),
188
+ dict(
189
+ type='DTRandomApply',
190
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
191
+ dict(type='DTToNumpy'),
192
+ dict(type='ExtraAttrs', tag='unsup_strong')
193
+ ]
194
+ weak_pipeline = [
195
+ dict(type='RResize', img_scale=(1024, 1024)),
196
+ dict(
197
+ type='RRandomFlip',
198
+ flip_ratio=[0.25, 0.25, 0.25],
199
+ direction=['horizontal', 'vertical', 'diagonal'],
200
+ version='le90'),
201
+ dict(type='ExtraAttrs', tag='unsup_weak')
202
+ ]
203
+ unsup_pipeline = [
204
+ dict(type='LoadImageFromFile'),
205
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
206
+ dict(
207
+ type='STMultiBranch',
208
+ unsup_strong=[
209
+ dict(type='DTToPILImage'),
210
+ dict(
211
+ type='DTRandomApply',
212
+ operations=[
213
+ ColorJitter(
214
+ brightness=[0.6, 1.4],
215
+ contrast=[0.6, 1.4],
216
+ saturation=[0.6, 1.4],
217
+ hue=[-0.1, 0.1])
218
+ ],
219
+ p=0.8),
220
+ dict(type='DTRandomGrayscale', p=0.2),
221
+ dict(
222
+ type='DTRandomApply',
223
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
224
+ 2.0])]),
225
+ dict(type='DTToNumpy'),
226
+ dict(type='ExtraAttrs', tag='unsup_strong')
227
+ ],
228
+ unsup_weak=[
229
+ dict(type='RResize', img_scale=(1024, 1024)),
230
+ dict(
231
+ type='RRandomFlip',
232
+ flip_ratio=[0.25, 0.25, 0.25],
233
+ direction=['horizontal', 'vertical', 'diagonal'],
234
+ version='le90'),
235
+ dict(type='ExtraAttrs', tag='unsup_weak')
236
+ ],
237
+ common_pipeline=[
238
+ dict(
239
+ type='Normalize',
240
+ mean=[123.675, 116.28, 103.53],
241
+ std=[58.395, 57.12, 57.375],
242
+ to_rgb=True),
243
+ dict(type='Pad', size_divisor=32),
244
+ dict(type='DefaultFormatBundle'),
245
+ dict(
246
+ type='Collect',
247
+ keys=['img', 'gt_bboxes', 'gt_labels'],
248
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
249
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
250
+ 'flip_direction', 'img_norm_cfg', 'tag'))
251
+ ],
252
+ is_seq=True)
253
+ ]
254
+ sup_pipeline = [
255
+ dict(type='LoadImageFromFile'),
256
+ dict(type='LoadAnnotations', with_bbox=True),
257
+ dict(type='AddNoise', p=0.1),
258
+ dict(type='RResize', img_scale=(1024, 1024)),
259
+ dict(
260
+ type='RRandomFlip',
261
+ flip_ratio=[0.25, 0.25, 0.25],
262
+ direction=['horizontal', 'vertical', 'diagonal'],
263
+ version='le90'),
264
+ dict(type='ExtraAttrs', tag='sup_weak'),
265
+ dict(
266
+ type='Normalize',
267
+ mean=[123.675, 116.28, 103.53],
268
+ std=[58.395, 57.12, 57.375],
269
+ to_rgb=True),
270
+ dict(type='Pad', size_divisor=32),
271
+ dict(type='DefaultFormatBundle'),
272
+ dict(
273
+ type='Collect',
274
+ keys=['img', 'gt_bboxes', 'gt_labels'],
275
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
276
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
277
+ 'img_norm_cfg', 'tag'))
278
+ ]
279
+ test_pipeline = [
280
+ dict(type='LoadImageFromFile'),
281
+ dict(
282
+ type='MultiScaleFlipAug',
283
+ img_scale=(1024, 1024),
284
+ flip=False,
285
+ transforms=[
286
+ dict(type='RResize'),
287
+ dict(
288
+ type='Normalize',
289
+ mean=[123.675, 116.28, 103.53],
290
+ std=[58.395, 57.12, 57.375],
291
+ to_rgb=True),
292
+ dict(type='Pad', size_divisor=32),
293
+ dict(type='DefaultFormatBundle'),
294
+ dict(type='Collect', keys=['img'])
295
+ ])
296
+ ]
297
+ dataset_type = 'DOTAv15WSOODDataset'
298
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
299
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
300
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
301
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
302
+ 'container-crane')
303
+ data = dict(
304
+ samples_per_gpu=3,
305
+ workers_per_gpu=5,
306
+ train=dict(
307
+ type='SemiDataset',
308
+ sup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadAnnotations', with_bbox=True),
313
+ dict(type='AddNoise', p=0.1),
314
+ dict(type='RResize', img_scale=(1024, 1024)),
315
+ dict(
316
+ type='RRandomFlip',
317
+ flip_ratio=[0.25, 0.25, 0.25],
318
+ direction=['horizontal', 'vertical', 'diagonal'],
319
+ version='le90'),
320
+ dict(type='ExtraAttrs', tag='sup_weak'),
321
+ dict(
322
+ type='Normalize',
323
+ mean=[123.675, 116.28, 103.53],
324
+ std=[58.395, 57.12, 57.375],
325
+ to_rgb=True),
326
+ dict(type='Pad', size_divisor=32),
327
+ dict(type='DefaultFormatBundle'),
328
+ dict(
329
+ type='Collect',
330
+ keys=['img', 'gt_bboxes', 'gt_labels'],
331
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
332
+ 'img_shape', 'pad_shape', 'scale_factor',
333
+ 'flip', 'flip_direction', 'img_norm_cfg',
334
+ 'tag'))
335
+ ],
336
+ ann_file='data/train_20p_labeled/annfiles/',
337
+ img_prefix='data/train_20p_labeled/images/',
338
+ version='le90',
339
+ classes=('plane', 'baseball-diamond', 'bridge',
340
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
341
+ 'ship', 'tennis-court', 'basketball-court',
342
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
343
+ 'harbor', 'swimming-pool', 'helicopter',
344
+ 'container-crane')),
345
+ unsup=dict(
346
+ type='DOTAv15WSOODDataset',
347
+ pipeline=[
348
+ dict(type='LoadImageFromFile'),
349
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
350
+ dict(
351
+ type='STMultiBranch',
352
+ unsup_strong=[
353
+ dict(type='DTToPILImage'),
354
+ dict(
355
+ type='DTRandomApply',
356
+ operations=[
357
+ ColorJitter(
358
+ brightness=[0.6, 1.4],
359
+ contrast=[0.6, 1.4],
360
+ saturation=[0.6, 1.4],
361
+ hue=[-0.1, 0.1])
362
+ ],
363
+ p=0.8),
364
+ dict(type='DTRandomGrayscale', p=0.2),
365
+ dict(
366
+ type='DTRandomApply',
367
+ operations=[
368
+ dict(
369
+ type='DTGaussianBlur',
370
+ rad_range=[0.1, 2.0])
371
+ ]),
372
+ dict(type='DTToNumpy'),
373
+ dict(type='ExtraAttrs', tag='unsup_strong')
374
+ ],
375
+ unsup_weak=[
376
+ dict(type='RResize', img_scale=(1024, 1024)),
377
+ dict(
378
+ type='RRandomFlip',
379
+ flip_ratio=[0.25, 0.25, 0.25],
380
+ direction=['horizontal', 'vertical', 'diagonal'],
381
+ version='le90'),
382
+ dict(type='ExtraAttrs', tag='unsup_weak')
383
+ ],
384
+ common_pipeline=[
385
+ dict(
386
+ type='Normalize',
387
+ mean=[123.675, 116.28, 103.53],
388
+ std=[58.395, 57.12, 57.375],
389
+ to_rgb=True),
390
+ dict(type='Pad', size_divisor=32),
391
+ dict(type='DefaultFormatBundle'),
392
+ dict(
393
+ type='Collect',
394
+ keys=['img', 'gt_bboxes', 'gt_labels'],
395
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
396
+ 'img_shape', 'pad_shape',
397
+ 'scale_factor', 'flip',
398
+ 'flip_direction', 'img_norm_cfg',
399
+ 'tag'))
400
+ ],
401
+ is_seq=True)
402
+ ],
403
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
404
+ img_prefix='data/train_20p_unlabeled/images/',
405
+ version='le90',
406
+ classes=('plane', 'baseball-diamond', 'bridge',
407
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
408
+ 'ship', 'tennis-court', 'basketball-court',
409
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
410
+ 'harbor', 'swimming-pool', 'helicopter',
411
+ 'container-crane'),
412
+ filter_empty_gt=False)),
413
+ val=dict(
414
+ type='DOTAv15WSOODDataset',
415
+ pipeline=[
416
+ dict(type='LoadImageFromFile'),
417
+ dict(
418
+ type='MultiScaleFlipAug',
419
+ img_scale=(1024, 1024),
420
+ flip=False,
421
+ transforms=[
422
+ dict(type='RResize'),
423
+ dict(
424
+ type='Normalize',
425
+ mean=[123.675, 116.28, 103.53],
426
+ std=[58.395, 57.12, 57.375],
427
+ to_rgb=True),
428
+ dict(type='Pad', size_divisor=32),
429
+ dict(type='DefaultFormatBundle'),
430
+ dict(type='Collect', keys=['img'])
431
+ ])
432
+ ],
433
+ img_prefix='data/val/images/',
434
+ ann_file='data/val/annfiles/',
435
+ version='le90',
436
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
437
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
438
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
439
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
440
+ 'container-crane')),
441
+ test=dict(
442
+ type='DOTAv15WSOODDataset',
443
+ pipeline=[
444
+ dict(type='LoadImageFromFile'),
445
+ dict(
446
+ type='MultiScaleFlipAug',
447
+ img_scale=(1024, 1024),
448
+ flip=False,
449
+ transforms=[
450
+ dict(type='RResize'),
451
+ dict(
452
+ type='Normalize',
453
+ mean=[123.675, 116.28, 103.53],
454
+ std=[58.395, 57.12, 57.375],
455
+ to_rgb=True),
456
+ dict(type='Pad', size_divisor=32),
457
+ dict(type='DefaultFormatBundle'),
458
+ dict(type='Collect', keys=['img'])
459
+ ])
460
+ ],
461
+ img_prefix='data/vis_val/images/',
462
+ ann_file='data/vis_val/annfiles/',
463
+ version='le90',
464
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
465
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
466
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
467
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
468
+ 'container-crane')),
469
+ sampler=dict(
470
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
471
+ custom_hooks = [
472
+ dict(type='NumClassCheckHook'),
473
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
474
+ ]
475
+ evaluation = dict(
476
+ type='SubModulesDistEvalHook',
477
+ interval=3200,
478
+ metric='mAP',
479
+ save_best='mAP')
480
+ optimizer = dict(
481
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
482
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
483
+ lr_config = dict(
484
+ policy='step',
485
+ warmup='linear',
486
+ warmup_iters=500,
487
+ warmup_ratio=0.3333333333333333,
488
+ step=120000)
489
+ runner = dict(type='IterBasedRunner', max_iters=120000)
490
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
491
+ log_config = dict(
492
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
493
+ dist_params = dict(backend='nccl')
494
+ log_level = 'INFO'
495
+ load_from = None
496
+ resume_from = None
497
+ workflow = [('train', 1)]
498
+ opencv_num_threads = 0
499
+ mp_start_method = 'fork'
500
+ custom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)
501
+ work_dir = 'work_dir/h2rv2_mcl/a_noise/0.1/'
502
+ auto_resume = False
503
+ gpu_ids = range(0, 2)
504
+
505
+ 2025-03-07 08:27:36,388 - mmrotate - INFO - Set random seed to 42, deterministic: True
506
+ 2025-03-07 08:28:00,761 - mmrotate - INFO - Start running, host: yangxue@think4proj-105-232, work_dir: /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.1
507
+ 2025-03-07 08:28:00,761 - mmrotate - INFO - Hooks will be executed in the following order:
508
+ before_run:
509
+ (VERY_HIGH ) StepLrUpdaterHook
510
+ (NORMAL ) CheckpointHook
511
+ (NORMAL ) MeanTeacher
512
+ (LOW ) SubModulesDistEvalHook
513
+ (VERY_LOW ) TextLoggerHook
514
+ --------------------
515
+ before_train_epoch:
516
+ (VERY_HIGH ) StepLrUpdaterHook
517
+ (NORMAL ) NumClassCheckHook
518
+ (LOW ) IterTimerHook
519
+ (LOW ) SubModulesDistEvalHook
520
+ (VERY_LOW ) TextLoggerHook
521
+ --------------------
522
+ before_train_iter:
523
+ (VERY_HIGH ) StepLrUpdaterHook
524
+ (LOW ) IterTimerHook
525
+ (LOW ) SubModulesDistEvalHook
526
+ --------------------
527
+ after_train_iter:
528
+ (ABOVE_NORMAL) OptimizerHook
529
+ (NORMAL ) CheckpointHook
530
+ (NORMAL ) MeanTeacher
531
+ (LOW ) IterTimerHook
532
+ (LOW ) SubModulesDistEvalHook
533
+ (VERY_LOW ) TextLoggerHook
534
+ --------------------
535
+ after_train_epoch:
536
+ (NORMAL ) CheckpointHook
537
+ (LOW ) SubModulesDistEvalHook
538
+ (VERY_LOW ) TextLoggerHook
539
+ --------------------
540
+ before_val_epoch:
541
+ (NORMAL ) NumClassCheckHook
542
+ (LOW ) IterTimerHook
543
+ (VERY_LOW ) TextLoggerHook
544
+ --------------------
545
+ before_val_iter:
546
+ (LOW ) IterTimerHook
547
+ --------------------
548
+ after_val_iter:
549
+ (LOW ) IterTimerHook
550
+ --------------------
551
+ after_val_epoch:
552
+ (VERY_LOW ) TextLoggerHook
553
+ --------------------
554
+ after_run:
555
+ (VERY_LOW ) TextLoggerHook
556
+ --------------------
557
+ 2025-03-07 08:28:00,761 - mmrotate - INFO - workflow: [('train', 1)], max: 120000 iters
558
+ 2025-03-07 08:28:00,762 - mmrotate - INFO - Checkpoints will be saved to /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.1 by HardDiskBackend.
work_dir_h/PWOOD/a_noise/0.1/20250307_082733.log.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_info": "sys.platform: linux\nPython: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]\nCUDA available: True\nGPU 0,1: NVIDIA GeForce RTX 4090\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 11.8, V11.8.89\nGCC: gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0\nPyTorch: 1.13.1+cu116\nPyTorch compiling details: PyTorch built with:\n - GCC 9.3\n - C++ Version: 201402\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - CUDA Runtime 11.6\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\n - CuDNN 8.3.2 (built against CUDA 11.5)\n - Magma 2.6.1\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, \n\nTorchVision: 0.14.1+cu116\nOpenCV: 4.11.0\nMMCV: 1.7.2\nMMCV Compiler: GCC 9.3\nMMCV CUDA Compiler: 11.6\nMMRotate: 0.3.4+7833b87", "config": "angle_version = 'le90'\ndetector = dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000))\nmodel = dict(\n type='H2RV2MCLTeacher',\n model=dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(\n type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(\n type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(\n type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000)),\n semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),\n train_cfg=dict(\n iter_count=0,\n burn_in_steps=12800,\n sup_weight=1.0,\n unsup_weight=1.0,\n weight_suppress='exp',\n logit_specific_weights=dict(),\n cls_channels=16),\n test_cfg=dict(inference_on='teacher'))\nimg_norm_cfg = dict(\n mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)\ncommon_pipeline = [\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\nstrong_pipeline = [\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n]\nweak_pipeline = [\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n]\nunsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1,\n 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg', 'tag'))\n ],\n is_seq=True)\n]\nsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.1),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\ntest_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n]\ndataset_type = 'DOTAv15WSOODDataset'\nclasses = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')\ndata = dict(\n samples_per_gpu=3,\n workers_per_gpu=5,\n train=dict(\n type='SemiDataset',\n sup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.1),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor',\n 'flip', 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n ann_file='data/train_20p_labeled/annfiles/',\n img_prefix='data/train_20p_labeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n unsup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[\n dict(\n type='DTGaussianBlur',\n rad_range=[0.1, 2.0])\n ]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape',\n 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n is_seq=True)\n ],\n ann_file='data/train_20p_unlabeled/empty_annfiles/',\n img_prefix='data/train_20p_unlabeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane'),\n filter_empty_gt=False)),\n val=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/val/images/',\n ann_file='data/val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n test=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/vis_val/images/',\n ann_file='data/vis_val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n sampler=dict(\n train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))\ncustom_hooks = [\n dict(type='NumClassCheckHook'),\n dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)\n]\nevaluation = dict(\n type='SubModulesDistEvalHook',\n interval=3200,\n metric='mAP',\n save_best='mAP')\noptimizer = dict(\n type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)\noptimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))\nlr_config = dict(\n policy='step',\n warmup='linear',\n warmup_iters=500,\n warmup_ratio=0.3333333333333333,\n step=120000)\nrunner = dict(type='IterBasedRunner', max_iters=120000)\ncheckpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)\nlog_config = dict(\n _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])\ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\nload_from = None\nresume_from = None\nworkflow = [('train', 1)]\nopencv_num_threads = 0\nmp_start_method = 'fork'\ncustom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)\nwork_dir = 'work_dir/h2rv2_mcl/a_noise/0.1/'\nauto_resume = False\ngpu_ids = range(0, 2)\n", "seed": 42, "exp_name": "gmm.py"}
work_dir_h/PWOOD/a_noise/0.1/20250307_090925.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/a_noise/0.1/20250307_090925.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/a_noise/0.1/gmm.py ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='AddNoise', p=0.1),
223
+ dict(type='RResize', img_scale=(1024, 1024)),
224
+ dict(
225
+ type='RRandomFlip',
226
+ flip_ratio=[0.25, 0.25, 0.25],
227
+ direction=['horizontal', 'vertical', 'diagonal'],
228
+ version='le90'),
229
+ dict(type='ExtraAttrs', tag='sup_weak'),
230
+ dict(
231
+ type='Normalize',
232
+ mean=[123.675, 116.28, 103.53],
233
+ std=[58.395, 57.12, 57.375],
234
+ to_rgb=True),
235
+ dict(type='Pad', size_divisor=32),
236
+ dict(type='DefaultFormatBundle'),
237
+ dict(
238
+ type='Collect',
239
+ keys=['img', 'gt_bboxes', 'gt_labels'],
240
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
241
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
242
+ 'img_norm_cfg', 'tag'))
243
+ ]
244
+ test_pipeline = [
245
+ dict(type='LoadImageFromFile'),
246
+ dict(
247
+ type='MultiScaleFlipAug',
248
+ img_scale=(1024, 1024),
249
+ flip=False,
250
+ transforms=[
251
+ dict(type='RResize'),
252
+ dict(
253
+ type='Normalize',
254
+ mean=[123.675, 116.28, 103.53],
255
+ std=[58.395, 57.12, 57.375],
256
+ to_rgb=True),
257
+ dict(type='Pad', size_divisor=32),
258
+ dict(type='DefaultFormatBundle'),
259
+ dict(type='Collect', keys=['img'])
260
+ ])
261
+ ]
262
+ dataset_type = 'DOTAv15WSOODDataset'
263
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
264
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
265
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
266
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
267
+ 'container-crane')
268
+ data = dict(
269
+ samples_per_gpu=3,
270
+ workers_per_gpu=5,
271
+ train=dict(
272
+ type='SemiDataset',
273
+ sup=dict(
274
+ type='DOTAv15WSOODDataset',
275
+ pipeline=[
276
+ dict(type='LoadImageFromFile'),
277
+ dict(type='LoadAnnotations', with_bbox=True),
278
+ dict(type='AddNoise', p=0.1),
279
+ dict(type='RResize', img_scale=(1024, 1024)),
280
+ dict(
281
+ type='RRandomFlip',
282
+ flip_ratio=[0.25, 0.25, 0.25],
283
+ direction=['horizontal', 'vertical', 'diagonal'],
284
+ version='le90'),
285
+ dict(type='ExtraAttrs', tag='sup_weak'),
286
+ dict(
287
+ type='Normalize',
288
+ mean=[123.675, 116.28, 103.53],
289
+ std=[58.395, 57.12, 57.375],
290
+ to_rgb=True),
291
+ dict(type='Pad', size_divisor=32),
292
+ dict(type='DefaultFormatBundle'),
293
+ dict(
294
+ type='Collect',
295
+ keys=['img', 'gt_bboxes', 'gt_labels'],
296
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
297
+ 'img_shape', 'pad_shape', 'scale_factor',
298
+ 'flip', 'flip_direction', 'img_norm_cfg',
299
+ 'tag'))
300
+ ],
301
+ ann_file='data/train_20p_labeled/annfiles/',
302
+ img_prefix='data/train_20p_labeled/images/',
303
+ version='le90',
304
+ classes=('plane', 'baseball-diamond', 'bridge',
305
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
306
+ 'ship', 'tennis-court', 'basketball-court',
307
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
308
+ 'harbor', 'swimming-pool', 'helicopter',
309
+ 'container-crane')),
310
+ unsup=dict(
311
+ type='DOTAv15WSOODDataset',
312
+ pipeline=[
313
+ dict(type='LoadImageFromFile'),
314
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
315
+ dict(
316
+ type='STMultiBranch',
317
+ unsup_strong=[
318
+ dict(type='DTToPILImage'),
319
+ dict(
320
+ type='DTRandomApply',
321
+ operations=[
322
+ ColorJitter(
323
+ brightness=[0.6, 1.4],
324
+ contrast=[0.6, 1.4],
325
+ saturation=[0.6, 1.4],
326
+ hue=[-0.1, 0.1])
327
+ ],
328
+ p=0.8),
329
+ dict(type='DTRandomGrayscale', p=0.2),
330
+ dict(
331
+ type='DTRandomApply',
332
+ operations=[
333
+ dict(
334
+ type='DTGaussianBlur',
335
+ rad_range=[0.1, 2.0])
336
+ ]),
337
+ dict(type='DTToNumpy'),
338
+ dict(type='ExtraAttrs', tag='unsup_strong')
339
+ ],
340
+ unsup_weak=[
341
+ dict(type='RResize', img_scale=(1024, 1024)),
342
+ dict(
343
+ type='RRandomFlip',
344
+ flip_ratio=[0.25, 0.25, 0.25],
345
+ direction=['horizontal', 'vertical', 'diagonal'],
346
+ version='le90'),
347
+ dict(type='ExtraAttrs', tag='unsup_weak')
348
+ ],
349
+ common_pipeline=[
350
+ dict(
351
+ type='Normalize',
352
+ mean=[123.675, 116.28, 103.53],
353
+ std=[58.395, 57.12, 57.375],
354
+ to_rgb=True),
355
+ dict(type='Pad', size_divisor=32),
356
+ dict(type='DefaultFormatBundle'),
357
+ dict(
358
+ type='Collect',
359
+ keys=['img', 'gt_bboxes', 'gt_labels'],
360
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
361
+ 'img_shape', 'pad_shape',
362
+ 'scale_factor', 'flip',
363
+ 'flip_direction', 'img_norm_cfg',
364
+ 'tag'))
365
+ ],
366
+ is_seq=True)
367
+ ],
368
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
369
+ img_prefix='data/train_20p_unlabeled/images/',
370
+ version='le90',
371
+ classes=('plane', 'baseball-diamond', 'bridge',
372
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
373
+ 'ship', 'tennis-court', 'basketball-court',
374
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
375
+ 'harbor', 'swimming-pool', 'helicopter',
376
+ 'container-crane'),
377
+ filter_empty_gt=False)),
378
+ val=dict(
379
+ type='DOTAv15WSOODDataset',
380
+ pipeline=[
381
+ dict(type='LoadImageFromFile'),
382
+ dict(
383
+ type='MultiScaleFlipAug',
384
+ img_scale=(1024, 1024),
385
+ flip=False,
386
+ transforms=[
387
+ dict(type='RResize'),
388
+ dict(
389
+ type='Normalize',
390
+ mean=[123.675, 116.28, 103.53],
391
+ std=[58.395, 57.12, 57.375],
392
+ to_rgb=True),
393
+ dict(type='Pad', size_divisor=32),
394
+ dict(type='DefaultFormatBundle'),
395
+ dict(type='Collect', keys=['img'])
396
+ ])
397
+ ],
398
+ img_prefix='data/val/images/',
399
+ ann_file='data/val/annfiles/',
400
+ version='le90',
401
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
402
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
403
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
404
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
405
+ 'container-crane')),
406
+ test=dict(
407
+ type='DOTAv15WSOODDataset',
408
+ pipeline=[
409
+ dict(type='LoadImageFromFile'),
410
+ dict(
411
+ type='MultiScaleFlipAug',
412
+ img_scale=(1024, 1024),
413
+ flip=False,
414
+ transforms=[
415
+ dict(type='RResize'),
416
+ dict(
417
+ type='Normalize',
418
+ mean=[123.675, 116.28, 103.53],
419
+ std=[58.395, 57.12, 57.375],
420
+ to_rgb=True),
421
+ dict(type='Pad', size_divisor=32),
422
+ dict(type='DefaultFormatBundle'),
423
+ dict(type='Collect', keys=['img'])
424
+ ])
425
+ ],
426
+ img_prefix='data/vis_val/images/',
427
+ ann_file='data/vis_val/annfiles/',
428
+ version='le90',
429
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
430
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
431
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
432
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
433
+ 'container-crane')),
434
+ sampler=dict(
435
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
436
+ custom_hooks = [
437
+ dict(type='NumClassCheckHook'),
438
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
439
+ ]
440
+ evaluation = dict(
441
+ type='SubModulesDistEvalHook',
442
+ interval=3200,
443
+ metric='mAP',
444
+ save_best='mAP')
445
+ optimizer = dict(
446
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
447
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
448
+ lr_config = dict(
449
+ policy='step',
450
+ warmup='linear',
451
+ warmup_iters=500,
452
+ warmup_ratio=0.3333333333333333,
453
+ step=120000)
454
+ runner = dict(type='IterBasedRunner', max_iters=120000)
455
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
456
+ log_config = dict(
457
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
458
+ dist_params = dict(backend='nccl')
459
+ log_level = 'INFO'
460
+ load_from = None
461
+ resume_from = None
462
+ workflow = [('train', 1)]
463
+ opencv_num_threads = 0
464
+ mp_start_method = 'fork'
465
+ custom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)
466
+ work_dir = 'work_dir/h2rv2_mcl/a_noise/0.1/'
467
+ auto_resume = False
468
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/a_noise/0.3/20250307_115752.log ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-03-07 11:57:52,177 - mmrotate - INFO - Environment info:
2
+ ------------------------------------------------------------
3
+ sys.platform: linux
4
+ Python: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]
5
+ CUDA available: True
6
+ GPU 0,1: NVIDIA GeForce RTX 3090
7
+ CUDA_HOME: /usr
8
+ NVCC: Cuda compilation tools, release 10.1, V10.1.24
9
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
10
+ PyTorch: 1.13.1+cu116
11
+ PyTorch compiling details: PyTorch built with:
12
+ - GCC 9.3
13
+ - C++ Version: 201402
14
+ - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
15
+ - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
16
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
17
+ - LAPACK is enabled (usually provided by MKL)
18
+ - NNPACK is enabled
19
+ - CPU capability usage: AVX2
20
+ - CUDA Runtime 11.6
21
+ - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
22
+ - CuDNN 8.3.2 (built against CUDA 11.5)
23
+ - Magma 2.6.1
24
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
25
+
26
+ TorchVision: 0.14.1+cu116
27
+ OpenCV: 4.11.0
28
+ MMCV: 1.7.2
29
+ MMCV Compiler: GCC 9.3
30
+ MMCV CUDA Compiler: 11.6
31
+ MMRotate: 0.3.4+7833b87
32
+ ------------------------------------------------------------
33
+
34
+ 2025-03-07 11:57:52,864 - mmrotate - INFO - Distributed training: True
35
+ 2025-03-07 11:57:53,655 - mmrotate - INFO - Config:
36
+ angle_version = 'le90'
37
+ detector = dict(
38
+ type='SemiRotatedFCOS',
39
+ backbone=dict(
40
+ type='ResNet',
41
+ depth=50,
42
+ num_stages=4,
43
+ out_indices=(0, 1, 2, 3),
44
+ frozen_stages=1,
45
+ zero_init_residual=False,
46
+ norm_cfg=dict(type='BN', requires_grad=True),
47
+ norm_eval=True,
48
+ style='pytorch',
49
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
50
+ neck=dict(
51
+ type='FPN',
52
+ in_channels=[256, 512, 1024, 2048],
53
+ out_channels=256,
54
+ start_level=1,
55
+ add_extra_convs='on_output',
56
+ num_outs=5,
57
+ relu_before_extra_convs=True),
58
+ bbox_head=dict(
59
+ type='SemiRotatedFCOSHeadH2RV2MCL',
60
+ num_classes=16,
61
+ in_channels=256,
62
+ stacked_convs=4,
63
+ feat_channels=256,
64
+ strides=[8, 16, 32, 64, 128],
65
+ center_sampling=True,
66
+ center_sample_radius=1.5,
67
+ norm_on_bbox=True,
68
+ centerness_on_reg=True,
69
+ square_cls=[1, 9, 11],
70
+ resize_cls=[1],
71
+ scale_angle=False,
72
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
73
+ loss_cls=dict(
74
+ type='FocalLoss',
75
+ use_sigmoid=True,
76
+ gamma=2.0,
77
+ alpha=0.25,
78
+ loss_weight=1.0),
79
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
80
+ loss_centerness=dict(
81
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
82
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
83
+ train_cfg=None,
84
+ test_cfg=dict(
85
+ nms_pre=2000,
86
+ min_bbox_size=0,
87
+ score_thr=0.05,
88
+ nms=dict(iou_thr=0.1),
89
+ max_per_img=2000))
90
+ model = dict(
91
+ type='H2RV2MCLTeacher',
92
+ model=dict(
93
+ type='SemiRotatedFCOS',
94
+ backbone=dict(
95
+ type='ResNet',
96
+ depth=50,
97
+ num_stages=4,
98
+ out_indices=(0, 1, 2, 3),
99
+ frozen_stages=1,
100
+ zero_init_residual=False,
101
+ norm_cfg=dict(type='BN', requires_grad=True),
102
+ norm_eval=True,
103
+ style='pytorch',
104
+ init_cfg=dict(
105
+ type='Pretrained', checkpoint='torchvision://resnet50')),
106
+ neck=dict(
107
+ type='FPN',
108
+ in_channels=[256, 512, 1024, 2048],
109
+ out_channels=256,
110
+ start_level=1,
111
+ add_extra_convs='on_output',
112
+ num_outs=5,
113
+ relu_before_extra_convs=True),
114
+ bbox_head=dict(
115
+ type='SemiRotatedFCOSHeadH2RV2MCL',
116
+ num_classes=16,
117
+ in_channels=256,
118
+ stacked_convs=4,
119
+ feat_channels=256,
120
+ strides=[8, 16, 32, 64, 128],
121
+ center_sampling=True,
122
+ center_sample_radius=1.5,
123
+ norm_on_bbox=True,
124
+ centerness_on_reg=True,
125
+ square_cls=[1, 9, 11],
126
+ resize_cls=[1],
127
+ scale_angle=False,
128
+ bbox_coder=dict(
129
+ type='DistanceAnglePointCoder', angle_version='le90'),
130
+ loss_cls=dict(
131
+ type='FocalLoss',
132
+ use_sigmoid=True,
133
+ gamma=2.0,
134
+ alpha=0.25,
135
+ loss_weight=1.0),
136
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
137
+ loss_centerness=dict(
138
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
139
+ loss_ss_symmetry=dict(
140
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
141
+ train_cfg=None,
142
+ test_cfg=dict(
143
+ nms_pre=2000,
144
+ min_bbox_size=0,
145
+ score_thr=0.05,
146
+ nms=dict(iou_thr=0.1),
147
+ max_per_img=2000)),
148
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),
149
+ train_cfg=dict(
150
+ iter_count=0,
151
+ burn_in_steps=12800,
152
+ sup_weight=1.0,
153
+ unsup_weight=1.0,
154
+ weight_suppress='exp',
155
+ logit_specific_weights=dict(),
156
+ cls_channels=16),
157
+ test_cfg=dict(inference_on='teacher'))
158
+ img_norm_cfg = dict(
159
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
160
+ common_pipeline = [
161
+ dict(
162
+ type='Normalize',
163
+ mean=[123.675, 116.28, 103.53],
164
+ std=[58.395, 57.12, 57.375],
165
+ to_rgb=True),
166
+ dict(type='Pad', size_divisor=32),
167
+ dict(type='DefaultFormatBundle'),
168
+ dict(
169
+ type='Collect',
170
+ keys=['img', 'gt_bboxes', 'gt_labels'],
171
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
172
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
173
+ 'img_norm_cfg', 'tag'))
174
+ ]
175
+ strong_pipeline = [
176
+ dict(type='DTToPILImage'),
177
+ dict(
178
+ type='DTRandomApply',
179
+ operations=[
180
+ ColorJitter(
181
+ brightness=[0.6, 1.4],
182
+ contrast=[0.6, 1.4],
183
+ saturation=[0.6, 1.4],
184
+ hue=[-0.1, 0.1])
185
+ ],
186
+ p=0.8),
187
+ dict(type='DTRandomGrayscale', p=0.2),
188
+ dict(
189
+ type='DTRandomApply',
190
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
191
+ dict(type='DTToNumpy'),
192
+ dict(type='ExtraAttrs', tag='unsup_strong')
193
+ ]
194
+ weak_pipeline = [
195
+ dict(type='RResize', img_scale=(1024, 1024)),
196
+ dict(
197
+ type='RRandomFlip',
198
+ flip_ratio=[0.25, 0.25, 0.25],
199
+ direction=['horizontal', 'vertical', 'diagonal'],
200
+ version='le90'),
201
+ dict(type='ExtraAttrs', tag='unsup_weak')
202
+ ]
203
+ unsup_pipeline = [
204
+ dict(type='LoadImageFromFile'),
205
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
206
+ dict(
207
+ type='STMultiBranch',
208
+ unsup_strong=[
209
+ dict(type='DTToPILImage'),
210
+ dict(
211
+ type='DTRandomApply',
212
+ operations=[
213
+ ColorJitter(
214
+ brightness=[0.6, 1.4],
215
+ contrast=[0.6, 1.4],
216
+ saturation=[0.6, 1.4],
217
+ hue=[-0.1, 0.1])
218
+ ],
219
+ p=0.8),
220
+ dict(type='DTRandomGrayscale', p=0.2),
221
+ dict(
222
+ type='DTRandomApply',
223
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
224
+ 2.0])]),
225
+ dict(type='DTToNumpy'),
226
+ dict(type='ExtraAttrs', tag='unsup_strong')
227
+ ],
228
+ unsup_weak=[
229
+ dict(type='RResize', img_scale=(1024, 1024)),
230
+ dict(
231
+ type='RRandomFlip',
232
+ flip_ratio=[0.25, 0.25, 0.25],
233
+ direction=['horizontal', 'vertical', 'diagonal'],
234
+ version='le90'),
235
+ dict(type='ExtraAttrs', tag='unsup_weak')
236
+ ],
237
+ common_pipeline=[
238
+ dict(
239
+ type='Normalize',
240
+ mean=[123.675, 116.28, 103.53],
241
+ std=[58.395, 57.12, 57.375],
242
+ to_rgb=True),
243
+ dict(type='Pad', size_divisor=32),
244
+ dict(type='DefaultFormatBundle'),
245
+ dict(
246
+ type='Collect',
247
+ keys=['img', 'gt_bboxes', 'gt_labels'],
248
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
249
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
250
+ 'flip_direction', 'img_norm_cfg', 'tag'))
251
+ ],
252
+ is_seq=True)
253
+ ]
254
+ sup_pipeline = [
255
+ dict(type='LoadImageFromFile'),
256
+ dict(type='LoadAnnotations', with_bbox=True),
257
+ dict(type='AddNoise', p=0.3),
258
+ dict(type='RResize', img_scale=(1024, 1024)),
259
+ dict(
260
+ type='RRandomFlip',
261
+ flip_ratio=[0.25, 0.25, 0.25],
262
+ direction=['horizontal', 'vertical', 'diagonal'],
263
+ version='le90'),
264
+ dict(type='ExtraAttrs', tag='sup_weak'),
265
+ dict(
266
+ type='Normalize',
267
+ mean=[123.675, 116.28, 103.53],
268
+ std=[58.395, 57.12, 57.375],
269
+ to_rgb=True),
270
+ dict(type='Pad', size_divisor=32),
271
+ dict(type='DefaultFormatBundle'),
272
+ dict(
273
+ type='Collect',
274
+ keys=['img', 'gt_bboxes', 'gt_labels'],
275
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
276
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
277
+ 'img_norm_cfg', 'tag'))
278
+ ]
279
+ test_pipeline = [
280
+ dict(type='LoadImageFromFile'),
281
+ dict(
282
+ type='MultiScaleFlipAug',
283
+ img_scale=(1024, 1024),
284
+ flip=False,
285
+ transforms=[
286
+ dict(type='RResize'),
287
+ dict(
288
+ type='Normalize',
289
+ mean=[123.675, 116.28, 103.53],
290
+ std=[58.395, 57.12, 57.375],
291
+ to_rgb=True),
292
+ dict(type='Pad', size_divisor=32),
293
+ dict(type='DefaultFormatBundle'),
294
+ dict(type='Collect', keys=['img'])
295
+ ])
296
+ ]
297
+ dataset_type = 'DOTAv15WSOODDataset'
298
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
299
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
300
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
301
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
302
+ 'container-crane')
303
+ data = dict(
304
+ samples_per_gpu=3,
305
+ workers_per_gpu=5,
306
+ train=dict(
307
+ type='SemiDataset',
308
+ sup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadAnnotations', with_bbox=True),
313
+ dict(type='AddNoise', p=0.3),
314
+ dict(type='RResize', img_scale=(1024, 1024)),
315
+ dict(
316
+ type='RRandomFlip',
317
+ flip_ratio=[0.25, 0.25, 0.25],
318
+ direction=['horizontal', 'vertical', 'diagonal'],
319
+ version='le90'),
320
+ dict(type='ExtraAttrs', tag='sup_weak'),
321
+ dict(
322
+ type='Normalize',
323
+ mean=[123.675, 116.28, 103.53],
324
+ std=[58.395, 57.12, 57.375],
325
+ to_rgb=True),
326
+ dict(type='Pad', size_divisor=32),
327
+ dict(type='DefaultFormatBundle'),
328
+ dict(
329
+ type='Collect',
330
+ keys=['img', 'gt_bboxes', 'gt_labels'],
331
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
332
+ 'img_shape', 'pad_shape', 'scale_factor',
333
+ 'flip', 'flip_direction', 'img_norm_cfg',
334
+ 'tag'))
335
+ ],
336
+ ann_file='data/train_20p_labeled/annfiles/',
337
+ img_prefix='data/train_20p_labeled/images/',
338
+ version='le90',
339
+ classes=('plane', 'baseball-diamond', 'bridge',
340
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
341
+ 'ship', 'tennis-court', 'basketball-court',
342
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
343
+ 'harbor', 'swimming-pool', 'helicopter',
344
+ 'container-crane')),
345
+ unsup=dict(
346
+ type='DOTAv15WSOODDataset',
347
+ pipeline=[
348
+ dict(type='LoadImageFromFile'),
349
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
350
+ dict(
351
+ type='STMultiBranch',
352
+ unsup_strong=[
353
+ dict(type='DTToPILImage'),
354
+ dict(
355
+ type='DTRandomApply',
356
+ operations=[
357
+ ColorJitter(
358
+ brightness=[0.6, 1.4],
359
+ contrast=[0.6, 1.4],
360
+ saturation=[0.6, 1.4],
361
+ hue=[-0.1, 0.1])
362
+ ],
363
+ p=0.8),
364
+ dict(type='DTRandomGrayscale', p=0.2),
365
+ dict(
366
+ type='DTRandomApply',
367
+ operations=[
368
+ dict(
369
+ type='DTGaussianBlur',
370
+ rad_range=[0.1, 2.0])
371
+ ]),
372
+ dict(type='DTToNumpy'),
373
+ dict(type='ExtraAttrs', tag='unsup_strong')
374
+ ],
375
+ unsup_weak=[
376
+ dict(type='RResize', img_scale=(1024, 1024)),
377
+ dict(
378
+ type='RRandomFlip',
379
+ flip_ratio=[0.25, 0.25, 0.25],
380
+ direction=['horizontal', 'vertical', 'diagonal'],
381
+ version='le90'),
382
+ dict(type='ExtraAttrs', tag='unsup_weak')
383
+ ],
384
+ common_pipeline=[
385
+ dict(
386
+ type='Normalize',
387
+ mean=[123.675, 116.28, 103.53],
388
+ std=[58.395, 57.12, 57.375],
389
+ to_rgb=True),
390
+ dict(type='Pad', size_divisor=32),
391
+ dict(type='DefaultFormatBundle'),
392
+ dict(
393
+ type='Collect',
394
+ keys=['img', 'gt_bboxes', 'gt_labels'],
395
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
396
+ 'img_shape', 'pad_shape',
397
+ 'scale_factor', 'flip',
398
+ 'flip_direction', 'img_norm_cfg',
399
+ 'tag'))
400
+ ],
401
+ is_seq=True)
402
+ ],
403
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
404
+ img_prefix='data/train_20p_unlabeled/images/',
405
+ version='le90',
406
+ classes=('plane', 'baseball-diamond', 'bridge',
407
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
408
+ 'ship', 'tennis-court', 'basketball-court',
409
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
410
+ 'harbor', 'swimming-pool', 'helicopter',
411
+ 'container-crane'),
412
+ filter_empty_gt=False)),
413
+ val=dict(
414
+ type='DOTAv15WSOODDataset',
415
+ pipeline=[
416
+ dict(type='LoadImageFromFile'),
417
+ dict(
418
+ type='MultiScaleFlipAug',
419
+ img_scale=(1024, 1024),
420
+ flip=False,
421
+ transforms=[
422
+ dict(type='RResize'),
423
+ dict(
424
+ type='Normalize',
425
+ mean=[123.675, 116.28, 103.53],
426
+ std=[58.395, 57.12, 57.375],
427
+ to_rgb=True),
428
+ dict(type='Pad', size_divisor=32),
429
+ dict(type='DefaultFormatBundle'),
430
+ dict(type='Collect', keys=['img'])
431
+ ])
432
+ ],
433
+ img_prefix='data/val/images/',
434
+ ann_file='data/val/annfiles/',
435
+ version='le90',
436
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
437
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
438
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
439
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
440
+ 'container-crane')),
441
+ test=dict(
442
+ type='DOTAv15WSOODDataset',
443
+ pipeline=[
444
+ dict(type='LoadImageFromFile'),
445
+ dict(
446
+ type='MultiScaleFlipAug',
447
+ img_scale=(1024, 1024),
448
+ flip=False,
449
+ transforms=[
450
+ dict(type='RResize'),
451
+ dict(
452
+ type='Normalize',
453
+ mean=[123.675, 116.28, 103.53],
454
+ std=[58.395, 57.12, 57.375],
455
+ to_rgb=True),
456
+ dict(type='Pad', size_divisor=32),
457
+ dict(type='DefaultFormatBundle'),
458
+ dict(type='Collect', keys=['img'])
459
+ ])
460
+ ],
461
+ img_prefix='data/vis_val/images/',
462
+ ann_file='data/vis_val/annfiles/',
463
+ version='le90',
464
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
465
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
466
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
467
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
468
+ 'container-crane')),
469
+ sampler=dict(
470
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
471
+ custom_hooks = [
472
+ dict(type='NumClassCheckHook'),
473
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
474
+ ]
475
+ evaluation = dict(
476
+ type='SubModulesDistEvalHook',
477
+ interval=3200,
478
+ metric='mAP',
479
+ save_best='mAP')
480
+ optimizer = dict(
481
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
482
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
483
+ lr_config = dict(
484
+ policy='step',
485
+ warmup='linear',
486
+ warmup_iters=500,
487
+ warmup_ratio=0.3333333333333333,
488
+ step=120000)
489
+ runner = dict(type='IterBasedRunner', max_iters=120000)
490
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
491
+ log_config = dict(
492
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
493
+ dist_params = dict(backend='nccl')
494
+ log_level = 'INFO'
495
+ load_from = None
496
+ resume_from = None
497
+ workflow = [('train', 1)]
498
+ opencv_num_threads = 0
499
+ mp_start_method = 'fork'
500
+ custom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)
501
+ work_dir = 'work_dir/h2rv2_mcl/a_noise/0.3/'
502
+ auto_resume = False
503
+ gpu_ids = range(0, 2)
504
+
505
+ 2025-03-07 11:57:53,655 - mmrotate - INFO - Set random seed to 42, deterministic: True
506
+ 2025-03-07 11:58:11,686 - mmrotate - INFO - Start running, host: yangxue@thinklab-105-226, work_dir: /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.3
507
+ 2025-03-07 11:58:11,687 - mmrotate - INFO - Hooks will be executed in the following order:
508
+ before_run:
509
+ (VERY_HIGH ) StepLrUpdaterHook
510
+ (NORMAL ) CheckpointHook
511
+ (NORMAL ) MeanTeacher
512
+ (LOW ) SubModulesDistEvalHook
513
+ (VERY_LOW ) TextLoggerHook
514
+ --------------------
515
+ before_train_epoch:
516
+ (VERY_HIGH ) StepLrUpdaterHook
517
+ (NORMAL ) NumClassCheckHook
518
+ (LOW ) IterTimerHook
519
+ (LOW ) SubModulesDistEvalHook
520
+ (VERY_LOW ) TextLoggerHook
521
+ --------------------
522
+ before_train_iter:
523
+ (VERY_HIGH ) StepLrUpdaterHook
524
+ (LOW ) IterTimerHook
525
+ (LOW ) SubModulesDistEvalHook
526
+ --------------------
527
+ after_train_iter:
528
+ (ABOVE_NORMAL) OptimizerHook
529
+ (NORMAL ) CheckpointHook
530
+ (NORMAL ) MeanTeacher
531
+ (LOW ) IterTimerHook
532
+ (LOW ) SubModulesDistEvalHook
533
+ (VERY_LOW ) TextLoggerHook
534
+ --------------------
535
+ after_train_epoch:
536
+ (NORMAL ) CheckpointHook
537
+ (LOW ) SubModulesDistEvalHook
538
+ (VERY_LOW ) TextLoggerHook
539
+ --------------------
540
+ before_val_epoch:
541
+ (NORMAL ) NumClassCheckHook
542
+ (LOW ) IterTimerHook
543
+ (VERY_LOW ) TextLoggerHook
544
+ --------------------
545
+ before_val_iter:
546
+ (LOW ) IterTimerHook
547
+ --------------------
548
+ after_val_iter:
549
+ (LOW ) IterTimerHook
550
+ --------------------
551
+ after_val_epoch:
552
+ (VERY_LOW ) TextLoggerHook
553
+ --------------------
554
+ after_run:
555
+ (VERY_LOW ) TextLoggerHook
556
+ --------------------
557
+ 2025-03-07 11:58:11,687 - mmrotate - INFO - workflow: [('train', 1)], max: 120000 iters
558
+ 2025-03-07 11:58:11,687 - mmrotate - INFO - Checkpoints will be saved to /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/a_noise/0.3 by HardDiskBackend.
work_dir_h/PWOOD/a_noise/0.3/20250307_115752.log.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_info": "sys.platform: linux\nPython: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]\nCUDA available: True\nGPU 0,1: NVIDIA GeForce RTX 3090\nCUDA_HOME: /usr\nNVCC: Cuda compilation tools, release 10.1, V10.1.24\nGCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0\nPyTorch: 1.13.1+cu116\nPyTorch compiling details: PyTorch built with:\n - GCC 9.3\n - C++ Version: 201402\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - CUDA Runtime 11.6\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\n - CuDNN 8.3.2 (built against CUDA 11.5)\n - Magma 2.6.1\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, \n\nTorchVision: 0.14.1+cu116\nOpenCV: 4.11.0\nMMCV: 1.7.2\nMMCV Compiler: GCC 9.3\nMMCV CUDA Compiler: 11.6\nMMRotate: 0.3.4+7833b87", "config": "angle_version = 'le90'\ndetector = dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000))\nmodel = dict(\n type='H2RV2MCLTeacher',\n model=dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(\n type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(\n type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(\n type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000)),\n semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),\n train_cfg=dict(\n iter_count=0,\n burn_in_steps=12800,\n sup_weight=1.0,\n unsup_weight=1.0,\n weight_suppress='exp',\n logit_specific_weights=dict(),\n cls_channels=16),\n test_cfg=dict(inference_on='teacher'))\nimg_norm_cfg = dict(\n mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)\ncommon_pipeline = [\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\nstrong_pipeline = [\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n]\nweak_pipeline = [\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n]\nunsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1,\n 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg', 'tag'))\n ],\n is_seq=True)\n]\nsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.3),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\ntest_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n]\ndataset_type = 'DOTAv15WSOODDataset'\nclasses = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')\ndata = dict(\n samples_per_gpu=3,\n workers_per_gpu=5,\n train=dict(\n type='SemiDataset',\n sup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='AddNoise', p=0.3),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor',\n 'flip', 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n ann_file='data/train_20p_labeled/annfiles/',\n img_prefix='data/train_20p_labeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n unsup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[\n dict(\n type='DTGaussianBlur',\n rad_range=[0.1, 2.0])\n ]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape',\n 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n is_seq=True)\n ],\n ann_file='data/train_20p_unlabeled/empty_annfiles/',\n img_prefix='data/train_20p_unlabeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane'),\n filter_empty_gt=False)),\n val=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/val/images/',\n ann_file='data/val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n test=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/vis_val/images/',\n ann_file='data/vis_val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n sampler=dict(\n train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))\ncustom_hooks = [\n dict(type='NumClassCheckHook'),\n dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)\n]\nevaluation = dict(\n type='SubModulesDistEvalHook',\n interval=3200,\n metric='mAP',\n save_best='mAP')\noptimizer = dict(\n type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)\noptimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))\nlr_config = dict(\n policy='step',\n warmup='linear',\n warmup_iters=500,\n warmup_ratio=0.3333333333333333,\n step=120000)\nrunner = dict(type='IterBasedRunner', max_iters=120000)\ncheckpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)\nlog_config = dict(\n _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])\ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\nload_from = None\nresume_from = None\nworkflow = [('train', 1)]\nopencv_num_threads = 0\nmp_start_method = 'fork'\ncustom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)\nwork_dir = 'work_dir/h2rv2_mcl/a_noise/0.3/'\nauto_resume = False\ngpu_ids = range(0, 2)\n", "seed": 42, "exp_name": "a_gmm_noise_3.py"}
work_dir_h/PWOOD/a_noise/0.3/20250307_120102.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/a_noise/0.3/20250307_120102.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/a_noise/0.3/a_gmm_noise_3.py ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='high'),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='AddNoise', p=0.3),
223
+ dict(type='RResize', img_scale=(1024, 1024)),
224
+ dict(
225
+ type='RRandomFlip',
226
+ flip_ratio=[0.25, 0.25, 0.25],
227
+ direction=['horizontal', 'vertical', 'diagonal'],
228
+ version='le90'),
229
+ dict(type='ExtraAttrs', tag='sup_weak'),
230
+ dict(
231
+ type='Normalize',
232
+ mean=[123.675, 116.28, 103.53],
233
+ std=[58.395, 57.12, 57.375],
234
+ to_rgb=True),
235
+ dict(type='Pad', size_divisor=32),
236
+ dict(type='DefaultFormatBundle'),
237
+ dict(
238
+ type='Collect',
239
+ keys=['img', 'gt_bboxes', 'gt_labels'],
240
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
241
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
242
+ 'img_norm_cfg', 'tag'))
243
+ ]
244
+ test_pipeline = [
245
+ dict(type='LoadImageFromFile'),
246
+ dict(
247
+ type='MultiScaleFlipAug',
248
+ img_scale=(1024, 1024),
249
+ flip=False,
250
+ transforms=[
251
+ dict(type='RResize'),
252
+ dict(
253
+ type='Normalize',
254
+ mean=[123.675, 116.28, 103.53],
255
+ std=[58.395, 57.12, 57.375],
256
+ to_rgb=True),
257
+ dict(type='Pad', size_divisor=32),
258
+ dict(type='DefaultFormatBundle'),
259
+ dict(type='Collect', keys=['img'])
260
+ ])
261
+ ]
262
+ dataset_type = 'DOTAv15WSOODDataset'
263
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
264
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
265
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
266
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
267
+ 'container-crane')
268
+ data = dict(
269
+ samples_per_gpu=3,
270
+ workers_per_gpu=5,
271
+ train=dict(
272
+ type='SemiDataset',
273
+ sup=dict(
274
+ type='DOTAv15WSOODDataset',
275
+ pipeline=[
276
+ dict(type='LoadImageFromFile'),
277
+ dict(type='LoadAnnotations', with_bbox=True),
278
+ dict(type='AddNoise', p=0.3),
279
+ dict(type='RResize', img_scale=(1024, 1024)),
280
+ dict(
281
+ type='RRandomFlip',
282
+ flip_ratio=[0.25, 0.25, 0.25],
283
+ direction=['horizontal', 'vertical', 'diagonal'],
284
+ version='le90'),
285
+ dict(type='ExtraAttrs', tag='sup_weak'),
286
+ dict(
287
+ type='Normalize',
288
+ mean=[123.675, 116.28, 103.53],
289
+ std=[58.395, 57.12, 57.375],
290
+ to_rgb=True),
291
+ dict(type='Pad', size_divisor=32),
292
+ dict(type='DefaultFormatBundle'),
293
+ dict(
294
+ type='Collect',
295
+ keys=['img', 'gt_bboxes', 'gt_labels'],
296
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
297
+ 'img_shape', 'pad_shape', 'scale_factor',
298
+ 'flip', 'flip_direction', 'img_norm_cfg',
299
+ 'tag'))
300
+ ],
301
+ ann_file='data/train_20p_labeled/annfiles/',
302
+ img_prefix='data/train_20p_labeled/images/',
303
+ version='le90',
304
+ classes=('plane', 'baseball-diamond', 'bridge',
305
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
306
+ 'ship', 'tennis-court', 'basketball-court',
307
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
308
+ 'harbor', 'swimming-pool', 'helicopter',
309
+ 'container-crane')),
310
+ unsup=dict(
311
+ type='DOTAv15WSOODDataset',
312
+ pipeline=[
313
+ dict(type='LoadImageFromFile'),
314
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
315
+ dict(
316
+ type='STMultiBranch',
317
+ unsup_strong=[
318
+ dict(type='DTToPILImage'),
319
+ dict(
320
+ type='DTRandomApply',
321
+ operations=[
322
+ ColorJitter(
323
+ brightness=[0.6, 1.4],
324
+ contrast=[0.6, 1.4],
325
+ saturation=[0.6, 1.4],
326
+ hue=[-0.1, 0.1])
327
+ ],
328
+ p=0.8),
329
+ dict(type='DTRandomGrayscale', p=0.2),
330
+ dict(
331
+ type='DTRandomApply',
332
+ operations=[
333
+ dict(
334
+ type='DTGaussianBlur',
335
+ rad_range=[0.1, 2.0])
336
+ ]),
337
+ dict(type='DTToNumpy'),
338
+ dict(type='ExtraAttrs', tag='unsup_strong')
339
+ ],
340
+ unsup_weak=[
341
+ dict(type='RResize', img_scale=(1024, 1024)),
342
+ dict(
343
+ type='RRandomFlip',
344
+ flip_ratio=[0.25, 0.25, 0.25],
345
+ direction=['horizontal', 'vertical', 'diagonal'],
346
+ version='le90'),
347
+ dict(type='ExtraAttrs', tag='unsup_weak')
348
+ ],
349
+ common_pipeline=[
350
+ dict(
351
+ type='Normalize',
352
+ mean=[123.675, 116.28, 103.53],
353
+ std=[58.395, 57.12, 57.375],
354
+ to_rgb=True),
355
+ dict(type='Pad', size_divisor=32),
356
+ dict(type='DefaultFormatBundle'),
357
+ dict(
358
+ type='Collect',
359
+ keys=['img', 'gt_bboxes', 'gt_labels'],
360
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
361
+ 'img_shape', 'pad_shape',
362
+ 'scale_factor', 'flip',
363
+ 'flip_direction', 'img_norm_cfg',
364
+ 'tag'))
365
+ ],
366
+ is_seq=True)
367
+ ],
368
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
369
+ img_prefix='data/train_20p_unlabeled/images/',
370
+ version='le90',
371
+ classes=('plane', 'baseball-diamond', 'bridge',
372
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
373
+ 'ship', 'tennis-court', 'basketball-court',
374
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
375
+ 'harbor', 'swimming-pool', 'helicopter',
376
+ 'container-crane'),
377
+ filter_empty_gt=False)),
378
+ val=dict(
379
+ type='DOTAv15WSOODDataset',
380
+ pipeline=[
381
+ dict(type='LoadImageFromFile'),
382
+ dict(
383
+ type='MultiScaleFlipAug',
384
+ img_scale=(1024, 1024),
385
+ flip=False,
386
+ transforms=[
387
+ dict(type='RResize'),
388
+ dict(
389
+ type='Normalize',
390
+ mean=[123.675, 116.28, 103.53],
391
+ std=[58.395, 57.12, 57.375],
392
+ to_rgb=True),
393
+ dict(type='Pad', size_divisor=32),
394
+ dict(type='DefaultFormatBundle'),
395
+ dict(type='Collect', keys=['img'])
396
+ ])
397
+ ],
398
+ img_prefix='data/val/images/',
399
+ ann_file='data/val/annfiles/',
400
+ version='le90',
401
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
402
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
403
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
404
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
405
+ 'container-crane')),
406
+ test=dict(
407
+ type='DOTAv15WSOODDataset',
408
+ pipeline=[
409
+ dict(type='LoadImageFromFile'),
410
+ dict(
411
+ type='MultiScaleFlipAug',
412
+ img_scale=(1024, 1024),
413
+ flip=False,
414
+ transforms=[
415
+ dict(type='RResize'),
416
+ dict(
417
+ type='Normalize',
418
+ mean=[123.675, 116.28, 103.53],
419
+ std=[58.395, 57.12, 57.375],
420
+ to_rgb=True),
421
+ dict(type='Pad', size_divisor=32),
422
+ dict(type='DefaultFormatBundle'),
423
+ dict(type='Collect', keys=['img'])
424
+ ])
425
+ ],
426
+ img_prefix='data/vis_val/images/',
427
+ ann_file='data/vis_val/annfiles/',
428
+ version='le90',
429
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
430
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
431
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
432
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
433
+ 'container-crane')),
434
+ sampler=dict(
435
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
436
+ custom_hooks = [
437
+ dict(type='NumClassCheckHook'),
438
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
439
+ ]
440
+ evaluation = dict(
441
+ type='SubModulesDistEvalHook',
442
+ interval=3200,
443
+ metric='mAP',
444
+ save_best='mAP')
445
+ optimizer = dict(
446
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
447
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
448
+ lr_config = dict(
449
+ policy='step',
450
+ warmup='linear',
451
+ warmup_iters=500,
452
+ warmup_ratio=0.3333333333333333,
453
+ step=120000)
454
+ runner = dict(type='IterBasedRunner', max_iters=120000)
455
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
456
+ log_config = dict(
457
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
458
+ dist_params = dict(backend='nccl')
459
+ log_level = 'INFO'
460
+ load_from = None
461
+ resume_from = None
462
+ workflow = [('train', 1)]
463
+ opencv_num_threads = 0
464
+ mp_start_method = 'fork'
465
+ custom_imports = dict(imports=['semi_mmrotate'], allow_failed_imports=False)
466
+ work_dir = 'work_dir/h2rv2_mcl/a_noise/0.3/'
467
+ auto_resume = False
468
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/0.015/20250301_190048.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.015/20250301_190048.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.015/20250302_070552.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.015/20250302_070552.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.015/lr_0.03.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.015),
114
+ train_cfg=dict(
115
+ iter_count=35200,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = 'work_dir/h2rv2_mcl/ablation/0.015/iter_35200.pth'
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/0.015/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/0.01_topk/20250221_000012.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.01_topk/20250221_000012.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.01_topk/lr_h2rv2_mcl_adamw_dota15_20p.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.01),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/0.01_topk/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/0.025/20250301_231440.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.025/20250301_231440.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.025/20250302_073702.log ADDED
@@ -0,0 +1,557 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-03-02 07:37:02,579 - mmrotate - INFO - Environment info:
2
+ ------------------------------------------------------------
3
+ sys.platform: linux
4
+ Python: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]
5
+ CUDA available: True
6
+ GPU 0,1: NVIDIA GeForce RTX 3090
7
+ CUDA_HOME: /usr/local/cuda
8
+ NVCC: Cuda compilation tools, release 11.6, V11.6.55
9
+ GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
10
+ PyTorch: 1.13.1+cu116
11
+ PyTorch compiling details: PyTorch built with:
12
+ - GCC 9.3
13
+ - C++ Version: 201402
14
+ - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
15
+ - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
16
+ - OpenMP 201511 (a.k.a. OpenMP 4.5)
17
+ - LAPACK is enabled (usually provided by MKL)
18
+ - NNPACK is enabled
19
+ - CPU capability usage: AVX2
20
+ - CUDA Runtime 11.6
21
+ - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
22
+ - CuDNN 8.3.2 (built against CUDA 11.5)
23
+ - Magma 2.6.1
24
+ - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
25
+
26
+ TorchVision: 0.14.1+cu116
27
+ OpenCV: 4.11.0
28
+ MMCV: 1.7.2
29
+ MMCV Compiler: GCC 9.3
30
+ MMCV CUDA Compiler: 11.6
31
+ MMRotate: 0.3.4+7833b87
32
+ ------------------------------------------------------------
33
+
34
+ 2025-03-02 07:37:03,726 - mmrotate - INFO - Distributed training: True
35
+ 2025-03-02 07:37:05,068 - mmrotate - INFO - Config:
36
+ angle_version = 'le90'
37
+ detector = dict(
38
+ type='SemiRotatedFCOS',
39
+ backbone=dict(
40
+ type='ResNet',
41
+ depth=50,
42
+ num_stages=4,
43
+ out_indices=(0, 1, 2, 3),
44
+ frozen_stages=1,
45
+ zero_init_residual=False,
46
+ norm_cfg=dict(type='BN', requires_grad=True),
47
+ norm_eval=True,
48
+ style='pytorch',
49
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
50
+ neck=dict(
51
+ type='FPN',
52
+ in_channels=[256, 512, 1024, 2048],
53
+ out_channels=256,
54
+ start_level=1,
55
+ add_extra_convs='on_output',
56
+ num_outs=5,
57
+ relu_before_extra_convs=True),
58
+ bbox_head=dict(
59
+ type='SemiRotatedFCOSHeadH2RV2MCL',
60
+ num_classes=16,
61
+ in_channels=256,
62
+ stacked_convs=4,
63
+ feat_channels=256,
64
+ strides=[8, 16, 32, 64, 128],
65
+ center_sampling=True,
66
+ center_sample_radius=1.5,
67
+ norm_on_bbox=True,
68
+ centerness_on_reg=True,
69
+ square_cls=[1, 9, 11],
70
+ resize_cls=[1],
71
+ scale_angle=False,
72
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
73
+ loss_cls=dict(
74
+ type='FocalLoss',
75
+ use_sigmoid=True,
76
+ gamma=2.0,
77
+ alpha=0.25,
78
+ loss_weight=1.0),
79
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
80
+ loss_centerness=dict(
81
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
82
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
83
+ train_cfg=None,
84
+ test_cfg=dict(
85
+ nms_pre=2000,
86
+ min_bbox_size=0,
87
+ score_thr=0.05,
88
+ nms=dict(iou_thr=0.1),
89
+ max_per_img=2000))
90
+ model = dict(
91
+ type='H2RV2MCLTeacher',
92
+ model=dict(
93
+ type='SemiRotatedFCOS',
94
+ backbone=dict(
95
+ type='ResNet',
96
+ depth=50,
97
+ num_stages=4,
98
+ out_indices=(0, 1, 2, 3),
99
+ frozen_stages=1,
100
+ zero_init_residual=False,
101
+ norm_cfg=dict(type='BN', requires_grad=True),
102
+ norm_eval=True,
103
+ style='pytorch',
104
+ init_cfg=dict(
105
+ type='Pretrained', checkpoint='torchvision://resnet50')),
106
+ neck=dict(
107
+ type='FPN',
108
+ in_channels=[256, 512, 1024, 2048],
109
+ out_channels=256,
110
+ start_level=1,
111
+ add_extra_convs='on_output',
112
+ num_outs=5,
113
+ relu_before_extra_convs=True),
114
+ bbox_head=dict(
115
+ type='SemiRotatedFCOSHeadH2RV2MCL',
116
+ num_classes=16,
117
+ in_channels=256,
118
+ stacked_convs=4,
119
+ feat_channels=256,
120
+ strides=[8, 16, 32, 64, 128],
121
+ center_sampling=True,
122
+ center_sample_radius=1.5,
123
+ norm_on_bbox=True,
124
+ centerness_on_reg=True,
125
+ square_cls=[1, 9, 11],
126
+ resize_cls=[1],
127
+ scale_angle=False,
128
+ bbox_coder=dict(
129
+ type='DistanceAnglePointCoder', angle_version='le90'),
130
+ loss_cls=dict(
131
+ type='FocalLoss',
132
+ use_sigmoid=True,
133
+ gamma=2.0,
134
+ alpha=0.25,
135
+ loss_weight=1.0),
136
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
137
+ loss_centerness=dict(
138
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
139
+ loss_ss_symmetry=dict(
140
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
141
+ train_cfg=None,
142
+ test_cfg=dict(
143
+ nms_pre=2000,
144
+ min_bbox_size=0,
145
+ score_thr=0.05,
146
+ nms=dict(iou_thr=0.1),
147
+ max_per_img=2000)),
148
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.025),
149
+ train_cfg=dict(
150
+ iter_count=28800,
151
+ burn_in_steps=12800,
152
+ sup_weight=1.0,
153
+ unsup_weight=1.0,
154
+ weight_suppress='exp',
155
+ logit_specific_weights=dict(),
156
+ cls_channels=16),
157
+ test_cfg=dict(inference_on='teacher'))
158
+ img_norm_cfg = dict(
159
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
160
+ common_pipeline = [
161
+ dict(
162
+ type='Normalize',
163
+ mean=[123.675, 116.28, 103.53],
164
+ std=[58.395, 57.12, 57.375],
165
+ to_rgb=True),
166
+ dict(type='Pad', size_divisor=32),
167
+ dict(type='DefaultFormatBundle'),
168
+ dict(
169
+ type='Collect',
170
+ keys=['img', 'gt_bboxes', 'gt_labels'],
171
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
172
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
173
+ 'img_norm_cfg', 'tag'))
174
+ ]
175
+ strong_pipeline = [
176
+ dict(type='DTToPILImage'),
177
+ dict(
178
+ type='DTRandomApply',
179
+ operations=[
180
+ ColorJitter(
181
+ brightness=[0.6, 1.4],
182
+ contrast=[0.6, 1.4],
183
+ saturation=[0.6, 1.4],
184
+ hue=[-0.1, 0.1])
185
+ ],
186
+ p=0.8),
187
+ dict(type='DTRandomGrayscale', p=0.2),
188
+ dict(
189
+ type='DTRandomApply',
190
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
191
+ dict(type='DTToNumpy'),
192
+ dict(type='ExtraAttrs', tag='unsup_strong')
193
+ ]
194
+ weak_pipeline = [
195
+ dict(type='RResize', img_scale=(1024, 1024)),
196
+ dict(
197
+ type='RRandomFlip',
198
+ flip_ratio=[0.25, 0.25, 0.25],
199
+ direction=['horizontal', 'vertical', 'diagonal'],
200
+ version='le90'),
201
+ dict(type='ExtraAttrs', tag='unsup_weak')
202
+ ]
203
+ unsup_pipeline = [
204
+ dict(type='LoadImageFromFile'),
205
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
206
+ dict(
207
+ type='STMultiBranch',
208
+ unsup_strong=[
209
+ dict(type='DTToPILImage'),
210
+ dict(
211
+ type='DTRandomApply',
212
+ operations=[
213
+ ColorJitter(
214
+ brightness=[0.6, 1.4],
215
+ contrast=[0.6, 1.4],
216
+ saturation=[0.6, 1.4],
217
+ hue=[-0.1, 0.1])
218
+ ],
219
+ p=0.8),
220
+ dict(type='DTRandomGrayscale', p=0.2),
221
+ dict(
222
+ type='DTRandomApply',
223
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
224
+ 2.0])]),
225
+ dict(type='DTToNumpy'),
226
+ dict(type='ExtraAttrs', tag='unsup_strong')
227
+ ],
228
+ unsup_weak=[
229
+ dict(type='RResize', img_scale=(1024, 1024)),
230
+ dict(
231
+ type='RRandomFlip',
232
+ flip_ratio=[0.25, 0.25, 0.25],
233
+ direction=['horizontal', 'vertical', 'diagonal'],
234
+ version='le90'),
235
+ dict(type='ExtraAttrs', tag='unsup_weak')
236
+ ],
237
+ common_pipeline=[
238
+ dict(
239
+ type='Normalize',
240
+ mean=[123.675, 116.28, 103.53],
241
+ std=[58.395, 57.12, 57.375],
242
+ to_rgb=True),
243
+ dict(type='Pad', size_divisor=32),
244
+ dict(type='DefaultFormatBundle'),
245
+ dict(
246
+ type='Collect',
247
+ keys=['img', 'gt_bboxes', 'gt_labels'],
248
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
249
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
250
+ 'flip_direction', 'img_norm_cfg', 'tag'))
251
+ ],
252
+ is_seq=True)
253
+ ]
254
+ sup_pipeline = [
255
+ dict(type='LoadImageFromFile'),
256
+ dict(type='LoadAnnotations', with_bbox=True),
257
+ dict(type='RResize', img_scale=(1024, 1024)),
258
+ dict(
259
+ type='RRandomFlip',
260
+ flip_ratio=[0.25, 0.25, 0.25],
261
+ direction=['horizontal', 'vertical', 'diagonal'],
262
+ version='le90'),
263
+ dict(type='ExtraAttrs', tag='sup_weak'),
264
+ dict(
265
+ type='Normalize',
266
+ mean=[123.675, 116.28, 103.53],
267
+ std=[58.395, 57.12, 57.375],
268
+ to_rgb=True),
269
+ dict(type='Pad', size_divisor=32),
270
+ dict(type='DefaultFormatBundle'),
271
+ dict(
272
+ type='Collect',
273
+ keys=['img', 'gt_bboxes', 'gt_labels'],
274
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
275
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
276
+ 'img_norm_cfg', 'tag'))
277
+ ]
278
+ test_pipeline = [
279
+ dict(type='LoadImageFromFile'),
280
+ dict(
281
+ type='MultiScaleFlipAug',
282
+ img_scale=(1024, 1024),
283
+ flip=False,
284
+ transforms=[
285
+ dict(type='RResize'),
286
+ dict(
287
+ type='Normalize',
288
+ mean=[123.675, 116.28, 103.53],
289
+ std=[58.395, 57.12, 57.375],
290
+ to_rgb=True),
291
+ dict(type='Pad', size_divisor=32),
292
+ dict(type='DefaultFormatBundle'),
293
+ dict(type='Collect', keys=['img'])
294
+ ])
295
+ ]
296
+ dataset_type = 'DOTAv15WSOODDataset'
297
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
298
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
299
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
300
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
301
+ 'container-crane')
302
+ data = dict(
303
+ samples_per_gpu=3,
304
+ workers_per_gpu=5,
305
+ train=dict(
306
+ type='SemiDataset',
307
+ sup=dict(
308
+ type='DOTAv15WSOODDataset',
309
+ pipeline=[
310
+ dict(type='LoadImageFromFile'),
311
+ dict(type='LoadAnnotations', with_bbox=True),
312
+ dict(type='RResize', img_scale=(1024, 1024)),
313
+ dict(
314
+ type='RRandomFlip',
315
+ flip_ratio=[0.25, 0.25, 0.25],
316
+ direction=['horizontal', 'vertical', 'diagonal'],
317
+ version='le90'),
318
+ dict(type='ExtraAttrs', tag='sup_weak'),
319
+ dict(
320
+ type='Normalize',
321
+ mean=[123.675, 116.28, 103.53],
322
+ std=[58.395, 57.12, 57.375],
323
+ to_rgb=True),
324
+ dict(type='Pad', size_divisor=32),
325
+ dict(type='DefaultFormatBundle'),
326
+ dict(
327
+ type='Collect',
328
+ keys=['img', 'gt_bboxes', 'gt_labels'],
329
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
330
+ 'img_shape', 'pad_shape', 'scale_factor',
331
+ 'flip', 'flip_direction', 'img_norm_cfg',
332
+ 'tag'))
333
+ ],
334
+ ann_file='data/train_20p_labeled/annfiles/',
335
+ img_prefix='data/train_20p_labeled/images/',
336
+ version='le90',
337
+ classes=('plane', 'baseball-diamond', 'bridge',
338
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
339
+ 'ship', 'tennis-court', 'basketball-court',
340
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
341
+ 'harbor', 'swimming-pool', 'helicopter',
342
+ 'container-crane')),
343
+ unsup=dict(
344
+ type='DOTAv15WSOODDataset',
345
+ pipeline=[
346
+ dict(type='LoadImageFromFile'),
347
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
348
+ dict(
349
+ type='STMultiBranch',
350
+ unsup_strong=[
351
+ dict(type='DTToPILImage'),
352
+ dict(
353
+ type='DTRandomApply',
354
+ operations=[
355
+ ColorJitter(
356
+ brightness=[0.6, 1.4],
357
+ contrast=[0.6, 1.4],
358
+ saturation=[0.6, 1.4],
359
+ hue=[-0.1, 0.1])
360
+ ],
361
+ p=0.8),
362
+ dict(type='DTRandomGrayscale', p=0.2),
363
+ dict(
364
+ type='DTRandomApply',
365
+ operations=[
366
+ dict(
367
+ type='DTGaussianBlur',
368
+ rad_range=[0.1, 2.0])
369
+ ]),
370
+ dict(type='DTToNumpy'),
371
+ dict(type='ExtraAttrs', tag='unsup_strong')
372
+ ],
373
+ unsup_weak=[
374
+ dict(type='RResize', img_scale=(1024, 1024)),
375
+ dict(
376
+ type='RRandomFlip',
377
+ flip_ratio=[0.25, 0.25, 0.25],
378
+ direction=['horizontal', 'vertical', 'diagonal'],
379
+ version='le90'),
380
+ dict(type='ExtraAttrs', tag='unsup_weak')
381
+ ],
382
+ common_pipeline=[
383
+ dict(
384
+ type='Normalize',
385
+ mean=[123.675, 116.28, 103.53],
386
+ std=[58.395, 57.12, 57.375],
387
+ to_rgb=True),
388
+ dict(type='Pad', size_divisor=32),
389
+ dict(type='DefaultFormatBundle'),
390
+ dict(
391
+ type='Collect',
392
+ keys=['img', 'gt_bboxes', 'gt_labels'],
393
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
394
+ 'img_shape', 'pad_shape',
395
+ 'scale_factor', 'flip',
396
+ 'flip_direction', 'img_norm_cfg',
397
+ 'tag'))
398
+ ],
399
+ is_seq=True)
400
+ ],
401
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
402
+ img_prefix='data/train_20p_unlabeled/images/',
403
+ version='le90',
404
+ classes=('plane', 'baseball-diamond', 'bridge',
405
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
406
+ 'ship', 'tennis-court', 'basketball-court',
407
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
408
+ 'harbor', 'swimming-pool', 'helicopter',
409
+ 'container-crane'),
410
+ filter_empty_gt=False)),
411
+ val=dict(
412
+ type='DOTAv15WSOODDataset',
413
+ pipeline=[
414
+ dict(type='LoadImageFromFile'),
415
+ dict(
416
+ type='MultiScaleFlipAug',
417
+ img_scale=(1024, 1024),
418
+ flip=False,
419
+ transforms=[
420
+ dict(type='RResize'),
421
+ dict(
422
+ type='Normalize',
423
+ mean=[123.675, 116.28, 103.53],
424
+ std=[58.395, 57.12, 57.375],
425
+ to_rgb=True),
426
+ dict(type='Pad', size_divisor=32),
427
+ dict(type='DefaultFormatBundle'),
428
+ dict(type='Collect', keys=['img'])
429
+ ])
430
+ ],
431
+ img_prefix='data/val/images/',
432
+ ann_file='data/val/annfiles/',
433
+ version='le90',
434
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
435
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
436
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
437
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
438
+ 'container-crane')),
439
+ test=dict(
440
+ type='DOTAv15WSOODDataset',
441
+ pipeline=[
442
+ dict(type='LoadImageFromFile'),
443
+ dict(
444
+ type='MultiScaleFlipAug',
445
+ img_scale=(1024, 1024),
446
+ flip=False,
447
+ transforms=[
448
+ dict(type='RResize'),
449
+ dict(
450
+ type='Normalize',
451
+ mean=[123.675, 116.28, 103.53],
452
+ std=[58.395, 57.12, 57.375],
453
+ to_rgb=True),
454
+ dict(type='Pad', size_divisor=32),
455
+ dict(type='DefaultFormatBundle'),
456
+ dict(type='Collect', keys=['img'])
457
+ ])
458
+ ],
459
+ img_prefix='data/vis_val/images/',
460
+ ann_file='data/vis_val/annfiles/',
461
+ version='le90',
462
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
463
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
464
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
465
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
466
+ 'container-crane')),
467
+ sampler=dict(
468
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
469
+ custom_hooks = [
470
+ dict(type='NumClassCheckHook'),
471
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
472
+ ]
473
+ evaluation = dict(
474
+ type='SubModulesDistEvalHook',
475
+ interval=3200,
476
+ metric='mAP',
477
+ save_best='mAP')
478
+ optimizer = dict(
479
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
480
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
481
+ lr_config = dict(
482
+ policy='step',
483
+ warmup='linear',
484
+ warmup_iters=500,
485
+ warmup_ratio=0.3333333333333333,
486
+ step=120000)
487
+ runner = dict(type='IterBasedRunner', max_iters=120000)
488
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
489
+ log_config = dict(
490
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
491
+ dist_params = dict(backend='nccl')
492
+ log_level = 'INFO'
493
+ load_from = None
494
+ resume_from = 'work_dir/h2rv2_mcl/ablation/0.025/iter_28800.pth'
495
+ workflow = [('train', 1)]
496
+ opencv_num_threads = 0
497
+ mp_start_method = 'fork'
498
+ work_dir = 'work_dir/h2rv2_mcl/ablation/0.025/'
499
+ auto_resume = False
500
+ gpu_ids = range(0, 2)
501
+
502
+ 2025-03-02 07:37:05,069 - mmrotate - INFO - Set random seed to 42, deterministic: True
503
+ 2025-03-02 07:38:51,196 - mmrotate - INFO - load checkpoint from local path: work_dir/h2rv2_mcl/ablation/0.025/iter_28800.pth
504
+ 2025-03-02 07:38:57,284 - mmrotate - INFO - resumed from epoch: 1, iter 28799
505
+ 2025-03-02 07:38:57,287 - mmrotate - INFO - Start running, host: yangxue@thinklab-105-227, work_dir: /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/ablation/0.025
506
+ 2025-03-02 07:38:57,288 - mmrotate - INFO - Hooks will be executed in the following order:
507
+ before_run:
508
+ (VERY_HIGH ) StepLrUpdaterHook
509
+ (NORMAL ) CheckpointHook
510
+ (NORMAL ) MeanTeacher
511
+ (LOW ) SubModulesDistEvalHook
512
+ (VERY_LOW ) TextLoggerHook
513
+ --------------------
514
+ before_train_epoch:
515
+ (VERY_HIGH ) StepLrUpdaterHook
516
+ (NORMAL ) NumClassCheckHook
517
+ (LOW ) IterTimerHook
518
+ (LOW ) SubModulesDistEvalHook
519
+ (VERY_LOW ) TextLoggerHook
520
+ --------------------
521
+ before_train_iter:
522
+ (VERY_HIGH ) StepLrUpdaterHook
523
+ (LOW ) IterTimerHook
524
+ (LOW ) SubModulesDistEvalHook
525
+ --------------------
526
+ after_train_iter:
527
+ (ABOVE_NORMAL) OptimizerHook
528
+ (NORMAL ) CheckpointHook
529
+ (NORMAL ) MeanTeacher
530
+ (LOW ) IterTimerHook
531
+ (LOW ) SubModulesDistEvalHook
532
+ (VERY_LOW ) TextLoggerHook
533
+ --------------------
534
+ after_train_epoch:
535
+ (NORMAL ) CheckpointHook
536
+ (LOW ) SubModulesDistEvalHook
537
+ (VERY_LOW ) TextLoggerHook
538
+ --------------------
539
+ before_val_epoch:
540
+ (NORMAL ) NumClassCheckHook
541
+ (LOW ) IterTimerHook
542
+ (VERY_LOW ) TextLoggerHook
543
+ --------------------
544
+ before_val_iter:
545
+ (LOW ) IterTimerHook
546
+ --------------------
547
+ after_val_iter:
548
+ (LOW ) IterTimerHook
549
+ --------------------
550
+ after_val_epoch:
551
+ (VERY_LOW ) TextLoggerHook
552
+ --------------------
553
+ after_run:
554
+ (VERY_LOW ) TextLoggerHook
555
+ --------------------
556
+ 2025-03-02 07:38:57,288 - mmrotate - INFO - workflow: [('train', 1)], max: 120000 iters
557
+ 2025-03-02 07:38:57,288 - mmrotate - INFO - Checkpoints will be saved to /mnt/nas2/home/yangxue/lmx/sood-mcl/work_dir/h2rv2_mcl/ablation/0.025 by HardDiskBackend.
work_dir_h/PWOOD/ablation/0.025/20250302_073702.log.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_info": "sys.platform: linux\nPython: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]\nCUDA available: True\nGPU 0,1: NVIDIA GeForce RTX 3090\nCUDA_HOME: /usr/local/cuda\nNVCC: Cuda compilation tools, release 11.6, V11.6.55\nGCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\nPyTorch: 1.13.1+cu116\nPyTorch compiling details: PyTorch built with:\n - GCC 9.3\n - C++ Version: 201402\n - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX2\n - CUDA Runtime 11.6\n - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86\n - CuDNN 8.3.2 (built against CUDA 11.5)\n - Magma 2.6.1\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, \n\nTorchVision: 0.14.1+cu116\nOpenCV: 4.11.0\nMMCV: 1.7.2\nMMCV Compiler: GCC 9.3\nMMCV CUDA Compiler: 11.6\nMMRotate: 0.3.4+7833b87", "config": "angle_version = 'le90'\ndetector = dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000))\nmodel = dict(\n type='H2RV2MCLTeacher',\n model=dict(\n type='SemiRotatedFCOS',\n backbone=dict(\n type='ResNet',\n depth=50,\n num_stages=4,\n out_indices=(0, 1, 2, 3),\n frozen_stages=1,\n zero_init_residual=False,\n norm_cfg=dict(type='BN', requires_grad=True),\n norm_eval=True,\n style='pytorch',\n init_cfg=dict(\n type='Pretrained', checkpoint='torchvision://resnet50')),\n neck=dict(\n type='FPN',\n in_channels=[256, 512, 1024, 2048],\n out_channels=256,\n start_level=1,\n add_extra_convs='on_output',\n num_outs=5,\n relu_before_extra_convs=True),\n bbox_head=dict(\n type='SemiRotatedFCOSHeadH2RV2MCL',\n num_classes=16,\n in_channels=256,\n stacked_convs=4,\n feat_channels=256,\n strides=[8, 16, 32, 64, 128],\n center_sampling=True,\n center_sample_radius=1.5,\n norm_on_bbox=True,\n centerness_on_reg=True,\n square_cls=[1, 9, 11],\n resize_cls=[1],\n scale_angle=False,\n bbox_coder=dict(\n type='DistanceAnglePointCoder', angle_version='le90'),\n loss_cls=dict(\n type='FocalLoss',\n use_sigmoid=True,\n gamma=2.0,\n alpha=0.25,\n loss_weight=1.0),\n loss_bbox=dict(type='IoULoss', loss_weight=1.0),\n loss_centerness=dict(\n type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),\n loss_ss_symmetry=dict(\n type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),\n train_cfg=None,\n test_cfg=dict(\n nms_pre=2000,\n min_bbox_size=0,\n score_thr=0.05,\n nms=dict(iou_thr=0.1),\n max_per_img=2000)),\n semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.025),\n train_cfg=dict(\n iter_count=28800,\n burn_in_steps=12800,\n sup_weight=1.0,\n unsup_weight=1.0,\n weight_suppress='exp',\n logit_specific_weights=dict(),\n cls_channels=16),\n test_cfg=dict(inference_on='teacher'))\nimg_norm_cfg = dict(\n mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)\ncommon_pipeline = [\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\nstrong_pipeline = [\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n]\nweak_pipeline = [\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n]\nunsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[dict(type='DTGaussianBlur', rad_range=[0.1,\n 2.0])]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg', 'tag'))\n ],\n is_seq=True)\n]\nsup_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',\n 'pad_shape', 'scale_factor', 'flip', 'flip_direction',\n 'img_norm_cfg', 'tag'))\n]\ntest_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n]\ndataset_type = 'DOTAv15WSOODDataset'\nclasses = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')\ndata = dict(\n samples_per_gpu=3,\n workers_per_gpu=5,\n train=dict(\n type='SemiDataset',\n sup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadAnnotations', with_bbox=True),\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='sup_weak'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape', 'scale_factor',\n 'flip', 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n ann_file='data/train_20p_labeled/annfiles/',\n img_prefix='data/train_20p_labeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n unsup=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(type='LoadEmptyAnnotations', with_bbox=True),\n dict(\n type='STMultiBranch',\n unsup_strong=[\n dict(type='DTToPILImage'),\n dict(\n type='DTRandomApply',\n operations=[\n ColorJitter(\n brightness=[0.6, 1.4],\n contrast=[0.6, 1.4],\n saturation=[0.6, 1.4],\n hue=[-0.1, 0.1])\n ],\n p=0.8),\n dict(type='DTRandomGrayscale', p=0.2),\n dict(\n type='DTRandomApply',\n operations=[\n dict(\n type='DTGaussianBlur',\n rad_range=[0.1, 2.0])\n ]),\n dict(type='DTToNumpy'),\n dict(type='ExtraAttrs', tag='unsup_strong')\n ],\n unsup_weak=[\n dict(type='RResize', img_scale=(1024, 1024)),\n dict(\n type='RRandomFlip',\n flip_ratio=[0.25, 0.25, 0.25],\n direction=['horizontal', 'vertical', 'diagonal'],\n version='le90'),\n dict(type='ExtraAttrs', tag='unsup_weak')\n ],\n common_pipeline=[\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(\n type='Collect',\n keys=['img', 'gt_bboxes', 'gt_labels'],\n meta_keys=('filename', 'ori_filename', 'ori_shape',\n 'img_shape', 'pad_shape',\n 'scale_factor', 'flip',\n 'flip_direction', 'img_norm_cfg',\n 'tag'))\n ],\n is_seq=True)\n ],\n ann_file='data/train_20p_unlabeled/empty_annfiles/',\n img_prefix='data/train_20p_unlabeled/images/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge',\n 'ground-track-field', 'small-vehicle', 'large-vehicle',\n 'ship', 'tennis-court', 'basketball-court',\n 'storage-tank', 'soccer-ball-field', 'roundabout',\n 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane'),\n filter_empty_gt=False)),\n val=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/val/images/',\n ann_file='data/val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n test=dict(\n type='DOTAv15WSOODDataset',\n pipeline=[\n dict(type='LoadImageFromFile'),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(1024, 1024),\n flip=False,\n transforms=[\n dict(type='RResize'),\n dict(\n type='Normalize',\n mean=[123.675, 116.28, 103.53],\n std=[58.395, 57.12, 57.375],\n to_rgb=True),\n dict(type='Pad', size_divisor=32),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ],\n img_prefix='data/vis_val/images/',\n ann_file='data/vis_val/annfiles/',\n version='le90',\n classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',\n 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',\n 'basketball-court', 'storage-tank', 'soccer-ball-field',\n 'roundabout', 'harbor', 'swimming-pool', 'helicopter',\n 'container-crane')),\n sampler=dict(\n train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))\ncustom_hooks = [\n dict(type='NumClassCheckHook'),\n dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)\n]\nevaluation = dict(\n type='SubModulesDistEvalHook',\n interval=3200,\n metric='mAP',\n save_best='mAP')\noptimizer = dict(\n type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)\noptimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))\nlr_config = dict(\n policy='step',\n warmup='linear',\n warmup_iters=500,\n warmup_ratio=0.3333333333333333,\n step=120000)\nrunner = dict(type='IterBasedRunner', max_iters=120000)\ncheckpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)\nlog_config = dict(\n _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])\ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\nload_from = None\nresume_from = 'work_dir/h2rv2_mcl/ablation/0.025/iter_28800.pth'\nworkflow = [('train', 1)]\nopencv_num_threads = 0\nmp_start_method = 'fork'\nwork_dir = 'work_dir/h2rv2_mcl/ablation/0.025/'\nauto_resume = False\ngpu_ids = range(0, 2)\n", "seed": 42, "exp_name": "lr_0.025.py"}
work_dir_h/PWOOD/ablation/0.025/20250302_074526.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.025/20250302_074526.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/0.025/lr_0.025.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.025),
114
+ train_cfg=dict(
115
+ iter_count=28800,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = 'work_dir/h2rv2_mcl/ablation/0.025/iter_28800.pth'
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/0.025/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/dior/0.01/20250302_195659.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/dior/0.01/20250302_195659.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/dior/0.01/lr_0.01.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=20,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[2, 5, 9, 14, 15, 19],
35
+ scale_angle=False,
36
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
37
+ loss_cls=dict(
38
+ type='FocalLoss',
39
+ use_sigmoid=True,
40
+ gamma=2.0,
41
+ alpha=0.25,
42
+ loss_weight=1.0),
43
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
44
+ loss_centerness=dict(
45
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
46
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
47
+ train_cfg=None,
48
+ test_cfg=dict(
49
+ nms_pre=2000,
50
+ min_bbox_size=0,
51
+ score_thr=0.05,
52
+ nms=dict(iou_thr=0.1),
53
+ max_per_img=2000))
54
+ model = dict(
55
+ type='H2RV2MCLTeacher',
56
+ model=dict(
57
+ type='SemiRotatedFCOS',
58
+ backbone=dict(
59
+ type='ResNet',
60
+ depth=50,
61
+ num_stages=4,
62
+ out_indices=(0, 1, 2, 3),
63
+ frozen_stages=1,
64
+ zero_init_residual=False,
65
+ norm_cfg=dict(type='BN', requires_grad=True),
66
+ norm_eval=True,
67
+ style='pytorch',
68
+ init_cfg=dict(
69
+ type='Pretrained', checkpoint='torchvision://resnet50')),
70
+ neck=dict(
71
+ type='FPN',
72
+ in_channels=[256, 512, 1024, 2048],
73
+ out_channels=256,
74
+ start_level=1,
75
+ add_extra_convs='on_output',
76
+ num_outs=5,
77
+ relu_before_extra_convs=True),
78
+ bbox_head=dict(
79
+ type='SemiRotatedFCOSHeadH2RV2MCL',
80
+ num_classes=20,
81
+ in_channels=256,
82
+ stacked_convs=4,
83
+ feat_channels=256,
84
+ strides=[8, 16, 32, 64, 128],
85
+ center_sampling=True,
86
+ center_sample_radius=1.5,
87
+ norm_on_bbox=True,
88
+ centerness_on_reg=True,
89
+ square_cls=[2, 5, 9, 14, 15, 19],
90
+ scale_angle=False,
91
+ bbox_coder=dict(
92
+ type='DistanceAnglePointCoder', angle_version='le90'),
93
+ loss_cls=dict(
94
+ type='FocalLoss',
95
+ use_sigmoid=True,
96
+ gamma=2.0,
97
+ alpha=0.25,
98
+ loss_weight=1.0),
99
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
100
+ loss_centerness=dict(
101
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
102
+ loss_ss_symmetry=dict(
103
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
104
+ train_cfg=None,
105
+ test_cfg=dict(
106
+ nms_pre=2000,
107
+ min_bbox_size=0,
108
+ score_thr=0.05,
109
+ nms=dict(iou_thr=0.1),
110
+ max_per_img=2000)),
111
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=20, thres=0.01),
112
+ train_cfg=dict(
113
+ iter_count=0,
114
+ burn_in_steps=12800,
115
+ sup_weight=1.0,
116
+ unsup_weight=1.0,
117
+ weight_suppress='exp',
118
+ logit_specific_weights=dict(),
119
+ cls_channels=20),
120
+ test_cfg=dict(inference_on='teacher'))
121
+ img_norm_cfg = dict(
122
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
123
+ common_pipeline = [
124
+ dict(
125
+ type='Normalize',
126
+ mean=[123.675, 116.28, 103.53],
127
+ std=[58.395, 57.12, 57.375],
128
+ to_rgb=True),
129
+ dict(type='Pad', size_divisor=32),
130
+ dict(type='DefaultFormatBundle'),
131
+ dict(
132
+ type='Collect',
133
+ keys=['img', 'gt_bboxes', 'gt_labels'],
134
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
135
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
136
+ 'img_norm_cfg', 'tag'))
137
+ ]
138
+ strong_pipeline = [
139
+ dict(type='DTToPILImage'),
140
+ dict(
141
+ type='DTRandomApply',
142
+ operations=[
143
+ ColorJitter(
144
+ brightness=[0.6, 1.4],
145
+ contrast=[0.6, 1.4],
146
+ saturation=[0.6, 1.4],
147
+ hue=[-0.1, 0.1])
148
+ ],
149
+ p=0.8),
150
+ dict(type='DTRandomGrayscale', p=0.2),
151
+ dict(
152
+ type='DTRandomApply',
153
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
154
+ dict(type='DTToNumpy'),
155
+ dict(type='ExtraAttrs', tag='unsup_strong')
156
+ ]
157
+ weak_pipeline = [
158
+ dict(type='RResize', img_scale=(800, 800)),
159
+ dict(
160
+ type='RRandomFlip',
161
+ flip_ratio=[0.25, 0.25, 0.25],
162
+ direction=['horizontal', 'vertical', 'diagonal'],
163
+ version='le90'),
164
+ dict(type='ExtraAttrs', tag='unsup_weak')
165
+ ]
166
+ unsup_pipeline = [
167
+ dict(type='LoadImageFromFile'),
168
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
169
+ dict(
170
+ type='STMultiBranch',
171
+ unsup_strong=[
172
+ dict(type='DTToPILImage'),
173
+ dict(
174
+ type='DTRandomApply',
175
+ operations=[
176
+ ColorJitter(
177
+ brightness=[0.6, 1.4],
178
+ contrast=[0.6, 1.4],
179
+ saturation=[0.6, 1.4],
180
+ hue=[-0.1, 0.1])
181
+ ],
182
+ p=0.8),
183
+ dict(type='DTRandomGrayscale', p=0.2),
184
+ dict(
185
+ type='DTRandomApply',
186
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
187
+ 2.0])]),
188
+ dict(type='DTToNumpy'),
189
+ dict(type='ExtraAttrs', tag='unsup_strong')
190
+ ],
191
+ unsup_weak=[
192
+ dict(type='RResize', img_scale=(800, 800)),
193
+ dict(
194
+ type='RRandomFlip',
195
+ flip_ratio=[0.25, 0.25, 0.25],
196
+ direction=['horizontal', 'vertical', 'diagonal'],
197
+ version='le90'),
198
+ dict(type='ExtraAttrs', tag='unsup_weak')
199
+ ],
200
+ common_pipeline=[
201
+ dict(
202
+ type='Normalize',
203
+ mean=[123.675, 116.28, 103.53],
204
+ std=[58.395, 57.12, 57.375],
205
+ to_rgb=True),
206
+ dict(type='Pad', size_divisor=32),
207
+ dict(type='DefaultFormatBundle'),
208
+ dict(
209
+ type='Collect',
210
+ keys=['img', 'gt_bboxes', 'gt_labels'],
211
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
212
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
213
+ 'flip_direction', 'img_norm_cfg', 'tag'))
214
+ ],
215
+ is_seq=True)
216
+ ]
217
+ sup_pipeline = [
218
+ dict(type='LoadImageFromFile'),
219
+ dict(type='LoadAnnotations', with_bbox=True),
220
+ dict(type='RResize', img_scale=(800, 800)),
221
+ dict(
222
+ type='RRandomFlip',
223
+ flip_ratio=[0.25, 0.25, 0.25],
224
+ direction=['horizontal', 'vertical', 'diagonal'],
225
+ version='le90'),
226
+ dict(type='ExtraAttrs', tag='sup_weak'),
227
+ dict(
228
+ type='Normalize',
229
+ mean=[123.675, 116.28, 103.53],
230
+ std=[58.395, 57.12, 57.375],
231
+ to_rgb=True),
232
+ dict(type='Pad', size_divisor=32),
233
+ dict(type='DefaultFormatBundle'),
234
+ dict(
235
+ type='Collect',
236
+ keys=['img', 'gt_bboxes', 'gt_labels'],
237
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
238
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
239
+ 'img_norm_cfg', 'tag'))
240
+ ]
241
+ test_pipeline = [
242
+ dict(type='LoadImageFromFile'),
243
+ dict(
244
+ type='MultiScaleFlipAug',
245
+ img_scale=(800, 800),
246
+ flip=False,
247
+ transforms=[
248
+ dict(type='RResize'),
249
+ dict(
250
+ type='Normalize',
251
+ mean=[123.675, 116.28, 103.53],
252
+ std=[58.395, 57.12, 57.375],
253
+ to_rgb=True),
254
+ dict(type='Pad', size_divisor=32),
255
+ dict(type='DefaultFormatBundle'),
256
+ dict(type='Collect', keys=['img'])
257
+ ])
258
+ ]
259
+ dataset_type = 'DIOR_DOTAWSOODDataset'
260
+ classes = ('airplane', 'airport', 'baseballfield', 'basketballcourt', 'bridge',
261
+ 'chimney', 'expressway-service-area', 'expressway-toll-station',
262
+ 'dam', 'golffield', 'groundtrackfield', 'harbor', 'overpass',
263
+ 'ship', 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
264
+ 'vehicle', 'windmill')
265
+ data = dict(
266
+ samples_per_gpu=3,
267
+ workers_per_gpu=5,
268
+ train=dict(
269
+ type='SemiDataset',
270
+ sup=dict(
271
+ type='DIOR_DOTAWSOODDataset',
272
+ pipeline=[
273
+ dict(type='LoadImageFromFile'),
274
+ dict(type='LoadAnnotations', with_bbox=True),
275
+ dict(type='RResize', img_scale=(800, 800)),
276
+ dict(
277
+ type='RRandomFlip',
278
+ flip_ratio=[0.25, 0.25, 0.25],
279
+ direction=['horizontal', 'vertical', 'diagonal'],
280
+ version='le90'),
281
+ dict(type='ExtraAttrs', tag='sup_weak'),
282
+ dict(
283
+ type='Normalize',
284
+ mean=[123.675, 116.28, 103.53],
285
+ std=[58.395, 57.12, 57.375],
286
+ to_rgb=True),
287
+ dict(type='Pad', size_divisor=32),
288
+ dict(type='DefaultFormatBundle'),
289
+ dict(
290
+ type='Collect',
291
+ keys=['img', 'gt_bboxes', 'gt_labels'],
292
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
293
+ 'img_shape', 'pad_shape', 'scale_factor',
294
+ 'flip', 'flip_direction', 'img_norm_cfg',
295
+ 'tag'))
296
+ ],
297
+ ann_file='data_dior/train_20p_labeled_txt/',
298
+ img_prefix='data_dior/train_20p_labeled_jpg/',
299
+ version='le90',
300
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
301
+ 'bridge', 'chimney', 'expressway-service-area',
302
+ 'expressway-toll-station', 'dam', 'golffield',
303
+ 'groundtrackfield', 'harbor', 'overpass', 'ship',
304
+ 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
305
+ 'vehicle', 'windmill')),
306
+ unsup=dict(
307
+ type='DIOR_DOTAWSOODDataset',
308
+ pipeline=[
309
+ dict(type='LoadImageFromFile'),
310
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
311
+ dict(
312
+ type='STMultiBranch',
313
+ unsup_strong=[
314
+ dict(type='DTToPILImage'),
315
+ dict(
316
+ type='DTRandomApply',
317
+ operations=[
318
+ ColorJitter(
319
+ brightness=[0.6, 1.4],
320
+ contrast=[0.6, 1.4],
321
+ saturation=[0.6, 1.4],
322
+ hue=[-0.1, 0.1])
323
+ ],
324
+ p=0.8),
325
+ dict(type='DTRandomGrayscale', p=0.2),
326
+ dict(
327
+ type='DTRandomApply',
328
+ operations=[
329
+ dict(
330
+ type='DTGaussianBlur',
331
+ rad_range=[0.1, 2.0])
332
+ ]),
333
+ dict(type='DTToNumpy'),
334
+ dict(type='ExtraAttrs', tag='unsup_strong')
335
+ ],
336
+ unsup_weak=[
337
+ dict(type='RResize', img_scale=(800, 800)),
338
+ dict(
339
+ type='RRandomFlip',
340
+ flip_ratio=[0.25, 0.25, 0.25],
341
+ direction=['horizontal', 'vertical', 'diagonal'],
342
+ version='le90'),
343
+ dict(type='ExtraAttrs', tag='unsup_weak')
344
+ ],
345
+ common_pipeline=[
346
+ dict(
347
+ type='Normalize',
348
+ mean=[123.675, 116.28, 103.53],
349
+ std=[58.395, 57.12, 57.375],
350
+ to_rgb=True),
351
+ dict(type='Pad', size_divisor=32),
352
+ dict(type='DefaultFormatBundle'),
353
+ dict(
354
+ type='Collect',
355
+ keys=['img', 'gt_bboxes', 'gt_labels'],
356
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
357
+ 'img_shape', 'pad_shape',
358
+ 'scale_factor', 'flip',
359
+ 'flip_direction', 'img_norm_cfg',
360
+ 'tag'))
361
+ ],
362
+ is_seq=True)
363
+ ],
364
+ ann_file='data_dior/train_20p_unlabeled_txt/',
365
+ img_prefix='data_dior/train_20p_unlabeled_jpg/',
366
+ version='le90',
367
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
368
+ 'bridge', 'chimney', 'expressway-service-area',
369
+ 'expressway-toll-station', 'dam', 'golffield',
370
+ 'groundtrackfield', 'harbor', 'overpass', 'ship',
371
+ 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
372
+ 'vehicle', 'windmill'),
373
+ filter_empty_gt=False)),
374
+ val=dict(
375
+ type='DIOR_DOTAWSOODDataset',
376
+ pipeline=[
377
+ dict(type='LoadImageFromFile'),
378
+ dict(
379
+ type='MultiScaleFlipAug',
380
+ img_scale=(800, 800),
381
+ flip=False,
382
+ transforms=[
383
+ dict(type='RResize'),
384
+ dict(
385
+ type='Normalize',
386
+ mean=[123.675, 116.28, 103.53],
387
+ std=[58.395, 57.12, 57.375],
388
+ to_rgb=True),
389
+ dict(type='Pad', size_divisor=32),
390
+ dict(type='DefaultFormatBundle'),
391
+ dict(type='Collect', keys=['img'])
392
+ ])
393
+ ],
394
+ img_prefix='data_dior/test_jpg/',
395
+ ann_file='data_dior/test_txt/',
396
+ version='le90',
397
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
398
+ 'bridge', 'chimney', 'expressway-service-area',
399
+ 'expressway-toll-station', 'dam', 'golffield',
400
+ 'groundtrackfield', 'harbor', 'overpass', 'ship', 'stadium',
401
+ 'storagetank', 'tenniscourt', 'trainstation', 'vehicle',
402
+ 'windmill')),
403
+ test=dict(
404
+ type='DIOR_DOTAWSOODDataset',
405
+ pipeline=[
406
+ dict(type='LoadImageFromFile'),
407
+ dict(
408
+ type='MultiScaleFlipAug',
409
+ img_scale=(800, 800),
410
+ flip=False,
411
+ transforms=[
412
+ dict(type='RResize'),
413
+ dict(
414
+ type='Normalize',
415
+ mean=[123.675, 116.28, 103.53],
416
+ std=[58.395, 57.12, 57.375],
417
+ to_rgb=True),
418
+ dict(type='Pad', size_divisor=32),
419
+ dict(type='DefaultFormatBundle'),
420
+ dict(type='Collect', keys=['img'])
421
+ ])
422
+ ],
423
+ img_prefix='data_dior/test_jpg/',
424
+ ann_file='data_dior/test_txt/',
425
+ version='le90',
426
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
427
+ 'bridge', 'chimney', 'expressway-service-area',
428
+ 'expressway-toll-station', 'dam', 'golffield',
429
+ 'groundtrackfield', 'harbor', 'overpass', 'ship', 'stadium',
430
+ 'storagetank', 'tenniscourt', 'trainstation', 'vehicle',
431
+ 'windmill')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/dior/0.01/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/dior/0.015/20250302_195657.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/dior/0.015/20250302_195657.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/dior/0.015/lr_0.015.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=20,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[2, 5, 9, 14, 15, 19],
35
+ scale_angle=False,
36
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
37
+ loss_cls=dict(
38
+ type='FocalLoss',
39
+ use_sigmoid=True,
40
+ gamma=2.0,
41
+ alpha=0.25,
42
+ loss_weight=1.0),
43
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
44
+ loss_centerness=dict(
45
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
46
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
47
+ train_cfg=None,
48
+ test_cfg=dict(
49
+ nms_pre=2000,
50
+ min_bbox_size=0,
51
+ score_thr=0.05,
52
+ nms=dict(iou_thr=0.1),
53
+ max_per_img=2000))
54
+ model = dict(
55
+ type='H2RV2MCLTeacher',
56
+ model=dict(
57
+ type='SemiRotatedFCOS',
58
+ backbone=dict(
59
+ type='ResNet',
60
+ depth=50,
61
+ num_stages=4,
62
+ out_indices=(0, 1, 2, 3),
63
+ frozen_stages=1,
64
+ zero_init_residual=False,
65
+ norm_cfg=dict(type='BN', requires_grad=True),
66
+ norm_eval=True,
67
+ style='pytorch',
68
+ init_cfg=dict(
69
+ type='Pretrained', checkpoint='torchvision://resnet50')),
70
+ neck=dict(
71
+ type='FPN',
72
+ in_channels=[256, 512, 1024, 2048],
73
+ out_channels=256,
74
+ start_level=1,
75
+ add_extra_convs='on_output',
76
+ num_outs=5,
77
+ relu_before_extra_convs=True),
78
+ bbox_head=dict(
79
+ type='SemiRotatedFCOSHeadH2RV2MCL',
80
+ num_classes=20,
81
+ in_channels=256,
82
+ stacked_convs=4,
83
+ feat_channels=256,
84
+ strides=[8, 16, 32, 64, 128],
85
+ center_sampling=True,
86
+ center_sample_radius=1.5,
87
+ norm_on_bbox=True,
88
+ centerness_on_reg=True,
89
+ square_cls=[2, 5, 9, 14, 15, 19],
90
+ scale_angle=False,
91
+ bbox_coder=dict(
92
+ type='DistanceAnglePointCoder', angle_version='le90'),
93
+ loss_cls=dict(
94
+ type='FocalLoss',
95
+ use_sigmoid=True,
96
+ gamma=2.0,
97
+ alpha=0.25,
98
+ loss_weight=1.0),
99
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
100
+ loss_centerness=dict(
101
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
102
+ loss_ss_symmetry=dict(
103
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
104
+ train_cfg=None,
105
+ test_cfg=dict(
106
+ nms_pre=2000,
107
+ min_bbox_size=0,
108
+ score_thr=0.05,
109
+ nms=dict(iou_thr=0.1),
110
+ max_per_img=2000)),
111
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=20, thres=0.015),
112
+ train_cfg=dict(
113
+ iter_count=0,
114
+ burn_in_steps=12800,
115
+ sup_weight=1.0,
116
+ unsup_weight=1.0,
117
+ weight_suppress='exp',
118
+ logit_specific_weights=dict(),
119
+ cls_channels=20),
120
+ test_cfg=dict(inference_on='teacher'))
121
+ img_norm_cfg = dict(
122
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
123
+ common_pipeline = [
124
+ dict(
125
+ type='Normalize',
126
+ mean=[123.675, 116.28, 103.53],
127
+ std=[58.395, 57.12, 57.375],
128
+ to_rgb=True),
129
+ dict(type='Pad', size_divisor=32),
130
+ dict(type='DefaultFormatBundle'),
131
+ dict(
132
+ type='Collect',
133
+ keys=['img', 'gt_bboxes', 'gt_labels'],
134
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
135
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
136
+ 'img_norm_cfg', 'tag'))
137
+ ]
138
+ strong_pipeline = [
139
+ dict(type='DTToPILImage'),
140
+ dict(
141
+ type='DTRandomApply',
142
+ operations=[
143
+ ColorJitter(
144
+ brightness=[0.6, 1.4],
145
+ contrast=[0.6, 1.4],
146
+ saturation=[0.6, 1.4],
147
+ hue=[-0.1, 0.1])
148
+ ],
149
+ p=0.8),
150
+ dict(type='DTRandomGrayscale', p=0.2),
151
+ dict(
152
+ type='DTRandomApply',
153
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
154
+ dict(type='DTToNumpy'),
155
+ dict(type='ExtraAttrs', tag='unsup_strong')
156
+ ]
157
+ weak_pipeline = [
158
+ dict(type='RResize', img_scale=(800, 800)),
159
+ dict(
160
+ type='RRandomFlip',
161
+ flip_ratio=[0.25, 0.25, 0.25],
162
+ direction=['horizontal', 'vertical', 'diagonal'],
163
+ version='le90'),
164
+ dict(type='ExtraAttrs', tag='unsup_weak')
165
+ ]
166
+ unsup_pipeline = [
167
+ dict(type='LoadImageFromFile'),
168
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
169
+ dict(
170
+ type='STMultiBranch',
171
+ unsup_strong=[
172
+ dict(type='DTToPILImage'),
173
+ dict(
174
+ type='DTRandomApply',
175
+ operations=[
176
+ ColorJitter(
177
+ brightness=[0.6, 1.4],
178
+ contrast=[0.6, 1.4],
179
+ saturation=[0.6, 1.4],
180
+ hue=[-0.1, 0.1])
181
+ ],
182
+ p=0.8),
183
+ dict(type='DTRandomGrayscale', p=0.2),
184
+ dict(
185
+ type='DTRandomApply',
186
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
187
+ 2.0])]),
188
+ dict(type='DTToNumpy'),
189
+ dict(type='ExtraAttrs', tag='unsup_strong')
190
+ ],
191
+ unsup_weak=[
192
+ dict(type='RResize', img_scale=(800, 800)),
193
+ dict(
194
+ type='RRandomFlip',
195
+ flip_ratio=[0.25, 0.25, 0.25],
196
+ direction=['horizontal', 'vertical', 'diagonal'],
197
+ version='le90'),
198
+ dict(type='ExtraAttrs', tag='unsup_weak')
199
+ ],
200
+ common_pipeline=[
201
+ dict(
202
+ type='Normalize',
203
+ mean=[123.675, 116.28, 103.53],
204
+ std=[58.395, 57.12, 57.375],
205
+ to_rgb=True),
206
+ dict(type='Pad', size_divisor=32),
207
+ dict(type='DefaultFormatBundle'),
208
+ dict(
209
+ type='Collect',
210
+ keys=['img', 'gt_bboxes', 'gt_labels'],
211
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
212
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
213
+ 'flip_direction', 'img_norm_cfg', 'tag'))
214
+ ],
215
+ is_seq=True)
216
+ ]
217
+ sup_pipeline = [
218
+ dict(type='LoadImageFromFile'),
219
+ dict(type='LoadAnnotations', with_bbox=True),
220
+ dict(type='RResize', img_scale=(800, 800)),
221
+ dict(
222
+ type='RRandomFlip',
223
+ flip_ratio=[0.25, 0.25, 0.25],
224
+ direction=['horizontal', 'vertical', 'diagonal'],
225
+ version='le90'),
226
+ dict(type='ExtraAttrs', tag='sup_weak'),
227
+ dict(
228
+ type='Normalize',
229
+ mean=[123.675, 116.28, 103.53],
230
+ std=[58.395, 57.12, 57.375],
231
+ to_rgb=True),
232
+ dict(type='Pad', size_divisor=32),
233
+ dict(type='DefaultFormatBundle'),
234
+ dict(
235
+ type='Collect',
236
+ keys=['img', 'gt_bboxes', 'gt_labels'],
237
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
238
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
239
+ 'img_norm_cfg', 'tag'))
240
+ ]
241
+ test_pipeline = [
242
+ dict(type='LoadImageFromFile'),
243
+ dict(
244
+ type='MultiScaleFlipAug',
245
+ img_scale=(800, 800),
246
+ flip=False,
247
+ transforms=[
248
+ dict(type='RResize'),
249
+ dict(
250
+ type='Normalize',
251
+ mean=[123.675, 116.28, 103.53],
252
+ std=[58.395, 57.12, 57.375],
253
+ to_rgb=True),
254
+ dict(type='Pad', size_divisor=32),
255
+ dict(type='DefaultFormatBundle'),
256
+ dict(type='Collect', keys=['img'])
257
+ ])
258
+ ]
259
+ dataset_type = 'DIOR_DOTAWSOODDataset'
260
+ classes = ('airplane', 'airport', 'baseballfield', 'basketballcourt', 'bridge',
261
+ 'chimney', 'expressway-service-area', 'expressway-toll-station',
262
+ 'dam', 'golffield', 'groundtrackfield', 'harbor', 'overpass',
263
+ 'ship', 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
264
+ 'vehicle', 'windmill')
265
+ data = dict(
266
+ samples_per_gpu=3,
267
+ workers_per_gpu=5,
268
+ train=dict(
269
+ type='SemiDataset',
270
+ sup=dict(
271
+ type='DIOR_DOTAWSOODDataset',
272
+ pipeline=[
273
+ dict(type='LoadImageFromFile'),
274
+ dict(type='LoadAnnotations', with_bbox=True),
275
+ dict(type='RResize', img_scale=(800, 800)),
276
+ dict(
277
+ type='RRandomFlip',
278
+ flip_ratio=[0.25, 0.25, 0.25],
279
+ direction=['horizontal', 'vertical', 'diagonal'],
280
+ version='le90'),
281
+ dict(type='ExtraAttrs', tag='sup_weak'),
282
+ dict(
283
+ type='Normalize',
284
+ mean=[123.675, 116.28, 103.53],
285
+ std=[58.395, 57.12, 57.375],
286
+ to_rgb=True),
287
+ dict(type='Pad', size_divisor=32),
288
+ dict(type='DefaultFormatBundle'),
289
+ dict(
290
+ type='Collect',
291
+ keys=['img', 'gt_bboxes', 'gt_labels'],
292
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
293
+ 'img_shape', 'pad_shape', 'scale_factor',
294
+ 'flip', 'flip_direction', 'img_norm_cfg',
295
+ 'tag'))
296
+ ],
297
+ ann_file='data_dior/train_20p_labeled_txt/',
298
+ img_prefix='data_dior/train_20p_labeled_jpg/',
299
+ version='le90',
300
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
301
+ 'bridge', 'chimney', 'expressway-service-area',
302
+ 'expressway-toll-station', 'dam', 'golffield',
303
+ 'groundtrackfield', 'harbor', 'overpass', 'ship',
304
+ 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
305
+ 'vehicle', 'windmill')),
306
+ unsup=dict(
307
+ type='DIOR_DOTAWSOODDataset',
308
+ pipeline=[
309
+ dict(type='LoadImageFromFile'),
310
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
311
+ dict(
312
+ type='STMultiBranch',
313
+ unsup_strong=[
314
+ dict(type='DTToPILImage'),
315
+ dict(
316
+ type='DTRandomApply',
317
+ operations=[
318
+ ColorJitter(
319
+ brightness=[0.6, 1.4],
320
+ contrast=[0.6, 1.4],
321
+ saturation=[0.6, 1.4],
322
+ hue=[-0.1, 0.1])
323
+ ],
324
+ p=0.8),
325
+ dict(type='DTRandomGrayscale', p=0.2),
326
+ dict(
327
+ type='DTRandomApply',
328
+ operations=[
329
+ dict(
330
+ type='DTGaussianBlur',
331
+ rad_range=[0.1, 2.0])
332
+ ]),
333
+ dict(type='DTToNumpy'),
334
+ dict(type='ExtraAttrs', tag='unsup_strong')
335
+ ],
336
+ unsup_weak=[
337
+ dict(type='RResize', img_scale=(800, 800)),
338
+ dict(
339
+ type='RRandomFlip',
340
+ flip_ratio=[0.25, 0.25, 0.25],
341
+ direction=['horizontal', 'vertical', 'diagonal'],
342
+ version='le90'),
343
+ dict(type='ExtraAttrs', tag='unsup_weak')
344
+ ],
345
+ common_pipeline=[
346
+ dict(
347
+ type='Normalize',
348
+ mean=[123.675, 116.28, 103.53],
349
+ std=[58.395, 57.12, 57.375],
350
+ to_rgb=True),
351
+ dict(type='Pad', size_divisor=32),
352
+ dict(type='DefaultFormatBundle'),
353
+ dict(
354
+ type='Collect',
355
+ keys=['img', 'gt_bboxes', 'gt_labels'],
356
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
357
+ 'img_shape', 'pad_shape',
358
+ 'scale_factor', 'flip',
359
+ 'flip_direction', 'img_norm_cfg',
360
+ 'tag'))
361
+ ],
362
+ is_seq=True)
363
+ ],
364
+ ann_file='data_dior/train_20p_unlabeled_txt/',
365
+ img_prefix='data_dior/train_20p_unlabeled_jpg/',
366
+ version='le90',
367
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
368
+ 'bridge', 'chimney', 'expressway-service-area',
369
+ 'expressway-toll-station', 'dam', 'golffield',
370
+ 'groundtrackfield', 'harbor', 'overpass', 'ship',
371
+ 'stadium', 'storagetank', 'tenniscourt', 'trainstation',
372
+ 'vehicle', 'windmill'),
373
+ filter_empty_gt=False)),
374
+ val=dict(
375
+ type='DIOR_DOTAWSOODDataset',
376
+ pipeline=[
377
+ dict(type='LoadImageFromFile'),
378
+ dict(
379
+ type='MultiScaleFlipAug',
380
+ img_scale=(800, 800),
381
+ flip=False,
382
+ transforms=[
383
+ dict(type='RResize'),
384
+ dict(
385
+ type='Normalize',
386
+ mean=[123.675, 116.28, 103.53],
387
+ std=[58.395, 57.12, 57.375],
388
+ to_rgb=True),
389
+ dict(type='Pad', size_divisor=32),
390
+ dict(type='DefaultFormatBundle'),
391
+ dict(type='Collect', keys=['img'])
392
+ ])
393
+ ],
394
+ img_prefix='data_dior/test_jpg/',
395
+ ann_file='data_dior/test_txt/',
396
+ version='le90',
397
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
398
+ 'bridge', 'chimney', 'expressway-service-area',
399
+ 'expressway-toll-station', 'dam', 'golffield',
400
+ 'groundtrackfield', 'harbor', 'overpass', 'ship', 'stadium',
401
+ 'storagetank', 'tenniscourt', 'trainstation', 'vehicle',
402
+ 'windmill')),
403
+ test=dict(
404
+ type='DIOR_DOTAWSOODDataset',
405
+ pipeline=[
406
+ dict(type='LoadImageFromFile'),
407
+ dict(
408
+ type='MultiScaleFlipAug',
409
+ img_scale=(800, 800),
410
+ flip=False,
411
+ transforms=[
412
+ dict(type='RResize'),
413
+ dict(
414
+ type='Normalize',
415
+ mean=[123.675, 116.28, 103.53],
416
+ std=[58.395, 57.12, 57.375],
417
+ to_rgb=True),
418
+ dict(type='Pad', size_divisor=32),
419
+ dict(type='DefaultFormatBundle'),
420
+ dict(type='Collect', keys=['img'])
421
+ ])
422
+ ],
423
+ img_prefix='data_dior/test_jpg/',
424
+ ann_file='data_dior/test_txt/',
425
+ version='le90',
426
+ classes=('airplane', 'airport', 'baseballfield', 'basketballcourt',
427
+ 'bridge', 'chimney', 'expressway-service-area',
428
+ 'expressway-toll-station', 'dam', 'golffield',
429
+ 'groundtrackfield', 'harbor', 'overpass', 'ship', 'stadium',
430
+ 'storagetank', 'tenniscourt', 'trainstation', 'vehicle',
431
+ 'windmill')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/dior/0.015/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/middle/20250221_072638.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/middle/20250221_072638.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/middle/gmm.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='SemiGMMLoss', cls_channels=16, policy='middle'),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=2)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/middle/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/ntopk/20250222_105501.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/ntopk/gmm_ntopk.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacherLog',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='SemiGMMLossNtopk', cls_channels=16, policy='high'),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'DEBUG'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/ntopk/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/ablation/topk_0.03/20250221_073944.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/topk_0.03/20250221_073944.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/ablation/topk_0.03/lr_0.03.py ADDED
@@ -0,0 +1,465 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='SemiRotatedFCOSHeadH2RV2MCL',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ center_sampling=True,
31
+ center_sample_radius=1.5,
32
+ norm_on_bbox=True,
33
+ centerness_on_reg=True,
34
+ square_cls=[1, 9, 11],
35
+ resize_cls=[1],
36
+ scale_angle=False,
37
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
38
+ loss_cls=dict(
39
+ type='FocalLoss',
40
+ use_sigmoid=True,
41
+ gamma=2.0,
42
+ alpha=0.25,
43
+ loss_weight=1.0),
44
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
45
+ loss_centerness=dict(
46
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
47
+ loss_ss_symmetry=dict(type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
48
+ train_cfg=None,
49
+ test_cfg=dict(
50
+ nms_pre=2000,
51
+ min_bbox_size=0,
52
+ score_thr=0.05,
53
+ nms=dict(iou_thr=0.1),
54
+ max_per_img=2000))
55
+ model = dict(
56
+ type='H2RV2MCLTeacher',
57
+ model=dict(
58
+ type='SemiRotatedFCOS',
59
+ backbone=dict(
60
+ type='ResNet',
61
+ depth=50,
62
+ num_stages=4,
63
+ out_indices=(0, 1, 2, 3),
64
+ frozen_stages=1,
65
+ zero_init_residual=False,
66
+ norm_cfg=dict(type='BN', requires_grad=True),
67
+ norm_eval=True,
68
+ style='pytorch',
69
+ init_cfg=dict(
70
+ type='Pretrained', checkpoint='torchvision://resnet50')),
71
+ neck=dict(
72
+ type='FPN',
73
+ in_channels=[256, 512, 1024, 2048],
74
+ out_channels=256,
75
+ start_level=1,
76
+ add_extra_convs='on_output',
77
+ num_outs=5,
78
+ relu_before_extra_convs=True),
79
+ bbox_head=dict(
80
+ type='SemiRotatedFCOSHeadH2RV2MCL',
81
+ num_classes=16,
82
+ in_channels=256,
83
+ stacked_convs=4,
84
+ feat_channels=256,
85
+ strides=[8, 16, 32, 64, 128],
86
+ center_sampling=True,
87
+ center_sample_radius=1.5,
88
+ norm_on_bbox=True,
89
+ centerness_on_reg=True,
90
+ square_cls=[1, 9, 11],
91
+ resize_cls=[1],
92
+ scale_angle=False,
93
+ bbox_coder=dict(
94
+ type='DistanceAnglePointCoder', angle_version='le90'),
95
+ loss_cls=dict(
96
+ type='FocalLoss',
97
+ use_sigmoid=True,
98
+ gamma=2.0,
99
+ alpha=0.25,
100
+ loss_weight=1.0),
101
+ loss_bbox=dict(type='IoULoss', loss_weight=1.0),
102
+ loss_centerness=dict(
103
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
104
+ loss_ss_symmetry=dict(
105
+ type='SmoothL1Loss', loss_weight=0.2, beta=0.1)),
106
+ train_cfg=None,
107
+ test_cfg=dict(
108
+ nms_pre=2000,
109
+ min_bbox_size=0,
110
+ score_thr=0.05,
111
+ nms=dict(iou_thr=0.1),
112
+ max_per_img=2000)),
113
+ semi_loss=dict(type='RotatedMCLLossV2', cls_channels=16, thres=0.03),
114
+ train_cfg=dict(
115
+ iter_count=0,
116
+ burn_in_steps=12800,
117
+ sup_weight=1.0,
118
+ unsup_weight=1.0,
119
+ weight_suppress='exp',
120
+ logit_specific_weights=dict(),
121
+ cls_channels=16),
122
+ test_cfg=dict(inference_on='teacher'))
123
+ img_norm_cfg = dict(
124
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
125
+ common_pipeline = [
126
+ dict(
127
+ type='Normalize',
128
+ mean=[123.675, 116.28, 103.53],
129
+ std=[58.395, 57.12, 57.375],
130
+ to_rgb=True),
131
+ dict(type='Pad', size_divisor=32),
132
+ dict(type='DefaultFormatBundle'),
133
+ dict(
134
+ type='Collect',
135
+ keys=['img', 'gt_bboxes', 'gt_labels'],
136
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
137
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
138
+ 'img_norm_cfg', 'tag'))
139
+ ]
140
+ strong_pipeline = [
141
+ dict(type='DTToPILImage'),
142
+ dict(
143
+ type='DTRandomApply',
144
+ operations=[
145
+ ColorJitter(
146
+ brightness=[0.6, 1.4],
147
+ contrast=[0.6, 1.4],
148
+ saturation=[0.6, 1.4],
149
+ hue=[-0.1, 0.1])
150
+ ],
151
+ p=0.8),
152
+ dict(type='DTRandomGrayscale', p=0.2),
153
+ dict(
154
+ type='DTRandomApply',
155
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
156
+ dict(type='DTToNumpy'),
157
+ dict(type='ExtraAttrs', tag='unsup_strong')
158
+ ]
159
+ weak_pipeline = [
160
+ dict(type='RResize', img_scale=(1024, 1024)),
161
+ dict(
162
+ type='RRandomFlip',
163
+ flip_ratio=[0.25, 0.25, 0.25],
164
+ direction=['horizontal', 'vertical', 'diagonal'],
165
+ version='le90'),
166
+ dict(type='ExtraAttrs', tag='unsup_weak')
167
+ ]
168
+ unsup_pipeline = [
169
+ dict(type='LoadImageFromFile'),
170
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
171
+ dict(
172
+ type='STMultiBranch',
173
+ unsup_strong=[
174
+ dict(type='DTToPILImage'),
175
+ dict(
176
+ type='DTRandomApply',
177
+ operations=[
178
+ ColorJitter(
179
+ brightness=[0.6, 1.4],
180
+ contrast=[0.6, 1.4],
181
+ saturation=[0.6, 1.4],
182
+ hue=[-0.1, 0.1])
183
+ ],
184
+ p=0.8),
185
+ dict(type='DTRandomGrayscale', p=0.2),
186
+ dict(
187
+ type='DTRandomApply',
188
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
189
+ 2.0])]),
190
+ dict(type='DTToNumpy'),
191
+ dict(type='ExtraAttrs', tag='unsup_strong')
192
+ ],
193
+ unsup_weak=[
194
+ dict(type='RResize', img_scale=(1024, 1024)),
195
+ dict(
196
+ type='RRandomFlip',
197
+ flip_ratio=[0.25, 0.25, 0.25],
198
+ direction=['horizontal', 'vertical', 'diagonal'],
199
+ version='le90'),
200
+ dict(type='ExtraAttrs', tag='unsup_weak')
201
+ ],
202
+ common_pipeline=[
203
+ dict(
204
+ type='Normalize',
205
+ mean=[123.675, 116.28, 103.53],
206
+ std=[58.395, 57.12, 57.375],
207
+ to_rgb=True),
208
+ dict(type='Pad', size_divisor=32),
209
+ dict(type='DefaultFormatBundle'),
210
+ dict(
211
+ type='Collect',
212
+ keys=['img', 'gt_bboxes', 'gt_labels'],
213
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
214
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
215
+ 'flip_direction', 'img_norm_cfg', 'tag'))
216
+ ],
217
+ is_seq=True)
218
+ ]
219
+ sup_pipeline = [
220
+ dict(type='LoadImageFromFile'),
221
+ dict(type='LoadAnnotations', with_bbox=True),
222
+ dict(type='RResize', img_scale=(1024, 1024)),
223
+ dict(
224
+ type='RRandomFlip',
225
+ flip_ratio=[0.25, 0.25, 0.25],
226
+ direction=['horizontal', 'vertical', 'diagonal'],
227
+ version='le90'),
228
+ dict(type='ExtraAttrs', tag='sup_weak'),
229
+ dict(
230
+ type='Normalize',
231
+ mean=[123.675, 116.28, 103.53],
232
+ std=[58.395, 57.12, 57.375],
233
+ to_rgb=True),
234
+ dict(type='Pad', size_divisor=32),
235
+ dict(type='DefaultFormatBundle'),
236
+ dict(
237
+ type='Collect',
238
+ keys=['img', 'gt_bboxes', 'gt_labels'],
239
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
240
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
241
+ 'img_norm_cfg', 'tag'))
242
+ ]
243
+ test_pipeline = [
244
+ dict(type='LoadImageFromFile'),
245
+ dict(
246
+ type='MultiScaleFlipAug',
247
+ img_scale=(1024, 1024),
248
+ flip=False,
249
+ transforms=[
250
+ dict(type='RResize'),
251
+ dict(
252
+ type='Normalize',
253
+ mean=[123.675, 116.28, 103.53],
254
+ std=[58.395, 57.12, 57.375],
255
+ to_rgb=True),
256
+ dict(type='Pad', size_divisor=32),
257
+ dict(type='DefaultFormatBundle'),
258
+ dict(type='Collect', keys=['img'])
259
+ ])
260
+ ]
261
+ dataset_type = 'DOTAv15WSOODDataset'
262
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
263
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
264
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
265
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
266
+ 'container-crane')
267
+ data = dict(
268
+ samples_per_gpu=3,
269
+ workers_per_gpu=5,
270
+ train=dict(
271
+ type='SemiDataset',
272
+ sup=dict(
273
+ type='DOTAv15WSOODDataset',
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ],
299
+ ann_file='data/train_20p_labeled/annfiles/',
300
+ img_prefix='data/train_20p_labeled/images/',
301
+ version='le90',
302
+ classes=('plane', 'baseball-diamond', 'bridge',
303
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
304
+ 'ship', 'tennis-court', 'basketball-court',
305
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
306
+ 'harbor', 'swimming-pool', 'helicopter',
307
+ 'container-crane')),
308
+ unsup=dict(
309
+ type='DOTAv15WSOODDataset',
310
+ pipeline=[
311
+ dict(type='LoadImageFromFile'),
312
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
313
+ dict(
314
+ type='STMultiBranch',
315
+ unsup_strong=[
316
+ dict(type='DTToPILImage'),
317
+ dict(
318
+ type='DTRandomApply',
319
+ operations=[
320
+ ColorJitter(
321
+ brightness=[0.6, 1.4],
322
+ contrast=[0.6, 1.4],
323
+ saturation=[0.6, 1.4],
324
+ hue=[-0.1, 0.1])
325
+ ],
326
+ p=0.8),
327
+ dict(type='DTRandomGrayscale', p=0.2),
328
+ dict(
329
+ type='DTRandomApply',
330
+ operations=[
331
+ dict(
332
+ type='DTGaussianBlur',
333
+ rad_range=[0.1, 2.0])
334
+ ]),
335
+ dict(type='DTToNumpy'),
336
+ dict(type='ExtraAttrs', tag='unsup_strong')
337
+ ],
338
+ unsup_weak=[
339
+ dict(type='RResize', img_scale=(1024, 1024)),
340
+ dict(
341
+ type='RRandomFlip',
342
+ flip_ratio=[0.25, 0.25, 0.25],
343
+ direction=['horizontal', 'vertical', 'diagonal'],
344
+ version='le90'),
345
+ dict(type='ExtraAttrs', tag='unsup_weak')
346
+ ],
347
+ common_pipeline=[
348
+ dict(
349
+ type='Normalize',
350
+ mean=[123.675, 116.28, 103.53],
351
+ std=[58.395, 57.12, 57.375],
352
+ to_rgb=True),
353
+ dict(type='Pad', size_divisor=32),
354
+ dict(type='DefaultFormatBundle'),
355
+ dict(
356
+ type='Collect',
357
+ keys=['img', 'gt_bboxes', 'gt_labels'],
358
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
359
+ 'img_shape', 'pad_shape',
360
+ 'scale_factor', 'flip',
361
+ 'flip_direction', 'img_norm_cfg',
362
+ 'tag'))
363
+ ],
364
+ is_seq=True)
365
+ ],
366
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
367
+ img_prefix='data/train_20p_unlabeled/images/',
368
+ version='le90',
369
+ classes=('plane', 'baseball-diamond', 'bridge',
370
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
371
+ 'ship', 'tennis-court', 'basketball-court',
372
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
373
+ 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ filter_empty_gt=False)),
376
+ val=dict(
377
+ type='DOTAv15WSOODDataset',
378
+ pipeline=[
379
+ dict(type='LoadImageFromFile'),
380
+ dict(
381
+ type='MultiScaleFlipAug',
382
+ img_scale=(1024, 1024),
383
+ flip=False,
384
+ transforms=[
385
+ dict(type='RResize'),
386
+ dict(
387
+ type='Normalize',
388
+ mean=[123.675, 116.28, 103.53],
389
+ std=[58.395, 57.12, 57.375],
390
+ to_rgb=True),
391
+ dict(type='Pad', size_divisor=32),
392
+ dict(type='DefaultFormatBundle'),
393
+ dict(type='Collect', keys=['img'])
394
+ ])
395
+ ],
396
+ img_prefix='data/val/images/',
397
+ ann_file='data/val/annfiles/',
398
+ version='le90',
399
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
400
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
401
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
402
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
403
+ 'container-crane')),
404
+ test=dict(
405
+ type='DOTAv15WSOODDataset',
406
+ pipeline=[
407
+ dict(type='LoadImageFromFile'),
408
+ dict(
409
+ type='MultiScaleFlipAug',
410
+ img_scale=(1024, 1024),
411
+ flip=False,
412
+ transforms=[
413
+ dict(type='RResize'),
414
+ dict(
415
+ type='Normalize',
416
+ mean=[123.675, 116.28, 103.53],
417
+ std=[58.395, 57.12, 57.375],
418
+ to_rgb=True),
419
+ dict(type='Pad', size_divisor=32),
420
+ dict(type='DefaultFormatBundle'),
421
+ dict(type='Collect', keys=['img'])
422
+ ])
423
+ ],
424
+ img_prefix='data/vis_val/images/',
425
+ ann_file='data/vis_val/annfiles/',
426
+ version='le90',
427
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
428
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
429
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
430
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
431
+ 'container-crane')),
432
+ sampler=dict(
433
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
434
+ custom_hooks = [
435
+ dict(type='NumClassCheckHook'),
436
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
437
+ ]
438
+ evaluation = dict(
439
+ type='SubModulesDistEvalHook',
440
+ interval=3200,
441
+ metric='mAP',
442
+ save_best='mAP')
443
+ optimizer = dict(
444
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
445
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
446
+ lr_config = dict(
447
+ policy='step',
448
+ warmup='linear',
449
+ warmup_iters=500,
450
+ warmup_ratio=0.3333333333333333,
451
+ step=120000)
452
+ runner = dict(type='IterBasedRunner', max_iters=120000)
453
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
454
+ log_config = dict(
455
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
456
+ dist_params = dict(backend='nccl')
457
+ log_level = 'INFO'
458
+ load_from = None
459
+ resume_from = None
460
+ workflow = [('train', 1)]
461
+ opencv_num_threads = 0
462
+ mp_start_method = 'fork'
463
+ work_dir = 'work_dir/h2rv2_mcl/ablation/topk_0.03/'
464
+ auto_resume = False
465
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/base/10p/20250221_202352.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/10p/20250221_202352.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/10p/mcl_fcos_adamw_dota15_10p.py ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='BaseHead',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ norm_on_bbox=True,
31
+ centerness_on_reg=True,
32
+ separate_angle=False,
33
+ scale_angle=True,
34
+ beta=0.2,
35
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
36
+ loss_cls=dict(
37
+ type='FocalLoss',
38
+ use_sigmoid=True,
39
+ gamma=2.0,
40
+ alpha=0.25,
41
+ loss_weight=1.0),
42
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
43
+ loss_centerness=dict(
44
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
45
+ train_cfg=None,
46
+ test_cfg=dict(
47
+ nms_pre=2000,
48
+ min_bbox_size=0,
49
+ score_thr=0.05,
50
+ nms=dict(iou_thr=0.1),
51
+ max_per_img=2000))
52
+ model = dict(
53
+ type='MCLTeacher',
54
+ model=dict(
55
+ type='SemiRotatedFCOS',
56
+ backbone=dict(
57
+ type='ResNet',
58
+ depth=50,
59
+ num_stages=4,
60
+ out_indices=(0, 1, 2, 3),
61
+ frozen_stages=1,
62
+ zero_init_residual=False,
63
+ norm_cfg=dict(type='BN', requires_grad=True),
64
+ norm_eval=True,
65
+ style='pytorch',
66
+ init_cfg=dict(
67
+ type='Pretrained', checkpoint='torchvision://resnet50')),
68
+ neck=dict(
69
+ type='FPN',
70
+ in_channels=[256, 512, 1024, 2048],
71
+ out_channels=256,
72
+ start_level=1,
73
+ add_extra_convs='on_output',
74
+ num_outs=5,
75
+ relu_before_extra_convs=True),
76
+ bbox_head=dict(
77
+ type='BaseHead',
78
+ num_classes=16,
79
+ in_channels=256,
80
+ stacked_convs=4,
81
+ feat_channels=256,
82
+ strides=[8, 16, 32, 64, 128],
83
+ norm_on_bbox=True,
84
+ centerness_on_reg=True,
85
+ separate_angle=False,
86
+ scale_angle=True,
87
+ beta=0.2,
88
+ bbox_coder=dict(
89
+ type='DistanceAnglePointCoder', angle_version='le90'),
90
+ loss_cls=dict(
91
+ type='FocalLoss',
92
+ use_sigmoid=True,
93
+ gamma=2.0,
94
+ alpha=0.25,
95
+ loss_weight=1.0),
96
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
97
+ loss_centerness=dict(
98
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
99
+ train_cfg=None,
100
+ test_cfg=dict(
101
+ nms_pre=2000,
102
+ min_bbox_size=0,
103
+ score_thr=0.05,
104
+ nms=dict(iou_thr=0.1),
105
+ max_per_img=2000)),
106
+ semi_loss=dict(type='RotatedMCLLoss', cls_channels=16),
107
+ train_cfg=dict(
108
+ iter_count=0,
109
+ burn_in_steps=6400,
110
+ sup_weight=1.0,
111
+ unsup_weight=1.0,
112
+ weight_suppress='linear',
113
+ logit_specific_weights=dict()),
114
+ test_cfg=dict(inference_on='teacher'))
115
+ img_norm_cfg = dict(
116
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
117
+ common_pipeline = [
118
+ dict(
119
+ type='Normalize',
120
+ mean=[123.675, 116.28, 103.53],
121
+ std=[58.395, 57.12, 57.375],
122
+ to_rgb=True),
123
+ dict(type='Pad', size_divisor=32),
124
+ dict(type='DefaultFormatBundle'),
125
+ dict(
126
+ type='Collect',
127
+ keys=['img', 'gt_bboxes', 'gt_labels'],
128
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
129
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
130
+ 'img_norm_cfg', 'tag'))
131
+ ]
132
+ strong_pipeline = [
133
+ dict(type='DTToPILImage'),
134
+ dict(
135
+ type='DTRandomApply',
136
+ operations=[
137
+ ColorJitter(
138
+ brightness=[0.6, 1.4],
139
+ contrast=[0.6, 1.4],
140
+ saturation=[0.6, 1.4],
141
+ hue=[-0.1, 0.1])
142
+ ],
143
+ p=0.8),
144
+ dict(type='DTRandomGrayscale', p=0.2),
145
+ dict(
146
+ type='DTRandomApply',
147
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
148
+ dict(type='DTToNumpy'),
149
+ dict(type='ExtraAttrs', tag='unsup_strong')
150
+ ]
151
+ weak_pipeline = [
152
+ dict(type='RResize', img_scale=(1024, 1024)),
153
+ dict(
154
+ type='RRandomFlip',
155
+ flip_ratio=[0.25, 0.25, 0.25],
156
+ direction=['horizontal', 'vertical', 'diagonal'],
157
+ version='le90'),
158
+ dict(type='ExtraAttrs', tag='unsup_weak')
159
+ ]
160
+ unsup_pipeline = [
161
+ dict(type='LoadImageFromFile'),
162
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
163
+ dict(
164
+ type='STMultiBranch',
165
+ unsup_strong=[
166
+ dict(type='DTToPILImage'),
167
+ dict(
168
+ type='DTRandomApply',
169
+ operations=[
170
+ ColorJitter(
171
+ brightness=[0.6, 1.4],
172
+ contrast=[0.6, 1.4],
173
+ saturation=[0.6, 1.4],
174
+ hue=[-0.1, 0.1])
175
+ ],
176
+ p=0.8),
177
+ dict(type='DTRandomGrayscale', p=0.2),
178
+ dict(
179
+ type='DTRandomApply',
180
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
181
+ 2.0])]),
182
+ dict(type='DTToNumpy'),
183
+ dict(type='ExtraAttrs', tag='unsup_strong')
184
+ ],
185
+ unsup_weak=[
186
+ dict(type='RResize', img_scale=(1024, 1024)),
187
+ dict(
188
+ type='RRandomFlip',
189
+ flip_ratio=[0.25, 0.25, 0.25],
190
+ direction=['horizontal', 'vertical', 'diagonal'],
191
+ version='le90'),
192
+ dict(type='ExtraAttrs', tag='unsup_weak')
193
+ ],
194
+ common_pipeline=[
195
+ dict(
196
+ type='Normalize',
197
+ mean=[123.675, 116.28, 103.53],
198
+ std=[58.395, 57.12, 57.375],
199
+ to_rgb=True),
200
+ dict(type='Pad', size_divisor=32),
201
+ dict(type='DefaultFormatBundle'),
202
+ dict(
203
+ type='Collect',
204
+ keys=['img', 'gt_bboxes', 'gt_labels'],
205
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
206
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
207
+ 'flip_direction', 'img_norm_cfg', 'tag'))
208
+ ],
209
+ is_seq=True)
210
+ ]
211
+ sup_pipeline = [
212
+ dict(type='LoadImageFromFile'),
213
+ dict(type='LoadAnnotations', with_bbox=True),
214
+ dict(type='RResize', img_scale=(1024, 1024)),
215
+ dict(
216
+ type='RRandomFlip',
217
+ flip_ratio=[0.25, 0.25, 0.25],
218
+ direction=['horizontal', 'vertical', 'diagonal'],
219
+ version='le90'),
220
+ dict(type='ExtraAttrs', tag='sup_weak'),
221
+ dict(
222
+ type='Normalize',
223
+ mean=[123.675, 116.28, 103.53],
224
+ std=[58.395, 57.12, 57.375],
225
+ to_rgb=True),
226
+ dict(type='Pad', size_divisor=32),
227
+ dict(type='DefaultFormatBundle'),
228
+ dict(
229
+ type='Collect',
230
+ keys=['img', 'gt_bboxes', 'gt_labels'],
231
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
232
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
233
+ 'img_norm_cfg', 'tag'))
234
+ ]
235
+ test_pipeline = [
236
+ dict(type='LoadImageFromFile'),
237
+ dict(
238
+ type='MultiScaleFlipAug',
239
+ img_scale=(1024, 1024),
240
+ flip=False,
241
+ transforms=[
242
+ dict(type='RResize'),
243
+ dict(
244
+ type='Normalize',
245
+ mean=[123.675, 116.28, 103.53],
246
+ std=[58.395, 57.12, 57.375],
247
+ to_rgb=True),
248
+ dict(type='Pad', size_divisor=32),
249
+ dict(type='DefaultFormatBundle'),
250
+ dict(type='Collect', keys=['img'])
251
+ ])
252
+ ]
253
+ dataset_type = 'DOTADataset'
254
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
255
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
256
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
257
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
258
+ 'container-crane')
259
+ data = dict(
260
+ samples_per_gpu=3,
261
+ workers_per_gpu=5,
262
+ train=dict(
263
+ type='SemiDataset',
264
+ sup=dict(
265
+ type='DOTADataset',
266
+ ann_file='data/train_10p_labeled/annfiles/',
267
+ img_prefix='data/train_10p_labeled/images/',
268
+ classes=('plane', 'baseball-diamond', 'bridge',
269
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
270
+ 'ship', 'tennis-court', 'basketball-court',
271
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
272
+ 'harbor', 'swimming-pool', 'helicopter',
273
+ 'container-crane'),
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ]),
299
+ unsup=dict(
300
+ type='DOTADataset',
301
+ ann_file='data/train_10p_unlabeled/empty_annfiles/',
302
+ img_prefix='data/train_10p_unlabeled/images/',
303
+ classes=('plane', 'baseball-diamond', 'bridge',
304
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
305
+ 'ship', 'tennis-court', 'basketball-court',
306
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
307
+ 'harbor', 'swimming-pool', 'helicopter',
308
+ 'container-crane'),
309
+ pipeline=[
310
+ dict(type='LoadImageFromFile'),
311
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
312
+ dict(
313
+ type='STMultiBranch',
314
+ unsup_strong=[
315
+ dict(type='DTToPILImage'),
316
+ dict(
317
+ type='DTRandomApply',
318
+ operations=[
319
+ ColorJitter(
320
+ brightness=[0.6, 1.4],
321
+ contrast=[0.6, 1.4],
322
+ saturation=[0.6, 1.4],
323
+ hue=[-0.1, 0.1])
324
+ ],
325
+ p=0.8),
326
+ dict(type='DTRandomGrayscale', p=0.2),
327
+ dict(
328
+ type='DTRandomApply',
329
+ operations=[
330
+ dict(
331
+ type='DTGaussianBlur',
332
+ rad_range=[0.1, 2.0])
333
+ ]),
334
+ dict(type='DTToNumpy'),
335
+ dict(type='ExtraAttrs', tag='unsup_strong')
336
+ ],
337
+ unsup_weak=[
338
+ dict(type='RResize', img_scale=(1024, 1024)),
339
+ dict(
340
+ type='RRandomFlip',
341
+ flip_ratio=[0.25, 0.25, 0.25],
342
+ direction=['horizontal', 'vertical', 'diagonal'],
343
+ version='le90'),
344
+ dict(type='ExtraAttrs', tag='unsup_weak')
345
+ ],
346
+ common_pipeline=[
347
+ dict(
348
+ type='Normalize',
349
+ mean=[123.675, 116.28, 103.53],
350
+ std=[58.395, 57.12, 57.375],
351
+ to_rgb=True),
352
+ dict(type='Pad', size_divisor=32),
353
+ dict(type='DefaultFormatBundle'),
354
+ dict(
355
+ type='Collect',
356
+ keys=['img', 'gt_bboxes', 'gt_labels'],
357
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
358
+ 'img_shape', 'pad_shape',
359
+ 'scale_factor', 'flip',
360
+ 'flip_direction', 'img_norm_cfg',
361
+ 'tag'))
362
+ ],
363
+ is_seq=True)
364
+ ],
365
+ filter_empty_gt=False)),
366
+ val=dict(
367
+ type='DOTADataset',
368
+ img_prefix='data/val/images/',
369
+ ann_file='data/val/annfiles/',
370
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
371
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
372
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
373
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ pipeline=[
376
+ dict(type='LoadImageFromFile'),
377
+ dict(
378
+ type='MultiScaleFlipAug',
379
+ img_scale=(1024, 1024),
380
+ flip=False,
381
+ transforms=[
382
+ dict(type='RResize'),
383
+ dict(
384
+ type='Normalize',
385
+ mean=[123.675, 116.28, 103.53],
386
+ std=[58.395, 57.12, 57.375],
387
+ to_rgb=True),
388
+ dict(type='Pad', size_divisor=32),
389
+ dict(type='DefaultFormatBundle'),
390
+ dict(type='Collect', keys=['img'])
391
+ ])
392
+ ]),
393
+ test=dict(
394
+ type='DOTADataset',
395
+ img_prefix='data/vis_val/images/',
396
+ ann_file='data/vis_val/annfiles/',
397
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
398
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
399
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
400
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
401
+ 'container-crane'),
402
+ pipeline=[
403
+ dict(type='LoadImageFromFile'),
404
+ dict(
405
+ type='MultiScaleFlipAug',
406
+ img_scale=(1024, 1024),
407
+ flip=False,
408
+ transforms=[
409
+ dict(type='RResize'),
410
+ dict(
411
+ type='Normalize',
412
+ mean=[123.675, 116.28, 103.53],
413
+ std=[58.395, 57.12, 57.375],
414
+ to_rgb=True),
415
+ dict(type='Pad', size_divisor=32),
416
+ dict(type='DefaultFormatBundle'),
417
+ dict(type='Collect', keys=['img'])
418
+ ])
419
+ ]),
420
+ sampler=dict(
421
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
422
+ custom_hooks = [
423
+ dict(type='NumClassCheckHook'),
424
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
425
+ ]
426
+ evaluation = dict(
427
+ type='SubModulesDistEvalHook',
428
+ interval=3200,
429
+ metric='mAP',
430
+ save_best='mAP')
431
+ optimizer = dict(
432
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
433
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
434
+ lr_config = dict(
435
+ policy='step',
436
+ warmup='linear',
437
+ warmup_iters=500,
438
+ warmup_ratio=0.3333333333333333,
439
+ step=120000)
440
+ runner = dict(type='IterBasedRunner', max_iters=120000)
441
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
442
+ log_config = dict(
443
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
444
+ dist_params = dict(backend='nccl')
445
+ log_level = 'INFO'
446
+ load_from = None
447
+ resume_from = None
448
+ workflow = [('train', 1)]
449
+ opencv_num_threads = 0
450
+ mp_start_method = 'fork'
451
+ work_dir = 'work_dir/h2rv2_mcl/base/10p/'
452
+ auto_resume = False
453
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/base/20p/20250221_204914.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/20p/20250221_204914.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/20p/mcl_fcos_adamw_dota15_20p.py ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='BaseHead',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ norm_on_bbox=True,
31
+ centerness_on_reg=True,
32
+ separate_angle=False,
33
+ scale_angle=True,
34
+ beta=0.2,
35
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
36
+ loss_cls=dict(
37
+ type='FocalLoss',
38
+ use_sigmoid=True,
39
+ gamma=2.0,
40
+ alpha=0.25,
41
+ loss_weight=1.0),
42
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
43
+ loss_centerness=dict(
44
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
45
+ train_cfg=None,
46
+ test_cfg=dict(
47
+ nms_pre=2000,
48
+ min_bbox_size=0,
49
+ score_thr=0.05,
50
+ nms=dict(iou_thr=0.1),
51
+ max_per_img=2000))
52
+ model = dict(
53
+ type='MCLTeacher',
54
+ model=dict(
55
+ type='SemiRotatedFCOS',
56
+ backbone=dict(
57
+ type='ResNet',
58
+ depth=50,
59
+ num_stages=4,
60
+ out_indices=(0, 1, 2, 3),
61
+ frozen_stages=1,
62
+ zero_init_residual=False,
63
+ norm_cfg=dict(type='BN', requires_grad=True),
64
+ norm_eval=True,
65
+ style='pytorch',
66
+ init_cfg=dict(
67
+ type='Pretrained', checkpoint='torchvision://resnet50')),
68
+ neck=dict(
69
+ type='FPN',
70
+ in_channels=[256, 512, 1024, 2048],
71
+ out_channels=256,
72
+ start_level=1,
73
+ add_extra_convs='on_output',
74
+ num_outs=5,
75
+ relu_before_extra_convs=True),
76
+ bbox_head=dict(
77
+ type='BaseHead',
78
+ num_classes=16,
79
+ in_channels=256,
80
+ stacked_convs=4,
81
+ feat_channels=256,
82
+ strides=[8, 16, 32, 64, 128],
83
+ norm_on_bbox=True,
84
+ centerness_on_reg=True,
85
+ separate_angle=False,
86
+ scale_angle=True,
87
+ beta=0.2,
88
+ bbox_coder=dict(
89
+ type='DistanceAnglePointCoder', angle_version='le90'),
90
+ loss_cls=dict(
91
+ type='FocalLoss',
92
+ use_sigmoid=True,
93
+ gamma=2.0,
94
+ alpha=0.25,
95
+ loss_weight=1.0),
96
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
97
+ loss_centerness=dict(
98
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
99
+ train_cfg=None,
100
+ test_cfg=dict(
101
+ nms_pre=2000,
102
+ min_bbox_size=0,
103
+ score_thr=0.05,
104
+ nms=dict(iou_thr=0.1),
105
+ max_per_img=2000)),
106
+ semi_loss=dict(type='RotatedMCLLoss', cls_channels=16),
107
+ train_cfg=dict(
108
+ iter_count=0,
109
+ burn_in_steps=12800,
110
+ sup_weight=1.0,
111
+ unsup_weight=1.0,
112
+ weight_suppress='linear',
113
+ logit_specific_weights=dict()),
114
+ test_cfg=dict(inference_on='teacher'))
115
+ img_norm_cfg = dict(
116
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
117
+ common_pipeline = [
118
+ dict(
119
+ type='Normalize',
120
+ mean=[123.675, 116.28, 103.53],
121
+ std=[58.395, 57.12, 57.375],
122
+ to_rgb=True),
123
+ dict(type='Pad', size_divisor=32),
124
+ dict(type='DefaultFormatBundle'),
125
+ dict(
126
+ type='Collect',
127
+ keys=['img', 'gt_bboxes', 'gt_labels'],
128
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
129
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
130
+ 'img_norm_cfg', 'tag'))
131
+ ]
132
+ strong_pipeline = [
133
+ dict(type='DTToPILImage'),
134
+ dict(
135
+ type='DTRandomApply',
136
+ operations=[
137
+ ColorJitter(
138
+ brightness=[0.6, 1.4],
139
+ contrast=[0.6, 1.4],
140
+ saturation=[0.6, 1.4],
141
+ hue=[-0.1, 0.1])
142
+ ],
143
+ p=0.8),
144
+ dict(type='DTRandomGrayscale', p=0.2),
145
+ dict(
146
+ type='DTRandomApply',
147
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
148
+ dict(type='DTToNumpy'),
149
+ dict(type='ExtraAttrs', tag='unsup_strong')
150
+ ]
151
+ weak_pipeline = [
152
+ dict(type='RResize', img_scale=(1024, 1024)),
153
+ dict(
154
+ type='RRandomFlip',
155
+ flip_ratio=[0.25, 0.25, 0.25],
156
+ direction=['horizontal', 'vertical', 'diagonal'],
157
+ version='le90'),
158
+ dict(type='ExtraAttrs', tag='unsup_weak')
159
+ ]
160
+ unsup_pipeline = [
161
+ dict(type='LoadImageFromFile'),
162
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
163
+ dict(
164
+ type='STMultiBranch',
165
+ unsup_strong=[
166
+ dict(type='DTToPILImage'),
167
+ dict(
168
+ type='DTRandomApply',
169
+ operations=[
170
+ ColorJitter(
171
+ brightness=[0.6, 1.4],
172
+ contrast=[0.6, 1.4],
173
+ saturation=[0.6, 1.4],
174
+ hue=[-0.1, 0.1])
175
+ ],
176
+ p=0.8),
177
+ dict(type='DTRandomGrayscale', p=0.2),
178
+ dict(
179
+ type='DTRandomApply',
180
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
181
+ 2.0])]),
182
+ dict(type='DTToNumpy'),
183
+ dict(type='ExtraAttrs', tag='unsup_strong')
184
+ ],
185
+ unsup_weak=[
186
+ dict(type='RResize', img_scale=(1024, 1024)),
187
+ dict(
188
+ type='RRandomFlip',
189
+ flip_ratio=[0.25, 0.25, 0.25],
190
+ direction=['horizontal', 'vertical', 'diagonal'],
191
+ version='le90'),
192
+ dict(type='ExtraAttrs', tag='unsup_weak')
193
+ ],
194
+ common_pipeline=[
195
+ dict(
196
+ type='Normalize',
197
+ mean=[123.675, 116.28, 103.53],
198
+ std=[58.395, 57.12, 57.375],
199
+ to_rgb=True),
200
+ dict(type='Pad', size_divisor=32),
201
+ dict(type='DefaultFormatBundle'),
202
+ dict(
203
+ type='Collect',
204
+ keys=['img', 'gt_bboxes', 'gt_labels'],
205
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
206
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
207
+ 'flip_direction', 'img_norm_cfg', 'tag'))
208
+ ],
209
+ is_seq=True)
210
+ ]
211
+ sup_pipeline = [
212
+ dict(type='LoadImageFromFile'),
213
+ dict(type='LoadAnnotations', with_bbox=True),
214
+ dict(type='RResize', img_scale=(1024, 1024)),
215
+ dict(
216
+ type='RRandomFlip',
217
+ flip_ratio=[0.25, 0.25, 0.25],
218
+ direction=['horizontal', 'vertical', 'diagonal'],
219
+ version='le90'),
220
+ dict(type='ExtraAttrs', tag='sup_weak'),
221
+ dict(
222
+ type='Normalize',
223
+ mean=[123.675, 116.28, 103.53],
224
+ std=[58.395, 57.12, 57.375],
225
+ to_rgb=True),
226
+ dict(type='Pad', size_divisor=32),
227
+ dict(type='DefaultFormatBundle'),
228
+ dict(
229
+ type='Collect',
230
+ keys=['img', 'gt_bboxes', 'gt_labels'],
231
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
232
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
233
+ 'img_norm_cfg', 'tag'))
234
+ ]
235
+ test_pipeline = [
236
+ dict(type='LoadImageFromFile'),
237
+ dict(
238
+ type='MultiScaleFlipAug',
239
+ img_scale=(1024, 1024),
240
+ flip=False,
241
+ transforms=[
242
+ dict(type='RResize'),
243
+ dict(
244
+ type='Normalize',
245
+ mean=[123.675, 116.28, 103.53],
246
+ std=[58.395, 57.12, 57.375],
247
+ to_rgb=True),
248
+ dict(type='Pad', size_divisor=32),
249
+ dict(type='DefaultFormatBundle'),
250
+ dict(type='Collect', keys=['img'])
251
+ ])
252
+ ]
253
+ dataset_type = 'DOTADataset'
254
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
255
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
256
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
257
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
258
+ 'container-crane')
259
+ data = dict(
260
+ samples_per_gpu=3,
261
+ workers_per_gpu=5,
262
+ train=dict(
263
+ type='SemiDataset',
264
+ sup=dict(
265
+ type='DOTADataset',
266
+ ann_file='data/train_20p_labeled/annfiles/',
267
+ img_prefix='data/train_20p_labeled/images/',
268
+ classes=('plane', 'baseball-diamond', 'bridge',
269
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
270
+ 'ship', 'tennis-court', 'basketball-court',
271
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
272
+ 'harbor', 'swimming-pool', 'helicopter',
273
+ 'container-crane'),
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ]),
299
+ unsup=dict(
300
+ type='DOTADataset',
301
+ ann_file='data/train_20p_unlabeled/empty_annfiles/',
302
+ img_prefix='data/train_20p_unlabeled/images/',
303
+ classes=('plane', 'baseball-diamond', 'bridge',
304
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
305
+ 'ship', 'tennis-court', 'basketball-court',
306
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
307
+ 'harbor', 'swimming-pool', 'helicopter',
308
+ 'container-crane'),
309
+ pipeline=[
310
+ dict(type='LoadImageFromFile'),
311
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
312
+ dict(
313
+ type='STMultiBranch',
314
+ unsup_strong=[
315
+ dict(type='DTToPILImage'),
316
+ dict(
317
+ type='DTRandomApply',
318
+ operations=[
319
+ ColorJitter(
320
+ brightness=[0.6, 1.4],
321
+ contrast=[0.6, 1.4],
322
+ saturation=[0.6, 1.4],
323
+ hue=[-0.1, 0.1])
324
+ ],
325
+ p=0.8),
326
+ dict(type='DTRandomGrayscale', p=0.2),
327
+ dict(
328
+ type='DTRandomApply',
329
+ operations=[
330
+ dict(
331
+ type='DTGaussianBlur',
332
+ rad_range=[0.1, 2.0])
333
+ ]),
334
+ dict(type='DTToNumpy'),
335
+ dict(type='ExtraAttrs', tag='unsup_strong')
336
+ ],
337
+ unsup_weak=[
338
+ dict(type='RResize', img_scale=(1024, 1024)),
339
+ dict(
340
+ type='RRandomFlip',
341
+ flip_ratio=[0.25, 0.25, 0.25],
342
+ direction=['horizontal', 'vertical', 'diagonal'],
343
+ version='le90'),
344
+ dict(type='ExtraAttrs', tag='unsup_weak')
345
+ ],
346
+ common_pipeline=[
347
+ dict(
348
+ type='Normalize',
349
+ mean=[123.675, 116.28, 103.53],
350
+ std=[58.395, 57.12, 57.375],
351
+ to_rgb=True),
352
+ dict(type='Pad', size_divisor=32),
353
+ dict(type='DefaultFormatBundle'),
354
+ dict(
355
+ type='Collect',
356
+ keys=['img', 'gt_bboxes', 'gt_labels'],
357
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
358
+ 'img_shape', 'pad_shape',
359
+ 'scale_factor', 'flip',
360
+ 'flip_direction', 'img_norm_cfg',
361
+ 'tag'))
362
+ ],
363
+ is_seq=True)
364
+ ],
365
+ filter_empty_gt=False)),
366
+ val=dict(
367
+ type='DOTADataset',
368
+ img_prefix='data/val/images/',
369
+ ann_file='data/val/annfiles/',
370
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
371
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
372
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
373
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ pipeline=[
376
+ dict(type='LoadImageFromFile'),
377
+ dict(
378
+ type='MultiScaleFlipAug',
379
+ img_scale=(1024, 1024),
380
+ flip=False,
381
+ transforms=[
382
+ dict(type='RResize'),
383
+ dict(
384
+ type='Normalize',
385
+ mean=[123.675, 116.28, 103.53],
386
+ std=[58.395, 57.12, 57.375],
387
+ to_rgb=True),
388
+ dict(type='Pad', size_divisor=32),
389
+ dict(type='DefaultFormatBundle'),
390
+ dict(type='Collect', keys=['img'])
391
+ ])
392
+ ]),
393
+ test=dict(
394
+ type='DOTADataset',
395
+ img_prefix='data/vis_val/images/',
396
+ ann_file='data/vis_val/annfiles/',
397
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
398
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
399
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
400
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
401
+ 'container-crane'),
402
+ pipeline=[
403
+ dict(type='LoadImageFromFile'),
404
+ dict(
405
+ type='MultiScaleFlipAug',
406
+ img_scale=(1024, 1024),
407
+ flip=False,
408
+ transforms=[
409
+ dict(type='RResize'),
410
+ dict(
411
+ type='Normalize',
412
+ mean=[123.675, 116.28, 103.53],
413
+ std=[58.395, 57.12, 57.375],
414
+ to_rgb=True),
415
+ dict(type='Pad', size_divisor=32),
416
+ dict(type='DefaultFormatBundle'),
417
+ dict(type='Collect', keys=['img'])
418
+ ])
419
+ ]),
420
+ sampler=dict(
421
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
422
+ custom_hooks = [
423
+ dict(type='NumClassCheckHook'),
424
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
425
+ ]
426
+ evaluation = dict(
427
+ type='SubModulesDistEvalHook',
428
+ interval=3200,
429
+ metric='mAP',
430
+ save_best='mAP')
431
+ optimizer = dict(
432
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
433
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
434
+ lr_config = dict(
435
+ policy='step',
436
+ warmup='linear',
437
+ warmup_iters=500,
438
+ warmup_ratio=0.3333333333333333,
439
+ step=120000)
440
+ runner = dict(type='IterBasedRunner', max_iters=120000)
441
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
442
+ log_config = dict(
443
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
444
+ dist_params = dict(backend='nccl')
445
+ log_level = 'INFO'
446
+ load_from = None
447
+ resume_from = None
448
+ workflow = [('train', 1)]
449
+ opencv_num_threads = 0
450
+ mp_start_method = 'fork'
451
+ work_dir = 'work_dir/h2rv2_mcl/base/20p/'
452
+ auto_resume = False
453
+ gpu_ids = range(0, 2)
work_dir_h/PWOOD/base/30p/20250221_215902.log ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/30p/20250221_215902.log.json ADDED
The diff for this file is too large to render. See raw diff
 
work_dir_h/PWOOD/base/30p/mcl_fcos_adamw_dota15_30p.py ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ angle_version = 'le90'
2
+ detector = dict(
3
+ type='SemiRotatedFCOS',
4
+ backbone=dict(
5
+ type='ResNet',
6
+ depth=50,
7
+ num_stages=4,
8
+ out_indices=(0, 1, 2, 3),
9
+ frozen_stages=1,
10
+ zero_init_residual=False,
11
+ norm_cfg=dict(type='BN', requires_grad=True),
12
+ norm_eval=True,
13
+ style='pytorch',
14
+ init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
15
+ neck=dict(
16
+ type='FPN',
17
+ in_channels=[256, 512, 1024, 2048],
18
+ out_channels=256,
19
+ start_level=1,
20
+ add_extra_convs='on_output',
21
+ num_outs=5,
22
+ relu_before_extra_convs=True),
23
+ bbox_head=dict(
24
+ type='BaseHead',
25
+ num_classes=16,
26
+ in_channels=256,
27
+ stacked_convs=4,
28
+ feat_channels=256,
29
+ strides=[8, 16, 32, 64, 128],
30
+ norm_on_bbox=True,
31
+ centerness_on_reg=True,
32
+ separate_angle=False,
33
+ scale_angle=True,
34
+ beta=0.2,
35
+ bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
36
+ loss_cls=dict(
37
+ type='FocalLoss',
38
+ use_sigmoid=True,
39
+ gamma=2.0,
40
+ alpha=0.25,
41
+ loss_weight=1.0),
42
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
43
+ loss_centerness=dict(
44
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
45
+ train_cfg=None,
46
+ test_cfg=dict(
47
+ nms_pre=2000,
48
+ min_bbox_size=0,
49
+ score_thr=0.05,
50
+ nms=dict(iou_thr=0.1),
51
+ max_per_img=2000))
52
+ model = dict(
53
+ type='MCLTeacher',
54
+ model=dict(
55
+ type='SemiRotatedFCOS',
56
+ backbone=dict(
57
+ type='ResNet',
58
+ depth=50,
59
+ num_stages=4,
60
+ out_indices=(0, 1, 2, 3),
61
+ frozen_stages=1,
62
+ zero_init_residual=False,
63
+ norm_cfg=dict(type='BN', requires_grad=True),
64
+ norm_eval=True,
65
+ style='pytorch',
66
+ init_cfg=dict(
67
+ type='Pretrained', checkpoint='torchvision://resnet50')),
68
+ neck=dict(
69
+ type='FPN',
70
+ in_channels=[256, 512, 1024, 2048],
71
+ out_channels=256,
72
+ start_level=1,
73
+ add_extra_convs='on_output',
74
+ num_outs=5,
75
+ relu_before_extra_convs=True),
76
+ bbox_head=dict(
77
+ type='BaseHead',
78
+ num_classes=16,
79
+ in_channels=256,
80
+ stacked_convs=4,
81
+ feat_channels=256,
82
+ strides=[8, 16, 32, 64, 128],
83
+ norm_on_bbox=True,
84
+ centerness_on_reg=True,
85
+ separate_angle=False,
86
+ scale_angle=True,
87
+ beta=0.2,
88
+ bbox_coder=dict(
89
+ type='DistanceAnglePointCoder', angle_version='le90'),
90
+ loss_cls=dict(
91
+ type='FocalLoss',
92
+ use_sigmoid=True,
93
+ gamma=2.0,
94
+ alpha=0.25,
95
+ loss_weight=1.0),
96
+ loss_bbox=dict(type='RotatedIoULoss', loss_weight=1.0),
97
+ loss_centerness=dict(
98
+ type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
99
+ train_cfg=None,
100
+ test_cfg=dict(
101
+ nms_pre=2000,
102
+ min_bbox_size=0,
103
+ score_thr=0.05,
104
+ nms=dict(iou_thr=0.1),
105
+ max_per_img=2000)),
106
+ semi_loss=dict(type='RotatedMCLLoss', cls_channels=16),
107
+ train_cfg=dict(
108
+ iter_count=0,
109
+ burn_in_steps=12800,
110
+ sup_weight=1.0,
111
+ unsup_weight=1.0,
112
+ weight_suppress='linear',
113
+ logit_specific_weights=dict()),
114
+ test_cfg=dict(inference_on='teacher'))
115
+ img_norm_cfg = dict(
116
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
117
+ common_pipeline = [
118
+ dict(
119
+ type='Normalize',
120
+ mean=[123.675, 116.28, 103.53],
121
+ std=[58.395, 57.12, 57.375],
122
+ to_rgb=True),
123
+ dict(type='Pad', size_divisor=32),
124
+ dict(type='DefaultFormatBundle'),
125
+ dict(
126
+ type='Collect',
127
+ keys=['img', 'gt_bboxes', 'gt_labels'],
128
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
129
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
130
+ 'img_norm_cfg', 'tag'))
131
+ ]
132
+ strong_pipeline = [
133
+ dict(type='DTToPILImage'),
134
+ dict(
135
+ type='DTRandomApply',
136
+ operations=[
137
+ ColorJitter(
138
+ brightness=[0.6, 1.4],
139
+ contrast=[0.6, 1.4],
140
+ saturation=[0.6, 1.4],
141
+ hue=[-0.1, 0.1])
142
+ ],
143
+ p=0.8),
144
+ dict(type='DTRandomGrayscale', p=0.2),
145
+ dict(
146
+ type='DTRandomApply',
147
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1, 2.0])]),
148
+ dict(type='DTToNumpy'),
149
+ dict(type='ExtraAttrs', tag='unsup_strong')
150
+ ]
151
+ weak_pipeline = [
152
+ dict(type='RResize', img_scale=(1024, 1024)),
153
+ dict(
154
+ type='RRandomFlip',
155
+ flip_ratio=[0.25, 0.25, 0.25],
156
+ direction=['horizontal', 'vertical', 'diagonal'],
157
+ version='le90'),
158
+ dict(type='ExtraAttrs', tag='unsup_weak')
159
+ ]
160
+ unsup_pipeline = [
161
+ dict(type='LoadImageFromFile'),
162
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
163
+ dict(
164
+ type='STMultiBranch',
165
+ unsup_strong=[
166
+ dict(type='DTToPILImage'),
167
+ dict(
168
+ type='DTRandomApply',
169
+ operations=[
170
+ ColorJitter(
171
+ brightness=[0.6, 1.4],
172
+ contrast=[0.6, 1.4],
173
+ saturation=[0.6, 1.4],
174
+ hue=[-0.1, 0.1])
175
+ ],
176
+ p=0.8),
177
+ dict(type='DTRandomGrayscale', p=0.2),
178
+ dict(
179
+ type='DTRandomApply',
180
+ operations=[dict(type='DTGaussianBlur', rad_range=[0.1,
181
+ 2.0])]),
182
+ dict(type='DTToNumpy'),
183
+ dict(type='ExtraAttrs', tag='unsup_strong')
184
+ ],
185
+ unsup_weak=[
186
+ dict(type='RResize', img_scale=(1024, 1024)),
187
+ dict(
188
+ type='RRandomFlip',
189
+ flip_ratio=[0.25, 0.25, 0.25],
190
+ direction=['horizontal', 'vertical', 'diagonal'],
191
+ version='le90'),
192
+ dict(type='ExtraAttrs', tag='unsup_weak')
193
+ ],
194
+ common_pipeline=[
195
+ dict(
196
+ type='Normalize',
197
+ mean=[123.675, 116.28, 103.53],
198
+ std=[58.395, 57.12, 57.375],
199
+ to_rgb=True),
200
+ dict(type='Pad', size_divisor=32),
201
+ dict(type='DefaultFormatBundle'),
202
+ dict(
203
+ type='Collect',
204
+ keys=['img', 'gt_bboxes', 'gt_labels'],
205
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
206
+ 'img_shape', 'pad_shape', 'scale_factor', 'flip',
207
+ 'flip_direction', 'img_norm_cfg', 'tag'))
208
+ ],
209
+ is_seq=True)
210
+ ]
211
+ sup_pipeline = [
212
+ dict(type='LoadImageFromFile'),
213
+ dict(type='LoadAnnotations', with_bbox=True),
214
+ dict(type='RResize', img_scale=(1024, 1024)),
215
+ dict(
216
+ type='RRandomFlip',
217
+ flip_ratio=[0.25, 0.25, 0.25],
218
+ direction=['horizontal', 'vertical', 'diagonal'],
219
+ version='le90'),
220
+ dict(type='ExtraAttrs', tag='sup_weak'),
221
+ dict(
222
+ type='Normalize',
223
+ mean=[123.675, 116.28, 103.53],
224
+ std=[58.395, 57.12, 57.375],
225
+ to_rgb=True),
226
+ dict(type='Pad', size_divisor=32),
227
+ dict(type='DefaultFormatBundle'),
228
+ dict(
229
+ type='Collect',
230
+ keys=['img', 'gt_bboxes', 'gt_labels'],
231
+ meta_keys=('filename', 'ori_filename', 'ori_shape', 'img_shape',
232
+ 'pad_shape', 'scale_factor', 'flip', 'flip_direction',
233
+ 'img_norm_cfg', 'tag'))
234
+ ]
235
+ test_pipeline = [
236
+ dict(type='LoadImageFromFile'),
237
+ dict(
238
+ type='MultiScaleFlipAug',
239
+ img_scale=(1024, 1024),
240
+ flip=False,
241
+ transforms=[
242
+ dict(type='RResize'),
243
+ dict(
244
+ type='Normalize',
245
+ mean=[123.675, 116.28, 103.53],
246
+ std=[58.395, 57.12, 57.375],
247
+ to_rgb=True),
248
+ dict(type='Pad', size_divisor=32),
249
+ dict(type='DefaultFormatBundle'),
250
+ dict(type='Collect', keys=['img'])
251
+ ])
252
+ ]
253
+ dataset_type = 'DOTADataset'
254
+ classes = ('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
255
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
256
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
257
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
258
+ 'container-crane')
259
+ data = dict(
260
+ samples_per_gpu=3,
261
+ workers_per_gpu=5,
262
+ train=dict(
263
+ type='SemiDataset',
264
+ sup=dict(
265
+ type='DOTADataset',
266
+ ann_file='data/train_30p_labeled/annfiles/',
267
+ img_prefix='data/train_30p_labeled/images/',
268
+ classes=('plane', 'baseball-diamond', 'bridge',
269
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
270
+ 'ship', 'tennis-court', 'basketball-court',
271
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
272
+ 'harbor', 'swimming-pool', 'helicopter',
273
+ 'container-crane'),
274
+ pipeline=[
275
+ dict(type='LoadImageFromFile'),
276
+ dict(type='LoadAnnotations', with_bbox=True),
277
+ dict(type='RResize', img_scale=(1024, 1024)),
278
+ dict(
279
+ type='RRandomFlip',
280
+ flip_ratio=[0.25, 0.25, 0.25],
281
+ direction=['horizontal', 'vertical', 'diagonal'],
282
+ version='le90'),
283
+ dict(type='ExtraAttrs', tag='sup_weak'),
284
+ dict(
285
+ type='Normalize',
286
+ mean=[123.675, 116.28, 103.53],
287
+ std=[58.395, 57.12, 57.375],
288
+ to_rgb=True),
289
+ dict(type='Pad', size_divisor=32),
290
+ dict(type='DefaultFormatBundle'),
291
+ dict(
292
+ type='Collect',
293
+ keys=['img', 'gt_bboxes', 'gt_labels'],
294
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
295
+ 'img_shape', 'pad_shape', 'scale_factor',
296
+ 'flip', 'flip_direction', 'img_norm_cfg',
297
+ 'tag'))
298
+ ]),
299
+ unsup=dict(
300
+ type='DOTADataset',
301
+ ann_file='data/train_30p_unlabeled/empty_annfiles/',
302
+ img_prefix='data/train_30p_unlabeled/images/',
303
+ classes=('plane', 'baseball-diamond', 'bridge',
304
+ 'ground-track-field', 'small-vehicle', 'large-vehicle',
305
+ 'ship', 'tennis-court', 'basketball-court',
306
+ 'storage-tank', 'soccer-ball-field', 'roundabout',
307
+ 'harbor', 'swimming-pool', 'helicopter',
308
+ 'container-crane'),
309
+ pipeline=[
310
+ dict(type='LoadImageFromFile'),
311
+ dict(type='LoadEmptyAnnotations', with_bbox=True),
312
+ dict(
313
+ type='STMultiBranch',
314
+ unsup_strong=[
315
+ dict(type='DTToPILImage'),
316
+ dict(
317
+ type='DTRandomApply',
318
+ operations=[
319
+ ColorJitter(
320
+ brightness=[0.6, 1.4],
321
+ contrast=[0.6, 1.4],
322
+ saturation=[0.6, 1.4],
323
+ hue=[-0.1, 0.1])
324
+ ],
325
+ p=0.8),
326
+ dict(type='DTRandomGrayscale', p=0.2),
327
+ dict(
328
+ type='DTRandomApply',
329
+ operations=[
330
+ dict(
331
+ type='DTGaussianBlur',
332
+ rad_range=[0.1, 2.0])
333
+ ]),
334
+ dict(type='DTToNumpy'),
335
+ dict(type='ExtraAttrs', tag='unsup_strong')
336
+ ],
337
+ unsup_weak=[
338
+ dict(type='RResize', img_scale=(1024, 1024)),
339
+ dict(
340
+ type='RRandomFlip',
341
+ flip_ratio=[0.25, 0.25, 0.25],
342
+ direction=['horizontal', 'vertical', 'diagonal'],
343
+ version='le90'),
344
+ dict(type='ExtraAttrs', tag='unsup_weak')
345
+ ],
346
+ common_pipeline=[
347
+ dict(
348
+ type='Normalize',
349
+ mean=[123.675, 116.28, 103.53],
350
+ std=[58.395, 57.12, 57.375],
351
+ to_rgb=True),
352
+ dict(type='Pad', size_divisor=32),
353
+ dict(type='DefaultFormatBundle'),
354
+ dict(
355
+ type='Collect',
356
+ keys=['img', 'gt_bboxes', 'gt_labels'],
357
+ meta_keys=('filename', 'ori_filename', 'ori_shape',
358
+ 'img_shape', 'pad_shape',
359
+ 'scale_factor', 'flip',
360
+ 'flip_direction', 'img_norm_cfg',
361
+ 'tag'))
362
+ ],
363
+ is_seq=True)
364
+ ],
365
+ filter_empty_gt=False)),
366
+ val=dict(
367
+ type='DOTADataset',
368
+ img_prefix='data/val/images/',
369
+ ann_file='data/val/annfiles/',
370
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
371
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
372
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
373
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
374
+ 'container-crane'),
375
+ pipeline=[
376
+ dict(type='LoadImageFromFile'),
377
+ dict(
378
+ type='MultiScaleFlipAug',
379
+ img_scale=(1024, 1024),
380
+ flip=False,
381
+ transforms=[
382
+ dict(type='RResize'),
383
+ dict(
384
+ type='Normalize',
385
+ mean=[123.675, 116.28, 103.53],
386
+ std=[58.395, 57.12, 57.375],
387
+ to_rgb=True),
388
+ dict(type='Pad', size_divisor=32),
389
+ dict(type='DefaultFormatBundle'),
390
+ dict(type='Collect', keys=['img'])
391
+ ])
392
+ ]),
393
+ test=dict(
394
+ type='DOTADataset',
395
+ img_prefix='data/vis_val/images/',
396
+ ann_file='data/vis_val/annfiles/',
397
+ classes=('plane', 'baseball-diamond', 'bridge', 'ground-track-field',
398
+ 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
399
+ 'basketball-court', 'storage-tank', 'soccer-ball-field',
400
+ 'roundabout', 'harbor', 'swimming-pool', 'helicopter',
401
+ 'container-crane'),
402
+ pipeline=[
403
+ dict(type='LoadImageFromFile'),
404
+ dict(
405
+ type='MultiScaleFlipAug',
406
+ img_scale=(1024, 1024),
407
+ flip=False,
408
+ transforms=[
409
+ dict(type='RResize'),
410
+ dict(
411
+ type='Normalize',
412
+ mean=[123.675, 116.28, 103.53],
413
+ std=[58.395, 57.12, 57.375],
414
+ to_rgb=True),
415
+ dict(type='Pad', size_divisor=32),
416
+ dict(type='DefaultFormatBundle'),
417
+ dict(type='Collect', keys=['img'])
418
+ ])
419
+ ]),
420
+ sampler=dict(
421
+ train=dict(type='MultiSourceSampler', sample_ratio=[2, 1], seed=42)))
422
+ custom_hooks = [
423
+ dict(type='NumClassCheckHook'),
424
+ dict(type='MeanTeacher', momentum=0.9996, interval=1, start_steps=3200)
425
+ ]
426
+ evaluation = dict(
427
+ type='SubModulesDistEvalHook',
428
+ interval=3200,
429
+ metric='mAP',
430
+ save_best='mAP')
431
+ optimizer = dict(
432
+ type='AdamW', lr=0.0001, betas=(0.9, 0.999), weight_decay=0.05)
433
+ optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
434
+ lr_config = dict(
435
+ policy='step',
436
+ warmup='linear',
437
+ warmup_iters=500,
438
+ warmup_ratio=0.3333333333333333,
439
+ step=[120000, 160000])
440
+ runner = dict(type='IterBasedRunner', max_iters=180000)
441
+ checkpoint_config = dict(by_epoch=False, interval=3200, max_keep_ckpts=1)
442
+ log_config = dict(
443
+ _delete_=True, interval=50, hooks=[dict(type='TextLoggerHook')])
444
+ dist_params = dict(backend='nccl')
445
+ log_level = 'INFO'
446
+ load_from = None
447
+ resume_from = None
448
+ workflow = [('train', 1)]
449
+ opencv_num_threads = 0
450
+ mp_start_method = 'fork'
451
+ work_dir = 'work_dir/h2rv2_mcl/base/30p/'
452
+ auto_resume = False
453
+ gpu_ids = range(0, 2)