mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
revised lint errors in loveda.py
This commit is contained in:
parent
bcd670cf68
commit
b2744ca4ac
@ -10,12 +10,13 @@ class LoveDADataset(CustomDataset):
|
||||
``reduce_zero_label`` should be set to True.
|
||||
The ``img_suffix`` and ``seg_map_suffix`` are both fixed to '.png'.
|
||||
"""
|
||||
CLASSES = ('background', 'building', 'road', 'water', 'barren', 'forest', 'agricultural')
|
||||
CLASSES = ('background', 'building', 'road',
|
||||
'water', 'barren', 'forest', 'agricultural')
|
||||
|
||||
PALETTE = [[255, 255, 255], [255, 0, 0], [255, 255, 0], [0, 0, 255],
|
||||
[159, 129, 183], [0, 255, 0], [255, 195, 128]]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(LoveDADataset, self).__init__(
|
||||
img_suffix='.png', seg_map_suffix='.png', reduce_zero_label=True, **kwargs)
|
||||
|
||||
img_suffix='.png', seg_map_suffix='.png',
|
||||
reduce_zero_label=True, **kwargs)
|
||||
|
@ -13,7 +13,7 @@ from PIL import Image
|
||||
|
||||
from mmseg.core.evaluation import get_classes, get_palette
|
||||
from mmseg.datasets import (DATASETS, ADE20KDataset, CityscapesDataset,
|
||||
ConcatDataset, CustomDataset, PascalVOCDataset, LoveDADataset,
|
||||
ConcatDataset, CustomDataset, PascalVOCDataset,
|
||||
RepeatDataset, build_dataset)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user