- 15 Aug 2024
- Print
- DarkLight
- PDF
Image Utils Nodes
- Updated On 15 Aug 2024
- Print
- DarkLight
- PDF
Image Utils Nodes
Crop Annotations
The Crop Out Box Annotations node crops out all box annotations from the image item and creates a new item from each cropped annotation in addition to the original item. The metadata of each new cropped annotation item will have a field linking it to the original item (metadata.system.parentItemId).
The following example demonstrates how to use the Crop Out Box Annotations in your pipeline:
- Create a pipeline.
- Add a Dataset node and set the trigger to Event of type Created.
- Add the following DQL filter in the Dataset node:
{"dir":"/"}
- Connect the dataset node to a task node.
- Connect the task node to the Crop Out Box Annotations node.
- Connect the Crop Out Box Annotations node to a dataset node.
Now, when you add a new item to the first dataset, it will appear in the task. Once the item is given a status Completed in the task, it will flow to the Crop Out Box Annotations node, and a new item will be created for every box annotation. The new items will appear in the original dataset as well as in the dataset that receives the input from the Crop Out Box Annotations node.
Alternatively, you can use the Crop Out Box Annotations as an application from the Dataset Browser.
Simply select or filter the items with box annotations in the Dataset Browser, click the application Crop Box Annotations, and click Execute. An item will be created in your dataset for every box annotation.
Trigger (Optional): An Event/Cron trigger can be set on this node, enabling you to initiate the pipeline run from this specific point.