Outline objects (Segment Anything)
segment_objectsTrace precise object outlines from rough boxes or points with Segment Anything, then save them as polygon annotations for image labeling.
Instructions
Trace precise outlines with Segment Anything and add them as polygon annotations.
Give each object a rough box (or a point on it) in image pixels; the model finds the object's exact edges, so the box only has to contain the object. Prefer this to drawing polygons yourself. model: "sam" for photos and general images; "medsam" for medical images (CT, MRI, X-ray, ultrasound, endoscopy, pathology), which takes boxes only. Up to 20 objects per call. With save=false the outlines are returned without being saved. Each result has the model's quality score (0-1).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Save the outlines as polygon annotations; false only returns them. | |
| model | No | 'sam' for everyday images; 'medsam' for medical images (CT, MRI, X-ray, ultrasound, endoscopy, pathology), which needs a box for every object. | sam |
| objects | Yes | Objects to outline, each with a label and a rough box (x, y, width, height) or a point on it, in image pixels. | |
| image_id | Yes | Id of an image in Image Label: the imageId (a UUID string) returned by list_images or an upload. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||