-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define blood vessel dataset and fix filename bug (#203)
* fix filename bug * define blood vessel dataset * redo debug * fix small bug * rename dataset Co-authored-by: yamengxi <yamengxi@sensetime.com>
- Loading branch information
Showing
6 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
from .ade import ADE20KDataset | ||
from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset | ||
from .chase_db1 import ChaseDB1Dataset | ||
from .cityscapes import CityscapesDataset | ||
from .custom import CustomDataset | ||
from .dataset_wrappers import ConcatDataset, RepeatDataset | ||
from .drive import DRIVEDataset | ||
from .hrf import HRFDataset | ||
from .pascal_context import PascalContextDataset | ||
from .stare import STAREDataset | ||
from .voc import PascalVOCDataset | ||
|
||
__all__ = [ | ||
'CustomDataset', 'build_dataloader', 'ConcatDataset', 'RepeatDataset', | ||
'DATASETS', 'build_dataset', 'PIPELINES', 'CityscapesDataset', | ||
'PascalVOCDataset', 'ADE20KDataset', 'PascalContextDataset' | ||
'PascalVOCDataset', 'ADE20KDataset', 'PascalContextDataset', | ||
'ChaseDB1Dataset', 'DRIVEDataset', 'HRFDataset', 'STAREDataset' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os.path as osp | ||
|
||
from .builder import DATASETS | ||
from .custom import CustomDataset | ||
|
||
|
||
@DATASETS.register_module() | ||
class ChaseDB1Dataset(CustomDataset): | ||
"""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. | ||
The ``img_suffix`` is fixed to '.jpg' and ``seg_map_suffix`` is fixed to | ||
'_1stHO.jpg'. | ||
""" | ||
|
||
CLASSES = ('background', 'vessel') | ||
|
||
PALETTE = [[120, 120, 120], [6, 230, 230]] | ||
|
||
def __init__(self, **kwargs): | ||
super(ChaseDB1Dataset, self).__init__( | ||
img_suffix='.jpg', | ||
seg_map_suffix='_1stHO.jpg', | ||
reduce_zero_label=False, | ||
**kwargs) | ||
assert osp.exists(self.img_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os.path as osp | ||
|
||
from .builder import DATASETS | ||
from .custom import CustomDataset | ||
|
||
|
||
@DATASETS.register_module() | ||
class DRIVEDataset(CustomDataset): | ||
"""DRIVE dataset. | ||
In segmentation map annotation for DRIVE, 0 stands for background, which is | ||
included in 2 categories. ``reduce_zero_label`` is fixed to False. The | ||
``img_suffix`` is fixed to '.jpg' and ``seg_map_suffix`` is fixed to | ||
'_manual1.jpg'. | ||
""" | ||
|
||
CLASSES = ('background', 'vessel') | ||
|
||
PALETTE = [[120, 120, 120], [6, 230, 230]] | ||
|
||
def __init__(self, **kwargs): | ||
super(DRIVEDataset, self).__init__( | ||
img_suffix='.jpg', | ||
seg_map_suffix='_manual1.jpg', | ||
reduce_zero_label=False, | ||
**kwargs) | ||
assert osp.exists(self.img_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os.path as osp | ||
|
||
from .builder import DATASETS | ||
from .custom import CustomDataset | ||
|
||
|
||
@DATASETS.register_module() | ||
class HRFDataset(CustomDataset): | ||
"""HRF dataset. | ||
In segmentation map annotation for HRF, 0 stands for background, which is | ||
included in 2 categories. ``reduce_zero_label`` is fixed to False. The | ||
``img_suffix`` is fixed to '.jpg' and ``seg_map_suffix`` is fixed to | ||
'.jpg'. | ||
""" | ||
|
||
CLASSES = ('background', 'vessel') | ||
|
||
PALETTE = [[120, 120, 120], [6, 230, 230]] | ||
|
||
def __init__(self, **kwargs): | ||
super(HRFDataset, self).__init__( | ||
img_suffix='.jpg', | ||
seg_map_suffix='.jpg', | ||
reduce_zero_label=False, | ||
**kwargs) | ||
assert osp.exists(self.img_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os.path as osp | ||
|
||
from .builder import DATASETS | ||
from .custom import CustomDataset | ||
|
||
|
||
@DATASETS.register_module() | ||
class STAREDataset(CustomDataset): | ||
"""STARE dataset. | ||
In segmentation map annotation for STARE, 0 stands for background, which is | ||
included in 2 categories. ``reduce_zero_label`` is fixed to False. The | ||
``img_suffix`` is fixed to '.jpg' and ``seg_map_suffix`` is fixed to | ||
'.ah.jpg'. | ||
""" | ||
|
||
CLASSES = ('background', 'vessel') | ||
|
||
PALETTE = [[120, 120, 120], [6, 230, 230]] | ||
|
||
def __init__(self, **kwargs): | ||
super(STAREDataset, self).__init__( | ||
img_suffix='.jpg', | ||
seg_map_suffix='.ah.jpg', | ||
reduce_zero_label=False, | ||
**kwargs) | ||
assert osp.exists(self.img_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters