-
Notifications
You must be signed in to change notification settings - Fork 0
/
mask2former_swin-l-p4-w12-384-in21k_16xb1-lsj-100e_coco-panoptic.py
42 lines (36 loc) · 1.75 KB
/
mask2former_swin-l-p4-w12-384-in21k_16xb1-lsj-100e_coco-panoptic.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
_base_ = ['./mask2former_swin-b-p4-w12-384_8xb2-lsj-50e_coco-panoptic.py']
pretrained = 'https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_large_patch4_window12_384_22k.pth' # noqa
model = dict(
backbone=dict(
embed_dims=192,
num_heads=[6, 12, 24, 48],
init_cfg=dict(type='Pretrained', checkpoint=pretrained)),
panoptic_head=dict(num_queries=200, in_channels=[192, 384, 768, 1536]))
train_dataloader = dict(batch_size=1, num_workers=1)
# learning policy
max_iters = 14080
param_scheduler = dict(end=max_iters, milestones=[11968, 13376])
# Before 735001th iteration, we do evaluation every 5000 iterations.
# After 735000th iteration, we do evaluation every 737500 iterations,
# which means that we do evaluation at the end of training.'
interval = 500
dynamic_intervals = [(max_iters // interval * interval + 1, max_iters)]
train_cfg = dict(
max_iters=max_iters,
val_interval=interval,
dynamic_intervals=dynamic_intervals)
default_hooks = dict(
checkpoint=dict(
type='CheckpointHook',
by_epoch=False,
save_last=True,
max_keep_ckpts=20,
interval=interval))
log_processor = dict(type='LogProcessor', window_size=50, by_epoch=False)
# Default setting for scaling LR automatically
# - `enable` means enable scaling LR automatically
# or not by default.
# - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
auto_scale_lr = dict(enable=False, base_batch_size=2)
work_dir = '/data/PhenoBench/work_dir/mask2former_r50_coco_pre_plant'
load_from = 'https://download.openmmlab.com/mmdetection/v3.0/mask2former/mask2former_swin-l-p4-w12-384-in21k_16xb1-lsj-100e_coco-panoptic/mask2former_swin-l-p4-w12-384-in21k_16xb1-lsj-100e_coco-panoptic_20220407_104949-82f8d28d.pth'