ImageSegment
20 tools in this family (folder Editor/Tools/ImageSegment/ in the bridge package). Effect: writes changes the project or the scene, read-only does not, destructive deletes or overwrites and the client asks before running it.
| Tool | Effect | Description |
|---|---|---|
image_segment_batch_segment_folder | writes | Auto-segment every image in a folder (recursive=false). Each image becomes one job, |
image_segment_classify_foreground_background | writes | Run the heuristic foreground/background classifier on every mask of a job. Rules: |
image_segment_emit_batch_pipeline | writes | Generate a MonoBehaviour that loops every image in a folder, calls a user-provided |
image_segment_emit_replicate_client | writes | Generate a MonoBehaviour that POSTs an image to Replicate, polls the prediction, |
image_segment_emit_sentis_local_setup | writes | Generate a MonoBehaviour that loads a SAM2 ONNX model with Unity.Sentis and runs |
image_segment_estimate_cost | read-only | Estimate per-image cost for each backend at the given resolution (defaults to 1024x768). |
image_segment_export_mask_png | writes | Write a mask as a PNG to output_path. If the mask was generated on disk by the mock |
image_segment_export_masked_region | writes | Crop the source image to the mask's bounding box and write the cropped pixels to |
image_segment_export_setup | read-only | Return the full family configuration snapshot — active backend, backend probe results, |
image_segment_get_backend_status | read-only | Probe every backend and return the availability + key configuration matrix. |
image_segment_get_job_status | read-only | Look up a segmentation job by id. Returns Status (Queued/Running/Completed/Failed/Cancelled), |
image_segment_init | writes | Initialize the image_segment_* family. Creates Library/ImageSegmentMock/ if missing, |
image_segment_list_masks | read-only | List every mask produced by a job — id, bounding box, area, centroid, classification, |
image_segment_segment_everything | writes | Auto-segment every object in an image (SAM2 'segment everything' mode). Routes through the |
image_segment_segment_with_box | writes | Segment one object using a bounding-box prompt — useful when the user can roughly draw |
image_segment_segment_with_point | writes | Segment one object using a single point prompt — SAM2's primary interaction. Pass |
image_segment_set_backend | writes | Set the active segmentation backend for subsequent image_segment_* calls. |
image_segment_set_huggingface_key | writes | Store the Hugging Face API key encrypted in EditorPrefs (AES-CBC, key derived from the project path)… |
image_segment_set_replicate_key | writes | Store the Replicate API key encrypted in EditorPrefs (AES-CBC, key derived from the project path). |
image_segment_smooth_boundaries | writes | Apply a box-blur smoothing kernel to a mask's boundary pixels. Useful for cleaning up the |