newron.log_image()


nweron.log_image(image: Union[numpy.ndarray, PIL.Image.Image], artifact_file: str) → None

Used to log image as an artifact. numpy.ndarray and PIL.Image.Image are the supported image object types.

Parameters

  • image - Image to log
  • artifact_file - The run-relative artifact file path in posixpath format to which the image is saved (e.g. “dir/image.png”).

Example

import newron
import numpy as np

image = np.random.randint(0, 256, size=(100, 100, 3), dtype=np.uint8)

newron.log_image(image, "image.png")