2021-08-17 14:16:55 +08:00
|
|
|
# Copyright (c) OpenMMLab. All rights reserved.
|
2020-10-23 08:27:40 +08:00
|
|
|
|
2022-05-10 20:15:20 +08:00
|
|
|
from mmseg.registry import DATASETS
|
2022-08-05 20:37:35 +08:00
|
|
|
from .basesegdataset import BaseSegDataset
|
2020-10-23 08:27:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
@DATASETS.register_module()
|
2022-07-26 12:01:40 +08:00
|
|
|
class ChaseDB1Dataset(BaseSegDataset):
|
2020-10-23 08:27:40 +08:00
|
|
|
"""Chase_db1 dataset.
|
|
|
|
|
|
|
|
In segmentation map annotation for Chase_db1, 0 stands for background,
|
|
|
|
which is included in 2 categories. ``reduce_zero_label`` is fixed to False.
|
2020-10-29 02:58:44 +08:00
|
|
|
The ``img_suffix`` is fixed to '.png' and ``seg_map_suffix`` is fixed to
|
|
|
|
'_1stHO.png'.
|
2020-10-23 08:27:40 +08:00
|
|
|
"""
|
2022-06-09 20:49:32 +08:00
|
|
|
METAINFO = dict(
|
2022-05-26 17:13:40 +08:00
|
|
|
classes=('background', 'vessel'),
|
|
|
|
palette=[[120, 120, 120], [6, 230, 230]])
|
2020-10-23 08:27:40 +08:00
|
|
|
|
2022-05-26 17:13:40 +08:00
|
|
|
def __init__(self, **kwargs) -> None:
|
|
|
|
super().__init__(
|
2020-10-29 02:58:44 +08:00
|
|
|
img_suffix='.png',
|
|
|
|
seg_map_suffix='_1stHO.png',
|
2020-10-23 08:27:40 +08:00
|
|
|
reduce_zero_label=False,
|
|
|
|
**kwargs)
|
2022-08-04 18:32:52 +08:00
|
|
|
assert self.file_client.exists(self.data_prefix['img_path'])
|