Upload 7 files
Browse files- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/20230419_203137.log +0 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/20230419_203137.json +0 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/config.py +824 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/scalars.json +0 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/iter_180000.pth +3 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/last_checkpoint +1 -0
- mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py +824 -0
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/20230419_203137.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/20230419_203137.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/config.py
ADDED
|
@@ -0,0 +1,824 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model = dict(
|
| 2 |
+
type='MixPL',
|
| 3 |
+
detector=dict(
|
| 4 |
+
type='FasterRCNN',
|
| 5 |
+
data_preprocessor=dict(
|
| 6 |
+
type='DetDataPreprocessor',
|
| 7 |
+
mean=[103.53, 116.28, 123.675],
|
| 8 |
+
std=[1.0, 1.0, 1.0],
|
| 9 |
+
bgr_to_rgb=False,
|
| 10 |
+
pad_size_divisor=32),
|
| 11 |
+
backbone=dict(
|
| 12 |
+
type='ResNet',
|
| 13 |
+
depth=50,
|
| 14 |
+
num_stages=4,
|
| 15 |
+
out_indices=(0, 1, 2, 3),
|
| 16 |
+
frozen_stages=1,
|
| 17 |
+
norm_cfg=dict(type='BN', requires_grad=False),
|
| 18 |
+
norm_eval=True,
|
| 19 |
+
style='caffe',
|
| 20 |
+
init_cfg=dict(
|
| 21 |
+
type='Pretrained',
|
| 22 |
+
checkpoint='open-mmlab://detectron2/resnet50_caffe')),
|
| 23 |
+
neck=dict(
|
| 24 |
+
type='FPN',
|
| 25 |
+
in_channels=[256, 512, 1024, 2048],
|
| 26 |
+
out_channels=256,
|
| 27 |
+
num_outs=5),
|
| 28 |
+
rpn_head=dict(
|
| 29 |
+
type='RPNHead',
|
| 30 |
+
in_channels=256,
|
| 31 |
+
feat_channels=256,
|
| 32 |
+
anchor_generator=dict(
|
| 33 |
+
type='AnchorGenerator',
|
| 34 |
+
scales=[8],
|
| 35 |
+
ratios=[0.5, 1.0, 2.0],
|
| 36 |
+
strides=[4, 8, 16, 32, 64]),
|
| 37 |
+
bbox_coder=dict(
|
| 38 |
+
type='DeltaXYWHBBoxCoder',
|
| 39 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 40 |
+
target_stds=[1.0, 1.0, 1.0, 1.0]),
|
| 41 |
+
loss_cls=dict(
|
| 42 |
+
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
|
| 43 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
|
| 44 |
+
roi_head=dict(
|
| 45 |
+
type='StandardRoIHead',
|
| 46 |
+
bbox_roi_extractor=dict(
|
| 47 |
+
type='SingleRoIExtractor',
|
| 48 |
+
roi_layer=dict(
|
| 49 |
+
type='RoIAlign', output_size=7, sampling_ratio=0),
|
| 50 |
+
out_channels=256,
|
| 51 |
+
featmap_strides=[4, 8, 16, 32]),
|
| 52 |
+
bbox_head=dict(
|
| 53 |
+
type='Shared2FCBBoxHead',
|
| 54 |
+
in_channels=256,
|
| 55 |
+
fc_out_channels=1024,
|
| 56 |
+
roi_feat_size=7,
|
| 57 |
+
num_classes=80,
|
| 58 |
+
bbox_coder=dict(
|
| 59 |
+
type='DeltaXYWHBBoxCoder',
|
| 60 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 61 |
+
target_stds=[0.1, 0.1, 0.2, 0.2]),
|
| 62 |
+
reg_class_agnostic=False,
|
| 63 |
+
loss_cls=dict(
|
| 64 |
+
type='CrossEntropyLoss',
|
| 65 |
+
use_sigmoid=False,
|
| 66 |
+
loss_weight=1.0),
|
| 67 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
|
| 68 |
+
train_cfg=dict(
|
| 69 |
+
rpn=dict(
|
| 70 |
+
assigner=dict(
|
| 71 |
+
type='MaxIoUAssigner',
|
| 72 |
+
pos_iou_thr=0.7,
|
| 73 |
+
neg_iou_thr=0.3,
|
| 74 |
+
min_pos_iou=0.3,
|
| 75 |
+
match_low_quality=True,
|
| 76 |
+
ignore_iof_thr=-1),
|
| 77 |
+
sampler=dict(
|
| 78 |
+
type='RandomSampler',
|
| 79 |
+
num=256,
|
| 80 |
+
pos_fraction=0.5,
|
| 81 |
+
neg_pos_ub=-1,
|
| 82 |
+
add_gt_as_proposals=False),
|
| 83 |
+
allowed_border=-1,
|
| 84 |
+
pos_weight=-1,
|
| 85 |
+
debug=False),
|
| 86 |
+
rpn_proposal=dict(
|
| 87 |
+
nms_pre=2000,
|
| 88 |
+
max_per_img=1000,
|
| 89 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 90 |
+
min_bbox_size=0),
|
| 91 |
+
rcnn=dict(
|
| 92 |
+
assigner=dict(
|
| 93 |
+
type='MaxIoUAssigner',
|
| 94 |
+
pos_iou_thr=0.5,
|
| 95 |
+
neg_iou_thr=0.5,
|
| 96 |
+
min_pos_iou=0.5,
|
| 97 |
+
match_low_quality=False,
|
| 98 |
+
ignore_iof_thr=-1),
|
| 99 |
+
sampler=dict(
|
| 100 |
+
type='RandomSampler',
|
| 101 |
+
num=512,
|
| 102 |
+
pos_fraction=0.25,
|
| 103 |
+
neg_pos_ub=-1,
|
| 104 |
+
add_gt_as_proposals=True),
|
| 105 |
+
pos_weight=-1,
|
| 106 |
+
debug=False)),
|
| 107 |
+
test_cfg=dict(
|
| 108 |
+
rpn=dict(
|
| 109 |
+
nms_pre=1000,
|
| 110 |
+
max_per_img=1000,
|
| 111 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 112 |
+
min_bbox_size=0),
|
| 113 |
+
rcnn=dict(
|
| 114 |
+
score_thr=0.05,
|
| 115 |
+
nms=dict(type='nms', iou_threshold=0.5),
|
| 116 |
+
max_per_img=100))),
|
| 117 |
+
data_preprocessor=dict(
|
| 118 |
+
type='MultiBranchDataPreprocessor',
|
| 119 |
+
data_preprocessor=dict(
|
| 120 |
+
type='DetDataPreprocessor',
|
| 121 |
+
mean=[103.53, 116.28, 123.675],
|
| 122 |
+
std=[1.0, 1.0, 1.0],
|
| 123 |
+
bgr_to_rgb=False,
|
| 124 |
+
pad_size_divisor=32)),
|
| 125 |
+
semi_train_cfg=dict(
|
| 126 |
+
least_num=1,
|
| 127 |
+
cache_size=8,
|
| 128 |
+
mixup=True,
|
| 129 |
+
mosaic=True,
|
| 130 |
+
mosaic_shape=[(400, 400), (800, 800)],
|
| 131 |
+
mosaic_weight=0.5,
|
| 132 |
+
erase=True,
|
| 133 |
+
erase_patches=(1, 20),
|
| 134 |
+
erase_ratio=(0, 0.1),
|
| 135 |
+
erase_thr=0.7,
|
| 136 |
+
cls_pseudo_thr=0.7,
|
| 137 |
+
freeze_teacher=True,
|
| 138 |
+
sup_weight=1.0,
|
| 139 |
+
unsup_weight=2.0,
|
| 140 |
+
min_pseudo_bbox_wh=(0.01, 0.01)),
|
| 141 |
+
semi_test_cfg=dict(predict_on='teacher'))
|
| 142 |
+
default_scope = 'mmdet'
|
| 143 |
+
default_hooks = dict(
|
| 144 |
+
timer=dict(type='IterTimerHook'),
|
| 145 |
+
logger=dict(type='LoggerHook', interval=50),
|
| 146 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
| 147 |
+
checkpoint=dict(
|
| 148 |
+
type='CheckpointHook',
|
| 149 |
+
interval=10000,
|
| 150 |
+
by_epoch=False,
|
| 151 |
+
max_keep_ckpts=1),
|
| 152 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
| 153 |
+
visualization=dict(type='DetVisualizationHook'))
|
| 154 |
+
env_cfg = dict(
|
| 155 |
+
cudnn_benchmark=False,
|
| 156 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
| 157 |
+
dist_cfg=dict(backend='nccl'))
|
| 158 |
+
vis_backends = [dict(type='LocalVisBackend')]
|
| 159 |
+
visualizer = dict(
|
| 160 |
+
type='DetLocalVisualizer',
|
| 161 |
+
vis_backends=[dict(type='LocalVisBackend')],
|
| 162 |
+
name='visualizer')
|
| 163 |
+
log_processor = dict(type='LogProcessor', window_size=50, by_epoch=False)
|
| 164 |
+
log_level = 'INFO'
|
| 165 |
+
load_from = None
|
| 166 |
+
resume = True
|
| 167 |
+
dataset_type = 'CocoDataset'
|
| 168 |
+
data_root = 'data/coco/'
|
| 169 |
+
file_client_args = dict(backend='disk')
|
| 170 |
+
color_space = [[{
|
| 171 |
+
'type': 'ColorTransform'
|
| 172 |
+
}], [{
|
| 173 |
+
'type': 'AutoContrast'
|
| 174 |
+
}], [{
|
| 175 |
+
'type': 'Equalize'
|
| 176 |
+
}], [{
|
| 177 |
+
'type': 'Sharpness'
|
| 178 |
+
}], [{
|
| 179 |
+
'type': 'Posterize'
|
| 180 |
+
}], [{
|
| 181 |
+
'type': 'Solarize'
|
| 182 |
+
}], [{
|
| 183 |
+
'type': 'Color'
|
| 184 |
+
}], [{
|
| 185 |
+
'type': 'Contrast'
|
| 186 |
+
}], [{
|
| 187 |
+
'type': 'Brightness'
|
| 188 |
+
}]]
|
| 189 |
+
geometric = [[{
|
| 190 |
+
'type': 'Rotate'
|
| 191 |
+
}], [{
|
| 192 |
+
'type': 'ShearX'
|
| 193 |
+
}], [{
|
| 194 |
+
'type': 'ShearY'
|
| 195 |
+
}], [{
|
| 196 |
+
'type': 'TranslateX'
|
| 197 |
+
}], [{
|
| 198 |
+
'type': 'TranslateY'
|
| 199 |
+
}]]
|
| 200 |
+
scale = [(1333, 400), (1333, 1200)]
|
| 201 |
+
branch_field = ['sup', 'unsup_teacher', 'unsup_student']
|
| 202 |
+
sup_pipeline = [
|
| 203 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 204 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 205 |
+
dict(
|
| 206 |
+
type='RandomResize',
|
| 207 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 208 |
+
keep_ratio=True),
|
| 209 |
+
dict(type='RandomFlip', prob=0.5),
|
| 210 |
+
dict(
|
| 211 |
+
type='RandAugment',
|
| 212 |
+
aug_space=[[{
|
| 213 |
+
'type': 'ColorTransform'
|
| 214 |
+
}], [{
|
| 215 |
+
'type': 'AutoContrast'
|
| 216 |
+
}], [{
|
| 217 |
+
'type': 'Equalize'
|
| 218 |
+
}], [{
|
| 219 |
+
'type': 'Sharpness'
|
| 220 |
+
}], [{
|
| 221 |
+
'type': 'Posterize'
|
| 222 |
+
}], [{
|
| 223 |
+
'type': 'Solarize'
|
| 224 |
+
}], [{
|
| 225 |
+
'type': 'Color'
|
| 226 |
+
}], [{
|
| 227 |
+
'type': 'Contrast'
|
| 228 |
+
}], [{
|
| 229 |
+
'type': 'Brightness'
|
| 230 |
+
}]],
|
| 231 |
+
aug_num=1),
|
| 232 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 233 |
+
dict(
|
| 234 |
+
type='MultiBranch',
|
| 235 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 236 |
+
sup=dict(type='PackDetInputs'))
|
| 237 |
+
]
|
| 238 |
+
weak_pipeline = [
|
| 239 |
+
dict(
|
| 240 |
+
type='RandomResize',
|
| 241 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 242 |
+
keep_ratio=True),
|
| 243 |
+
dict(type='RandomFlip', prob=0.5),
|
| 244 |
+
dict(
|
| 245 |
+
type='PackDetInputs',
|
| 246 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 247 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 248 |
+
'homography_matrix'))
|
| 249 |
+
]
|
| 250 |
+
strong_pipeline = [
|
| 251 |
+
dict(
|
| 252 |
+
type='RandomResize',
|
| 253 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 254 |
+
keep_ratio=True),
|
| 255 |
+
dict(type='RandomFlip', prob=0.5),
|
| 256 |
+
dict(
|
| 257 |
+
type='RandomOrder',
|
| 258 |
+
transforms=[
|
| 259 |
+
dict(
|
| 260 |
+
type='RandAugment',
|
| 261 |
+
aug_space=[[{
|
| 262 |
+
'type': 'ColorTransform'
|
| 263 |
+
}], [{
|
| 264 |
+
'type': 'AutoContrast'
|
| 265 |
+
}], [{
|
| 266 |
+
'type': 'Equalize'
|
| 267 |
+
}], [{
|
| 268 |
+
'type': 'Sharpness'
|
| 269 |
+
}], [{
|
| 270 |
+
'type': 'Posterize'
|
| 271 |
+
}], [{
|
| 272 |
+
'type': 'Solarize'
|
| 273 |
+
}], [{
|
| 274 |
+
'type': 'Color'
|
| 275 |
+
}], [{
|
| 276 |
+
'type': 'Contrast'
|
| 277 |
+
}], [{
|
| 278 |
+
'type': 'Brightness'
|
| 279 |
+
}]],
|
| 280 |
+
aug_num=1),
|
| 281 |
+
dict(
|
| 282 |
+
type='RandAugment',
|
| 283 |
+
aug_space=[[{
|
| 284 |
+
'type': 'Rotate'
|
| 285 |
+
}], [{
|
| 286 |
+
'type': 'ShearX'
|
| 287 |
+
}], [{
|
| 288 |
+
'type': 'ShearY'
|
| 289 |
+
}], [{
|
| 290 |
+
'type': 'TranslateX'
|
| 291 |
+
}], [{
|
| 292 |
+
'type': 'TranslateY'
|
| 293 |
+
}]],
|
| 294 |
+
aug_num=1)
|
| 295 |
+
]),
|
| 296 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 297 |
+
dict(
|
| 298 |
+
type='PackDetInputs',
|
| 299 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 300 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 301 |
+
'homography_matrix'))
|
| 302 |
+
]
|
| 303 |
+
unsup_pipeline = [
|
| 304 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 305 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 306 |
+
dict(
|
| 307 |
+
type='MultiBranch',
|
| 308 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 309 |
+
unsup_teacher=[
|
| 310 |
+
dict(
|
| 311 |
+
type='RandomResize',
|
| 312 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 313 |
+
keep_ratio=True),
|
| 314 |
+
dict(type='RandomFlip', prob=0.5),
|
| 315 |
+
dict(
|
| 316 |
+
type='PackDetInputs',
|
| 317 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 318 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 319 |
+
'homography_matrix'))
|
| 320 |
+
],
|
| 321 |
+
unsup_student=[
|
| 322 |
+
dict(
|
| 323 |
+
type='RandomResize',
|
| 324 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 325 |
+
keep_ratio=True),
|
| 326 |
+
dict(type='RandomFlip', prob=0.5),
|
| 327 |
+
dict(
|
| 328 |
+
type='RandomOrder',
|
| 329 |
+
transforms=[
|
| 330 |
+
dict(
|
| 331 |
+
type='RandAugment',
|
| 332 |
+
aug_space=[[{
|
| 333 |
+
'type': 'ColorTransform'
|
| 334 |
+
}], [{
|
| 335 |
+
'type': 'AutoContrast'
|
| 336 |
+
}], [{
|
| 337 |
+
'type': 'Equalize'
|
| 338 |
+
}], [{
|
| 339 |
+
'type': 'Sharpness'
|
| 340 |
+
}], [{
|
| 341 |
+
'type': 'Posterize'
|
| 342 |
+
}], [{
|
| 343 |
+
'type': 'Solarize'
|
| 344 |
+
}], [{
|
| 345 |
+
'type': 'Color'
|
| 346 |
+
}], [{
|
| 347 |
+
'type': 'Contrast'
|
| 348 |
+
}], [{
|
| 349 |
+
'type': 'Brightness'
|
| 350 |
+
}]],
|
| 351 |
+
aug_num=1),
|
| 352 |
+
dict(
|
| 353 |
+
type='RandAugment',
|
| 354 |
+
aug_space=[[{
|
| 355 |
+
'type': 'Rotate'
|
| 356 |
+
}], [{
|
| 357 |
+
'type': 'ShearX'
|
| 358 |
+
}], [{
|
| 359 |
+
'type': 'ShearY'
|
| 360 |
+
}], [{
|
| 361 |
+
'type': 'TranslateX'
|
| 362 |
+
}], [{
|
| 363 |
+
'type': 'TranslateY'
|
| 364 |
+
}]],
|
| 365 |
+
aug_num=1)
|
| 366 |
+
]),
|
| 367 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 368 |
+
dict(
|
| 369 |
+
type='PackDetInputs',
|
| 370 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 371 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 372 |
+
'homography_matrix'))
|
| 373 |
+
])
|
| 374 |
+
]
|
| 375 |
+
test_pipeline = [
|
| 376 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 377 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 378 |
+
dict(
|
| 379 |
+
type='PackDetInputs',
|
| 380 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 381 |
+
'scale_factor'))
|
| 382 |
+
]
|
| 383 |
+
batch_size = 8
|
| 384 |
+
num_workers = 8
|
| 385 |
+
labeled_dataset = dict(
|
| 386 |
+
type='CocoDataset',
|
| 387 |
+
data_root='data/',
|
| 388 |
+
ann_file='coco_semi_anns/instances_train2017.1@10.json',
|
| 389 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 390 |
+
filter_cfg=dict(filter_empty_gt=True, min_size=32),
|
| 391 |
+
pipeline=[
|
| 392 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 393 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 394 |
+
dict(
|
| 395 |
+
type='RandomResize',
|
| 396 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 397 |
+
keep_ratio=True),
|
| 398 |
+
dict(type='RandomFlip', prob=0.5),
|
| 399 |
+
dict(
|
| 400 |
+
type='RandAugment',
|
| 401 |
+
aug_space=[[{
|
| 402 |
+
'type': 'ColorTransform'
|
| 403 |
+
}], [{
|
| 404 |
+
'type': 'AutoContrast'
|
| 405 |
+
}], [{
|
| 406 |
+
'type': 'Equalize'
|
| 407 |
+
}], [{
|
| 408 |
+
'type': 'Sharpness'
|
| 409 |
+
}], [{
|
| 410 |
+
'type': 'Posterize'
|
| 411 |
+
}], [{
|
| 412 |
+
'type': 'Solarize'
|
| 413 |
+
}], [{
|
| 414 |
+
'type': 'Color'
|
| 415 |
+
}], [{
|
| 416 |
+
'type': 'Contrast'
|
| 417 |
+
}], [{
|
| 418 |
+
'type': 'Brightness'
|
| 419 |
+
}]],
|
| 420 |
+
aug_num=1),
|
| 421 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 422 |
+
dict(
|
| 423 |
+
type='MultiBranch',
|
| 424 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 425 |
+
sup=dict(type='PackDetInputs'))
|
| 426 |
+
])
|
| 427 |
+
unlabeled_dataset = dict(
|
| 428 |
+
type='CocoDataset',
|
| 429 |
+
data_root='data/',
|
| 430 |
+
ann_file='coco_semi_anns/instances_train2017.1@10-unlabeled.json',
|
| 431 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 432 |
+
filter_cfg=dict(filter_empty_gt=False),
|
| 433 |
+
pipeline=[
|
| 434 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 435 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 436 |
+
dict(
|
| 437 |
+
type='MultiBranch',
|
| 438 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 439 |
+
unsup_teacher=[
|
| 440 |
+
dict(
|
| 441 |
+
type='RandomResize',
|
| 442 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 443 |
+
keep_ratio=True),
|
| 444 |
+
dict(type='RandomFlip', prob=0.5),
|
| 445 |
+
dict(
|
| 446 |
+
type='PackDetInputs',
|
| 447 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 448 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 449 |
+
'homography_matrix'))
|
| 450 |
+
],
|
| 451 |
+
unsup_student=[
|
| 452 |
+
dict(
|
| 453 |
+
type='RandomResize',
|
| 454 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 455 |
+
keep_ratio=True),
|
| 456 |
+
dict(type='RandomFlip', prob=0.5),
|
| 457 |
+
dict(
|
| 458 |
+
type='RandomOrder',
|
| 459 |
+
transforms=[
|
| 460 |
+
dict(
|
| 461 |
+
type='RandAugment',
|
| 462 |
+
aug_space=[[{
|
| 463 |
+
'type': 'ColorTransform'
|
| 464 |
+
}], [{
|
| 465 |
+
'type': 'AutoContrast'
|
| 466 |
+
}], [{
|
| 467 |
+
'type': 'Equalize'
|
| 468 |
+
}], [{
|
| 469 |
+
'type': 'Sharpness'
|
| 470 |
+
}], [{
|
| 471 |
+
'type': 'Posterize'
|
| 472 |
+
}], [{
|
| 473 |
+
'type': 'Solarize'
|
| 474 |
+
}], [{
|
| 475 |
+
'type': 'Color'
|
| 476 |
+
}], [{
|
| 477 |
+
'type': 'Contrast'
|
| 478 |
+
}], [{
|
| 479 |
+
'type': 'Brightness'
|
| 480 |
+
}]],
|
| 481 |
+
aug_num=1),
|
| 482 |
+
dict(
|
| 483 |
+
type='RandAugment',
|
| 484 |
+
aug_space=[[{
|
| 485 |
+
'type': 'Rotate'
|
| 486 |
+
}], [{
|
| 487 |
+
'type': 'ShearX'
|
| 488 |
+
}], [{
|
| 489 |
+
'type': 'ShearY'
|
| 490 |
+
}], [{
|
| 491 |
+
'type': 'TranslateX'
|
| 492 |
+
}], [{
|
| 493 |
+
'type': 'TranslateY'
|
| 494 |
+
}]],
|
| 495 |
+
aug_num=1)
|
| 496 |
+
]),
|
| 497 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 498 |
+
dict(
|
| 499 |
+
type='PackDetInputs',
|
| 500 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 501 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 502 |
+
'homography_matrix'))
|
| 503 |
+
])
|
| 504 |
+
])
|
| 505 |
+
train_dataloader = dict(
|
| 506 |
+
batch_size=5,
|
| 507 |
+
num_workers=5,
|
| 508 |
+
persistent_workers=True,
|
| 509 |
+
sampler=dict(
|
| 510 |
+
type='GroupMultiSourceSampler', batch_size=5, source_ratio=[1, 4]),
|
| 511 |
+
dataset=dict(
|
| 512 |
+
type='ConcatDataset',
|
| 513 |
+
datasets=[
|
| 514 |
+
dict(
|
| 515 |
+
type='CocoDataset',
|
| 516 |
+
data_root='data/',
|
| 517 |
+
ann_file='coco_semi_anns/instances_train2017.1@10.json',
|
| 518 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 519 |
+
filter_cfg=dict(filter_empty_gt=True, min_size=32),
|
| 520 |
+
pipeline=[
|
| 521 |
+
dict(
|
| 522 |
+
type='LoadImageFromFile',
|
| 523 |
+
file_client_args=dict(backend='disk')),
|
| 524 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 525 |
+
dict(
|
| 526 |
+
type='RandomResize',
|
| 527 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 528 |
+
keep_ratio=True),
|
| 529 |
+
dict(type='RandomFlip', prob=0.5),
|
| 530 |
+
dict(
|
| 531 |
+
type='RandAugment',
|
| 532 |
+
aug_space=[[{
|
| 533 |
+
'type': 'ColorTransform'
|
| 534 |
+
}], [{
|
| 535 |
+
'type': 'AutoContrast'
|
| 536 |
+
}], [{
|
| 537 |
+
'type': 'Equalize'
|
| 538 |
+
}], [{
|
| 539 |
+
'type': 'Sharpness'
|
| 540 |
+
}], [{
|
| 541 |
+
'type': 'Posterize'
|
| 542 |
+
}], [{
|
| 543 |
+
'type': 'Solarize'
|
| 544 |
+
}], [{
|
| 545 |
+
'type': 'Color'
|
| 546 |
+
}], [{
|
| 547 |
+
'type': 'Contrast'
|
| 548 |
+
}], [{
|
| 549 |
+
'type': 'Brightness'
|
| 550 |
+
}]],
|
| 551 |
+
aug_num=1),
|
| 552 |
+
dict(
|
| 553 |
+
type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 554 |
+
dict(
|
| 555 |
+
type='MultiBranch',
|
| 556 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 557 |
+
sup=dict(type='PackDetInputs'))
|
| 558 |
+
]),
|
| 559 |
+
dict(
|
| 560 |
+
type='CocoDataset',
|
| 561 |
+
data_root='data/',
|
| 562 |
+
ann_file=
|
| 563 |
+
'coco_semi_anns/instances_train2017.1@10-unlabeled.json',
|
| 564 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 565 |
+
filter_cfg=dict(filter_empty_gt=False),
|
| 566 |
+
pipeline=[
|
| 567 |
+
dict(
|
| 568 |
+
type='LoadImageFromFile',
|
| 569 |
+
file_client_args=dict(backend='disk')),
|
| 570 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 571 |
+
dict(
|
| 572 |
+
type='MultiBranch',
|
| 573 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 574 |
+
unsup_teacher=[
|
| 575 |
+
dict(
|
| 576 |
+
type='RandomResize',
|
| 577 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 578 |
+
keep_ratio=True),
|
| 579 |
+
dict(type='RandomFlip', prob=0.5),
|
| 580 |
+
dict(
|
| 581 |
+
type='PackDetInputs',
|
| 582 |
+
meta_keys=('img_id', 'img_path', 'ori_shape',
|
| 583 |
+
'img_shape', 'scale_factor', 'flip',
|
| 584 |
+
'flip_direction',
|
| 585 |
+
'homography_matrix'))
|
| 586 |
+
],
|
| 587 |
+
unsup_student=[
|
| 588 |
+
dict(
|
| 589 |
+
type='RandomResize',
|
| 590 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 591 |
+
keep_ratio=True),
|
| 592 |
+
dict(type='RandomFlip', prob=0.5),
|
| 593 |
+
dict(
|
| 594 |
+
type='RandomOrder',
|
| 595 |
+
transforms=[
|
| 596 |
+
dict(
|
| 597 |
+
type='RandAugment',
|
| 598 |
+
aug_space=[[{
|
| 599 |
+
'type': 'ColorTransform'
|
| 600 |
+
}], [{
|
| 601 |
+
'type': 'AutoContrast'
|
| 602 |
+
}], [{
|
| 603 |
+
'type': 'Equalize'
|
| 604 |
+
}], [{
|
| 605 |
+
'type': 'Sharpness'
|
| 606 |
+
}], [{
|
| 607 |
+
'type': 'Posterize'
|
| 608 |
+
}], [{
|
| 609 |
+
'type': 'Solarize'
|
| 610 |
+
}], [{
|
| 611 |
+
'type': 'Color'
|
| 612 |
+
}], [{
|
| 613 |
+
'type': 'Contrast'
|
| 614 |
+
}], [{
|
| 615 |
+
'type': 'Brightness'
|
| 616 |
+
}]],
|
| 617 |
+
aug_num=1),
|
| 618 |
+
dict(
|
| 619 |
+
type='RandAugment',
|
| 620 |
+
aug_space=[[{
|
| 621 |
+
'type': 'Rotate'
|
| 622 |
+
}], [{
|
| 623 |
+
'type': 'ShearX'
|
| 624 |
+
}], [{
|
| 625 |
+
'type': 'ShearY'
|
| 626 |
+
}], [{
|
| 627 |
+
'type': 'TranslateX'
|
| 628 |
+
}], [{
|
| 629 |
+
'type': 'TranslateY'
|
| 630 |
+
}]],
|
| 631 |
+
aug_num=1)
|
| 632 |
+
]),
|
| 633 |
+
dict(
|
| 634 |
+
type='FilterAnnotations',
|
| 635 |
+
min_gt_bbox_wh=(0.01, 0.01)),
|
| 636 |
+
dict(
|
| 637 |
+
type='PackDetInputs',
|
| 638 |
+
meta_keys=('img_id', 'img_path', 'ori_shape',
|
| 639 |
+
'img_shape', 'scale_factor', 'flip',
|
| 640 |
+
'flip_direction',
|
| 641 |
+
'homography_matrix'))
|
| 642 |
+
])
|
| 643 |
+
])
|
| 644 |
+
]))
|
| 645 |
+
val_dataloader = dict(
|
| 646 |
+
batch_size=1,
|
| 647 |
+
num_workers=2,
|
| 648 |
+
persistent_workers=True,
|
| 649 |
+
drop_last=False,
|
| 650 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 651 |
+
dataset=dict(
|
| 652 |
+
type='CocoDataset',
|
| 653 |
+
data_root='data/coco/',
|
| 654 |
+
ann_file='annotations/instances_val2017.json',
|
| 655 |
+
data_prefix=dict(img='val2017/'),
|
| 656 |
+
test_mode=True,
|
| 657 |
+
pipeline=[
|
| 658 |
+
dict(
|
| 659 |
+
type='LoadImageFromFile',
|
| 660 |
+
file_client_args=dict(backend='disk')),
|
| 661 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 662 |
+
dict(
|
| 663 |
+
type='PackDetInputs',
|
| 664 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 665 |
+
'scale_factor'))
|
| 666 |
+
]))
|
| 667 |
+
test_dataloader = dict(
|
| 668 |
+
batch_size=1,
|
| 669 |
+
num_workers=2,
|
| 670 |
+
persistent_workers=True,
|
| 671 |
+
drop_last=False,
|
| 672 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 673 |
+
dataset=dict(
|
| 674 |
+
type='CocoDataset',
|
| 675 |
+
data_root='data/coco/',
|
| 676 |
+
ann_file='annotations/instances_val2017.json',
|
| 677 |
+
data_prefix=dict(img='val2017/'),
|
| 678 |
+
test_mode=True,
|
| 679 |
+
pipeline=[
|
| 680 |
+
dict(
|
| 681 |
+
type='LoadImageFromFile',
|
| 682 |
+
file_client_args=dict(backend='disk')),
|
| 683 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 684 |
+
dict(
|
| 685 |
+
type='PackDetInputs',
|
| 686 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 687 |
+
'scale_factor'))
|
| 688 |
+
]))
|
| 689 |
+
val_evaluator = dict(
|
| 690 |
+
type='CocoMetric',
|
| 691 |
+
ann_file='data/coco/annotations/instances_val2017.json',
|
| 692 |
+
metric='bbox',
|
| 693 |
+
format_only=False)
|
| 694 |
+
test_evaluator = dict(
|
| 695 |
+
type='CocoMetric',
|
| 696 |
+
ann_file='data/coco/annotations/instances_val2017.json',
|
| 697 |
+
metric='bbox',
|
| 698 |
+
format_only=False)
|
| 699 |
+
detector = dict(
|
| 700 |
+
type='FasterRCNN',
|
| 701 |
+
data_preprocessor=dict(
|
| 702 |
+
type='DetDataPreprocessor',
|
| 703 |
+
mean=[103.53, 116.28, 123.675],
|
| 704 |
+
std=[1.0, 1.0, 1.0],
|
| 705 |
+
bgr_to_rgb=False,
|
| 706 |
+
pad_size_divisor=32),
|
| 707 |
+
backbone=dict(
|
| 708 |
+
type='ResNet',
|
| 709 |
+
depth=50,
|
| 710 |
+
num_stages=4,
|
| 711 |
+
out_indices=(0, 1, 2, 3),
|
| 712 |
+
frozen_stages=1,
|
| 713 |
+
norm_cfg=dict(type='BN', requires_grad=False),
|
| 714 |
+
norm_eval=True,
|
| 715 |
+
style='caffe',
|
| 716 |
+
init_cfg=dict(
|
| 717 |
+
type='Pretrained',
|
| 718 |
+
checkpoint='open-mmlab://detectron2/resnet50_caffe')),
|
| 719 |
+
neck=dict(
|
| 720 |
+
type='FPN',
|
| 721 |
+
in_channels=[256, 512, 1024, 2048],
|
| 722 |
+
out_channels=256,
|
| 723 |
+
num_outs=5),
|
| 724 |
+
rpn_head=dict(
|
| 725 |
+
type='RPNHead',
|
| 726 |
+
in_channels=256,
|
| 727 |
+
feat_channels=256,
|
| 728 |
+
anchor_generator=dict(
|
| 729 |
+
type='AnchorGenerator',
|
| 730 |
+
scales=[8],
|
| 731 |
+
ratios=[0.5, 1.0, 2.0],
|
| 732 |
+
strides=[4, 8, 16, 32, 64]),
|
| 733 |
+
bbox_coder=dict(
|
| 734 |
+
type='DeltaXYWHBBoxCoder',
|
| 735 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 736 |
+
target_stds=[1.0, 1.0, 1.0, 1.0]),
|
| 737 |
+
loss_cls=dict(
|
| 738 |
+
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
|
| 739 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
|
| 740 |
+
roi_head=dict(
|
| 741 |
+
type='StandardRoIHead',
|
| 742 |
+
bbox_roi_extractor=dict(
|
| 743 |
+
type='SingleRoIExtractor',
|
| 744 |
+
roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
|
| 745 |
+
out_channels=256,
|
| 746 |
+
featmap_strides=[4, 8, 16, 32]),
|
| 747 |
+
bbox_head=dict(
|
| 748 |
+
type='Shared2FCBBoxHead',
|
| 749 |
+
in_channels=256,
|
| 750 |
+
fc_out_channels=1024,
|
| 751 |
+
roi_feat_size=7,
|
| 752 |
+
num_classes=80,
|
| 753 |
+
bbox_coder=dict(
|
| 754 |
+
type='DeltaXYWHBBoxCoder',
|
| 755 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 756 |
+
target_stds=[0.1, 0.1, 0.2, 0.2]),
|
| 757 |
+
reg_class_agnostic=False,
|
| 758 |
+
loss_cls=dict(
|
| 759 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
|
| 760 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
|
| 761 |
+
train_cfg=dict(
|
| 762 |
+
rpn=dict(
|
| 763 |
+
assigner=dict(
|
| 764 |
+
type='MaxIoUAssigner',
|
| 765 |
+
pos_iou_thr=0.7,
|
| 766 |
+
neg_iou_thr=0.3,
|
| 767 |
+
min_pos_iou=0.3,
|
| 768 |
+
match_low_quality=True,
|
| 769 |
+
ignore_iof_thr=-1),
|
| 770 |
+
sampler=dict(
|
| 771 |
+
type='RandomSampler',
|
| 772 |
+
num=256,
|
| 773 |
+
pos_fraction=0.5,
|
| 774 |
+
neg_pos_ub=-1,
|
| 775 |
+
add_gt_as_proposals=False),
|
| 776 |
+
allowed_border=-1,
|
| 777 |
+
pos_weight=-1,
|
| 778 |
+
debug=False),
|
| 779 |
+
rpn_proposal=dict(
|
| 780 |
+
nms_pre=2000,
|
| 781 |
+
max_per_img=1000,
|
| 782 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 783 |
+
min_bbox_size=0),
|
| 784 |
+
rcnn=dict(
|
| 785 |
+
assigner=dict(
|
| 786 |
+
type='MaxIoUAssigner',
|
| 787 |
+
pos_iou_thr=0.5,
|
| 788 |
+
neg_iou_thr=0.5,
|
| 789 |
+
min_pos_iou=0.5,
|
| 790 |
+
match_low_quality=False,
|
| 791 |
+
ignore_iof_thr=-1),
|
| 792 |
+
sampler=dict(
|
| 793 |
+
type='RandomSampler',
|
| 794 |
+
num=512,
|
| 795 |
+
pos_fraction=0.25,
|
| 796 |
+
neg_pos_ub=-1,
|
| 797 |
+
add_gt_as_proposals=True),
|
| 798 |
+
pos_weight=-1,
|
| 799 |
+
debug=False)),
|
| 800 |
+
test_cfg=dict(
|
| 801 |
+
rpn=dict(
|
| 802 |
+
nms_pre=1000,
|
| 803 |
+
max_per_img=1000,
|
| 804 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 805 |
+
min_bbox_size=0),
|
| 806 |
+
rcnn=dict(
|
| 807 |
+
score_thr=0.05,
|
| 808 |
+
nms=dict(type='nms', iou_threshold=0.5),
|
| 809 |
+
max_per_img=100)))
|
| 810 |
+
work_dir = '/mnt/petrelfs/chenzeming/mixpl/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py'
|
| 811 |
+
train_cfg = dict(
|
| 812 |
+
type='IterBasedTrainLoop', max_iters=180000, val_interval=5000)
|
| 813 |
+
val_cfg = dict(type='TeacherStudentValLoop')
|
| 814 |
+
test_cfg = dict(type='TestLoop')
|
| 815 |
+
param_scheduler = [
|
| 816 |
+
dict(
|
| 817 |
+
type='LinearLR', start_factor=0.001, by_epoch=False, begin=0, end=500)
|
| 818 |
+
]
|
| 819 |
+
optim_wrapper = dict(
|
| 820 |
+
type='OptimWrapper',
|
| 821 |
+
optimizer=dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001),
|
| 822 |
+
clip_grad=dict(max_norm=20, norm_type=2))
|
| 823 |
+
custom_hooks = [dict(type='AnnealMeanTeacherHook', momentum=0.0002, gamma=4)]
|
| 824 |
+
launcher = 'slurm'
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/20230419_203137/vis_data/scalars.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/iter_180000.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a014249c67c6c8278de2e795e9ed33f5c3d6788b1b60131de97541d0b43cbc3
|
| 3 |
+
size 567531777
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/last_checkpoint
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/mnt/petrelfs/chenzeming/mixpl/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/iter_180000.pth
|
mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py
ADDED
|
@@ -0,0 +1,824 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model = dict(
|
| 2 |
+
type='MixPL',
|
| 3 |
+
detector=dict(
|
| 4 |
+
type='FasterRCNN',
|
| 5 |
+
data_preprocessor=dict(
|
| 6 |
+
type='DetDataPreprocessor',
|
| 7 |
+
mean=[103.53, 116.28, 123.675],
|
| 8 |
+
std=[1.0, 1.0, 1.0],
|
| 9 |
+
bgr_to_rgb=False,
|
| 10 |
+
pad_size_divisor=32),
|
| 11 |
+
backbone=dict(
|
| 12 |
+
type='ResNet',
|
| 13 |
+
depth=50,
|
| 14 |
+
num_stages=4,
|
| 15 |
+
out_indices=(0, 1, 2, 3),
|
| 16 |
+
frozen_stages=1,
|
| 17 |
+
norm_cfg=dict(type='BN', requires_grad=False),
|
| 18 |
+
norm_eval=True,
|
| 19 |
+
style='caffe',
|
| 20 |
+
init_cfg=dict(
|
| 21 |
+
type='Pretrained',
|
| 22 |
+
checkpoint='open-mmlab://detectron2/resnet50_caffe')),
|
| 23 |
+
neck=dict(
|
| 24 |
+
type='FPN',
|
| 25 |
+
in_channels=[256, 512, 1024, 2048],
|
| 26 |
+
out_channels=256,
|
| 27 |
+
num_outs=5),
|
| 28 |
+
rpn_head=dict(
|
| 29 |
+
type='RPNHead',
|
| 30 |
+
in_channels=256,
|
| 31 |
+
feat_channels=256,
|
| 32 |
+
anchor_generator=dict(
|
| 33 |
+
type='AnchorGenerator',
|
| 34 |
+
scales=[8],
|
| 35 |
+
ratios=[0.5, 1.0, 2.0],
|
| 36 |
+
strides=[4, 8, 16, 32, 64]),
|
| 37 |
+
bbox_coder=dict(
|
| 38 |
+
type='DeltaXYWHBBoxCoder',
|
| 39 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 40 |
+
target_stds=[1.0, 1.0, 1.0, 1.0]),
|
| 41 |
+
loss_cls=dict(
|
| 42 |
+
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
|
| 43 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
|
| 44 |
+
roi_head=dict(
|
| 45 |
+
type='StandardRoIHead',
|
| 46 |
+
bbox_roi_extractor=dict(
|
| 47 |
+
type='SingleRoIExtractor',
|
| 48 |
+
roi_layer=dict(
|
| 49 |
+
type='RoIAlign', output_size=7, sampling_ratio=0),
|
| 50 |
+
out_channels=256,
|
| 51 |
+
featmap_strides=[4, 8, 16, 32]),
|
| 52 |
+
bbox_head=dict(
|
| 53 |
+
type='Shared2FCBBoxHead',
|
| 54 |
+
in_channels=256,
|
| 55 |
+
fc_out_channels=1024,
|
| 56 |
+
roi_feat_size=7,
|
| 57 |
+
num_classes=80,
|
| 58 |
+
bbox_coder=dict(
|
| 59 |
+
type='DeltaXYWHBBoxCoder',
|
| 60 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 61 |
+
target_stds=[0.1, 0.1, 0.2, 0.2]),
|
| 62 |
+
reg_class_agnostic=False,
|
| 63 |
+
loss_cls=dict(
|
| 64 |
+
type='CrossEntropyLoss',
|
| 65 |
+
use_sigmoid=False,
|
| 66 |
+
loss_weight=1.0),
|
| 67 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
|
| 68 |
+
train_cfg=dict(
|
| 69 |
+
rpn=dict(
|
| 70 |
+
assigner=dict(
|
| 71 |
+
type='MaxIoUAssigner',
|
| 72 |
+
pos_iou_thr=0.7,
|
| 73 |
+
neg_iou_thr=0.3,
|
| 74 |
+
min_pos_iou=0.3,
|
| 75 |
+
match_low_quality=True,
|
| 76 |
+
ignore_iof_thr=-1),
|
| 77 |
+
sampler=dict(
|
| 78 |
+
type='RandomSampler',
|
| 79 |
+
num=256,
|
| 80 |
+
pos_fraction=0.5,
|
| 81 |
+
neg_pos_ub=-1,
|
| 82 |
+
add_gt_as_proposals=False),
|
| 83 |
+
allowed_border=-1,
|
| 84 |
+
pos_weight=-1,
|
| 85 |
+
debug=False),
|
| 86 |
+
rpn_proposal=dict(
|
| 87 |
+
nms_pre=2000,
|
| 88 |
+
max_per_img=1000,
|
| 89 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 90 |
+
min_bbox_size=0),
|
| 91 |
+
rcnn=dict(
|
| 92 |
+
assigner=dict(
|
| 93 |
+
type='MaxIoUAssigner',
|
| 94 |
+
pos_iou_thr=0.5,
|
| 95 |
+
neg_iou_thr=0.5,
|
| 96 |
+
min_pos_iou=0.5,
|
| 97 |
+
match_low_quality=False,
|
| 98 |
+
ignore_iof_thr=-1),
|
| 99 |
+
sampler=dict(
|
| 100 |
+
type='RandomSampler',
|
| 101 |
+
num=512,
|
| 102 |
+
pos_fraction=0.25,
|
| 103 |
+
neg_pos_ub=-1,
|
| 104 |
+
add_gt_as_proposals=True),
|
| 105 |
+
pos_weight=-1,
|
| 106 |
+
debug=False)),
|
| 107 |
+
test_cfg=dict(
|
| 108 |
+
rpn=dict(
|
| 109 |
+
nms_pre=1000,
|
| 110 |
+
max_per_img=1000,
|
| 111 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 112 |
+
min_bbox_size=0),
|
| 113 |
+
rcnn=dict(
|
| 114 |
+
score_thr=0.05,
|
| 115 |
+
nms=dict(type='nms', iou_threshold=0.5),
|
| 116 |
+
max_per_img=100))),
|
| 117 |
+
data_preprocessor=dict(
|
| 118 |
+
type='MultiBranchDataPreprocessor',
|
| 119 |
+
data_preprocessor=dict(
|
| 120 |
+
type='DetDataPreprocessor',
|
| 121 |
+
mean=[103.53, 116.28, 123.675],
|
| 122 |
+
std=[1.0, 1.0, 1.0],
|
| 123 |
+
bgr_to_rgb=False,
|
| 124 |
+
pad_size_divisor=32)),
|
| 125 |
+
semi_train_cfg=dict(
|
| 126 |
+
least_num=1,
|
| 127 |
+
cache_size=8,
|
| 128 |
+
mixup=True,
|
| 129 |
+
mosaic=True,
|
| 130 |
+
mosaic_shape=[(400, 400), (800, 800)],
|
| 131 |
+
mosaic_weight=0.5,
|
| 132 |
+
erase=True,
|
| 133 |
+
erase_patches=(1, 20),
|
| 134 |
+
erase_ratio=(0, 0.1),
|
| 135 |
+
erase_thr=0.7,
|
| 136 |
+
cls_pseudo_thr=0.7,
|
| 137 |
+
freeze_teacher=True,
|
| 138 |
+
sup_weight=1.0,
|
| 139 |
+
unsup_weight=2.0,
|
| 140 |
+
min_pseudo_bbox_wh=(0.01, 0.01)),
|
| 141 |
+
semi_test_cfg=dict(predict_on='teacher'))
|
| 142 |
+
default_scope = 'mmdet'
|
| 143 |
+
default_hooks = dict(
|
| 144 |
+
timer=dict(type='IterTimerHook'),
|
| 145 |
+
logger=dict(type='LoggerHook', interval=50),
|
| 146 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
| 147 |
+
checkpoint=dict(
|
| 148 |
+
type='CheckpointHook',
|
| 149 |
+
interval=10000,
|
| 150 |
+
by_epoch=False,
|
| 151 |
+
max_keep_ckpts=1),
|
| 152 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
| 153 |
+
visualization=dict(type='DetVisualizationHook'))
|
| 154 |
+
env_cfg = dict(
|
| 155 |
+
cudnn_benchmark=False,
|
| 156 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
| 157 |
+
dist_cfg=dict(backend='nccl'))
|
| 158 |
+
vis_backends = [dict(type='LocalVisBackend')]
|
| 159 |
+
visualizer = dict(
|
| 160 |
+
type='DetLocalVisualizer',
|
| 161 |
+
vis_backends=[dict(type='LocalVisBackend')],
|
| 162 |
+
name='visualizer')
|
| 163 |
+
log_processor = dict(type='LogProcessor', window_size=50, by_epoch=False)
|
| 164 |
+
log_level = 'INFO'
|
| 165 |
+
load_from = None
|
| 166 |
+
resume = True
|
| 167 |
+
dataset_type = 'CocoDataset'
|
| 168 |
+
data_root = 'data/coco/'
|
| 169 |
+
file_client_args = dict(backend='disk')
|
| 170 |
+
color_space = [[{
|
| 171 |
+
'type': 'ColorTransform'
|
| 172 |
+
}], [{
|
| 173 |
+
'type': 'AutoContrast'
|
| 174 |
+
}], [{
|
| 175 |
+
'type': 'Equalize'
|
| 176 |
+
}], [{
|
| 177 |
+
'type': 'Sharpness'
|
| 178 |
+
}], [{
|
| 179 |
+
'type': 'Posterize'
|
| 180 |
+
}], [{
|
| 181 |
+
'type': 'Solarize'
|
| 182 |
+
}], [{
|
| 183 |
+
'type': 'Color'
|
| 184 |
+
}], [{
|
| 185 |
+
'type': 'Contrast'
|
| 186 |
+
}], [{
|
| 187 |
+
'type': 'Brightness'
|
| 188 |
+
}]]
|
| 189 |
+
geometric = [[{
|
| 190 |
+
'type': 'Rotate'
|
| 191 |
+
}], [{
|
| 192 |
+
'type': 'ShearX'
|
| 193 |
+
}], [{
|
| 194 |
+
'type': 'ShearY'
|
| 195 |
+
}], [{
|
| 196 |
+
'type': 'TranslateX'
|
| 197 |
+
}], [{
|
| 198 |
+
'type': 'TranslateY'
|
| 199 |
+
}]]
|
| 200 |
+
scale = [(1333, 400), (1333, 1200)]
|
| 201 |
+
branch_field = ['sup', 'unsup_teacher', 'unsup_student']
|
| 202 |
+
sup_pipeline = [
|
| 203 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 204 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 205 |
+
dict(
|
| 206 |
+
type='RandomResize',
|
| 207 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 208 |
+
keep_ratio=True),
|
| 209 |
+
dict(type='RandomFlip', prob=0.5),
|
| 210 |
+
dict(
|
| 211 |
+
type='RandAugment',
|
| 212 |
+
aug_space=[[{
|
| 213 |
+
'type': 'ColorTransform'
|
| 214 |
+
}], [{
|
| 215 |
+
'type': 'AutoContrast'
|
| 216 |
+
}], [{
|
| 217 |
+
'type': 'Equalize'
|
| 218 |
+
}], [{
|
| 219 |
+
'type': 'Sharpness'
|
| 220 |
+
}], [{
|
| 221 |
+
'type': 'Posterize'
|
| 222 |
+
}], [{
|
| 223 |
+
'type': 'Solarize'
|
| 224 |
+
}], [{
|
| 225 |
+
'type': 'Color'
|
| 226 |
+
}], [{
|
| 227 |
+
'type': 'Contrast'
|
| 228 |
+
}], [{
|
| 229 |
+
'type': 'Brightness'
|
| 230 |
+
}]],
|
| 231 |
+
aug_num=1),
|
| 232 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 233 |
+
dict(
|
| 234 |
+
type='MultiBranch',
|
| 235 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 236 |
+
sup=dict(type='PackDetInputs'))
|
| 237 |
+
]
|
| 238 |
+
weak_pipeline = [
|
| 239 |
+
dict(
|
| 240 |
+
type='RandomResize',
|
| 241 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 242 |
+
keep_ratio=True),
|
| 243 |
+
dict(type='RandomFlip', prob=0.5),
|
| 244 |
+
dict(
|
| 245 |
+
type='PackDetInputs',
|
| 246 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 247 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 248 |
+
'homography_matrix'))
|
| 249 |
+
]
|
| 250 |
+
strong_pipeline = [
|
| 251 |
+
dict(
|
| 252 |
+
type='RandomResize',
|
| 253 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 254 |
+
keep_ratio=True),
|
| 255 |
+
dict(type='RandomFlip', prob=0.5),
|
| 256 |
+
dict(
|
| 257 |
+
type='RandomOrder',
|
| 258 |
+
transforms=[
|
| 259 |
+
dict(
|
| 260 |
+
type='RandAugment',
|
| 261 |
+
aug_space=[[{
|
| 262 |
+
'type': 'ColorTransform'
|
| 263 |
+
}], [{
|
| 264 |
+
'type': 'AutoContrast'
|
| 265 |
+
}], [{
|
| 266 |
+
'type': 'Equalize'
|
| 267 |
+
}], [{
|
| 268 |
+
'type': 'Sharpness'
|
| 269 |
+
}], [{
|
| 270 |
+
'type': 'Posterize'
|
| 271 |
+
}], [{
|
| 272 |
+
'type': 'Solarize'
|
| 273 |
+
}], [{
|
| 274 |
+
'type': 'Color'
|
| 275 |
+
}], [{
|
| 276 |
+
'type': 'Contrast'
|
| 277 |
+
}], [{
|
| 278 |
+
'type': 'Brightness'
|
| 279 |
+
}]],
|
| 280 |
+
aug_num=1),
|
| 281 |
+
dict(
|
| 282 |
+
type='RandAugment',
|
| 283 |
+
aug_space=[[{
|
| 284 |
+
'type': 'Rotate'
|
| 285 |
+
}], [{
|
| 286 |
+
'type': 'ShearX'
|
| 287 |
+
}], [{
|
| 288 |
+
'type': 'ShearY'
|
| 289 |
+
}], [{
|
| 290 |
+
'type': 'TranslateX'
|
| 291 |
+
}], [{
|
| 292 |
+
'type': 'TranslateY'
|
| 293 |
+
}]],
|
| 294 |
+
aug_num=1)
|
| 295 |
+
]),
|
| 296 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 297 |
+
dict(
|
| 298 |
+
type='PackDetInputs',
|
| 299 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 300 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 301 |
+
'homography_matrix'))
|
| 302 |
+
]
|
| 303 |
+
unsup_pipeline = [
|
| 304 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 305 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 306 |
+
dict(
|
| 307 |
+
type='MultiBranch',
|
| 308 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 309 |
+
unsup_teacher=[
|
| 310 |
+
dict(
|
| 311 |
+
type='RandomResize',
|
| 312 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 313 |
+
keep_ratio=True),
|
| 314 |
+
dict(type='RandomFlip', prob=0.5),
|
| 315 |
+
dict(
|
| 316 |
+
type='PackDetInputs',
|
| 317 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 318 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 319 |
+
'homography_matrix'))
|
| 320 |
+
],
|
| 321 |
+
unsup_student=[
|
| 322 |
+
dict(
|
| 323 |
+
type='RandomResize',
|
| 324 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 325 |
+
keep_ratio=True),
|
| 326 |
+
dict(type='RandomFlip', prob=0.5),
|
| 327 |
+
dict(
|
| 328 |
+
type='RandomOrder',
|
| 329 |
+
transforms=[
|
| 330 |
+
dict(
|
| 331 |
+
type='RandAugment',
|
| 332 |
+
aug_space=[[{
|
| 333 |
+
'type': 'ColorTransform'
|
| 334 |
+
}], [{
|
| 335 |
+
'type': 'AutoContrast'
|
| 336 |
+
}], [{
|
| 337 |
+
'type': 'Equalize'
|
| 338 |
+
}], [{
|
| 339 |
+
'type': 'Sharpness'
|
| 340 |
+
}], [{
|
| 341 |
+
'type': 'Posterize'
|
| 342 |
+
}], [{
|
| 343 |
+
'type': 'Solarize'
|
| 344 |
+
}], [{
|
| 345 |
+
'type': 'Color'
|
| 346 |
+
}], [{
|
| 347 |
+
'type': 'Contrast'
|
| 348 |
+
}], [{
|
| 349 |
+
'type': 'Brightness'
|
| 350 |
+
}]],
|
| 351 |
+
aug_num=1),
|
| 352 |
+
dict(
|
| 353 |
+
type='RandAugment',
|
| 354 |
+
aug_space=[[{
|
| 355 |
+
'type': 'Rotate'
|
| 356 |
+
}], [{
|
| 357 |
+
'type': 'ShearX'
|
| 358 |
+
}], [{
|
| 359 |
+
'type': 'ShearY'
|
| 360 |
+
}], [{
|
| 361 |
+
'type': 'TranslateX'
|
| 362 |
+
}], [{
|
| 363 |
+
'type': 'TranslateY'
|
| 364 |
+
}]],
|
| 365 |
+
aug_num=1)
|
| 366 |
+
]),
|
| 367 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 368 |
+
dict(
|
| 369 |
+
type='PackDetInputs',
|
| 370 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 371 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 372 |
+
'homography_matrix'))
|
| 373 |
+
])
|
| 374 |
+
]
|
| 375 |
+
test_pipeline = [
|
| 376 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 377 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 378 |
+
dict(
|
| 379 |
+
type='PackDetInputs',
|
| 380 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 381 |
+
'scale_factor'))
|
| 382 |
+
]
|
| 383 |
+
batch_size = 8
|
| 384 |
+
num_workers = 8
|
| 385 |
+
labeled_dataset = dict(
|
| 386 |
+
type='CocoDataset',
|
| 387 |
+
data_root='data/',
|
| 388 |
+
ann_file='coco_semi_anns/instances_train2017.1@10.json',
|
| 389 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 390 |
+
filter_cfg=dict(filter_empty_gt=True, min_size=32),
|
| 391 |
+
pipeline=[
|
| 392 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 393 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 394 |
+
dict(
|
| 395 |
+
type='RandomResize',
|
| 396 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 397 |
+
keep_ratio=True),
|
| 398 |
+
dict(type='RandomFlip', prob=0.5),
|
| 399 |
+
dict(
|
| 400 |
+
type='RandAugment',
|
| 401 |
+
aug_space=[[{
|
| 402 |
+
'type': 'ColorTransform'
|
| 403 |
+
}], [{
|
| 404 |
+
'type': 'AutoContrast'
|
| 405 |
+
}], [{
|
| 406 |
+
'type': 'Equalize'
|
| 407 |
+
}], [{
|
| 408 |
+
'type': 'Sharpness'
|
| 409 |
+
}], [{
|
| 410 |
+
'type': 'Posterize'
|
| 411 |
+
}], [{
|
| 412 |
+
'type': 'Solarize'
|
| 413 |
+
}], [{
|
| 414 |
+
'type': 'Color'
|
| 415 |
+
}], [{
|
| 416 |
+
'type': 'Contrast'
|
| 417 |
+
}], [{
|
| 418 |
+
'type': 'Brightness'
|
| 419 |
+
}]],
|
| 420 |
+
aug_num=1),
|
| 421 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 422 |
+
dict(
|
| 423 |
+
type='MultiBranch',
|
| 424 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 425 |
+
sup=dict(type='PackDetInputs'))
|
| 426 |
+
])
|
| 427 |
+
unlabeled_dataset = dict(
|
| 428 |
+
type='CocoDataset',
|
| 429 |
+
data_root='data/',
|
| 430 |
+
ann_file='coco_semi_anns/instances_train2017.1@10-unlabeled.json',
|
| 431 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 432 |
+
filter_cfg=dict(filter_empty_gt=False),
|
| 433 |
+
pipeline=[
|
| 434 |
+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
|
| 435 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 436 |
+
dict(
|
| 437 |
+
type='MultiBranch',
|
| 438 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 439 |
+
unsup_teacher=[
|
| 440 |
+
dict(
|
| 441 |
+
type='RandomResize',
|
| 442 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 443 |
+
keep_ratio=True),
|
| 444 |
+
dict(type='RandomFlip', prob=0.5),
|
| 445 |
+
dict(
|
| 446 |
+
type='PackDetInputs',
|
| 447 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 448 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 449 |
+
'homography_matrix'))
|
| 450 |
+
],
|
| 451 |
+
unsup_student=[
|
| 452 |
+
dict(
|
| 453 |
+
type='RandomResize',
|
| 454 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 455 |
+
keep_ratio=True),
|
| 456 |
+
dict(type='RandomFlip', prob=0.5),
|
| 457 |
+
dict(
|
| 458 |
+
type='RandomOrder',
|
| 459 |
+
transforms=[
|
| 460 |
+
dict(
|
| 461 |
+
type='RandAugment',
|
| 462 |
+
aug_space=[[{
|
| 463 |
+
'type': 'ColorTransform'
|
| 464 |
+
}], [{
|
| 465 |
+
'type': 'AutoContrast'
|
| 466 |
+
}], [{
|
| 467 |
+
'type': 'Equalize'
|
| 468 |
+
}], [{
|
| 469 |
+
'type': 'Sharpness'
|
| 470 |
+
}], [{
|
| 471 |
+
'type': 'Posterize'
|
| 472 |
+
}], [{
|
| 473 |
+
'type': 'Solarize'
|
| 474 |
+
}], [{
|
| 475 |
+
'type': 'Color'
|
| 476 |
+
}], [{
|
| 477 |
+
'type': 'Contrast'
|
| 478 |
+
}], [{
|
| 479 |
+
'type': 'Brightness'
|
| 480 |
+
}]],
|
| 481 |
+
aug_num=1),
|
| 482 |
+
dict(
|
| 483 |
+
type='RandAugment',
|
| 484 |
+
aug_space=[[{
|
| 485 |
+
'type': 'Rotate'
|
| 486 |
+
}], [{
|
| 487 |
+
'type': 'ShearX'
|
| 488 |
+
}], [{
|
| 489 |
+
'type': 'ShearY'
|
| 490 |
+
}], [{
|
| 491 |
+
'type': 'TranslateX'
|
| 492 |
+
}], [{
|
| 493 |
+
'type': 'TranslateY'
|
| 494 |
+
}]],
|
| 495 |
+
aug_num=1)
|
| 496 |
+
]),
|
| 497 |
+
dict(type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 498 |
+
dict(
|
| 499 |
+
type='PackDetInputs',
|
| 500 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 501 |
+
'scale_factor', 'flip', 'flip_direction',
|
| 502 |
+
'homography_matrix'))
|
| 503 |
+
])
|
| 504 |
+
])
|
| 505 |
+
train_dataloader = dict(
|
| 506 |
+
batch_size=5,
|
| 507 |
+
num_workers=5,
|
| 508 |
+
persistent_workers=True,
|
| 509 |
+
sampler=dict(
|
| 510 |
+
type='GroupMultiSourceSampler', batch_size=5, source_ratio=[1, 4]),
|
| 511 |
+
dataset=dict(
|
| 512 |
+
type='ConcatDataset',
|
| 513 |
+
datasets=[
|
| 514 |
+
dict(
|
| 515 |
+
type='CocoDataset',
|
| 516 |
+
data_root='data/',
|
| 517 |
+
ann_file='coco_semi_anns/instances_train2017.1@10.json',
|
| 518 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 519 |
+
filter_cfg=dict(filter_empty_gt=True, min_size=32),
|
| 520 |
+
pipeline=[
|
| 521 |
+
dict(
|
| 522 |
+
type='LoadImageFromFile',
|
| 523 |
+
file_client_args=dict(backend='disk')),
|
| 524 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 525 |
+
dict(
|
| 526 |
+
type='RandomResize',
|
| 527 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 528 |
+
keep_ratio=True),
|
| 529 |
+
dict(type='RandomFlip', prob=0.5),
|
| 530 |
+
dict(
|
| 531 |
+
type='RandAugment',
|
| 532 |
+
aug_space=[[{
|
| 533 |
+
'type': 'ColorTransform'
|
| 534 |
+
}], [{
|
| 535 |
+
'type': 'AutoContrast'
|
| 536 |
+
}], [{
|
| 537 |
+
'type': 'Equalize'
|
| 538 |
+
}], [{
|
| 539 |
+
'type': 'Sharpness'
|
| 540 |
+
}], [{
|
| 541 |
+
'type': 'Posterize'
|
| 542 |
+
}], [{
|
| 543 |
+
'type': 'Solarize'
|
| 544 |
+
}], [{
|
| 545 |
+
'type': 'Color'
|
| 546 |
+
}], [{
|
| 547 |
+
'type': 'Contrast'
|
| 548 |
+
}], [{
|
| 549 |
+
'type': 'Brightness'
|
| 550 |
+
}]],
|
| 551 |
+
aug_num=1),
|
| 552 |
+
dict(
|
| 553 |
+
type='FilterAnnotations', min_gt_bbox_wh=(0.01, 0.01)),
|
| 554 |
+
dict(
|
| 555 |
+
type='MultiBranch',
|
| 556 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 557 |
+
sup=dict(type='PackDetInputs'))
|
| 558 |
+
]),
|
| 559 |
+
dict(
|
| 560 |
+
type='CocoDataset',
|
| 561 |
+
data_root='data/',
|
| 562 |
+
ann_file=
|
| 563 |
+
'coco_semi_anns/instances_train2017.1@10-unlabeled.json',
|
| 564 |
+
data_prefix=dict(img='coco/train2017/'),
|
| 565 |
+
filter_cfg=dict(filter_empty_gt=False),
|
| 566 |
+
pipeline=[
|
| 567 |
+
dict(
|
| 568 |
+
type='LoadImageFromFile',
|
| 569 |
+
file_client_args=dict(backend='disk')),
|
| 570 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 571 |
+
dict(
|
| 572 |
+
type='MultiBranch',
|
| 573 |
+
branch_field=['sup', 'unsup_teacher', 'unsup_student'],
|
| 574 |
+
unsup_teacher=[
|
| 575 |
+
dict(
|
| 576 |
+
type='RandomResize',
|
| 577 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 578 |
+
keep_ratio=True),
|
| 579 |
+
dict(type='RandomFlip', prob=0.5),
|
| 580 |
+
dict(
|
| 581 |
+
type='PackDetInputs',
|
| 582 |
+
meta_keys=('img_id', 'img_path', 'ori_shape',
|
| 583 |
+
'img_shape', 'scale_factor', 'flip',
|
| 584 |
+
'flip_direction',
|
| 585 |
+
'homography_matrix'))
|
| 586 |
+
],
|
| 587 |
+
unsup_student=[
|
| 588 |
+
dict(
|
| 589 |
+
type='RandomResize',
|
| 590 |
+
scale=[(1333, 400), (1333, 1200)],
|
| 591 |
+
keep_ratio=True),
|
| 592 |
+
dict(type='RandomFlip', prob=0.5),
|
| 593 |
+
dict(
|
| 594 |
+
type='RandomOrder',
|
| 595 |
+
transforms=[
|
| 596 |
+
dict(
|
| 597 |
+
type='RandAugment',
|
| 598 |
+
aug_space=[[{
|
| 599 |
+
'type': 'ColorTransform'
|
| 600 |
+
}], [{
|
| 601 |
+
'type': 'AutoContrast'
|
| 602 |
+
}], [{
|
| 603 |
+
'type': 'Equalize'
|
| 604 |
+
}], [{
|
| 605 |
+
'type': 'Sharpness'
|
| 606 |
+
}], [{
|
| 607 |
+
'type': 'Posterize'
|
| 608 |
+
}], [{
|
| 609 |
+
'type': 'Solarize'
|
| 610 |
+
}], [{
|
| 611 |
+
'type': 'Color'
|
| 612 |
+
}], [{
|
| 613 |
+
'type': 'Contrast'
|
| 614 |
+
}], [{
|
| 615 |
+
'type': 'Brightness'
|
| 616 |
+
}]],
|
| 617 |
+
aug_num=1),
|
| 618 |
+
dict(
|
| 619 |
+
type='RandAugment',
|
| 620 |
+
aug_space=[[{
|
| 621 |
+
'type': 'Rotate'
|
| 622 |
+
}], [{
|
| 623 |
+
'type': 'ShearX'
|
| 624 |
+
}], [{
|
| 625 |
+
'type': 'ShearY'
|
| 626 |
+
}], [{
|
| 627 |
+
'type': 'TranslateX'
|
| 628 |
+
}], [{
|
| 629 |
+
'type': 'TranslateY'
|
| 630 |
+
}]],
|
| 631 |
+
aug_num=1)
|
| 632 |
+
]),
|
| 633 |
+
dict(
|
| 634 |
+
type='FilterAnnotations',
|
| 635 |
+
min_gt_bbox_wh=(0.01, 0.01)),
|
| 636 |
+
dict(
|
| 637 |
+
type='PackDetInputs',
|
| 638 |
+
meta_keys=('img_id', 'img_path', 'ori_shape',
|
| 639 |
+
'img_shape', 'scale_factor', 'flip',
|
| 640 |
+
'flip_direction',
|
| 641 |
+
'homography_matrix'))
|
| 642 |
+
])
|
| 643 |
+
])
|
| 644 |
+
]))
|
| 645 |
+
val_dataloader = dict(
|
| 646 |
+
batch_size=1,
|
| 647 |
+
num_workers=2,
|
| 648 |
+
persistent_workers=True,
|
| 649 |
+
drop_last=False,
|
| 650 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 651 |
+
dataset=dict(
|
| 652 |
+
type='CocoDataset',
|
| 653 |
+
data_root='data/coco/',
|
| 654 |
+
ann_file='annotations/instances_val2017.json',
|
| 655 |
+
data_prefix=dict(img='val2017/'),
|
| 656 |
+
test_mode=True,
|
| 657 |
+
pipeline=[
|
| 658 |
+
dict(
|
| 659 |
+
type='LoadImageFromFile',
|
| 660 |
+
file_client_args=dict(backend='disk')),
|
| 661 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 662 |
+
dict(
|
| 663 |
+
type='PackDetInputs',
|
| 664 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 665 |
+
'scale_factor'))
|
| 666 |
+
]))
|
| 667 |
+
test_dataloader = dict(
|
| 668 |
+
batch_size=1,
|
| 669 |
+
num_workers=2,
|
| 670 |
+
persistent_workers=True,
|
| 671 |
+
drop_last=False,
|
| 672 |
+
sampler=dict(type='DefaultSampler', shuffle=False),
|
| 673 |
+
dataset=dict(
|
| 674 |
+
type='CocoDataset',
|
| 675 |
+
data_root='data/coco/',
|
| 676 |
+
ann_file='annotations/instances_val2017.json',
|
| 677 |
+
data_prefix=dict(img='val2017/'),
|
| 678 |
+
test_mode=True,
|
| 679 |
+
pipeline=[
|
| 680 |
+
dict(
|
| 681 |
+
type='LoadImageFromFile',
|
| 682 |
+
file_client_args=dict(backend='disk')),
|
| 683 |
+
dict(type='Resize', scale=(1333, 800), keep_ratio=True),
|
| 684 |
+
dict(
|
| 685 |
+
type='PackDetInputs',
|
| 686 |
+
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
|
| 687 |
+
'scale_factor'))
|
| 688 |
+
]))
|
| 689 |
+
val_evaluator = dict(
|
| 690 |
+
type='CocoMetric',
|
| 691 |
+
ann_file='data/coco/annotations/instances_val2017.json',
|
| 692 |
+
metric='bbox',
|
| 693 |
+
format_only=False)
|
| 694 |
+
test_evaluator = dict(
|
| 695 |
+
type='CocoMetric',
|
| 696 |
+
ann_file='data/coco/annotations/instances_val2017.json',
|
| 697 |
+
metric='bbox',
|
| 698 |
+
format_only=False)
|
| 699 |
+
detector = dict(
|
| 700 |
+
type='FasterRCNN',
|
| 701 |
+
data_preprocessor=dict(
|
| 702 |
+
type='DetDataPreprocessor',
|
| 703 |
+
mean=[103.53, 116.28, 123.675],
|
| 704 |
+
std=[1.0, 1.0, 1.0],
|
| 705 |
+
bgr_to_rgb=False,
|
| 706 |
+
pad_size_divisor=32),
|
| 707 |
+
backbone=dict(
|
| 708 |
+
type='ResNet',
|
| 709 |
+
depth=50,
|
| 710 |
+
num_stages=4,
|
| 711 |
+
out_indices=(0, 1, 2, 3),
|
| 712 |
+
frozen_stages=1,
|
| 713 |
+
norm_cfg=dict(type='BN', requires_grad=False),
|
| 714 |
+
norm_eval=True,
|
| 715 |
+
style='caffe',
|
| 716 |
+
init_cfg=dict(
|
| 717 |
+
type='Pretrained',
|
| 718 |
+
checkpoint='open-mmlab://detectron2/resnet50_caffe')),
|
| 719 |
+
neck=dict(
|
| 720 |
+
type='FPN',
|
| 721 |
+
in_channels=[256, 512, 1024, 2048],
|
| 722 |
+
out_channels=256,
|
| 723 |
+
num_outs=5),
|
| 724 |
+
rpn_head=dict(
|
| 725 |
+
type='RPNHead',
|
| 726 |
+
in_channels=256,
|
| 727 |
+
feat_channels=256,
|
| 728 |
+
anchor_generator=dict(
|
| 729 |
+
type='AnchorGenerator',
|
| 730 |
+
scales=[8],
|
| 731 |
+
ratios=[0.5, 1.0, 2.0],
|
| 732 |
+
strides=[4, 8, 16, 32, 64]),
|
| 733 |
+
bbox_coder=dict(
|
| 734 |
+
type='DeltaXYWHBBoxCoder',
|
| 735 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 736 |
+
target_stds=[1.0, 1.0, 1.0, 1.0]),
|
| 737 |
+
loss_cls=dict(
|
| 738 |
+
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
|
| 739 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
|
| 740 |
+
roi_head=dict(
|
| 741 |
+
type='StandardRoIHead',
|
| 742 |
+
bbox_roi_extractor=dict(
|
| 743 |
+
type='SingleRoIExtractor',
|
| 744 |
+
roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
|
| 745 |
+
out_channels=256,
|
| 746 |
+
featmap_strides=[4, 8, 16, 32]),
|
| 747 |
+
bbox_head=dict(
|
| 748 |
+
type='Shared2FCBBoxHead',
|
| 749 |
+
in_channels=256,
|
| 750 |
+
fc_out_channels=1024,
|
| 751 |
+
roi_feat_size=7,
|
| 752 |
+
num_classes=80,
|
| 753 |
+
bbox_coder=dict(
|
| 754 |
+
type='DeltaXYWHBBoxCoder',
|
| 755 |
+
target_means=[0.0, 0.0, 0.0, 0.0],
|
| 756 |
+
target_stds=[0.1, 0.1, 0.2, 0.2]),
|
| 757 |
+
reg_class_agnostic=False,
|
| 758 |
+
loss_cls=dict(
|
| 759 |
+
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
|
| 760 |
+
loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
|
| 761 |
+
train_cfg=dict(
|
| 762 |
+
rpn=dict(
|
| 763 |
+
assigner=dict(
|
| 764 |
+
type='MaxIoUAssigner',
|
| 765 |
+
pos_iou_thr=0.7,
|
| 766 |
+
neg_iou_thr=0.3,
|
| 767 |
+
min_pos_iou=0.3,
|
| 768 |
+
match_low_quality=True,
|
| 769 |
+
ignore_iof_thr=-1),
|
| 770 |
+
sampler=dict(
|
| 771 |
+
type='RandomSampler',
|
| 772 |
+
num=256,
|
| 773 |
+
pos_fraction=0.5,
|
| 774 |
+
neg_pos_ub=-1,
|
| 775 |
+
add_gt_as_proposals=False),
|
| 776 |
+
allowed_border=-1,
|
| 777 |
+
pos_weight=-1,
|
| 778 |
+
debug=False),
|
| 779 |
+
rpn_proposal=dict(
|
| 780 |
+
nms_pre=2000,
|
| 781 |
+
max_per_img=1000,
|
| 782 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 783 |
+
min_bbox_size=0),
|
| 784 |
+
rcnn=dict(
|
| 785 |
+
assigner=dict(
|
| 786 |
+
type='MaxIoUAssigner',
|
| 787 |
+
pos_iou_thr=0.5,
|
| 788 |
+
neg_iou_thr=0.5,
|
| 789 |
+
min_pos_iou=0.5,
|
| 790 |
+
match_low_quality=False,
|
| 791 |
+
ignore_iof_thr=-1),
|
| 792 |
+
sampler=dict(
|
| 793 |
+
type='RandomSampler',
|
| 794 |
+
num=512,
|
| 795 |
+
pos_fraction=0.25,
|
| 796 |
+
neg_pos_ub=-1,
|
| 797 |
+
add_gt_as_proposals=True),
|
| 798 |
+
pos_weight=-1,
|
| 799 |
+
debug=False)),
|
| 800 |
+
test_cfg=dict(
|
| 801 |
+
rpn=dict(
|
| 802 |
+
nms_pre=1000,
|
| 803 |
+
max_per_img=1000,
|
| 804 |
+
nms=dict(type='nms', iou_threshold=0.7),
|
| 805 |
+
min_bbox_size=0),
|
| 806 |
+
rcnn=dict(
|
| 807 |
+
score_thr=0.05,
|
| 808 |
+
nms=dict(type='nms', iou_threshold=0.5),
|
| 809 |
+
max_per_img=100)))
|
| 810 |
+
work_dir = '/mnt/petrelfs/chenzeming/mixpl/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py'
|
| 811 |
+
train_cfg = dict(
|
| 812 |
+
type='IterBasedTrainLoop', max_iters=180000, val_interval=5000)
|
| 813 |
+
val_cfg = dict(type='TeacherStudentValLoop')
|
| 814 |
+
test_cfg = dict(type='TestLoop')
|
| 815 |
+
param_scheduler = [
|
| 816 |
+
dict(
|
| 817 |
+
type='LinearLR', start_factor=0.001, by_epoch=False, begin=0, end=500)
|
| 818 |
+
]
|
| 819 |
+
optim_wrapper = dict(
|
| 820 |
+
type='OptimWrapper',
|
| 821 |
+
optimizer=dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001),
|
| 822 |
+
clip_grad=dict(max_norm=20, norm_type=2))
|
| 823 |
+
custom_hooks = [dict(type='AnnealMeanTeacherHook', momentum=0.0002, gamma=4)]
|
| 824 |
+
launcher = 'slurm'
|