Datasets:
Sricharan Reddy Varra
commited on
Commit
·
3dd07d9
1
Parent(s):
d047ac0
added datasets for nb4
Browse files- ark_example.py +39 -20
- data/segmentation/example_cell_output_dir.zip +3 -0
ark_example.py
CHANGED
|
@@ -48,22 +48,29 @@ _URL_DATA = {
|
|
| 48 |
"image_data": "./data/image_data.zip",
|
| 49 |
"cell_table": "./data/segmentation/cell_table.zip",
|
| 50 |
"deepcell_output": "./data/segmentation/deepcell_output.zip",
|
| 51 |
-
"example_pixel_output_dir": "./data/segmentation/example_pixel_output_dir.zip"
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
_URL_DATASET_CONFIGS = {
|
| 55 |
-
"
|
| 56 |
-
"
|
| 57 |
"image_data": _URL_DATA["image_data"],
|
| 58 |
"cell_table": _URL_DATA["cell_table"],
|
| 59 |
"deepcell_output": _URL_DATA["deepcell_output"],
|
| 60 |
},
|
| 61 |
-
"
|
| 62 |
"image_data": _URL_DATA["image_data"],
|
| 63 |
"cell_table": _URL_DATA["cell_table"],
|
| 64 |
"deepcell_output": _URL_DATA["deepcell_output"],
|
| 65 |
-
"example_pixel_output_dir": _URL_DATA["example_pixel_output_dir"]
|
| 66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
|
|
@@ -87,7 +94,7 @@ TMA24_R9C1 -> fov10
|
|
| 87 |
class ArkExample(datasets.GeneratorBasedBuilder):
|
| 88 |
"""The Dataset consists of 11 FOVs"""
|
| 89 |
|
| 90 |
-
VERSION = datasets.Version("0.0.
|
| 91 |
|
| 92 |
# This is an example of a dataset with multiple configurations.
|
| 93 |
# If you don't want/need to define several sub-sets in your dataset,
|
|
@@ -98,35 +105,47 @@ class ArkExample(datasets.GeneratorBasedBuilder):
|
|
| 98 |
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
| 99 |
|
| 100 |
# You will be able to load one or the other configurations in the following list with
|
| 101 |
-
# data = datasets.load_dataset('my_dataset', 'nb1')
|
| 102 |
-
# data = datasets.load_dataset('my_dataset', 'nb2')
|
| 103 |
BUILDER_CONFIGS = [
|
| 104 |
datasets.BuilderConfig(
|
| 105 |
-
name="
|
| 106 |
version=VERSION,
|
| 107 |
-
description="This
|
| 108 |
),
|
| 109 |
datasets.BuilderConfig(
|
| 110 |
-
name="
|
| 111 |
version=VERSION,
|
| 112 |
-
description="This
|
| 113 |
-
Therefore you can start at any notebook with this dataset.",
|
| 114 |
),
|
| 115 |
datasets.BuilderConfig(
|
| 116 |
-
name="
|
| 117 |
version=VERSION,
|
| 118 |
-
description="This
|
| 119 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
]
|
| 121 |
|
| 122 |
def _info(self):
|
| 123 |
# This is the name of the configuration selected in BUILDER_CONFIGS above
|
| 124 |
-
if self.config.name in [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
features = datasets.Features(
|
| 126 |
-
{
|
|
|
|
|
|
|
|
|
|
| 127 |
)
|
| 128 |
else:
|
| 129 |
-
ValueError(
|
|
|
|
|
|
|
| 130 |
return datasets.DatasetInfo(
|
| 131 |
# This is the description that will appear on the datasets page.
|
| 132 |
description=_DESCRIPTION,
|
|
|
|
| 48 |
"image_data": "./data/image_data.zip",
|
| 49 |
"cell_table": "./data/segmentation/cell_table.zip",
|
| 50 |
"deepcell_output": "./data/segmentation/deepcell_output.zip",
|
| 51 |
+
"example_pixel_output_dir": "./data/segmentation/example_pixel_output_dir.zip",
|
| 52 |
+
"example_cell_output_dir": "./data/segmentation/example_cell_output_dir.zip",
|
| 53 |
}
|
| 54 |
|
| 55 |
_URL_DATASET_CONFIGS = {
|
| 56 |
+
"segment_image_data": {"image_data": _URL_DATA["image_data"]},
|
| 57 |
+
"cluster_pixels": {
|
| 58 |
"image_data": _URL_DATA["image_data"],
|
| 59 |
"cell_table": _URL_DATA["cell_table"],
|
| 60 |
"deepcell_output": _URL_DATA["deepcell_output"],
|
| 61 |
},
|
| 62 |
+
"cluster_cells": {
|
| 63 |
"image_data": _URL_DATA["image_data"],
|
| 64 |
"cell_table": _URL_DATA["cell_table"],
|
| 65 |
"deepcell_output": _URL_DATA["deepcell_output"],
|
| 66 |
+
"example_pixel_output_dir": _URL_DATA["example_pixel_output_dir"],
|
| 67 |
+
},
|
| 68 |
+
"post_clustering": {
|
| 69 |
+
"image_data": _URL_DATA["image_data"],
|
| 70 |
+
"cell_table": _URL_DATA["cell_table"],
|
| 71 |
+
"deepcell_output": _URL_DATA["deepcell_output"],
|
| 72 |
+
"example_cell_output_dir": _URL_DATA["example_cell_output_dir"],
|
| 73 |
+
},
|
| 74 |
}
|
| 75 |
|
| 76 |
|
|
|
|
| 94 |
class ArkExample(datasets.GeneratorBasedBuilder):
|
| 95 |
"""The Dataset consists of 11 FOVs"""
|
| 96 |
|
| 97 |
+
VERSION = datasets.Version("0.0.3")
|
| 98 |
|
| 99 |
# This is an example of a dataset with multiple configurations.
|
| 100 |
# If you don't want/need to define several sub-sets in your dataset,
|
|
|
|
| 105 |
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
| 106 |
|
| 107 |
# You will be able to load one or the other configurations in the following list with
|
|
|
|
|
|
|
| 108 |
BUILDER_CONFIGS = [
|
| 109 |
datasets.BuilderConfig(
|
| 110 |
+
name="segment_image_data",
|
| 111 |
version=VERSION,
|
| 112 |
+
description="This configuration contains data used by notebook 1; contains only the 12 FOVs, and their 22 channels.",
|
| 113 |
),
|
| 114 |
datasets.BuilderConfig(
|
| 115 |
+
name="cluster_pixels",
|
| 116 |
version=VERSION,
|
| 117 |
+
description="This configuration contains data used by notebook 2, Pixel Clustering (Pixie Pipeline #1).",
|
|
|
|
| 118 |
),
|
| 119 |
datasets.BuilderConfig(
|
| 120 |
+
name="cluster_cells",
|
| 121 |
version=VERSION,
|
| 122 |
+
description="This configuration contains data used by notebook 3, Cell Clustering (Pixie Pipeline #2).",
|
| 123 |
+
),
|
| 124 |
+
datasets.BuilderConfig(
|
| 125 |
+
name="post_clustering",
|
| 126 |
+
version=VERSION,
|
| 127 |
+
description="This configuration contains data used by notebook 4 - Post Clustering.",
|
| 128 |
+
),
|
| 129 |
]
|
| 130 |
|
| 131 |
def _info(self):
|
| 132 |
# This is the name of the configuration selected in BUILDER_CONFIGS above
|
| 133 |
+
if self.config.name in [
|
| 134 |
+
"segment_image_data",
|
| 135 |
+
"cluster_pixels",
|
| 136 |
+
"cluster_cells",
|
| 137 |
+
"post_clustering",
|
| 138 |
+
]:
|
| 139 |
features = datasets.Features(
|
| 140 |
+
{
|
| 141 |
+
f: datasets.Value("string")
|
| 142 |
+
for f in _URL_DATASET_CONFIGS[self.config.name].keys()
|
| 143 |
+
}
|
| 144 |
)
|
| 145 |
else:
|
| 146 |
+
ValueError(
|
| 147 |
+
f"Dataset name is incorrect, options include {list(_URL_DATASET_CONFIGS.keys())}"
|
| 148 |
+
)
|
| 149 |
return datasets.DatasetInfo(
|
| 150 |
# This is the description that will appear on the datasets page.
|
| 151 |
description=_DESCRIPTION,
|
data/segmentation/example_cell_output_dir.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad78b0f72ede2eeaa05f5befb1f556a86f667a7dcdc31d5f5dc45cc1d933884f
|
| 3 |
+
size 4197412
|