Skip to content

add sam3-server: HTTP API + web UI for SAM3/SAM2 inference - #37

Open
ivanovalex32 wants to merge 1 commit into
PABannier:mainfrom
ivanovalex32:pr-sam3-server
Open

ivanovalex32 wants to merge 1 commit into
PABannier:mainfrom
ivanovalex32:pr-sam3-server

Conversation

@ivanovalex32

@ivanovalex32 ivanovalex32 commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

Adds a dependency-free HTTP inference server (sam3-server) with a browser UI for SAM3/SAM2 models.

What is included

  • examples/sam3-server/ — httplib-based server: /health, /models, /segment (point/mask PVS), /track (memory-bank tracking sessions), /video/upload|open|info|frame|track (video decoding + propagation)
  • Web UI canvas (inlined index.html via scripts/gen_webui.py)
  • Public API additions in sam3.h: sam3_video_decoder_* and sam3_postprocess_mask (fill holes + remove sprinkles)
  • Validation scripts: scripts/validate_case.py, scripts/validate_cases.sh, scripts/server_smoke.sh
  • docs/SERVER.md

Validation

  • CPU (Release, SAM3_METAL=OFF, sam3-f16.ggml): smoke OK; validate_cases.sh 5/5 PASS (IoU 0.9891/0.9931/0.9917/0.9904/0.9819, threshold 0.9)
  • Windows MSVC: server code is guarded (#ifndef _WIN32 for <dirent.h> /models listing)

Notes

  • No changes to the ggml submodule (pinned as upstream)

- HTTP server (httplib.h) with /health /models /segment /track /video/* endpoints
- Web UI canvas (index.html inlined via gen_webui.py)
- sam3_video_decoder_* + sam3_postprocess_mask public API for video/mask handling
- scripts: validate_case.py / validate_cases.sh / server_smoke.sh
- tests/cases: 5 detect+aggregate cases with reference masks (IoU >= 0.9)
- docs/SERVER.md
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