🖼️ Execution Node
Execution Nodes represent individual steps in image processing workflows
Overview
The ExecutionNode
class is crucial for representing a single step in the workflow of image processing tasks. It encapsulates the image, the data processed at this stage, and optionally, a reference to the parent detection.
Attributes
- image: The input image at this step of the workflow.
- data: The data resulting from processing the image. This could be a set of detections or any other type of data.
- parent_detection (Optional): The detections from the previous step that led to this node.
Methods
data_is_detections
Checks if the data associated with this node is of type Detections
.
is_detections
bool
A boolean indicating if the data is of type Detections
.
visualize
Generates a visual representation of the node. If the data is detections, it annotates the image with the detections. Otherwise, it displays the data as text on the image.
visualized_image
PIL.Image.Image
The image with annotations or data visualization.
id
Returns the unique identifier of the node.
node_id
int
The unique identifier of the node.