mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
parent
054dc66145
commit
d06a84d54d
@ -369,7 +369,7 @@
|
||||
"id": "HchvmGYB_rrO"
|
||||
},
|
||||
"source": [
|
||||
"After downloading the data, we need to implement `load_annotations` function in the new dataset class `StandfordBackgroundDataset`."
|
||||
"After downloading the data, we need to implement `load_annotations` function in the new dataset class `StanfordBackgroundDataset`."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -384,7 +384,7 @@
|
||||
"from mmseg.datasets.custom import CustomDataset\n",
|
||||
"\n",
|
||||
"@DATASETS.register_module()\n",
|
||||
"class StandfordBackgroundDataset(CustomDataset):\n",
|
||||
"class StanfordBackgroundDataset(CustomDataset):\n",
|
||||
" CLASSES = classes\n",
|
||||
" PALETTE = palette\n",
|
||||
" def __init__(self, split, **kwargs):\n",
|
||||
@ -440,7 +440,7 @@
|
||||
"source": [
|
||||
"from mmseg.apis import set_random_seed\n",
|
||||
"\n",
|
||||
"# Since we use ony one GPU, BN is used instead of SyncBN\n",
|
||||
"# Since we use only one GPU, BN is used instead of SyncBN\n",
|
||||
"cfg.norm_cfg = dict(type='BN', requires_grad=True)\n",
|
||||
"cfg.model.backbone.norm_cfg = cfg.norm_cfg\n",
|
||||
"cfg.model.decode_head.norm_cfg = cfg.norm_cfg\n",
|
||||
@ -450,7 +450,7 @@
|
||||
"cfg.model.auxiliary_head.num_classes = 8\n",
|
||||
"\n",
|
||||
"# Modify dataset type and path\n",
|
||||
"cfg.dataset_type = 'StandfordBackgroundDataset'\n",
|
||||
"cfg.dataset_type = 'StanfordBackgroundDataset'\n",
|
||||
"cfg.data_root = data_root\n",
|
||||
"\n",
|
||||
"cfg.data.samples_per_gpu = 8\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user