Deploys Segformer by NVIDIA Research as a DataTorch action. Currently used for internal evaluation only.
name: Segformer
triggers:
# Adds a button to the annotator.
annotatorButton:
name: "Segformer"
icon: brain
# Annotator will prompt the user for 4 points before triggering the pipeline
flow: 4-points
jobs:
predict:
# Properties about the trigger event can be accessed at 'event' property
steps:
- name: Download File
action: datatorch/download-file@v1
inputs:
# Get the file id for the event that triggered this.
fileId: ${{ event.fileId }}
name: ${{ event.fileName }}
- name: Predict Segmentation
action: aoxolotl/segformer_action
inputs:
# Download file path from the previous action.
imagePath: ${{ variable.path }}
# Get the 4 points the user clicked
points: ${{ event.flowData.points }}
# Annotation created by the four points. We will insert the
# segmentation into this annotation
annotationId: ${{ event.annotationId }}
NOTE: Running Segformer for the first time will take serval minutes to complete as it needs to download the Segformer docker image. Do not exit out of your agent unless it specifically throws an error.
Name | Type | Default | Description |
---|---|---|---|
imagePath |
string | required | Absolute path to image. This path must be in the agent directory. |
points |
array | required | 4 points marking the most left, right, bottom and top points of the shape. |
url |
string | http://localhost:3445 |
Url for sending requests. A Segformer docker image will be spun up on this port if not found. |
image |
string | add3000/segformer_server |
Docker image to spin up. |
annotationId |
string | null |
Annotation to insert segmentation into. If not provided the segmentation will not be inserted. |
simplify |
float | 1.5 |
Simplification tolerance applied to segmentation before importing. Set to 0 to disable. Disabling can significantly increase pipeline performance, but decrease annotator performance. |
Name | Type | Description |
---|---|---|
segmentation |
array | Segmentation of points predicted by Segformer |