feat(semantics): add portable annotation, learning and review contracts
Add portable corpus, annotation provenance, admission, review and bounded agent-cycle contracts. Preserve dataset ownership and explicit research acceptance limits.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# Observed-paint geometry gate · 26.10.2026
|
||||
|
||||
Portable decision: [MISSIONCOR-93](https://ops.nodedc.ru/nodedc/browse/MISSIONCOR-93).
|
||||
This is a completed **offline representation check**, not a trained detector, production rollout or street-quality acceptance.
|
||||
|
||||
## Accepted module
|
||||
|
||||
`simulation/semantic-learning/paint_geometry.py` converts integer labels (0 background, 1 observed paint, 255 unknown) into separate 2-D Polygon features with inner rings. It uses existing Shapely/GEOS union of horizontal pixel runs. It does not run morphology, fit rectangles, group paint instances or infer missing paint. Exact collinear vertex removal is checked for geometric equality.
|
||||
|
||||
The six-number affine maps **pixel edges** (column,row) to scene XY. Full label bytes, dimensions, affine and caller source identity enter the hash. IDs identify a tile observation, not a cross-tile semantic object. Tile-edge and unknown-support contacts are explicit; completeness is always not assessed.
|
||||
|
||||
`editor_features()` adds XYZ only through an explicit height provider and provenance. Missing heights fail; there is no flat-surface fallback. Callback mutation cannot alter XY. Features remain unreviewed, with unassessed confidence and no inferred subtype/group. No function publishes a map or authorizes a dataset.
|
||||
|
||||
General paint components are rigid objects under the current editor contract; whole-object movement/removal works. This result does **not** claim vertex editing of arbitrary symbols. The current editor rejects touching rings, including a hole touching its shell at one point. The raw 2-D proposal is preserved; editor admission fails explicitly.
|
||||
|
||||
Local limits: 1,048,576 input cells; 32,768 runs per channel; editor preflight 128 rings/feature, 4096 vertices/ring, 20,000 features, 300,000 total vertices, 2,000,000 conservative segment-work units per proposal. These are refusal bounds, not measured large-map throughput. No silent simplification on budget failure. No street names or geographic coordinates are embedded.
|
||||
|
||||
## Executed evidence
|
||||
|
||||
Command:
|
||||
`.venv/bin/python scripts/check_python.py pytest tests/test_paint_geometry.py tests/test_semantic_objects.py tests/test_semantic_vectors.py tests/test_semantic_edits.py tests/test_urban_maps.py -q`
|
||||
|
||||
98 tests passed (20 new tests plus existing editor/store tests). One test exhaustively checks all 512 binary 3×3 masks. Cases cover separate/diagonal components, one-pixel gaps, background and unknown holes, reflected/sheared affine, exact area, point-touch refusal, resource preflight, mutated height callback and changed proposal identity.
|
||||
|
||||
Four synthetic cases also use actual UrbanMapStore and SemanticEdits in deleted pytest temporary directories: save/read, move one object, restart/read edits, preserve original model and other objects. The synthetic v3 envelope satisfies the existing Gaussian-specific schema for integration testing only; it is explicitly marked synthetic and is not a qualified Gaussian result. Edited state remains urban-edit/v1, never relabelled as an inference map. Dataset-ready remains false.
|
||||
|
||||
`geometry_contract_gate.py` generated one visual proof and JSON in `outputs/semantic-geometry-gate-20261026/`. Three dashes, five crossing bars, one A hole and an unknown gap survive exactly: zero raster reconstruction errors in all four cases. Root visually inspected the figure. The envelope column is an information-loss illustration, **not VMA predictions or the old production output**.
|
||||
|
||||
Optional study dependencies: NumPy, Shapely ≥2 and Pillow. Local versions 2.5.1 / 2.1.2 / 12.3.0. They were already installed; no new packages or weights downloaded. Missing optional NumPy/Shapely skips these offline tests in a default dev environment.
|
||||
|
||||
Critic found and root fixed three issues before acceptance: quadratic hole-validation cost, in-place height callback mutation and unconditional optional-dependency imports. No remaining blockers in the bounded offline gate.
|
||||
|
||||
## Production path inspected, not executed
|
||||
|
||||
The unchanged systematic `paint_observations.collect` performs morphological closing, nonzero contour approximation, minimum-area/hole thresholds and crossing rectangle fitting. `assemble_paint.py` performs semantic admission, deduplication and shape fitting. These operations can alter/remove evidence, by design; source inspection does not measure which caused each historical error. OpenCV is absent locally and the live Worker path was not invoked.
|
||||
|
||||
Do not insert the exact adapter in front of/after that chain and claim losslessness for the whole chain. For the next segmentation comparison, use the new exact path as the common geometry control. Optional shape regularization must remain a separate hypothesis carrying original evidence and measured geometry changes.
|
||||
|
||||
## VMA decision: reject the shipped SD representation as a complete paint replacement
|
||||
|
||||
Primary code was inspected on the mutable `main` branch on 26.10.2026; no upstream commit was pinned or code executed.
|
||||
|
||||
- [SD box configuration](https://raw.githubusercontent.com/hustvl/VMA/main/projects/configs/vma_res152_e80_box.py): crosswalk and symbols are box instances. [Box assembly](https://raw.githubusercontent.com/hustvl/VMA/main/demo/combine_and_save_driving_box.py) reduces crosswalks to an oriented rectangle. That omits each bar's position and width.
|
||||
- [SD line configuration](https://raw.githubusercontent.com/hustvl/VMA/main/projects/configs/vma_res152_e80_line.py) and [line assembly](https://raw.githubusercontent.com/hustvl/VMA/main/demo/combine_and_save_driving_line.py): lane polylines plus categorical attributes do not encode individual dash footprints or phase.
|
||||
- [Freespace assembly](https://raw.githubusercontent.com/hustvl/VMA/main/demo/combine_and_save_driving_freespace.py) serializes exterior coordinates; no inner-ring structure is retained.
|
||||
- [RGB loading/inference](https://raw.githubusercontent.com/hustvl/VMA/main/demo/inference_and_combine_function.py) confirms a three-channel RGB input and tile-coordinate assembly. Missing LiDAR is not a valid reason to reject this route.
|
||||
|
||||
Information-content counterexamples are tested: different dash/crossing masks have identical summary envelopes; a holed and solid symbol have identical exteriors. No inverse using only that summary can recover both originals. This settles the shipped-output contract question without GPU training, not the potential of a differently trained VMA.
|
||||
|
||||
VMA remains a possible semantic line/zone stage, or a future dash/bar instance model with new labels, classes and assembly. Holes require rings/relations or a separate mask. Cross-tile instance reconciliation and confidence export also require work. Do not spend the next training budget on treating shipped VMA as a ready substitute for exact paint.
|
||||
|
||||
## Next decision and execution boundary
|
||||
|
||||
Next candidate: one full-network SegFormer MiT-B0 recipe against the frozen G research baseline, using the **same** exact geometry path. This tests a substantially different representation than another F/G/H/S/P head adjustment. [Official MMSegmentation configuration](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/segformer/segformer_mit-b0_8xb2-160k_ade20k-512x512.py) is the starting point, not an already-qualified model for our data.
|
||||
|
||||
Bounded specification: `outputs/semantic-geometry-gate-20261026/next-experiment.json`. It is not an executable release yet: exact data/weights/dependencies must be pinned, geographic separation established, whole objects/background reviewed, and Worker execution authorized. Existing 26 heavily used windows are development evidence; they cannot become a new independent test by renaming the split. Preserve the preceding admission requirements in `parent-refresh-1/NEXT_EXPERIMENT_ADMISSION.md`.
|
||||
|
||||
The owner's current instruction remains: do not touch Worker. No Worker command, training, model installation, live-map mutation or power operation occurred in this gate.
|
||||
Reference in New Issue
Block a user