Server-side interactive segmentation and stereo for the web client - #1982
Draft
mattdawkins wants to merge 1 commit into
Draft
mattdawkins wants to merge 1 commit into
mattdawkins wants to merge 1 commit into
Conversation
A broker on the GPU host keeps VIAME interactive_service processes resident, capped in number, retired when idle, one inference at a time, refusing requests that cannot get a turn quickly. Girder resolves dataset frames and calibration to assetstore paths, pauses the tools while pipeline or training jobs hold the GPU, and forwards commands. The web client hooks the shared point-segmentation recipe to it, carries masks across cameras with the service, and runs every stereo matching method through it while it is up, falling back to the browser models.
Collaborator
|
With #1672 merged, DIVE Web already has point-prompt SAM segmentation and stereo auto-population running in the browser (ONNX / WebGPU with WASM fallback). That covers the interactive web workflow this PR was standing in for. I don’t think we need the server-side interactive broker / Girder proxy path anymore for that purpose, it adds GPU-host ops, long-lived sync request handling, and session management we can avoid now that the client path is in main. Happy to close this as superseded by #1672 unless there’s a separate reason to keep a VIAME-parity / server-GPU option (shared GPU with pipelines, weak clients, exact desktop service parity, etc.). If so, we can reopen or split that out later; otherwise I’ll close this draft. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. Runs the web client's interactive SAM segmentation and stereo point mapping in VIAME's
interactive_serviceon the server GPU instead of ONNX in the browser (the alternative to #1672 discussed earlier).Server
dive_interactivebroker (new compose serviceinteractive, GPU profile, same worker image): spawns oneviame.core.interactive_serviceprocess per user+dataset session, matches its out-of-order replies by id, keepsdisparity_readyevents for pollingDIVE_INTERACTIVE_MAX_SESSIONSresident processes (idlest evicted),DIVE_INTERACTIVE_IDLE_SECONDSretirement,DIVE_INTERACTIVE_MAX_INFLIGHTinferences at once, and a request that cannot get a turn withinDIVE_INTERACTIVE_QUEUE_TIMEOUTis refused with 503 rather than queueddive_interactiveresource:segmentation/predict,segmentation/keypoints,segmentation/stereo_segment,text_query,stereo/{set_frame,transfer_points,transfer_line,measure_line,aggregate_lengths},DELETE session. Resolves dataset/camera/frame to assetstore paths (image sequences and transcoded video with frame time; large-image datasets rejected) and the calibration item; the interactive container mounts the assetstore read-onlyinteractiveEnabled: falseindive_configuration) while any pipelines / training / private-queue job is queued or running, since they share the GPUClient (web)
useServerSegmentation: hooks the shared point-segmentation recipe to the server (Segmenttool now works on web) and carries a finished mask to the other stereo camera via the service'sstereo_segmentStereoServerMatcher: every stereo method (ncc,dino,foundation) runs through the server while it is up; the browser ONNX matchers remain the fallback.dinobecomes selectable on web when the server offers ituseConfiggains the interactive capability and re-checks it when a viewer opensNot yet done / to discuss
viame.core.interactive_serviceand the SAM / stereo add-on configs resolve under/tmp/addons/extracted🤖 Generated with Claude Code