in_memory_tiled_pred_dataset
In-memory tiled prediction dataset.
InMemoryTiledPredDataset
#
Bases: Dataset
Prediction dataset storing data in memory and returning tiles of each image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prediction_config | InferenceConfig | Prediction configuration. | required |
inputs | NDArray | Input data. | required |
Source code in src/careamics/dataset/in_memory_tiled_pred_dataset.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 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 |
|
__getitem__(index)
#
Return the patch corresponding to the provided index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index | int | Index of the patch to return. | required |
Returns:
Type | Description |
---|---|
tuple of NDArray and TileInformation | Transformed patch. |
Source code in src/careamics/dataset/in_memory_tiled_pred_dataset.py
__init__(prediction_config, inputs)
#
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prediction_config | InferenceConfig | Prediction configuration. | required |
inputs | NDArray | Input data. | required |
Raises:
Type | Description |
---|---|
ValueError | If data_path is not a directory. |
Source code in src/careamics/dataset/in_memory_tiled_pred_dataset.py
__len__()
#
Return the length of the dataset.
Returns:
Type | Description |
---|---|
int | Length of the dataset. |