ImageLoader¶
-
class
ImageLoader(image_dir: str, targets: numpy.ndarray, channels: int = 3, im_shape: tuple = None, batch_size: int = 32, shuffle: bool = True)¶ Bases:
bluebird.dataloader.dataloaderbase.DataLoaderBase-
__init__(image_dir: str, targets: numpy.ndarray, channels: int = 3, im_shape: tuple = None, batch_size: int = 32, shuffle: bool = True)¶ Initalizes the object.
- Parameters
image_dir (str) – location of base images directory
targets (
Tensor) – target data, note: order must be the same as filenames in directorychannels (int) – number of channels of images, 1: grayscale, 3: rgb, 4: rgba, defautls to 3
im_shape (tuple, optional) – define if you want to reshape the image, None = default image shape
batch_size (int, optional) – length of every batch size, defaults to 32
shuffle (bool, optional) – shuffles data if true, defaults to True
Methods
__init__(image_dir, targets[, channels, …])Initalizes the object.
preload()Loads the file names as Tensor
-
preload() → None¶ Loads the file names as Tensor
-