Skip to content



Dataset, 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.


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



Dataset.from_images(images, tfm=None, class_map=None)

Creates a Dataset from a list of images.


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