Skip to content

Commit 4ef423e

Browse files
committed
fix(datamodule): forgot classes from lizard module
1 parent a6d5468 commit 4ef423e

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

cellseg_models_pytorch/datamodules/lizard_datamodule.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ def __init__(
122122

123123
self.dataset_type = dataset_type
124124

125+
@property
126+
def type_classes(self) -> Dict[str, int]:
127+
"""Pannuke cell type classes."""
128+
return {
129+
"bg": 0,
130+
"neutrophil": 1,
131+
"epithelial": 2,
132+
"lymphocyte": 3,
133+
"plasma": 4,
134+
"eosinophil": 5,
135+
"connective": 6,
136+
}
137+
125138
@staticmethod
126139
def download(root: str) -> None:
127140
"""Download the lizard dataset from online."""
@@ -144,9 +157,12 @@ def prepare_data(self, rm_orig: bool = False, do_patching: bool = True) -> None:
144157
145158
Parameters
146159
----------
147-
do_patching : bool, default=True
148-
Flag, whether to do patching at all. Can be used if you only want to
149-
download and split the data and then work it out on your own.
160+
rm_orig : bool, default=False
161+
After processing all the files, If True, removes the original
162+
un-processed files.
163+
do_patching : bool, default=True
164+
Flag, whether to do patching at all. Can be used if you only want to
165+
download and split the data and then work it out on your own.
150166
"""
151167
folders_found = [
152168
d.name

cellseg_models_pytorch/datamodules/pannuke_datamodule.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ def prepare_data(self, rm_orig: bool = True) -> None:
133133
1. Download pannuke folds from:
134134
"https://warwick.ac.uk/fac/cross_fac/tia/data/pannuke/"
135135
2. Pre-process and split the images and masks into train, valid and test sets.
136+
137+
Parameters
138+
----------
139+
rm_orig : bool, default=False
140+
After processing all the files, If True, removes the original
141+
un-processed files.
136142
"""
137143
folds_found = [
138144
d.name

0 commit comments

Comments
 (0)