Kingdrone 634fbceab0 [Feature] Support ISPRS Potsdam Dataset. (#1097)
* add isprs potsdam dataset

* add isprs dataset configs

* fix lint error

* fix potsdam conversion bug

* fix error in potsdam class

* fix error in potsdam class

* add vaihingen dataset

* add vaihingen dataset

* add vaihingen dataset

* fix some description errors.

* fix some description errors.

* fix some description errors.

* upload models & logs of Potsdam

* remove vaihingen and add unit test

* add chinese readme

* add pseudodataset

* use mmcv and add class_names

* use f-string

* add new dataset unittest

* add docstring and remove global variables args

* fix metafile error in PSPNet

* fix pretrained value

* Add dataset info

* fix typo

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-01-18 14:15:15 +08:00

26 lines
848 B
Python

# Copyright (c) OpenMMLab. All rights reserved.
from .builder import DATASETS
from .custom import CustomDataset
@DATASETS.register_module()
class PotsdamDataset(CustomDataset):
"""ISPRS Potsdam dataset.
In segmentation map annotation for Potsdam dataset, 0 is the ignore index.
``reduce_zero_label`` should be set to True. The ``img_suffix`` and
``seg_map_suffix`` are both fixed to '.png'.
"""
CLASSES = ('impervious_surface', 'building', 'low_vegetation', 'tree',
'car', 'clutter')
PALETTE = [[255, 255, 255], [0, 0, 255], [0, 255, 255], [0, 255, 0],
[255, 255, 0], [255, 0, 0]]
def __init__(self, **kwargs):
super(PotsdamDataset, self).__init__(
img_suffix='.png',
seg_map_suffix='.png',
reduce_zero_label=True,
**kwargs)