class ray.data.datasource.ImageDatasource(*args, **kwds)[source]#

Bases: ray.data.datasource.binary_datasource.BinaryDatasource

A datasource that lets you read images.

DeveloperAPI: This API may change across minor Ray releases.

create_reader(size: Optional[Tuple[int, int]] = None, mode: Optional[str] = None, include_paths: bool = False, **kwargs) Reader[T][source]#

Return a Reader for the given read arguments.

The reader object will be responsible for querying the read metadata, and generating the actual read tasks to retrieve the data blocks upon request.


read_args – Additional kwargs to pass to the datasource impl.