Overview

The ExecutionNode class represents a single step in an image processing workflow. You can think of an Execution Node as containing two main attributes: IMAGE and DATA.

All Execution Nodes have a unique id.

Attributes

image
PIL.Image.Image
required

The input image at this step of the workflow.

data
any
required

The data resulting from processing the image. This could be text, a Detections object, or a Pydantic object.

parent_detection
Detection

The detections from the previous step that led to this node.

Note: This attribute operates behind the scenes to assist with splits and joins.

id
int

The unique identifier of the node.

Methods

ExecutionNode.visualize()

Returns:

  • [PIL.Image.Image]: Generates a visual representation of the node. If the data in the node are Detections, it annotates the image with the detections. Otherwise, it displays the data as text on the image.