_base_ = [
    '../_base_/models/stdc.py',
    '../_base_/datasets/publicdataset_cholecseg8k.py',
    '../_base_/default_runtime.py',
    '../_base_/schedules/schedule_300e_val1_check10.py',
]

norm_cfg = dict(
    type='BN',
)

crop_size = (512, 512)

data_preprocessor = dict(
    size=(512, 512),
    mean=[
        85.65740418979115,
        53.99282220050495,
        46.074045888534535,
    ],
    std=[
        72.24589167201978,
        56.76979155397199,
        49.056637115061775,
    ],
    bgr_to_rgb=False,
)

model = dict(
    data_preprocessor=dict(
        size=(512, 512),
        mean=[
            85.65740418979115,
            53.99282220050495,
            46.074045888534535,
        ],
        std=[
            72.24589167201978,
            56.76979155397199,
            49.056637115061775,
        ],
        bgr_to_rgb=False,
    ),
    backbone=dict(
        backbone_cfg=dict(
            stdc_type='STDCNet2',
        ),
        init_cfg=dict(
            type='Pretrained',
            checkpoint='./My_Local_Model/open_mmlab/stdc2.pth',
        ),
    ),
    decode_head=dict(
        num_classes=13,
        loss_decode=dict(
            type='DiceLoss',
            use_sigmoid=False,
            loss_weight=1.0,
        ),
    ),
)

optim_wrapper = dict(
    type='OptimWrapper',
    _delete_=True,
    optimizer=dict(
        type='AdamW',
        lr=0.0001,
        weight_decay=0.0005,
    ),
    clip_grad=dict(
        max_norm=1,
        norm_type=2,
    ),
)

param_scheduler = [
    dict(
        type='LinearLR',
        start_factor=1e-06,
        by_epoch=True,
        begin=0,
        end=10,
    ),
    dict(
        type='PolyLR',
        power=0.9,
        begin=10,
        end=300,
        eta_min=1e-05,
        by_epoch=True,
    ),
]

