Skip to content

Result

Class representing the result of Instance.analyze.

Attributes:

Name Type Description
image_bytes Optional[bytes]

Encoded PNG image, to get the decoded image, use get_decoded_image.

context dict

Context dictionary.

get_decoded_image

get_decoded_image() -> NDArray[np.uint8]

Get the decoded image.

Raises:

Type Description
ValueError

If image is None, usually when response_type is "context".

OpenCVImportError

If image is not None and OpenCV is not installed.