Skip to content

Dataset

[source]

Dataset

icevision.data.dataset.Dataset(records, tfm=None)

Container for a list of records and transforms.

Steps each time an item is requested (normally via directly indexing the Dataset): * Grab a record from the internal list of records. * Prepare the record (open the image, open the mask, add metadata). * Apply transforms to the record.

Arguments

  • records List[dict]: A list of records.
  • tfm icevision.tfms.transform.Transform: Transforms to be applied to each item.

[source]

from_images

Dataset.from_images(images, tfm=None)

Creates a Dataset from a list of images.

Arguments

  • images Sequence[numpy.array]: Sequence of images in memory (numpy arrays).
  • tfm icevision.tfms.transform.Transform: Transforms to be applied to each item.