yuxuanw8 commited on
Commit
d30083a
·
verified ·
1 Parent(s): 153ecb6

Upload DFC2020.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. DFC2020.py +14 -14
DFC2020.py CHANGED
@@ -147,17 +147,17 @@ class DFC2020Dataset(datasets.GeneratorBasedBuilder):
147
 
148
  yield f"{index}", sample
149
 
150
- def _read_image(self, image_path):
151
- """Read tiff image from image_path
152
- Args:
153
- image_path:
154
- Image path to read from
155
-
156
- Return:
157
- image:
158
- C, H, W numpy array image
159
- """
160
- image = tifffile.imread(image_path)
161
- image = np.transpose(image, (2, 0, 1))
162
-
163
- return image
 
147
 
148
  yield f"{index}", sample
149
 
150
+ def _read_image(self, image_path):
151
+ """Read tiff image from image_path
152
+ Args:
153
+ image_path:
154
+ Image path to read from
155
+
156
+ Return:
157
+ image:
158
+ C, H, W numpy array image
159
+ """
160
+ image = tifffile.imread(image_path)
161
+ image = np.transpose(image, (2, 0, 1))
162
+
163
+ return image