Documentation
Search…
wandb.data_types.Image
Wandb class for images.
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.

Methods

all_boxes

1
@classmethod
2
all_boxes(
3
images: Sequence['Image'],
4
run: "LocalRun",
5
run_key: str,
6
step: Union[int, str]
7
) -> Union[List[Optional[dict]], bool]
Copied!

all_captions

1
@classmethod
2
all_captions(
3
images: Sequence['Media']
4
) -> Union[bool, Sequence[Optional[str]]]
Copied!

all_masks

1
@classmethod
2
all_masks(
3
images: Sequence['Image'],
4
run: "LocalRun",
5
run_key: str,
6
step: Union[int, str]
7
) -> Union[List[Optional[dict]], bool]
Copied!

guess_mode

1
guess_mode(
2
data: "np.ndarray"
3
) -> str
Copied!
Guess what type of image the np.array is representing

to_uint8

1
@classmethod
2
to_uint8(
3
data: "np.ndarray"
4
) -> "np.ndarray"
Copied!
Converts floating point image on the range [0,1] and integer images on the range [0,255] to uint8, clipping if necessary.
Class Variables
Text
MAX_DIMENSION
65500
MAX_ITEMS
108
Last modified 14h ago