neuralset.events.etypes.Image

pydantic model neuralset.events.etypes.Image[source][source]

Image event with optional caption.

Requires pillow>=9.2.0 to be installed.

Parameters:

caption (str, optional) – Caption or description of the image. Multiple captions should be newline-separated. Default: “”

Returns:

RGB PIL Image object when read() is called

Return type:

PIL.Image

Warning

Image events with duration <= 0 will be logged as ignored

Examples

img_event = Image(start=1.0, timeline="exp", filepath="img.jpg",
                 duration=2.0, caption="A cat")
pil_image = img_event.read()
Fields:
requirements: ClassVar[tuple[str, ...]] = ('pillow>=9.2.0',)[source]
field caption: str = ''[source]
type: tp.ClassVar[str] = 'Image'[source]