Skip to content

Add interactive text-query annotation button#1708

Open
mattdawkins wants to merge 10 commits into
mainfrom
dev/text-query-annot-button
Open

Add interactive text-query annotation button#1708
mattdawkins wants to merge 10 commits into
mainfrom
dev/text-query-annot-button

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Summary

Follow-up to #1582. Adds the SAM3 interactive text-query annotation button on top of the interactive segmentation + stereo branch.

Changes

  • EditorMenu text-query button + dialog (query text, threshold, all-frames toggle).
  • textQuery / refineDetections / runTextQueryPipeline frontend API + IPC handlers.
  • Text-query methods on the consolidated interactive service.
  • Viewer / ViewerLoader wiring (text-query-init / text-query / text-query-all-frames, service-ready forwarding).

Notes

Brings in the SAM2/SAM3-based interactive segmentation feature, the
SAM3 text-query workflow, and the desktop interactive stereo mode.
Web-girder paths are intentionally untouched for now — web support
will come in a follow-up.

- New segmentation point-click recipe + EditorMenu wiring; SAM2/SAM3
  models loaded via VIAME install configs.
- Desktop backend: viame_segmentation_service-backed IPC handlers and
  matching frontend API for segmentationInitialize/Predict/SetImage/
  ClearImage/Shutdown/IsReady, textQuery/refineDetections/
  runTextQueryPipeline, and stereoEnable/Disable/SetFrame/GetStatus/
  TransferLine/TransferPoints/SetCalibration/IsEnabled, plus disparity
  ready/error event hooks.
- EditAnnotationLayer: track shift-key state and right-click for Point
  mode, propagate background flag for negative SAM points.
- Sidebar / ViewerLoader / Viewer: stereo annotation mode UI, error
  dialog when seg or text-query model fails to load, dot-only-on-source
  -frame fix.
- useModeManager / EditAnnotationLayer / recipes: keep existing geometry
  type when current editing mode already matches; right-click in Point
  creation finalises and deselects.
A track-frame's polygon now expands to a list of polygons each with
their own keys, and each polygon supports holes.

- Server CSV (de)serializer: emit polygon-key column per polygon, support
  holes in the geoJSON FeatureCollection; auto_key path to append a new
  polygon to an existing track frame.
- Client recipes / useModeManager: handleAddHole / handleAddPolygon /
  handleCancelCreation; PolygonLayer emits polygon-clicked.
- Hole drawing reuses the polygon edit pipeline (left-click places a
  hole vertex without exiting creation mode).
- Test fixtures cover multi-polygon and polygons-with-holes round-trip.
(cherry picked from commit c2f3cd0)
…tton)

Strip the SAM3 text-query button, dialog, API, and IPC handlers from the interactive editor, keeping segmentation and stereo intact. The full text-query feature lives on the follow-up branch dev/text-query-annot-button.
Strip the no-transcode NativeVideoAnnotator path that should not be on the
segmentation/stereo branch: removes the residual Viewer.vue async-component,
nativeVideoPath plumbing, and template branch, plus the stale settings field.
@mattdawkins mattdawkins force-pushed the dev/add-interactive-seg-and-stereo branch from 7858f2f to 20303f0 Compare June 22, 2026 16:08
@mattdawkins mattdawkins force-pushed the dev/text-query-annot-button branch from 7d03471 to 37bc67d Compare June 22, 2026 16:08
The rebase onto main dropped the opening <template> tag, so vite parsed the
root <div> as a custom block and the electron build failed. Restore it.
SAM3 text-query button, dialog, API, and IPC handlers on top of the interactive segmentation + stereo branch.
@mattdawkins mattdawkins force-pushed the dev/text-query-annot-button branch from 37bc67d to fc8e213 Compare June 22, 2026 16:25
Base automatically changed from dev/add-interactive-seg-and-stereo to main June 27, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant