Iterable Tiled Pred Dataset
Iterable tiled prediction dataset used to load data file by file.
IterableTiledPredDataset
Bases: IterableDataset
Tiled prediction dataset.
Parameters:
-
prediction_config(InferenceConfig) –Inference configuration.
-
src_files(list of pathlib.Path) –List of data files.
-
read_source_func(Callable, default:read_tiff) –Read source function for custom types, by default read_tiff.
-
**kwargs(Any, default:{}) –Additional keyword arguments, unused.
Attributes:
-
data_path(str or Path) –Path to the data, must be a directory.
-
axes(str) –Description of axes in format STCZYX.
-
mean((float, optional)) –Expected mean of the dataset, by default None.
-
std((float, optional)) –Expected standard deviation of the dataset, by default None.
-
patch_transform((Callable, optional)) –Patch transform callable, by default None.
__init__(prediction_config, src_files, read_source_func=read_tiff, **kwargs)
Constructor.
Parameters:
-
prediction_config(InferenceConfig) –Inference configuration.
-
src_files(List[Path]) –List of data files.
-
read_source_func(Callable, default:read_tiff) –Read source function for custom types, by default read_tiff.
-
**kwargs(Any, default:{}) –Additional keyword arguments, unused.
Raises:
-
ValueError–If mean and std are not provided in the inference configuration.
__iter__()
Iterate over data source and yield single patch.
Yields:
-
Generator of (np.ndarray, np.ndarray or None) and TileInformation tuple–Generator of single tiles.