Skip to content

Commit 4686f1e

Browse files
author
谢昕辰
authored
[Enhancement] Support inherit cityscapes dataset (open-mmlab#750)
* rewrite init function * init function parameters
1 parent 7ccb9c3 commit 4686f1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mmseg/datasets/cityscapes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ class CityscapesDataset(CustomDataset):
2929
[255, 0, 0], [0, 0, 142], [0, 0, 70], [0, 60, 100],
3030
[0, 80, 100], [0, 0, 230], [119, 11, 32]]
3131

32-
def __init__(self, **kwargs):
32+
def __init__(self,
33+
img_suffix='_leftImg8bit.png',
34+
seg_map_suffix='_gtFine_labelTrainIds.png',
35+
**kwargs):
3336
super(CityscapesDataset, self).__init__(
34-
img_suffix='_leftImg8bit.png',
35-
seg_map_suffix='_gtFine_labelTrainIds.png',
36-
**kwargs)
37+
img_suffix=img_suffix, seg_map_suffix=seg_map_suffix, **kwargs)
3738

3839
@staticmethod
3940
def _convert_to_label_id(result):

0 commit comments

Comments
 (0)