bioimageloader#
Root module of bioimageloader
Expose core classes and functions
- class bioimageloader.BatchDataloader(dataset: bioimageloader.base.Dataset, batch_size: int = 16, shuffle: bool = False, drop_last: bool = False, num_workers: Optional[int] = None)[source]#
Batch loader with multi-processing
- class bioimageloader.ConcatDataset(datasets: List[bioimageloader.base.Dataset])[source]#
Concatenate Datasets
References
- class bioimageloader.Config(filename=None)[source]#
Construct config from a yaml file
- Parameters
- filenamestr
Path to config file
- load_datasets(transforms: Optional[Union[albumentations.core.composition.Compose, Dict[str, albumentations.core.composition.Compose]]] = None) bioimageloader.types.DatasetList [source]#
Load multiple datasets from a yaml file
Note that when you provide a dictionray for
transforms
, keys should be the class names, not their acronyms.- Parameters
- configconfiguration object
Config instance that contains acronyms and arguments to initialize each dataset
- transformsalbumentations.Compose or dictionary, optional
Either apply a single composed transformations for every datasets or pass a dictionary that defines transformations for each dataset with keys being the class names of collections.
- replace_commonpath(new: str)[source]#
Replace common path for all
root_dir
with a new oneAll
root_dir
should have a commonpath. Do not put trailing ‘/’ at the end.You made a config with root_dir being relative path. You do not need to replace them manually with this method.
- set_training(val: bool)[source]#
Iterate config and set all
training
to given valueIt only affects those that have
training
kwarg.