[Enhancement] Support inherit cityscapes dataset (#750)

* rewrite init function

* init function parameters
This commit is contained in:
谢昕辰 2021-08-27 14:53:36 +08:00 committed by GitHub
parent 7ccb9c3995
commit 4686f1ec28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,11 +29,12 @@ class CityscapesDataset(CustomDataset):
[255, 0, 0], [0, 0, 142], [0, 0, 70], [0, 60, 100], [255, 0, 0], [0, 0, 142], [0, 0, 70], [0, 60, 100],
[0, 80, 100], [0, 0, 230], [119, 11, 32]] [0, 80, 100], [0, 0, 230], [119, 11, 32]]
def __init__(self, **kwargs): def __init__(self,
super(CityscapesDataset, self).__init__(
img_suffix='_leftImg8bit.png', img_suffix='_leftImg8bit.png',
seg_map_suffix='_gtFine_labelTrainIds.png', seg_map_suffix='_gtFine_labelTrainIds.png',
**kwargs) **kwargs):
super(CityscapesDataset, self).__init__(
img_suffix=img_suffix, seg_map_suffix=seg_map_suffix, **kwargs)
@staticmethod @staticmethod
def _convert_to_label_id(result): def _convert_to_label_id(result):