revised lint errors in loveda.py

This commit is contained in:
kingdrone 2021-11-04 12:56:16 +08:00
parent bcd670cf68
commit b2744ca4ac
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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)