Documentation
Search…
wandb.data_types.Image
Format images for logging to W&B.
1
Image(
2
data_or_path: "ImageDataOrPathType",
3
mode: Optional[str] = None,
4
caption: Optional[str] = None,
5
grouping: Optional[str] = None,
6
classes: Optional[Union['Classes', Sequence[dict]]] = None,
7
boxes: Optional[Union[Dict[str, 'BoundingBoxes2D'], Dict[str, dict]]] = None,
8
masks: Optional[Union[Dict[str, 'ImageMask'], Dict[str, dict]]] = None
9
) -> None
Copied!
Arguments
Text
data_or_path
(numpy array, string, io) Accepts numpy array of image data, or a PIL image. The class attempts to infer the data format and converts it.
mode
(string) The PIL mode for an image. Most common are "L", "RGB", "RGBA". Full explanation at https://pillow.readthedocs.io/en/4.2.x/handbook/concepts.html#concept-modes.
caption
(string) Label for display of image.

Examples:

Create a wandb.Image from a numpy array