Skip to content

Remove SAM2 mask generation and SA-V support - #23

Merged
parkjinman98 merged 3 commits into
mainfrom
jm/clean
Sep 29, 2026
Merged

parkjinman98 merged 3 commits into
mainfrom
jm/clean

Conversation

@parkjinman98

@parkjinman98 parkjinman98 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes SAM2HieraLarge promptable mask generation and SA-V dataset support from main. The full implementation is preserved on the jm/sam branch (a snapshot of main at f8d8a07).

Removed

  • mblt_vision.mask_generation (SAM2HieraLarge, prompt-encoder port, graph contracts) and models/SAM2HieraLarge.yaml
  • mask_generation from VISION_TASKS and the top-level exports
  • SA-V support: datasets/sa-v.yaml, CustomSAV, organize_sav, readiness checks, eval_sav, benchmark/organize_sav.py
  • CLI --point, encoder/decoder/prompt-weights path overrides, and SA-V val options (predict.py and _vision.py now match their pre-SAM versions)
  • The mask_generation branch of Results
  • SAM/SA-V tests and docs (root and Vision READMEs, benchmark/README.md, AGENTS.md, mblt-vision skill)

Kept (generic improvements that landed with the SAM PR)

  • wrapper.download_hub_artifact
  • _find_existing_source never returning the organized cache
  • Letterbox/postprocess fixes, MANIFEST.in, sample assets/

Test plan

  • No remaining SAM/SA-V references (grep)
  • ruff check --select F . clean, git diff --check clean
  • list_tasks() returns 8 tasks
  • pytest: 708 passed, 5 failed. All 5 are tests/test_onnx_yolo.py Hugging Face download failures (no network in the test environment); not rerun with network access

Sets __version__ to 0.0.5: 0.0.5 was never released, so this removal ships as 0.0.5.

🤖 Generated with Claude Code

Move SAM2HieraLarge promptable mask generation off main; the full
implementation is preserved on the jm/sam branch.

Removed:
- mblt_vision.mask_generation (SAM2HieraLarge, prompt encoder port,
  graph contracts) and models/SAM2HieraLarge.yaml
- the mask_generation task from VISION_TASKS and the top-level exports
- SA-V dataset support: datasets/sa-v.yaml, CustomSAV, organize_sav,
  readiness checks, eval_sav, and benchmark/organize_sav.py
- CLI point prompts, two-artifact path overrides, and SA-V val options
- the mask_generation branch of Results
- SAM/SA-V tests and documentation in the READMEs, AGENTS.md, and the
  mblt-vision skill

Kept, as generic improvements that landed with the SAM work:
wrapper.download_hub_artifact, _find_existing_source never returning the
organized cache, the letterbox/postprocess fixes, MANIFEST.in, and the
sample assets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

0.0.5 was never released, so the SAM removal ships as 0.0.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@parkjinman98

Copy link
Copy Markdown
Contributor Author

@codex review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T01:52:24.146209Z 4a6f8c1 Manual request
🔒 Security Review ✅ Completed 2026-09-29T01:52:04.571538Z 4a6f8c1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4a6f8c1c66

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a6f8c1c66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mblt_vision/_tasks.py
Comment thread AGENTS.md
The SAM cleanup cut the NYU Depth ranking rule out of AGENTS.md along
with the adjacent SA-V bullets; restore it. Record the removal of the
mask_generation surface (shipped in 0.0.3/0.0.4) as a breaking change in
the Vision README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@parkjinman98

Copy link
Copy Markdown
Contributor Author

@mobilint-review Please re-review at 0a0dccc.

Both earlier findings are addressed and resolved:

  • NYU Depth rule dropped from AGENTS.md (P2): fixed. The rule is restored verbatim.
  • Deprecate mask generation before removal (P1): closed as intentional. Please do not raise it again. The maintainer decided to remove SAM2 from main, and the code is kept on the jm/sam branch. The AGENTS.md deprecation rule covers established Model Zoo Vision behavior, and SAM2 was never part of mblt_model_zoo.vision. Because it did ship in 0.0.3/0.0.4, the removal is now documented as a breaking change in mblt_vision/README.md (pin <0.0.5). A stub or shim is deliberately not added.

Guide for this review:

  • Scope: this PR only removes code. Every added line either removes SAM/SA-V wiring or documents the removal. A complete, accurate removal is the goal, not new behavior.
  • Most useful checks:
    • Leftover references to mask_generation, SAM2HieraLarge, sa-v, eval_sav, CustomSAV, organize_sav, or --point / encoder / decoder / prompt-weights CLI options.
    • Imports or exports that now point at deleted modules.
    • Non-SAM rules or docs that were deleted by accident, like the NYU one.
  • Kept on purpose, do not flag:
    • wrapper.download_hub_artifact, a generic helper that MBLT_Engine uses.
    • The _find_existing_source guard that never returns the organized cache (it still protects nyu-depth).
    • The letterbox/postprocess fixes, MANIFEST.in, and assets/.
    • The *.tar/*.tgz gitignore entries.
  • Version: __version__ = "0.0.5" is intentional. 0.0.5 was never released, so going from 0.0.6 back to 0.0.5 is not a downgrade.
  • Known test failures: 5 failures in tests/test_onnx_yolo.py are Hugging Face download failures in a sandbox without network. They are unrelated to this PR.

@parkjinman98
parkjinman98 merged commit 27f3370 into main Sep 29, 2026
15 checks passed
@parkjinman98
parkjinman98 deleted the jm/clean branch September 29, 2026 02:05
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