em_3d
generate_tiles
¶
This method to crop the image into smaller crops.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_image |
numpy array of input image |
required | |
tile_size |
The crop size |
256
|
|
overlap |
Overlap between two crops |
128
|
Returns:
Name | Type | Description |
---|---|---|
tiles |
numpy array of image crops |
Source code in fastestimator/fastestimator/dataset/data/em_3d.py
get_encode_label
¶
One hot encode the input mask
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label_data |
Color encoded input label |
required |
Returns:
Name | Type | Description |
---|---|---|
encoded_label |
one hot encoded label |
Source code in fastestimator/fastestimator/dataset/data/em_3d.py
load_data
¶
Load and return the 3d electron microscope platelet dataset.
Sourced from https://bio3d-vision.github.io/platelet-description.
Electronic Microscopy 3D cell dataset, consists of 2 3D images, one 800x800x50 and the other 800x800x24.
The 800x800x50 is used as training dataset and 800x800x24 is used for validation. If tile
is True, then instead
of using the entire 800x800 images, the 800x800x50 is tiled into 256x256x24 tiles with an overlap of 128 producing
around 75 training images and similarly the 800x800x24 image is tiled to produce 25 validation images.
The method downloads the dataset from google drive and provides train and validation NumpyDataset. While the dataset contains encoded value 0 as background, its omitted in the one hot encoded class label provided by this method. Below indexes represent the labels in channel layer. Index Class name 0 Cell 1 Mitochondria 2 Alpha granule 3 Canalicular vessel 4 Dense granule body 5 Dense granule core
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root_dir |
Optional[str]
|
The path to store the downloaded data. When |
None
|
image_key |
str
|
The key for image. |
'image'
|
label_key |
str
|
The key for label. |
'label'
|
tile |
bool
|
Whether to tile the image into multiple smaller images, or to return the individual volumes directly. |
True
|
Returns:
Type | Description |
---|---|
Tuple[NumpyDataset, NumpyDataset]
|
(train_data, eval_data) |
Source code in fastestimator/fastestimator/dataset/data/em_3d.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|