|
369 | 369 | "id": "HchvmGYB_rrO" |
370 | 370 | }, |
371 | 371 | "source": [ |
372 | | - "After downloading the data, we need to implement `load_annotations` function in the new dataset class `StandfordBackgroundDataset`." |
| 372 | + "After downloading the data, we need to implement `load_annotations` function in the new dataset class `StanfordBackgroundDataset`." |
373 | 373 | ] |
374 | 374 | }, |
375 | 375 | { |
|
384 | 384 | "from mmseg.datasets.custom import CustomDataset\n", |
385 | 385 | "\n", |
386 | 386 | "@DATASETS.register_module()\n", |
387 | | - "class StandfordBackgroundDataset(CustomDataset):\n", |
| 387 | + "class StanfordBackgroundDataset(CustomDataset):\n", |
388 | 388 | " CLASSES = classes\n", |
389 | 389 | " PALETTE = palette\n", |
390 | 390 | " def __init__(self, split, **kwargs):\n", |
|
440 | 440 | "source": [ |
441 | 441 | "from mmseg.apis import set_random_seed\n", |
442 | 442 | "\n", |
443 | | - "# Since we use ony one GPU, BN is used instead of SyncBN\n", |
| 443 | + "# Since we use only one GPU, BN is used instead of SyncBN\n", |
444 | 444 | "cfg.norm_cfg = dict(type='BN', requires_grad=True)\n", |
445 | 445 | "cfg.model.backbone.norm_cfg = cfg.norm_cfg\n", |
446 | 446 | "cfg.model.decode_head.norm_cfg = cfg.norm_cfg\n", |
|
450 | 450 | "cfg.model.auxiliary_head.num_classes = 8\n", |
451 | 451 | "\n", |
452 | 452 | "# Modify dataset type and path\n", |
453 | | - "cfg.dataset_type = 'StandfordBackgroundDataset'\n", |
| 453 | + "cfg.dataset_type = 'StanfordBackgroundDataset'\n", |
454 | 454 | "cfg.data_root = data_root\n", |
455 | 455 | "\n", |
456 | 456 | "cfg.data.samples_per_gpu = 8\n", |
|
0 commit comments