mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
* 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>
26 lines
848 B
Python
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)
|