P0: Strict two-map/two-head open-vocabulary segmentation foundation - #55
Merged
Conversation
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.
Summary
This PR introduces the P0 foundation for open-vocabulary heritage-facade segmentation.
Ontology v2 defines 12 stable semantic concepts, but they are not represented as 12 mutually exclusive model channels. The canonical supervised representation uses two separate target maps and two output heads so ornament geometry can overlap with damage.
Target representation
Main target
Y_mainstores stable semantic IDs:The canonical main output has 11 mutually exclusive channels:
Semantic IDs are converted to contiguous channel indices only at the model/loss boundary. Predictions are converted back to semantic IDs when exported.
Ornament target
Semantic concept 8 is
ornament_region: visible decorative geometry independent of its damage or surface condition.Y_ornamentis stored separately:Therefore, the same pixel may represent both corrosion and ornament geometry:
The canonical supervised boundary expects:
The two outputs are never collapsed through cross-head argmax or last-mask-wins logic.
Legacy
heritage_facades_v1_11classesremains an explicit separate single-mask schema. Flattened legacy masks cannot be losslessly converted into overlapping v2 targets without the original annotations.What this PR adds
Validation and reproducibility
Validation reports include:
The metadata object is intended as an integration point for future shared experiment tracking. This PR does not introduce a competing ledger, registry, or provenance JSONL file.
Verification
GitHub Actions run:
https://github.com/InsightofSPb/Compress_to_prevent/actions/runs/32167722590
Results:
Final reviewed commit:
Out of scope
This P0 PR does not include:
LPOSS integration and its positive regression tests remain future P1 work.