Skip to content

Add stock LPOSS inference runner with explicit maskclip_raw / lposs / lposs_plus modes - #58

Merged
InsightofSPb merged 12 commits into
masterfrom
codex/integrate-genuine-lposs-inference-in-repository
Aug 26, 2026
Merged

InsightofSPb merged 12 commits into
masterfrom
codex/integrate-genuine-lposs-inference-in-repository

Conversation

@InsightofSPb

Copy link
Copy Markdown
Owner

Motivation

  • Confirmed root cause: legacy FineTuneWrapper-based paths invoked clip_backbone and MaskCLIP decode-head probabilities directly, bypassing LPOSS.forward (DINO extraction, patch affinity graph, LPOSS label propagation, and LPOSS+ pixel refinement).
  • Additional defects: segmentation/evaluation/lposs_eval.py allocated solver tensors on a hardcoded generic CUDA device and contained a duplicated conditional-expression in LPOSS_Infrencer.forward, and the legacy head applied softmax before any propagation so probabilities were treated like logits.
  • Goal: restore one reliable stock open-vocabulary inference path that reproduces upstream LPOSS behavior (three explicit modes), preserves historical MaskCLIP-only reproduction paths, and fails closed when graph dependencies are missing.

Description

  • Implemented a modular stock inference engine ovs_heritage/stock_lposs.py exposing three explicit modes: maskclip_raw (frozen MaskCLIP features → raw cosine seed scores), lposs (adds frozen DINO extraction + patch-level LPOSS propagation), and lposs_plus (adds LPOSS+ pixel refinement), with injectable propagator and truthful stage metadata in ExecutionMetadata.
  • Added a dataset-independent CLI entry point python -m ovs_heritage.infer_ovs (ovs_heritage/infer_ovs.py) supporting single image / directory / manifest input, explicit model config, canonical vocabulary reuse, extra runtime concepts, device selection, optional score saving, optional ledger recording, and deterministic run_manifest.json output; the CLI rejects silent slide-mode approximations and documents behavior and provenance.
  • Adapted upstream vendored graph utilities via a thin adapter UpstreamGraphPropagator calling segmentation/evaluation/lposs_eval.py graph builders and solvers, and made the solver device-aware to avoid hardcoded `

Codex Task

InsightofSPb and others added 6 commits August 20, 2026 23:02
…58-with-requested-fixes

Harden stock LPOSS inference: PyTorch-1.12 compatibility, pinned upstream, memory preflights, provenance and parity harness
chore: ignore local datasets and experiment artifacts
…tate-hashing-fix-to-pr-#58

Fix scalar-state hashing for PyTorch 1.12 in state hashing utilities
@InsightofSPb
InsightofSPb merged commit f4691b7 into master Aug 26, 2026
1 check passed
@InsightofSPb
InsightofSPb deleted the codex/integrate-genuine-lposs-inference-in-repository branch August 26, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant