feat(research): preserve urban geometry pipelines and qualification suites
Preserve offline geometry, marking, replay and evaluation pipelines with source manifests and synthetic tests. Research qualification does not activate these methods as production navigation.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Компактные велосипедные знаки из Gaussian-рендеров
|
||||
|
||||
Этот проход дополняет существующую разметку. Входы — принятый план, калиброванные Gaussian-рендеры, поля поверхности и зафиксированные результаты SAM3. Облака точек и ручные области не используются.
|
||||
|
||||
## Последовательность
|
||||
|
||||
1. OpenCV ищет компактные рисунки краски с внутренними отверстиями во всех наблюдаемых дорожных и пешеходных поверхностях. Старые семантические кандидаты автоматически центрируются повторно.
|
||||
2. Вырезки имеют единый метрический размер 3 м. Ближайший покрывающий кадр выбирается по геометрии до проверки краски.
|
||||
3. Предварительный контекстный фильтр использует только необходимую верхнюю оценку длины соседних полос. Грубая регистрация готового велосипедного пресета отсеивает очевидно неподходящие формы. Семантические кандидаты сохраняются независимо от этой проверки.
|
||||
4. Тот же зафиксированный SAM3 распознаёт велосипедный символ в увеличенных вырезках. Высокий ответ модели сам по себе не даёт права добавить объект.
|
||||
5. OpenCV/SciPy подбирают положение, масштаб и поворот атрибутированного SVG-пресета. Минимальная длина предложения — 0,35 м, площадь — 0,025 м². Эти пределы относятся к поиску кандидатов, а не к признанию соответствия ГОСТ.
|
||||
6. Размытие учитывается при подборе, но не включается в итоговый вектор: смещение контура пресета равно нулю. Сетка проверки — 1 см; это шаг вычисления, не заявление о геодезической точности. Допуск краски — два пикселя исходного рендера, ограниченные диапазоном 2–4 см.
|
||||
7. Сохраняются проверки полного символа, отрицательного пространства, контекста полос, покрытия и доступных дополнительных видов. В исходной политике допускается сильный полный основной вид при отсутствии покрытия вторым видом; такой случай не называется подтверждением по двум видам.
|
||||
8. Независимый аудит воспроизводит все транзакции, проверяет чистую геометрию пресета и неизменность остальных слоёв. Публикация отделена от экспериментального запуска и требует просмотра всех изменённых объектов и точного чтения результата из Mission Core.
|
||||
|
||||
## Границы применения
|
||||
|
||||
Это дополнительный офлайн-проход на Worker 006. Он не подключает автоматически новую обработку к обычной кнопке анализа в интерфейсе. Принятые карты доставляются существующим протоколом квалифицированной публикации.
|
||||
|
||||
Топологический поиск может пропускать сильно стёртые символы без различимых колёс. Контекст полос также ограничивает обнаружение символов на изолированных пешеходных площадках. Отсутствие нового объекта в результате не доказывает отсутствие разметки в скане. Проверка нескольких карт не является доказательством работы на любых дорогах.
|
||||
|
||||
Исходный контракт унаследованных ортографических кадров — 60 м и калибровочная сетка 1200 px. Изменение этого контракта требует согласованной замены вычисления масштаба в подготовке данных; это ограничение формата, а не настройка отдельной улицы.
|
||||
|
||||
## Артефакты
|
||||
|
||||
`compact_symbols_bundle.json` фиксирует замыкание исходников, контрольные суммы и образы выполнения. Манифест каждого запуска хранит фактические входы и снимок исходников; результаты и неудачные эксперименты находятся в `.runtime/simulation-qualifications`, изображения — в `outputs`. Промежуточные результаты не означают публикацию.
|
||||
|
||||
## Принятый результат 15 октября 2026
|
||||
|
||||
Квалификация `compact-metric-refinement-20261015T083722Z`: восемь карт проверены одним набором правил, три синтетических проверки пройдены. Добавлены три велосипедных знака — один на Маросейке, два на Сретенке. Все остальные объекты сохранены; ручных исправлений геометрии нет. Все восемь карт опубликованы через канонический API и прочитаны обратно с точным совпадением. Предыдущие карты сохранены протоколом публикации.
|
||||
|
||||
Изображения всех трёх изменений и итог: `outputs/compact-metric-refinement-20261015T083722Z/`. Машинные аудиты, исходники запуска, контрольные суммы входов, публикация и подтверждение освобождения воркера: `.runtime/simulation-qualifications/compact-metric-refinement-20261015T083722Z/`.
|
||||
|
||||
Сравнение контекстной и наземной глубины не дало достаточного основания удалить подозрительные старые фрагменты возле автомобилей. Эта часть остаётся открытой.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Local evidence for final linear markings
|
||||
|
||||
This offline pass accepts any final Gaussian plan and its calibrated survey,
|
||||
semantic fields, and coverage renders. There are no feature IDs, place names,
|
||||
coordinate overrides, or operator-drawn regions in the detector modules.
|
||||
|
||||
`audit_linear_windows.py` partitions each linear marking into disjoint 3 m
|
||||
ownership cells using Shapely. The existing `glyph_views` sampler adds a 1 m
|
||||
context halo, so adjacent image windows overlap. Areas are counted once, and the
|
||||
union must equal the original polygon. Tiny fragments containing no 4 cm sample
|
||||
are explicitly unmeasured. Geometry and inference provenance are preserved.
|
||||
|
||||
The two nearest eligible render tiles are chosen by geometry before their paint
|
||||
is read. Existing thresholds remain: 98% valid coverage, at most 20% paint support
|
||||
for weak evidence, and at least 85% for strong paint support. Mixed paint,
|
||||
occlusion/semantic mismatch, and absent render coverage remain separate states.
|
||||
The per-feature `linear_support` field reports measured area fractions; it is
|
||||
not a calibrated probability, a label for traversability, or a completeness score.
|
||||
Repeating the audit refreshes this field while preserving every other property.
|
||||
`linear_windows_bundle.json` declares the audit's complete local source closure;
|
||||
the coverage planner and renderer reuse the existing corridor bundle separately.
|
||||
|
||||
`plan_linear_coverage.py` converts every missing-window footprint to an input for
|
||||
the existing `coverage_plan.plan_centers`. The existing `render_coverage.py`
|
||||
creates metric 60 m / 4096 pixel Gaussian renders, using its prior height slice,
|
||||
10 m center grid and 40-tile budget. No extra physical observation is claimed.
|
||||
`linear_coverage_views.py` verifies their hashes and appends them to the original
|
||||
views without modifying prior evidence. Unknown vehicle-mask coverage remains
|
||||
blocked. `EXTRA_COVERAGE_ROOT` is optional.
|
||||
|
||||
The previous whole-object audit is optional (`/previous-audit.json`) and is used
|
||||
only for comparison. It is never needed to run on a new location. When supplied,
|
||||
it must match the input map hash. Required mounts follow existing research
|
||||
passes: `/fullplan`, `/survey`, `/ortho`, `/evidence_plan`, `/coverage_base`, and
|
||||
`/out`; all evidence mounts are read-only. The runtime dependencies and source
|
||||
hashes must be pinned in the qualification manifest.
|
||||
|
||||
Weak paint alone never deletes geometry. Additional renders can also be supplied
|
||||
to the existing corridor reconstruction pass: this is a separate operation with
|
||||
its own paint/gap/edge checks, before/after transactions and replay audit.
|
||||
Nonlinear symbols, road boundaries, pedestrian zones, facades and crosswalks
|
||||
must remain unchanged by that operation. Render every transaction before
|
||||
admitting its output for experimental display.
|
||||
|
||||
Publish accepted maps through `scripts/publish_qualified_urban_maps.py`, keeping
|
||||
previous revisions and exact API readback. The ordinary product analysis button
|
||||
does not yet execute the complete research chain. Neither two renders of one
|
||||
Gaussian model nor these tests establish surveyed accuracy or recognition recall.
|
||||
|
||||
`tests/test_urban_linear_windows.py` covers disjoint area ownership, curved paths,
|
||||
holes, long lines, missing/occluded/disagreeing views, undersampled fragments and
|
||||
coordinate translation. Run its scientific dependencies on Worker 006.
|
||||
@@ -0,0 +1,160 @@
|
||||
Qualified marking refinements
|
||||
=============================
|
||||
|
||||
This directory contains offline, Worker-executed refinements of an existing
|
||||
Gaussian-derived infrastructure map. They are not the installed Analyze job
|
||||
provider. Qualified output documents can be published through the existing
|
||||
Mission Core urban-map API; publication is separate from automatic job-chain
|
||||
integration. Do not describe one as the other.
|
||||
|
||||
Whole-arrow admission
|
||||
---------------------
|
||||
|
||||
``arrow_admission_bundle.json`` describes the frozen dependency closure for
|
||||
``paved-whole-arrow-admission-v7``. ``refine_arrow_admission.py`` consumes a
|
||||
baseline map, cached semantic arrow proposals, their source image/mask manifests,
|
||||
Gaussian orthographic views, semantic ground fields and optional previously
|
||||
computed registration candidates. All decisions are recomputed against the
|
||||
input pixels. It does not read a point cloud, collider, location-specific
|
||||
coordinates or manually drawn region.
|
||||
|
||||
The pass treats a pre-existing linear stem as a fragment, not as proof that the
|
||||
whole arrow was already recognized. The existing strict conflict policy must
|
||||
still approve every consumed fragment; an intersecting independent lane line
|
||||
cannot be removed. Existing complete symbols remain protected.
|
||||
|
||||
Arrow context is observed paved ground. The bicycle-specific requirement for
|
||||
nearby parallel strips is not mandatory for arrows. Independent semantic extent
|
||||
limits optimization targets so connected asphalt texture cannot dominate the
|
||||
fit. That extent only seeds the final connectivity check: paint continuing
|
||||
beyond the semantic mask remains visible to the completeness checks. Raw paint
|
||||
connectivity is intentionally not opened morphologically in v7, because coarse
|
||||
opening erased real thin continuations in the examined inputs. This conservative
|
||||
choice can also reject useful candidates connected to texture.
|
||||
|
||||
This admission stage produces a deformable catalogue fit, not a traced paint
|
||||
contour. It is a candidate initializer: its independently adjustable head and
|
||||
branch parameters do not preserve a dimensioned marking's proportions. Apply
|
||||
the fixed-proportion refinement below before treating a result as an immutable
|
||||
1.18 preset.
|
||||
Registration checks overlap, boundary residuals and both XY coordinates of the
|
||||
head/tail ends. The local optional tip refinement uses bounded SciPy Powell
|
||||
optimization of the same preset parameters. ``paved_registration.py`` is mounted
|
||||
as ``registration.py`` only in this bundle; the inherited joint-pass module is
|
||||
unchanged. Homography-transformed geometry and all evidence probes share the
|
||||
same exact coordinate transform. Exterior probes count endpoint-connected paint,
|
||||
not an unrelated nearby stripe. Source view support, semantic identity, complete
|
||||
head/tail evidence and Gaussian-derived heights remain required.
|
||||
|
||||
Qualification and publication
|
||||
-----------------------------
|
||||
|
||||
Run on the pinned Worker image in bounded, reservation-owned containers. The
|
||||
qualification records source hashes, immutable inputs, per-stage execution and
|
||||
cleanup receipts. Admission requires all of:
|
||||
|
||||
* ``test_arrow_admission.py``: fragment ownership, crossing-line protection,
|
||||
offset/wrong-end rejection, continuation outside the semantic mask, and exact
|
||||
projective frame consistency.
|
||||
* ``audit_arrow_admission.py``: exact transaction replay, catalogue geometry,
|
||||
unchanged non-marking layers and finite Gaussian-derived coordinates.
|
||||
* ``audit_arrow_sources.py``: provenance back to original cached fits, image
|
||||
manifests and semantic masks.
|
||||
* ``verify_arrow_observations.py``: independent pixel and height remeasurement of
|
||||
every admitted object using the recorded parameters and transforms.
|
||||
* Visual review of every new transaction on the raw Gaussian render, followed
|
||||
by publication preflight and exact API readback. Numeric acceptance alone is
|
||||
insufficient; intermediate numerically accepted partial-head fits were rejected.
|
||||
|
||||
``scripts/publish_qualified_urban_maps.py`` preserves the previous documents and
|
||||
refuses unrelated live changes between planning and apply. Private evidence and
|
||||
the publication manifest belong under ``.runtime/simulation-qualifications``;
|
||||
images belong under ``outputs``. Their private IDs and coordinates are not rules.
|
||||
|
||||
Scope of the 2026-10-15 qualification
|
||||
-----------------------------------
|
||||
|
||||
The final identical-policy eight-scene pass examined 149 deduplicated arrow
|
||||
hypotheses and admitted one additional complete turn arrow. All five synthetic
|
||||
checks, eight transaction audits, eight source audits and eight observation
|
||||
audits passed. Existing features were preserved. Source inspection found no
|
||||
location-name overrides or manual regions in this increment. This is a bounded
|
||||
regression qualification, not proof of recall on arbitrary roads, metric survey
|
||||
accuracy, marking-standard compliance or autonomous driving authority.
|
||||
|
||||
``audit_zigzag_coverage.py`` measures individual cached zigzag legs against
|
||||
existing zigzag objects. It reports missing candidate legs without adding them;
|
||||
candidate overlap is not independent ground-truth recall. The current audit
|
||||
identified four potentially uncovered legs requiring image and identity review.
|
||||
No new bicycle or zigzag objects were published by the arrow pass.
|
||||
|
||||
Fixed-proportion 1.18 arrows
|
||||
---------------------------
|
||||
|
||||
``fixed_arrow_bundle.json`` records the source closure for
|
||||
``fixed-118-similarity-v4``. ``standard_arrow_templates.py`` constructs five
|
||||
immutable profiles (straight, left, right, straight-left, straight-right), each
|
||||
with the two size variants from GOST R 51256-2018 figure B.5/table B.1. Source:
|
||||
https://www.mos.ru/upload/documents/files/1106/GOSTR51256-2018TehnicheskiesredstvaorganizaciidorojnogodvijeniyaR_.pdf
|
||||
The selected variant does not establish a speed limit or regulatory compliance.
|
||||
|
||||
``refine_standard_arrows.py`` examines every existing eligible arrow with the
|
||||
same rules. It selects a profile and optimizes exactly four parameters: two
|
||||
translations, rotation and uniform scale. Head width, neck angle, stem width,
|
||||
branch station and all vertex proportions are fixed. There is no affine shear,
|
||||
homography or independent vertex fitting in this stage. Existing geometry only
|
||||
initializes a bounded search; independent semantic evidence still supplies the
|
||||
symbol identity and target extent.
|
||||
|
||||
``fit_standard_arrows.py`` uses SciPy differential evolution followed by Powell
|
||||
refinement. The objective combines paint overlap with every immutable corner's
|
||||
distance to the observed paint edge. Overlap alone can leave a narrow tip
|
||||
misplaced. Corner measurements use the original paint, not an edge created by
|
||||
clipping a semantic mask. Whole-symbol connectivity, source-view coverage,
|
||||
head/tail support, foreign-marking protection and Gaussian-derived height checks
|
||||
remain mandatory. Unsuccessful fits retain the previous feature unchanged.
|
||||
|
||||
``test_standard_arrows.py`` checks profile dimensions, mirror symmetry,
|
||||
similarity invariance, malformed scale, extraneous paint, semantic clipping and
|
||||
recovery of a translated/rotated synthetic arrow. ``verify_standard_arrows.py``
|
||||
reconstructs each exact preset from recorded parameters, remeasures original
|
||||
pixels and heights, and replays every transaction. In the eight-scene run on
|
||||
2026-10-15, 25 of 30 eligible arrows were replaced and individually inspected:
|
||||
13 Maroseyka, 8 Pokrovka, and one each on both Mira scenes, Sadovaya-Triumfalnaya
|
||||
and Sretenka. Five failed placement evidence and remain unchanged. The separate
|
||||
1.19 merge arrow is outside this preset conversion. All eight published maps
|
||||
passed exact canonical API readback. This does not expand candidate recall or
|
||||
integrate this stage into the installed Analyze job.
|
||||
|
||||
Observed zigzag endpoint extension
|
||||
----------------------------------
|
||||
|
||||
``zigzag_extension_bundle.json`` freezes ``observed-periodic-zigzag-end-v1``.
|
||||
``refine_zigzag_extensions.py`` examines all existing clean zigzag patterns,
|
||||
derives their alternating two-leg period, and proposes at most one complete
|
||||
additional leg at each end. A proposal needs at least five existing legs,
|
||||
consistent phase, original yellow paint support in two Gaussian source views,
|
||||
known surface, low unexplained paint and no foreign-marking conflict. Existing
|
||||
vertices and width are preserved. Unknown paint is not synthesized from period
|
||||
alone. ``verify_zigzag_extensions.py`` repeats geometry, pixels, height and
|
||||
transaction checks independently from serialized acceptance flags.
|
||||
|
||||
The eight-scene run examined 16 endpoints and extended one pattern on Sretenka.
|
||||
The added leg was visually reviewed and published with exact API readback.
|
||||
Three other cached candidate legs were a false zigzag over ordinary linework;
|
||||
they were not added. A visibly shorter terminal return remains outside the
|
||||
full-period extension rule. ``audit_completed_zigzags.py`` evaluates the output
|
||||
map, whereas the earlier coverage auditor evaluates its baseline. Neither is
|
||||
ground-truth recall: the cached proposals omit that terminal return.
|
||||
|
||||
Next implementation boundaries
|
||||
------------------------------
|
||||
|
||||
Handle shortened terminal zigzag returns using observed endpoints without
|
||||
inventing a full period. Resolve the five rejected fixed-preset fits and add
|
||||
dimensioned 1.19 presets while keeping immutable proportions.
|
||||
Expand arrow candidate recall beyond the existing semantic cache while retaining
|
||||
the complete-symbol and frame checks. False positive removal needs positive
|
||||
counter-evidence, not merely missing paint in a blurred Gaussian view. Package
|
||||
the complete qualified stage chain into the normal Analyze lifecycle separately,
|
||||
including cancellation, resource ownership and reproducible fresh-input runs.
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Whole-arrow context is paved ground, not the presence of parallel stripes.
|
||||
|
||||
An extracted stem is a replaceable fragment only after whole-symbol evidence.
|
||||
Existing non-linear symbols retain priority; arbitrary crossing lines veto the
|
||||
transaction through the inherited component_conflicts checks.
|
||||
"""
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
from glyph_rules import POLICY as GLYPH_POLICY, accept_symbol
|
||||
|
||||
VERSION = 'paved-whole-arrow-admission-v7'
|
||||
POLICY = {**GLYPH_POLICY, 'arrow_context': 'observed-paved-ground',
|
||||
'surface_classes': [1, 2], 'parallel_stripes_required': False, 'arrow_connectivity_open_m': 0.,
|
||||
'replacement': 'existing-whole-symbol-conflict-policy',
|
||||
'registration_required': True,
|
||||
'paint_connectivity_scope': 'whole-observed-paved-component-with-semantic-seed',
|
||||
'end_probe_validity': 'observed-symbol-endpoint',
|
||||
'end_probe_paint': 'endpoint-connected-paved-paint'}
|
||||
|
||||
|
||||
def already_has_symbol(target, features):
|
||||
symbols = [shapely.force_2d(shape(f['geometry'])) for f in features
|
||||
if f['properties'].get('class') == 'road_marking'
|
||||
and f['properties'].get('subtype') != 'linear_marking']
|
||||
covered = shapely.union_all(symbols).buffer(.12).intersection(target).area
|
||||
return covered / max(target.area, 1e-9) > .5
|
||||
|
||||
|
||||
def registered_geometry_passes(metrics):
|
||||
# Absolute gates apply to new geometry; the inherited registration gain
|
||||
# test belongs to replacing an already accepted object, not first admission.
|
||||
from registration import POLICY as REGISTRATION_POLICY
|
||||
first = metrics[0]
|
||||
if first['coverage'] != 1. or first['valid'] < REGISTRATION_POLICY['min_valid']:
|
||||
return False
|
||||
for rank, m in enumerate(metrics):
|
||||
if rank and m['coverage'] < .95:
|
||||
continue
|
||||
if m['valid']/max(m['coverage'],1e-9) < REGISTRATION_POLICY['min_valid']:
|
||||
return False
|
||||
if m['iou'] < REGISTRATION_POLICY['min_iou']:
|
||||
return False
|
||||
if m['boundary_mean_m'] > REGISTRATION_POLICY['max_boundary_mean_m'] or m['boundary_p90_m'] > REGISTRATION_POLICY['max_boundary_p90_m']:
|
||||
return False
|
||||
if m.get('endpoint_xy_error_m',m['endpoint_error_m']) > REGISTRATION_POLICY['max_endpoint_error_m'] + (.04 if rank else 0.):
|
||||
return False
|
||||
if m['endpoint_error_m'] > REGISTRATION_POLICY['max_endpoint_error_m'] + (.04 if rank else 0.):
|
||||
return False
|
||||
return True
|
||||
@@ -0,0 +1,401 @@
|
||||
{
|
||||
"schema": "missioncore.urban-refinement-bundle/v1",
|
||||
"root": "simulation/urban-plan-research",
|
||||
"files": {
|
||||
"assembly_evidence.py": "assembly_pass/assembly_evidence.py",
|
||||
"assembly_rules.py": "assembly_pass/assembly_rules.py",
|
||||
"assembly_templates.py": "assembly_pass/assembly_templates.py",
|
||||
"assembly_zigzag.py": "assembly_pass/assembly_zigzag.py",
|
||||
"audit_assembly.py": "assembly_pass/audit_assembly.py",
|
||||
"audit_assembly_joins.py": "assembly_pass/audit_assembly_joins.py",
|
||||
"audit_beta.py": "beta_pass/audit_beta.py",
|
||||
"audit_catalog.py": "catalog_pass/audit_catalog.py",
|
||||
"audit_completion.py": "completion_pass/audit_completion.py",
|
||||
"audit_components.py": "component_pass/audit_components.py",
|
||||
"audit_consensus.py": "consensus_pass/audit_consensus.py",
|
||||
"audit_corridor.py": "corridor_pass/audit_corridor.py",
|
||||
"audit_discovery.py": "discovery_pass/audit_discovery.py",
|
||||
"audit_norms.py": "norms_pass/audit_norms.py",
|
||||
"audit_rows.py": "rows_pass/audit_rows.py",
|
||||
"audit_search.py": "search_pass/audit_search.py",
|
||||
"audit_sections.py": "sections_pass/audit_sections.py",
|
||||
"audit_symbols.py": "symbol_pass/audit_symbols.py",
|
||||
"audit_transitions.py": "transitions_pass/audit_transitions.py",
|
||||
"beta_profiles.py": "beta_pass/beta_profiles.py",
|
||||
"bicycle_artwork.py": "catalog_pass/bicycle_artwork.py",
|
||||
"catalog_context.py": "catalog_pass/catalog_context.py",
|
||||
"catalog_dependencies.py": "catalog_pass/catalog_dependencies.py",
|
||||
"catalog_dependency_pins.py": "catalog_pass/catalog_dependency_pins.py",
|
||||
"catalog_evidence.py": "symbol_pass/catalog_evidence.py",
|
||||
"catalog_rules.py": "catalog_pass/catalog_rules.py",
|
||||
"catalog_templates.py": "catalog_pass/catalog_templates.py",
|
||||
"catalog_zigzag.py": "catalog_pass/catalog_zigzag.py",
|
||||
"completion_profiles.py": "completion_pass/completion_profiles.py",
|
||||
"component_arrows.py": "component_pass/component_arrows.py",
|
||||
"component_bicycle.py": "component_pass/component_bicycle.py",
|
||||
"component_conflicts.py": "component_pass/component_conflicts.py",
|
||||
"component_evidence.py": "component_pass/component_evidence.py",
|
||||
"component_mosaics.py": "component_pass/component_mosaics.py",
|
||||
"component_rules.py": "component_pass/component_rules.py",
|
||||
"component_surface.py": "component_pass/component_surface.py",
|
||||
"component_targets.py": "component_pass/component_targets.py",
|
||||
"component_zigzag_rules.py": "component_pass/component_zigzag_rules.py",
|
||||
"consensus_profiles.py": "consensus_pass/consensus_profiles.py",
|
||||
"coordinate_cache.py": "orthophoto/coordinate_cache.py",
|
||||
"corridor_profiles.py": "search_pass/corridor_profiles.py",
|
||||
"coverage_evidence.py": "coverage_pass/coverage_evidence.py",
|
||||
"coverage_plan.py": "corridor_pass/coverage_plan.py",
|
||||
"diagnose_assembly.py": "assembly_pass/diagnose_assembly.py",
|
||||
"diagnose_components.py": "component_pass/diagnose_components.py",
|
||||
"diagnose_corridor.py": "corridor_pass/diagnose_corridor.py",
|
||||
"diagnose_coverage.py": "corridor_pass/diagnose_coverage.py",
|
||||
"discovery_evidence.py": "discovery_pass/discovery_evidence.py",
|
||||
"discovery_rules.py": "discovery_pass/discovery_rules.py",
|
||||
"extract_assembly.py": "assembly_pass/extract_assembly.py",
|
||||
"extract_catalog.py": "catalog_pass/extract_catalog.py",
|
||||
"extract_discovery.py": "discovery_pass/extract_discovery.py",
|
||||
"extract_search.py": "search_pass/extract_search.py",
|
||||
"fit_scene.py": "full_plan/fit_scene.py",
|
||||
"fragment_templates.py": "discovery_pass/fragment_templates.py",
|
||||
"gost_catalog.py": "norms_pass/gost_catalog.py",
|
||||
"image_profiles.py": "lines_pass/image_profiles.py",
|
||||
"inspect_bicycles.py": "catalog_pass/inspect_bicycles.py",
|
||||
"inspect_catalog.py": "catalog_pass/inspect_catalog.py",
|
||||
"interval_profiles.py": "intervals_pass/interval_profiles.py",
|
||||
"join_assembly.py": "assembly_pass/join_assembly.py",
|
||||
"layer_common.py": "full_plan/layer_common.py",
|
||||
"line_reconstruction.py": "intervals_pass/line_reconstruction.py",
|
||||
"mapping.py": "corridor_pass/mapping.py",
|
||||
"norm_profiles.py": "norms_pass/norm_profiles.py",
|
||||
"ortho_terrain.py": "orthophoto/ortho_terrain.py",
|
||||
"paint_channels.py": "component_pass/paint_channels.py",
|
||||
"paint_templates.py": "continuation_pass/paint_templates.py",
|
||||
"prepare_symbols.py": "symbol_pass/prepare_symbols.py",
|
||||
"refine_assembly.py": "assembly_pass/refine_assembly.py",
|
||||
"refine_beta.py": "beta_pass/refine_beta.py",
|
||||
"refine_catalog.py": "catalog_pass/refine_catalog.py",
|
||||
"refine_completion.py": "completion_pass/refine_completion.py",
|
||||
"refine_components.py": "component_pass/refine_components.py",
|
||||
"refine_consensus.py": "consensus_pass/refine_consensus.py",
|
||||
"refine_corridor.py": "corridor_pass/refine_corridor.py",
|
||||
"refine_discovery.py": "discovery_pass/refine_discovery.py",
|
||||
"refine_norms.py": "norms_pass/refine_norms.py",
|
||||
"refine_rows.py": "rows_pass/refine_rows.py",
|
||||
"refine_search.py": "search_pass/refine_search.py",
|
||||
"refine_sections.py": "sections_pass/refine_sections.py",
|
||||
"refine_symbols.py": "symbol_pass/refine_symbols.py",
|
||||
"refine_transitions.py": "transitions_pass/refine_transitions.py",
|
||||
"refine_zigzags.py": "component_pass/refine_zigzags.py",
|
||||
"render_assembly.py": "assembly_pass/render_assembly.py",
|
||||
"render_beta.py": "beta_pass/render_beta.py",
|
||||
"render_catalog.py": "catalog_pass/render_catalog.py",
|
||||
"render_completion.py": "completion_pass/render_completion.py",
|
||||
"render_components.py": "component_pass/render_components.py",
|
||||
"render_consensus.py": "consensus_pass/render_consensus.py",
|
||||
"render_corridor.py": "corridor_pass/render_corridor.py",
|
||||
"render_coverage.py": "corridor_pass/render_coverage.py",
|
||||
"render_discovery.py": "discovery_pass/render_discovery.py",
|
||||
"render_hypotheses.py": "component_pass/render_hypotheses.py",
|
||||
"render_norms.py": "norms_pass/render_norms.py",
|
||||
"render_plan.py": "catalog_pass/render_plan.py",
|
||||
"render_rows.py": "rows_pass/render_rows.py",
|
||||
"render_search.py": "search_pass/render_search.py",
|
||||
"render_sections.py": "sections_pass/render_sections.py",
|
||||
"render_symbols.py": "symbol_pass/render_symbols.py",
|
||||
"render_transitions.py": "transitions_pass/render_transitions.py",
|
||||
"review_symbols.py": "symbol_pass/review_symbols.py",
|
||||
"road_glyph_presets.py": "continuation_pass/road_glyph_presets.py",
|
||||
"row_evidence.py": "corridor_pass/row_evidence.py",
|
||||
"row_profiles.py": "rows_pass/row_profiles.py",
|
||||
"search_rules.py": "search_pass/search_rules.py",
|
||||
"search_views.py": "search_pass/search_views.py",
|
||||
"section_profiles.py": "sections_pass/section_profiles.py",
|
||||
"semantic_symbols.py": "symbol_pass/semantic_symbols.py",
|
||||
"symbol_evidence.py": "symbol_pass/symbol_evidence.py",
|
||||
"symbol_rules.py": "symbol_pass/symbol_rules.py",
|
||||
"test_assembly.py": "assembly_pass/test_assembly.py",
|
||||
"test_beta.py": "beta_pass/test_beta.py",
|
||||
"test_catalog.py": "catalog_pass/test_catalog.py",
|
||||
"test_completion.py": "completion_pass/test_completion.py",
|
||||
"test_components.py": "component_pass/test_components.py",
|
||||
"test_consensus.py": "consensus_pass/test_consensus.py",
|
||||
"test_corridor.py": "corridor_pass/test_corridor.py",
|
||||
"test_discovery.py": "discovery_pass/test_discovery.py",
|
||||
"test_intervals.py": "intervals_pass/test_intervals.py",
|
||||
"test_lines.py": "lines_pass/test_lines.py",
|
||||
"test_norms.py": "norms_pass/test_norms.py",
|
||||
"test_rows.py": "rows_pass/test_rows.py",
|
||||
"test_search.py": "search_pass/test_search.py",
|
||||
"test_sections.py": "sections_pass/test_sections.py",
|
||||
"test_symbols.py": "symbol_pass/test_symbols.py",
|
||||
"test_transitions.py": "transitions_pass/test_transitions.py",
|
||||
"transition_profiles.py": "transitions_pass/transition_profiles.py",
|
||||
"validation.py": "corridor_pass/validation.py",
|
||||
"zigzag_evidence.py": "component_pass/zigzag_evidence.py",
|
||||
"zigzag_mosaics.py": "component_pass/zigzag_mosaics.py",
|
||||
"audit_coverage.py": "coverage_pass/audit_coverage.py",
|
||||
"render_coverage_changes.py": "coverage_pass/render_coverage_changes.py",
|
||||
"test_coverage.py": "coverage_pass/test_coverage.py",
|
||||
"coverage_crossings.py": "coverage_pass/coverage_crossings.py",
|
||||
"zigzag_segments.py": "coverage_pass/zigzag_segments.py",
|
||||
"audit_scene.py": "coverage_pass/audit_scene.py",
|
||||
"refine_coverage.py": "coverage_pass/refine_coverage.py",
|
||||
"coverage_rules.py": "coverage_pass/coverage_rules.py",
|
||||
"refine_patterns.py": "coverage_pass/refine_patterns.py",
|
||||
"refine_crossings.py": "coverage_pass/refine_crossings.py",
|
||||
"coverage_patterns.py": "coverage_pass/coverage_patterns.py",
|
||||
"crossing_completion.py": "families_pass/crossing_completion.py",
|
||||
"crosswalk_family.py": "full_plan/crosswalk_family.py",
|
||||
"recall_extent.py": "recall_pass/recall_extent.py",
|
||||
"render_recall.py": "recall_pass/render_recall.py",
|
||||
"refine_recall.py": "recall_pass/refine_recall.py",
|
||||
"recall_rules.py": "recall_pass/recall_rules.py",
|
||||
"recall_templates.py": "recall_pass/recall_templates.py",
|
||||
"diagnose_recall.py": "recall_pass/diagnose_recall.py",
|
||||
"recall_targets.py": "recall_pass/recall_targets.py",
|
||||
"test_recall.py": "recall_pass/test_recall.py",
|
||||
"audit_recall.py": "recall_pass/audit_recall.py",
|
||||
"glyph_mosaics_inspect.py": "glyph_pass/glyph_mosaics_inspect.py",
|
||||
"glyph_registration.py": "glyph_pass/glyph_registration.py",
|
||||
"diagnose_glyph.py": "glyph_pass/diagnose_glyph.py",
|
||||
"refine_glyph.py": "glyph_pass/refine_glyph.py",
|
||||
"render_glyph.py": "glyph_pass/render_glyph.py",
|
||||
"glyph_mosaics.py": "glyph_pass/glyph_mosaics.py",
|
||||
"test_glyph.py": "glyph_pass/test_glyph.py",
|
||||
"glyph_identity.py": "glyph_pass/glyph_identity.py",
|
||||
"glyph_rules.py": "glyph_pass/glyph_rules.py",
|
||||
"audit_glyph.py": "glyph_pass/audit_glyph.py",
|
||||
"glyph_templates.py": "glyph_pass/glyph_templates.py",
|
||||
"diagnose_projection.py": "glyph_pass/diagnose_projection.py",
|
||||
"glyph_targets.py": "glyph_pass/glyph_targets.py",
|
||||
"registration.py": "replay/paved_registration.py",
|
||||
"refine_registration.py": "joint_pass/refine_registration.py",
|
||||
"registered_template.py": "joint_pass/registered_template.py",
|
||||
"render_registration.py": "joint_pass/render_registration.py",
|
||||
"audit_registration.py": "joint_pass/audit_registration.py",
|
||||
"test_registration.py": "joint_pass/test_registration.py",
|
||||
"probe_bicycles.py": "joint_pass/probe_bicycles.py",
|
||||
"inspect_recall.py": "joint_pass/inspect_recall.py",
|
||||
"small_bicycle.py": "joint_pass/small_bicycle.py",
|
||||
"arrow_admission.py": "replay/arrow_admission.py",
|
||||
"refine_arrow_admission.py": "replay/refine_arrow_admission.py",
|
||||
"arrow_mosaics.py": "replay/arrow_mosaics.py",
|
||||
"arrow_evidence.py": "replay/arrow_evidence.py",
|
||||
"arrow_frames.py": "replay/arrow_frames.py",
|
||||
"arrow_tip_registration.py": "replay/arrow_tip_registration.py",
|
||||
"audit_arrow_sources.py": "replay/audit_arrow_sources.py",
|
||||
"verify_arrow_observations.py": "replay/verify_arrow_observations.py",
|
||||
"render_marking_overview.py": "replay/render_marking_overview.py",
|
||||
"test_arrow_admission.py": "replay/test_arrow_admission.py",
|
||||
"audit_arrow_admission.py": "replay/audit_arrow_admission.py",
|
||||
"render_arrow_admission.py": "replay/render_arrow_admission.py",
|
||||
"audit_zigzag_coverage.py": "replay/audit_zigzag_coverage.py",
|
||||
"diagnose_arrow_gates.py": "replay/diagnose_arrow_gates.py"
|
||||
},
|
||||
"source_sha256": {
|
||||
"assembly_evidence.py": "0fda82c403f9734ea0b0267504ac82437092d410882dc21417a492de9509c09b",
|
||||
"assembly_rules.py": "04798c28e0daccc8be5fb045cc736160721308f7c41189f287b97a509999ddbf",
|
||||
"assembly_templates.py": "41ec0428032ae328d5f46c34702d5b0be43f724e5821278e745554c72326d402",
|
||||
"assembly_zigzag.py": "dbee99c505381fbdccbecec0817e0ec4e028ac1eb475124829cd58811251b9ca",
|
||||
"audit_assembly.py": "8defc22e391c330962c503b27c49b9d13cecee90b0170dab1b8372858bda3638",
|
||||
"audit_assembly_joins.py": "e8a3ded181b69961c8a0a5f88e171ff5ada82f0a43e55c217bb40734e411c094",
|
||||
"audit_beta.py": "f6dfe314f5f0f9875035f08ae279e64309fafcd9c04e0feb468dcf106cc2990f",
|
||||
"audit_catalog.py": "19d5f0f156c0f90d2e1e2548fee99eee521b76e7152f0b53ae12b43ed48553b2",
|
||||
"audit_completion.py": "ef6adcfec3e1a4bd894b54a150fe3b8559bf73e94665bb9da6bd68007e90575d",
|
||||
"audit_components.py": "b472856305839483fcf806eb76a29b46650f2188b1e0cf0f94afdc250eb1fa28",
|
||||
"audit_consensus.py": "7056d6195b320ae165aeef44e802c29697ae8163abb99d4593e0c8df6e186bc2",
|
||||
"audit_corridor.py": "3f792b1830e9097644dd66c38eb2cf7efa11d75a0fda928ffa0a7780afb85bfe",
|
||||
"audit_discovery.py": "9e5f1bdd0d752d82a52121fe86d4e6fb00068a6af9330a072fe7311a909bc974",
|
||||
"audit_norms.py": "234e431040e38d9c999f10a62d05454f217673cda5e2ab3e3119a2fabf9e703d",
|
||||
"audit_rows.py": "7298fddd8baf9798e6dd5251d4f261e97a5b92f0beeb60f3198c6aa7498d7f01",
|
||||
"audit_search.py": "0de9929d983c97045444131b9255ec4c256ae652b6adb82551e42b94c4bec0eb",
|
||||
"audit_sections.py": "755d129ef5e1c6503c784393f67cc0dae1c9ebaaecb9c08b8ad440cde7dceea7",
|
||||
"audit_symbols.py": "105c7a7939c43643299e071d94f5b1e4acc45a29d8b45482a3d7fabc9508ecea",
|
||||
"audit_transitions.py": "35a3ecb08d96ee21badf438a18bdddf800263032078e2daee888673ab4209c4a",
|
||||
"beta_profiles.py": "172ab1f02b8767e9e96c21d99925c8fd7568403434f951feadc2857036d07c6e",
|
||||
"bicycle_artwork.py": "2e5220e6e82024c683b65c81695b53fa3070d58eed89d61f5cbda41f6c3c554f",
|
||||
"catalog_context.py": "f2e654ea068a758be1f929299786559f02672898047893cdc20e6f1cb204bb80",
|
||||
"catalog_dependencies.py": "d6407445db28f6f15201f4ec09e3401141fca90e11a9cef52392f88175634fca",
|
||||
"catalog_dependency_pins.py": "93ed9007288440620b8339043f1d5ae74684e39e7c3bd50d94d24f6cf29c9f3a",
|
||||
"catalog_evidence.py": "7f9fb171776faf1181705826bec206882aea13eded8664d8e3e6dfd09031ec95",
|
||||
"catalog_rules.py": "ed0f8e838908bcea9ac1ee15fe13d1b23ac29981428ea6a4bdc097c0226db3cb",
|
||||
"catalog_templates.py": "05577c611ce5ffa2c21d0f608e728eca13009c994e26913b29f39fdcf584c092",
|
||||
"catalog_zigzag.py": "2e6a804cd14440afaf27bd0f0c2123afc7bf3ea1c58cd0d49293049f1f3b498f",
|
||||
"completion_profiles.py": "b01cb280a265f170c2f3823d59d423c0cf11472050678cc4dad716c1f90ff786",
|
||||
"component_arrows.py": "8b577e22e1fb2f45cf6cf426ecd32050c9fca5066a9f5fa00d156049f8691e39",
|
||||
"component_bicycle.py": "854388ce45520abb82d8f61d1195a50525e6326c315feee5bcb84b66163dc2fe",
|
||||
"component_conflicts.py": "dccc333197b47bbbf211212b38d5a0018c8bae5f403fed1cbe3e22be0a81967e",
|
||||
"component_evidence.py": "ef889c65ce03baf5da245a45c2819927d93ac16d4575fa28e3078a340fdd57fb",
|
||||
"component_mosaics.py": "15f8aac32e73cfc72253082e9b7ce2baaaf69ff53a701d0d279990f0cffb5db5",
|
||||
"component_rules.py": "910be55c56c3b406e1727339b1054ee0693a5d7c4ec46cb3cfa8015a34eb0553",
|
||||
"component_surface.py": "e425be65d184d474c5485160547f122291529622244da73ca484469ffd994d69",
|
||||
"component_targets.py": "1719de92d38ff15377276e7b471501cf5ed21392a14113d90537eafea735e6c2",
|
||||
"component_zigzag_rules.py": "76566a1ec3b90c7d3abe7dd96054351e3fbb41ac1117f2b1eb09ce33c716da98",
|
||||
"consensus_profiles.py": "4069e7e56eff1cfe3c10884a63a8c329891bbdffa68f477281c2eebff9128091",
|
||||
"coordinate_cache.py": "930f8f521ef13c02b589d0c182ab4cf337acc4c213354808d32178bbbea3edf4",
|
||||
"corridor_profiles.py": "967902dae9137ceddb05708acbb6a7cc1e06977c6d064787a1a651422d2e5672",
|
||||
"coverage_evidence.py": "e5567525f324b77861ef5d393067f44b9edf8c0f51dc16b0e7af03e1c4f6aa53",
|
||||
"coverage_plan.py": "48e28d6781d5d04e83645ba0a9aa7f0398ae904d26bf2e81caa8d8e741bccdda",
|
||||
"diagnose_assembly.py": "44ef17e6bdecc9285ae8150ccb5c4dd397006381b34b013ebd3e2ed6c2b34bbc",
|
||||
"diagnose_components.py": "b9653a2b642c1399dd3b6388cd40a148cb4cb81f665fad3bf993d950a64579f8",
|
||||
"diagnose_corridor.py": "cff89f2a78ff315906b7d40ba1855f0f842afe1f7f74d1d38b7366e2959bcfd6",
|
||||
"diagnose_coverage.py": "f5305f0c429aea3ba5f18e4261abd64fe8254e53db24323ffcebc152734864b7",
|
||||
"discovery_evidence.py": "dc7e0594b77f6d3723a965216164427835aa5ae2ff736b5599774c4efbc626eb",
|
||||
"discovery_rules.py": "1ac148d3fd75d443d2bde69e46da775de838c9cb2013570d87c13900f0a1a491",
|
||||
"extract_assembly.py": "d2f1cd5a1fc03b95496b32e024452c3e8ba489a06299a6cba967d4d18a5c3b33",
|
||||
"extract_catalog.py": "7c3b7de0291f52d9f37590b438d1abb7e37b36665cfb5e9ba4698b78a8f42574",
|
||||
"extract_discovery.py": "5d2835cde2b9d4d895609ea39be2a94a22e894d0996d525dcc3df7046c33e681",
|
||||
"extract_search.py": "09b3c0c65d33fdd5025e3436fb1bd5df67d1e359b507f4fae74a7e61754fc92c",
|
||||
"fit_scene.py": "d130e092d0acad9994da04ca34810beaa8a31c9602d1858cb4d686c240e42ab8",
|
||||
"fragment_templates.py": "11f2eb0bdf89a76f2f3be1e8368662f45fea1dec13f7fb43bac9c3e41acf1ae7",
|
||||
"gost_catalog.py": "a55a837cc1473055ff24d340c6a669a45d8295f9efb08fd81f1bf2651c0ac537",
|
||||
"image_profiles.py": "1c497f06053ffff63a476baf6dd65ba75ee17d7c38d04c8ff8c22ae03a27eca8",
|
||||
"inspect_bicycles.py": "e12964f244645b7a4b2bdb0da5d2bb90e7d49dc35bf2f66c4a8466fabc6836bb",
|
||||
"inspect_catalog.py": "322aec8f233009eb42703132b220e1e216f8dc8b59aa6bbd27244067e651727d",
|
||||
"interval_profiles.py": "6e7dc0e0eb2cc7ed641bd786b283688ecbc831a2b3442f3f6e6c18add0bad345",
|
||||
"join_assembly.py": "293fd78d10f0ba13b1339a69d737c3f96ef003ea3f6dd63fdf02d14c40fa324f",
|
||||
"layer_common.py": "5e6a2ef463a786b81d387250b2f2be21511f3dae887c8b9ea424051b1722fa59",
|
||||
"line_reconstruction.py": "f89883a1140aca2b78e1567e3361aa69403725d9b384daca6f782951b8920738",
|
||||
"mapping.py": "1c6ba0cc111250d73bc0bc282e9cbb7a602921bca931da6441bc9a6daf88b4f4",
|
||||
"norm_profiles.py": "fe5169f850919abdbc762fcf12960ef7dc0185f1ae56330246ca322db6caa0e7",
|
||||
"ortho_terrain.py": "9c9cab9d7086144fd1a108db28f796e9d267375d7135d50d5cb3f054eae75213",
|
||||
"paint_channels.py": "46da37b13914c69c72f6f4ae1bb5ad70e6f6b77b42355b016df1b3c4d72fbc63",
|
||||
"paint_templates.py": "9cf9c4e871ea03f38e1641c1c89864a628e0fe87462cccdc0149fdf6242545b6",
|
||||
"prepare_symbols.py": "59d0f7da37f4f119b0bfa996dfe4638999bf1bce575415db087fdb55d64a144a",
|
||||
"refine_assembly.py": "0da00d12e4bda06760a3fc78fcddb6875012edc046e9f83a00074846031b4939",
|
||||
"refine_beta.py": "36f39ab464c967b1df136f992a3156deef1dfe2af858bc7cbbef43e9bf7f9831",
|
||||
"refine_catalog.py": "eeeee4d59066579c1fa8708a1be9d999a481f8f8daf05ec01704897252cc66cb",
|
||||
"refine_completion.py": "12f424d39a687e8b94823f2e2f7b2f2c95538f3504260b4373c47cc21b29c6e1",
|
||||
"refine_components.py": "57eeb116e3c61ee42d30d3d6bc557e33d2b2d8ee24910584487bec5d34b69ef5",
|
||||
"refine_consensus.py": "e0e6bf6ad7023515103be330df93b5d925cc1c62642d1a38e67f07cbe027eb36",
|
||||
"refine_corridor.py": "fd1c4d4e028a037e32538c26a66f876425088b8b5b2c7ffc8d5dc807eba3290f",
|
||||
"refine_discovery.py": "6272ca1f5052259fb3c6cfd1f1079e4e5864e1e067d12de7ff36d95857219d7b",
|
||||
"refine_norms.py": "081f6f2347a19b996d5f1b69d63194112d808071eb8c8313e173b5cd09e2dfd5",
|
||||
"refine_rows.py": "3983e8de9b6dadb349b8731335798640e4ce11c87356925f9ea79c5d0bf819b8",
|
||||
"refine_search.py": "113e8cee4f26d1f6b0bcce516388d046ced0523598ddf7f6f4e4dc365a0d9859",
|
||||
"refine_sections.py": "7fd48aa308df07b980e40153651c9c6985949245d4f3f0d1a46bbfd13f735ff3",
|
||||
"refine_symbols.py": "c210c825edb1d2469b27afac6292f911df8351e92c8f47d0b5d05f99a229a95a",
|
||||
"refine_transitions.py": "777d0a0f4d9c762768311db154f66a77880790f523ec639bbd02225ac470138b",
|
||||
"refine_zigzags.py": "8fad49227ca4fdaf72fa46a9050aaa39d699aa2620ffc765ea829e2ecb77d967",
|
||||
"render_assembly.py": "b8471dceb42be102eeb1918eb7950e038d3fc9e0ebab0a3b01b3aaea8be710fa",
|
||||
"render_beta.py": "4a5fdeaa746ce8b4f449df44c210e13fcc2cabf2e2931beab00928eda3777e1c",
|
||||
"render_catalog.py": "58ecb30ac8ddffd1489c93361dc6678c82e4dbbfbe8a6e851a1be395ee40db1b",
|
||||
"render_completion.py": "5e76d2a6ce41a6be8013f98df33951fe17fc209c078376ebfafe7c60ed0b14a7",
|
||||
"render_components.py": "2115f348228ffcbb21ac1a80c1e8c37b082af8be09ca2a182028aa1ea0a7a222",
|
||||
"render_consensus.py": "ea677bac3a4950209133268801f238c67236b0e7866f22df3e738e7592fde682",
|
||||
"render_corridor.py": "f6355e3761834fcf811c0cae9dc3ce602e7221afea4f674178d6c29085e87e9f",
|
||||
"render_coverage.py": "2cba12c09333c242841b174f201c89ffce9e715b78b26b472117ae140ff4157c",
|
||||
"render_discovery.py": "868ad8eb712f5880e944b0899205a2c0fd6dd0713eb727b1c49dda92b897fa20",
|
||||
"render_hypotheses.py": "d7ea4b19409a7b5c78c8a01ed9c190069cc109e4bfa854c77672ed1d1e64ba56",
|
||||
"render_norms.py": "3a8bcf81723d7bda4b49c8ff12e21efded4450839e11a4f23e719dfc8fa4441d",
|
||||
"render_plan.py": "9e702d51c6be09caa456d8e528bd62bc9ec238ca3689a99f38b414dafc193f66",
|
||||
"render_rows.py": "65f57b15f2b288048a75d1f4603625637f1e2af505925628ec80a2169fe9944e",
|
||||
"render_search.py": "5655641df20c2e4f0849bb35ff4029d806554cc7d3b696d26378ad9d880d0491",
|
||||
"render_sections.py": "43de78c4b1c643162f4ac9ada77411a2a4e222fa5506ec8f1061311a96bb234c",
|
||||
"render_symbols.py": "ae3bd83870aa435d2051282b65fd3015eee8c11e92831062328e39482de76d5b",
|
||||
"render_transitions.py": "eea6be5a6f90145f00d7e930f4123c87aa135a64a2c59723908cf7056520128d",
|
||||
"review_symbols.py": "264c92625648cf1930753add51496c28ef645a481e5cf13993ae0cf758d5df30",
|
||||
"road_glyph_presets.py": "619f4e9c9eeaf63537afc0e8676ab5915d78af1aee8bfb9fe4656bf81b07f322",
|
||||
"row_evidence.py": "fec784ab795470d96e48c7022e59d5206b0c07b40d84843cbc058fcc4de896c0",
|
||||
"row_profiles.py": "0b23a93b6de9b2e01efb5ce57085fac0afebcd3df6184e573d6b84793e0128df",
|
||||
"search_rules.py": "ca3cab6d24f31460d9912c351c166d89fb1c3b21df620ba1d847543bd7a71f41",
|
||||
"search_views.py": "8a123558dbef184fc85a92c9547c19644d14681329dbbd0cfeac0032bbd102be",
|
||||
"section_profiles.py": "f3f57b2f5e01962f0aca44164d95dfd2d1e03c73c1b0ecb94c6d550f509609de",
|
||||
"semantic_symbols.py": "0665fa1ba0dd08bd29b762a09fb2d03b31a1894ff0731353c2f847fb170c5658",
|
||||
"symbol_evidence.py": "2d643c9756660bd33ad208ffbe960283feb3aa12352399b6df6f81c0b507e3a2",
|
||||
"symbol_rules.py": "c349ee11f5c33da7310dcf6e530d988858243c5e99ad8072818d78802ea59527",
|
||||
"test_assembly.py": "80510625a71ea9fc04add883d9a7e40a3bfdcac4251bd702b5507ce76f9bba8f",
|
||||
"test_beta.py": "e5729c05063afb65c3e35b4e380219dee9893dfa26bb41e1c5cd24641e08358b",
|
||||
"test_catalog.py": "91a8fdbc330cecd5bc354406012852cc46245baf99ba8befdaac164f6b79c1c4",
|
||||
"test_completion.py": "a3a6a283221ae48ade8fd0cca2f145509fd6bedf8e808967c13438791654a7f1",
|
||||
"test_components.py": "71c48f0b6afda80713aef4ee6547acc1995f0dd07d901ee84a4254bee0cc1168",
|
||||
"test_consensus.py": "90cdd1be7bd2a0d1471141eb40bfa806cc149789c3d6794bbfdaba5999a369f7",
|
||||
"test_corridor.py": "42788835ec88e91a3b92ec7ead4e4c489b01ddf11256b46b7b3722c6b4770703",
|
||||
"test_discovery.py": "a75ffc22d065201f7023d8e6cfb6dc09204a80f9be607599b85479628a301538",
|
||||
"test_intervals.py": "0fd926c0739f066bf79d549e190b8641399eea39486726e5946d67388ab73a12",
|
||||
"test_lines.py": "a5b2aab9cb0627bd463d1bd37b1353e0ca14fbffa7dfbac2a928e528dc8ca29a",
|
||||
"test_norms.py": "02b0757f7c1c4498c9165dde2bd650ca9f0a1dec840d59e7828343264079905f",
|
||||
"test_rows.py": "a89932294a62a373b8c4c80556c4d23d7182c64126788d63988312bc3b9f3449",
|
||||
"test_search.py": "fc3d874c8a6639bfa007eb8fa4a869e270bddafe317868bed29450c6024f8756",
|
||||
"test_sections.py": "0b9f5da94e3f7ca8f05ab1f15b48685a6c97ac4a559147f98adb6634ad74031f",
|
||||
"test_symbols.py": "63a429e8d3324b87075bcb2a2c9902f35c45f1aceff5b46c260aec9bed666481",
|
||||
"test_transitions.py": "95837d6e04c890f514901d9b587092f79fa1552dde6df99e301849d66c004438",
|
||||
"transition_profiles.py": "7f713e5fed3a1aa88d00a4c3299b45a8970ff225ab827f82950901185b33ea2e",
|
||||
"validation.py": "ee004220db3cdf2429af2a0e875cd9a63526587422881692ce56fe9d77f5cc2c",
|
||||
"zigzag_evidence.py": "978bda848dc7dc85268e2696b918eb6f86c7377c7e9da7c5e4b875815daefa0d",
|
||||
"zigzag_mosaics.py": "b2703eb159e92680df15d4ed80cd47e55a9168ab3f1703f50faf843eca5262b5",
|
||||
"audit_coverage.py": "cb7fd23d5b9a86ec1d2a94fa6d172326024d551c0a5ae1791487d455a512d655",
|
||||
"render_coverage_changes.py": "fa79e806d806ad8a59f8b1cf3ec1df27a4032a38eb234b0695fdffcc625f5617",
|
||||
"test_coverage.py": "d4ee6c71db2e6a426e0c44b99a46acf34c2094af1148e2aade4382c784c99063",
|
||||
"coverage_crossings.py": "ecfc59bbd5ce419ffbc08f282985c0937d21f2311d581cd6fb8fe6d20671411c",
|
||||
"zigzag_segments.py": "02b46d2462f0851af3d371e927da7858bbf3f59daf89201a40e30e267cf097c0",
|
||||
"audit_scene.py": "298bc00d21fecf7c511fd2ae455d181f3998781e13b91464fb6553338847d28b",
|
||||
"refine_coverage.py": "d647727eb6c64ce60e3e98701e22c41d42f265c073fe099d9c95cc3e165d5540",
|
||||
"coverage_rules.py": "9c22f810b123a0b2d1bb4fb0717f1df2bcab2f9c2ebd76d3b537e67e6baea055",
|
||||
"refine_patterns.py": "83b053abc53fb198b21f7a8ec80e6fa2b507855c20fc4a33e06a10f7c387346d",
|
||||
"refine_crossings.py": "7e7237cd41640ea7b298754b6be40c734eee8dc933f5be920ef9426a2c88eb6f",
|
||||
"coverage_patterns.py": "76f2a539c88e3212fd0b904a0b85d1a31c1a2357e864f4b44dc9b1a28e722638",
|
||||
"crossing_completion.py": "6e75ae4b65e8d6447acae57ae17ca088a427fda39f438271bc0f1b0ca84641fb",
|
||||
"crosswalk_family.py": "68ee6327a7a24ab74e77bdbbc9c504562f6997cfb7f0e6082095b3e2eb32fc2d",
|
||||
"recall_extent.py": "fea1f876ccf52dbaf7a06a68c7bf7870a8ebbc1331c612366419a36291433fbf",
|
||||
"render_recall.py": "51d887366f79b82d3c61ed3ba9dcd01a8c07a4b609ba379cd9393d2924c702b0",
|
||||
"refine_recall.py": "b2d323ce0325265b37302673101421078cc05f52cd00415d476165c7144247cc",
|
||||
"recall_rules.py": "7a54b3ff0aaaac84d71206f685dd8479f8bfb1966294c50f56567c908794f94c",
|
||||
"recall_templates.py": "56c8f95854df245d31b1b132bf800ab8ac9356e775bed52042304047cd849497",
|
||||
"diagnose_recall.py": "83b96adf9796412d800e702608dd6e64f237718d739ff592acca0574d2dc62a1",
|
||||
"recall_targets.py": "01bb0876d092f9de660e181f6622323704b76bbd8a62e6d8f88cfd7bf398e7bb",
|
||||
"test_recall.py": "8a35c7ea7f5bb0cea6193181c75f5bba04344ee902e000c106c07caa51b7df15",
|
||||
"audit_recall.py": "ce4cb5ae9582a6b46921fb311cec626ffdc5ee8ea2a9a19c0eb9699b0d9211e3",
|
||||
"glyph_mosaics_inspect.py": "330e6aff8fde052ca94bca0908a46c3b2f5d9457e47482a99e78708634c402fa",
|
||||
"glyph_registration.py": "30a21ce2bccb6921b5b77939ed5a329787fd1f3127d63f9cc2481a326dde6c9b",
|
||||
"diagnose_glyph.py": "982a9656f4ffc67d8b833db3cd4aa738bf8d2e9f1ee8be4d73751b66922f5ba3",
|
||||
"refine_glyph.py": "ca2bea6020ce4ab458af57553931978ee1eec1beb39225a8009f7daaac81d826",
|
||||
"render_glyph.py": "e1bda83c85d6cb48481cd7aa9cd738bf67311a693d07e33188c711e9c30ab161",
|
||||
"glyph_mosaics.py": "cdedb823f1e3d49f8072b38f38f463b0e7338351fe0d032d634396f55f45b0b9",
|
||||
"test_glyph.py": "46555f5acc2319c94418b68177991d3538e6b53eb6b3b8befca913299607ac6b",
|
||||
"glyph_identity.py": "d02114510077651db8cac1b0ec4dcf6dc98e8b64a8caa44ffc37df4914ecdd5b",
|
||||
"glyph_rules.py": "747d3da1f0e0cd3301a6f20c5185eab68c431b4966c491ea77210bc4db48eac1",
|
||||
"audit_glyph.py": "31f44bdae4c2af38cbe9af5b8bbf16bfbdcf0b96e39b62078d5459e673d30758",
|
||||
"glyph_templates.py": "8ddc50348563b048c362a447d68a30872284dc08c88ca9d9c70c27a382a62758",
|
||||
"diagnose_projection.py": "d49d44c69b9bbb3c91af27851b33b7323a68727e76846af846df94cfa663a684",
|
||||
"glyph_targets.py": "e957f2d7889b4366eacc29a0d8a1440ee16b35f00a79d9e8740f0b807a232eda",
|
||||
"registration.py": "1f66a2c70789251813ad19f92f77d5a0244a0dbafbb6bc98d6c6b0239f32192d",
|
||||
"refine_registration.py": "7740076f771b3d7949d1b03f9b6fe3034aa1c646fda7751e0cc81cb1055e5579",
|
||||
"registered_template.py": "6c256bab9275c1d4924e5eb9a5982b0b777e6e637603d33f6d0df00ffad29464",
|
||||
"render_registration.py": "c1ca93d964a8ee1cca134497f05672978c43ff845980308f2a9ab3823bea06bd",
|
||||
"audit_registration.py": "0cf92896826c40b80513f25935b8abf9de99d7f51437aea98ac825474da2b6d5",
|
||||
"test_registration.py": "e565bcbf56921bb252d8a4c0bbee7515a4ba4d73ad9797cf6b6d67de5783503d",
|
||||
"probe_bicycles.py": "8e2a66e352b6e05d2eb3f631453d53e0940f046779f4cc10e87f9a80470ff4bc",
|
||||
"inspect_recall.py": "b071dcc227002ec4cc643de48302c854997d5f7b48782c780a874d13c214e689",
|
||||
"small_bicycle.py": "fecca9312cff0d4e7035f42a7c44e441f90ab4e033cfe22ae91d609de445d2af",
|
||||
"arrow_admission.py": "2ed5a28706416dc3a2b674cc4d8cf007049db91e3c70b530ea14f1eec986c516",
|
||||
"refine_arrow_admission.py": "c55ce2548da5795b32d7fe6718619b0d681ddd229075937a1c7ca131c394b3d0",
|
||||
"arrow_mosaics.py": "a55c3560961577c381f21f087b632a73ba778869a7f60ba58c095135523a0763",
|
||||
"arrow_evidence.py": "047c0d9fe6e17c1500b993f8a6166406db1950e38c0af4562886143238c377ad",
|
||||
"arrow_frames.py": "4be5a3d96ca29981be698a3200f7d1447d8c9848fde0e67dab5f5b3b529bc9ca",
|
||||
"arrow_tip_registration.py": "0d74cb29a0cef1c40267152a6a1fec6397d5118de0cd6c94a402fc3738354056",
|
||||
"audit_arrow_sources.py": "8d5315e52f5c414e94104aa52914eee85ab3b1c3237cfc9b042f8683a0d37525",
|
||||
"verify_arrow_observations.py": "0351443c94f6eb5c7cf87642ab785c85a2e7eb8a85f8f6ac3f59f898eb74b09e",
|
||||
"render_marking_overview.py": "1cf79de953f94f26a846c9a14872ddee7465fccad9764c8ecf17876ce1bc2115",
|
||||
"test_arrow_admission.py": "543a7c64b6c4232d8612cd0d63eb6b137466b610daa78c1f0ccd614115310425",
|
||||
"audit_arrow_admission.py": "9e365af391f403e7eb9619e4e434c336e2f7ecf703852ae3e9484e9e85cb8dc7",
|
||||
"render_arrow_admission.py": "527b9f9e65c7a522eae06309b99efa7fb0701f8ce91b4e8b388807c63b0ffb2b",
|
||||
"audit_zigzag_coverage.py": "085ef1fe01f43f4ff40b0c89df026f329120dfb8b6050269047d3422ac864eff",
|
||||
"diagnose_arrow_gates.py": "fd1e695a4a2917f1fd8cfdaa65a0e93041a165668417eb4685e56560b0f2e65e"
|
||||
},
|
||||
"source_snapshot": "628e4052092555d47c20352ac67e3bbfe9d6caa9bd37203ce8d0ba682cde8cec",
|
||||
"execution_snapshot": "ed6fba5db238c3b18e7c7a4ee6d071f22c605405c0755a3a328a90dd240a2bab",
|
||||
"stages": [
|
||||
"diagnose_arrow_gates.py",
|
||||
"refine_arrow_admission.py",
|
||||
"audit_arrow_admission.py",
|
||||
"audit_arrow_sources.py",
|
||||
"verify_arrow_observations.py"
|
||||
],
|
||||
"runtime_images": [
|
||||
"sha256:925b093545e15c270d95d4076139ad8ed48e790eccd9434a58495d58c97671d0"
|
||||
],
|
||||
"reused_semantic_model": "SAM3 pinned existing glyph pipeline",
|
||||
"publication": "external image review and exact canonical API readback",
|
||||
"inputs": "current accepted map plus hashed whole-scene Gaussian renders and SAM hypotheses"
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
"""Separate object evidence from unrelated connected texture and end context.
|
||||
|
||||
SAM's parent extent seeds connectivity; it never clips a connected object.
|
||||
Head/tail/branch support and negative-space paint remain measured on original
|
||||
pixels. Beyond an endpoint, observed non-paved ground is known background; its
|
||||
paint does not establish a continuation of a road arrow.
|
||||
"""
|
||||
import cv2
|
||||
import numpy as np
|
||||
import shapely
|
||||
from component_evidence import directional_score as original_score
|
||||
from discovery_rules import POLICY
|
||||
|
||||
|
||||
def directional_score(rgb,allowed,points,polygon,cell=.04,kind=None,parameters=None,
|
||||
observed=None,paint_override=None,connectivity_open_m=0.,
|
||||
semantic_extent=None,alpha_good=None):
|
||||
result=original_score(rgb,allowed,points,polygon,cell,kind,parameters,observed,paint_override,connectivity_open_m)
|
||||
if semantic_extent is None or paint_override is None:
|
||||
raise ValueError('Whole semantic extent and original paint are required')
|
||||
paint=np.asarray(paint_override,bool);observed=np.asarray(observed,bool)
|
||||
target=shapely.contains_xy(polygon,points[:,0],points[:,1]).reshape(allowed.shape)
|
||||
scope=shapely.contains_xy(semantic_extent.buffer(.20),points[:,0],points[:,1]).reshape(allowed.shape)
|
||||
connected=(paint&allowed&observed&alpha_good).astype('uint8')
|
||||
if connectivity_open_m>0:
|
||||
k=max(3,int(round(connectivity_open_m/cell))//2*2+1)
|
||||
connected=cv2.morphologyEx(connected,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
_,labels=cv2.connectedComponents(connected,8)
|
||||
owners=set(np.unique(labels[target&scope]))-{0};connected=np.isin(labels,list(owners))
|
||||
wide=cv2.dilate(target.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(5,5)))>0
|
||||
result['connected_recall']=float(wide[connected].mean()) if connected.any() else 0.
|
||||
result['connected_at_window_edge']=bool(connected[0].any() or connected[-1].any() or connected[:,0].any() or connected[:,-1].any())
|
||||
result['connectivity_scope']='whole-observed-paved-component-with-semantic-seed'
|
||||
px,py,a,L,W,stroke=parameters[:6];u=np.array([np.cos(a),np.sin(a)]);n=np.array([-u[1],u[0]])
|
||||
local=points-[px,py];t=(local@u).reshape(allowed.shape);side=(local@n).reshape(allowed.shape)
|
||||
# A separate stripe or bright object beyond the arrow is not continuation.
|
||||
# Test only paint connected to that endpoint; never clip this graph to SAM.
|
||||
outside_graph=(paint&allowed&observed&alpha_good).astype('uint8')
|
||||
if connectivity_open_m>0:
|
||||
outside_graph=cv2.morphologyEx(outside_graph,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
_,outside_labels=cv2.connectedComponents(outside_graph,8)
|
||||
longitudinal=t[target];t0,t1=(float(longitudinal.min()),float(longitudinal.max())) if longitudinal.size else (0.,L)
|
||||
result['ends']=[]
|
||||
for name,interior,exterior in [('tail',t<L*.20,(t<-POLICY['glyph_end_probe_start_m'])&(t>-POLICY['glyph_end_probe_stop_m'])),('head',t>L*.90,(t>L+POLICY['glyph_end_probe_start_m'])&(t<L+POLICY['glyph_end_probe_stop_m']))]:
|
||||
sides=side[target&interior];offset=float(np.median(sides)) if len(sides) else 0.
|
||||
select=exterior&(abs(side-offset)<max(.12,stroke*.6));known=select&observed
|
||||
endpoint=target&((t<t0+.20) if name=='tail' else (t>t1-.20))
|
||||
ids=set(np.unique(outside_labels[endpoint]))-{0}
|
||||
continuation=np.isin(outside_labels,list(ids))
|
||||
exterior_known=known&alpha_good
|
||||
result['ends'].append(dict(end=name,coverage=float(observed[endpoint].mean()) if endpoint.any() else 0.,
|
||||
valid=float(alpha_good[endpoint&observed].mean()) if (endpoint&observed).any() else 0.,
|
||||
paint_fraction=float(continuation[exterior_known].mean()) if exterior_known.any() else 0.,
|
||||
exterior_known_fraction=float(exterior_known[select].mean()) if select.any() else 0.,
|
||||
unconnected_paint_fraction=float((paint&allowed)[exterior_known].mean()) if exterior_known.any() else None,
|
||||
validity_scope='observed-symbol-endpoint',paint_scope='endpoint-connected-paved-paint'))
|
||||
return result
|
||||
@@ -0,0 +1,14 @@
|
||||
"""Transform complete catalog geometry and its probes through the same frame."""
|
||||
import numpy as np
|
||||
from shapely.ops import transform
|
||||
|
||||
def points_in_frame(points,matrix):
|
||||
h=np.asarray(matrix,float);xy=np.asarray(points,float)
|
||||
p=np.c_[xy[:,:2],np.ones(len(xy))]@h.T
|
||||
if np.any(abs(p[:,2])<1e-8):raise ValueError('Singular glyph frame')
|
||||
return p[:,:2]/p[:,2,None]
|
||||
|
||||
def geometry_in_frame(geometry,matrix):
|
||||
def fn(x,y,z=None):
|
||||
p=points_in_frame(np.c_[x,y],matrix);return p[:,0],p[:,1]
|
||||
return transform(fn,geometry)
|
||||
@@ -0,0 +1,47 @@
|
||||
from paint_channels import paint_mask
|
||||
from component_surface import planar_vehicle_clearance
|
||||
from glyph_identity import branch_evidence
|
||||
"""Two geometry-selected image mosaics for every point of a finite object.
|
||||
|
||||
No demand that both complete camera rectangles contain a long polygon's bbox.
|
||||
Unknown paint pixels remain unknown; different ranks never use the same tile.
|
||||
"""
|
||||
import numpy as np,cv2,shapely
|
||||
from fit_scene import project
|
||||
from layer_common import sample
|
||||
from row_evidence import choose_owners
|
||||
from arrow_evidence import directional_score as glyph_score
|
||||
|
||||
def mosaic_views(p,views,kind=None,parameters=None,allow_pedestrian=False,calibrate_ground=False,connectivity_open_m=0.,semantic_extent=None,probe_frame=None):
|
||||
lo=np.asarray(p.bounds[:2])-1.;hi=np.asarray(p.bounds[2:])+1.;cell=.04
|
||||
xx=np.arange(lo[0],hi[0],cell);yy=np.arange(lo[1],hi[1],cell);x,y=np.meshgrid(xx,yy);points=np.c_[x.ravel(),y.ravel()]
|
||||
distance=np.linalg.norm(points[:,None,:]-views.centers[None,:,:],axis=2);coverage=np.zeros(distance.shape,bool)
|
||||
for i,tile in enumerate(views.tiles):
|
||||
uv=project(points,views.geometry(tile['id']));coverage[:,i]=(uv.min(1)>=20)&(uv.max(1)<1180)
|
||||
planar=planar_vehicle_clearance(points,views)
|
||||
owners=choose_owners(distance,coverage);ev=[];names=set();target=shapely.contains_xy(p,points[:,0],points[:,1])
|
||||
for rank in [0,1]:
|
||||
colors=np.zeros((len(points),3),'uint8');allowed=np.zeros(len(points),bool);covered=np.zeros(len(points),bool);source_counts={};alpha_good=np.zeros(len(points),bool);vehicle_good=alpha_good.copy();surface_good=alpha_good.copy()
|
||||
for i in np.unique(owners[:,rank]):
|
||||
if i<0:continue
|
||||
select=np.flatnonzero(owners[:,rank]==i);name=views.tiles[i]['id'];g=views.geometry(name);rgb,vehicle=views.inputs(name);uv=project(points[select],g).astype('float32');native=(uv+.5)*(rgb.shape[0]/1200)-.5
|
||||
def read(a,q):return np.concatenate([cv2.remap(a,b[:,0,None],b[:,1,None],cv2.INTER_LINEAR).reshape(len(b),-1)for b in np.array_split(q,max(1,int(np.ceil(len(q)/20000))))])
|
||||
colors[select]=read(rgb,native);allowed[select]=(read(g['alpha'].astype('float32'),uv).ravel()>=.65)&((read(vehicle,uv).ravel()<.2)|planar[select])&(np.isin(sample(views.labels,points[select],views.low,views.high),[1,2]if allow_pedestrian else[1]));covered[select]=True;alpha_good[select]=read(g['alpha'].astype('float32'),uv).ravel()>=.65;vehicle_good[select]=read(vehicle,uv).ravel()<.2;surface_good[select]=np.isin(sample(views.labels,points[select],views.low,views.high),[1,2]if allow_pedestrian else[1])
|
||||
if target[select].any():names.add(name);source_counts[name]=int(target[select].sum())
|
||||
rgb=colors.reshape(len(yy),len(xx),3)
|
||||
paint=paint_mask(rgb,channel='white',observed=covered.reshape(len(yy),len(xx)),calibration=allowed.reshape(len(yy),len(xx))if calibrate_ground else None)
|
||||
probe_points,probe_polygon,probe_extent=points,p,semantic_extent
|
||||
if probe_frame is not None:
|
||||
from arrow_frames import points_in_frame,geometry_in_frame
|
||||
inverse=np.linalg.inv(np.asarray(probe_frame));probe_points=points_in_frame(points,inverse);probe_polygon=geometry_in_frame(p,inverse);probe_extent=geometry_in_frame(semantic_extent,inverse)
|
||||
score=glyph_score(rgb,allowed.reshape(len(yy),len(xx)),probe_points,probe_polygon,kind=kind,parameters=parameters,observed=covered.reshape(len(yy),len(xx)),paint_override=paint,connectivity_open_m=connectivity_open_m,semantic_extent=probe_extent,alpha_good=alpha_good.reshape(len(yy),len(xx)))
|
||||
if parameters is not None:
|
||||
score['branch_identity']=branch_evidence(paint,allowed.reshape(len(yy),len(xx)),covered.reshape(len(yy),len(xx)),probe_points,probe_polygon,kind,parameters)
|
||||
rgb=colors.reshape(len(yy),len(xx),3);gray=cv2.cvtColor(rgb,cv2.COLOR_RGB2GRAY);hsv=cv2.cvtColor(rgb,cv2.COLOR_RGB2HSV)
|
||||
bg=cv2.morphologyEx(gray,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(19,19)))
|
||||
near=cv2.dilate(paint.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(5,5))).ravel()>0
|
||||
known=target&allowed&covered
|
||||
score['observed_support']=float(near[known].mean())if known.any()else 0.
|
||||
score.update(paint_valid=float(allowed[target].mean())if target.any()else 0.,paint_coverage=float(covered[target].mean())if target.any()else 0.,source_counts=source_counts,ownership='nearest-covering-geometry-per-pixel',rank=rank)
|
||||
score['planar_vehicle_override']=float((planar&~vehicle_good)[target].mean())if target.any()else 0.;score['surface_checks']={key:float(a[target].mean())if target.any()else 0. for key,a in [('alpha',alpha_good),('vehicle',vehicle_good),('paved',surface_good)]};ev.append(score)
|
||||
return ev,sorted(names)
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Register whole glyphs with true 2D endpoint constraints, including lateral error."""
|
||||
import numpy as np,shapely
|
||||
from scipy.optimize import minimize
|
||||
from registered_template import polygon,unit_coordinates
|
||||
def fit_tip(kind,parameters,grid,cell):
|
||||
base=np.r_[parameters[:6],parameters[6:8]if len(parameters)>=8 else [.65,0.],parameters[8:11]if len(parameters)>=11 else [0.,0.,1.]];unit=unit_coordinates(kind)
|
||||
lo=grid['lo'];size=grid['size'];points=grid['points'];axis=np.array([np.cos(grid.get('angle',base[2])),np.sin(grid.get('angle',base[2]))]);dots=points@axis
|
||||
evidence=[]
|
||||
for rank,v in enumerate(grid['views']):
|
||||
valid=v['allowed']&v['observed'];target=v['target']&valid
|
||||
if not target.any():continue
|
||||
ends=np.quantile(dots[target.ravel()],[.002,.998]);ink=target.ravel();tips=np.stack([points[ink&(dots<=ends[0]+.04)].mean(0),points[ink&(dots>=ends[1]-.04)].mean(0)])
|
||||
evidence.append((valid,target,ends,tips,.09 if rank==0 else .13))
|
||||
def score(p):
|
||||
# Exact same pixel-centre inclusion and end measurements as the independent audit.
|
||||
q=polygon(kind,p)
|
||||
if q.is_empty or not q.is_valid or q.geom_type!='Polygon':return -1e3
|
||||
mask=shapely.contains_xy(q,points[:,0],points[:,1]).reshape(size)
|
||||
md=dots[mask.ravel()]
|
||||
if not len(md):return -1e3
|
||||
ends=np.array([md.min(),md.max()]);scores=[]
|
||||
for valid,target,target_ends,target_tips,limit in evidence:
|
||||
m=mask&valid;inter=(m&target).sum();iou=float(inter/max((m|target).sum(),1));error=np.abs(ends-target_ends)
|
||||
tips=np.stack([points[mask.ravel()&(dots<=ends[0]+.04)].mean(0),points[mask.ravel()&(dots>=ends[1]-.04)].mean(0)]);xyerror=np.linalg.norm(tips-target_tips,axis=1)
|
||||
scores.append(iou-.3*float(error.sum())-6.*float(np.maximum(error-limit,0.).sum())-.4*float(xyerror.sum())-6.*float(np.maximum(xyerror-limit,0.).sum()))
|
||||
return float(.5*np.mean(scores)+.5*min(scores))if scores else -1e3
|
||||
bx,by,a,L,W,stroke,knot,shear,station,skew,branchsize=base
|
||||
bounds=[(bx-.4,bx+.4),(by-.4,by+.4),(a-.14,a+.14),(L*.85,L*1.15),(W*.80,W*1.20),(.08,.30),(.45,.85),(-.45,.45),(-.15,.15),(-.8,.8),(.65,1.8)]
|
||||
if kind not in ['straight_left_arrow','straight_right_arrow']:bounds[-3:]=[(0.,0.),(0.,0.),(1.,1.)]
|
||||
base=np.clip(base,np.array(bounds)[:,0],np.array(bounds)[:,1]);starts=[base.copy()]
|
||||
# A prior complete catalog registration supplies this local seed.
|
||||
# No new global search or scene-specific starts.
|
||||
starts.append(np.r_[base[:7],0.,base[8:]])
|
||||
fitted=[]
|
||||
for z in starts:
|
||||
result=minimize(lambda v:1-score(v),z,method='Powell',bounds=bounds,options=dict(maxiter=35,xtol=.0008,ftol=.0002));fitted.extend([z,result.x])
|
||||
best=max(fitted,key=score);return polygon(kind,best),best.tolist(),score(best)
|
||||
@@ -0,0 +1,35 @@
|
||||
"""Verify exact transactions, clean catalog geometry and admission evidence."""
|
||||
import hashlib,json
|
||||
from pathlib import Path
|
||||
import numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from arrow_admission import registered_geometry_passes,accept_symbol
|
||||
from component_conflicts import symbol_replacements
|
||||
from registered_template import polygon as registered_polygon
|
||||
from glyph_templates import polygon
|
||||
from arrow_frames import geometry_in_frame
|
||||
|
||||
out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw)
|
||||
candidate=out/'full-map.json';new=json.loads(candidate.read_text());rows=json.loads((out/'arrow-rows.json').read_text());report=json.loads((out/'arrow-report.json').read_text())
|
||||
assert report['baseline_sha256']==hashlib.sha256(raw).hexdigest()
|
||||
current={f['id']:f for f in old['features']}
|
||||
for row in rows:
|
||||
assert len(row['after'])==1 and row['semantic_recall']>=.85
|
||||
f=row['after'][0];props=f['properties'];p=shape(f['geometry']);q=shapely.force_2d(p)
|
||||
assert props['class']=='road_marking' and props['subtype'].endswith('_arrow')
|
||||
assert p.is_valid and not p.is_empty and np.isfinite(shapely.get_coordinates(p,include_z=True)).all()
|
||||
pars=props['template_parameters'];clean=registered_polygon(props['subtype'],pars) if len(pars)==11 else polygon(props['subtype'],pars)
|
||||
frame=props.get('registration',{}).get('homography_xy')
|
||||
if frame is not None:clean=geometry_in_frame(clean,frame)
|
||||
assert q.symmetric_difference(clean).area<1e-8
|
||||
assert registered_geometry_passes(row['registration_metrics'])
|
||||
assert accept_symbol(row['evidence'],props['semantic_score'],row['semantic_containment'],props['template_fit_score'],props['subtype'])
|
||||
assert symbol_replacements(q,props['subtype'],current.values())==row['before']
|
||||
for removed in row['before']:assert current.pop(removed['id'])==removed
|
||||
assert f['id'] not in current;current[f['id']]=f
|
||||
assert len(new['features'])==len(current)
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
nonmark=lambda doc:{f['id']:f for f in doc['features'] if f['properties']['class']!='road_marking'}
|
||||
assert nonmark(old)==nonmark(new)
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256(candidate.read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,clean_catalog_geometry=True,non_marking_layers_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit)
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Bind reused proposals to immutable SAM masks, original pixels and fits."""
|
||||
import hashlib,json
|
||||
from pathlib import Path
|
||||
from functools import lru_cache
|
||||
import numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from component_targets import vector
|
||||
from recall_extent import semantic_extent
|
||||
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
root=Path('/symbolplan');patch_file=root/'symbol-patches.json';semantic_file=root/'symbol-semantics.json'
|
||||
patches={p['id']:p for p in json.loads(patch_file.read_text())['patches']}
|
||||
semantic=json.loads(semantic_file.read_text());assert semantic['patch_manifest_sha256']==sha(patch_file)
|
||||
records={r['id']:r for r in semantic['records']}
|
||||
fits_file=Path('/glyphplan/glyph-diagnostics.json');original=json.loads(fits_file.read_text())
|
||||
cache_file=Path('/gateplan/arrow-gates.json');cache=json.loads(cache_file.read_text());hashes={}
|
||||
@lru_cache(maxsize=8)
|
||||
def regions(patch):
|
||||
im=root/'symbol-patches'/(patch+'.png');p=root/'symbol-masks'/(patch+'.npz')
|
||||
assert sha(im)==patches[patch]['sha256']
|
||||
assert sha(p)==records[patch]['sha256']
|
||||
hashes[patch]=dict(image_sha256=sha(im),masks_sha256=sha(p))
|
||||
with np.load(p) as z:
|
||||
return {i:vector(m,patches[patch]) for i,(m,s,c) in enumerate(zip(z['masks'],z['scores'],z['classes'])) if c==1 and s>=.5}
|
||||
for row in cache:
|
||||
d=original[row['index']]
|
||||
for key in ['patch','masks','semantic_score','target']:assert row[key]==d[key]
|
||||
assert len(row['fits'])==len(d['fits'])
|
||||
for fit,old in zip(row['fits'],d['fits']):
|
||||
for key,value in old.items():assert fit[key]==value
|
||||
regs=regions(row['patch']);r=shapely.union_all([regs[i] for i in row['masks'] if i in regs])
|
||||
extent,_=semantic_extent(r,list(regs.items()))
|
||||
assert r.symmetric_difference(shape(row['region'])).area<1e-9
|
||||
assert extent.symmetric_difference(shape(row['extent'])).area<1e-9
|
||||
report=dict(passed=True,patch_manifest_sha256=sha(patch_file),semantic_sha256=sha(semantic_file),
|
||||
fits_sha256=sha(fits_file),hypotheses_sha256=sha(cache_file),verified_candidates=len(cache),sources=hashes)
|
||||
Path('/out/arrow-source-audit.json').write_text(json.dumps(report,indent=2));print('VERIFIED',len(cache),'hypotheses')
|
||||
@@ -0,0 +1,46 @@
|
||||
"""Exact transaction replay and independent clean-artwork geometry checks."""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
from catalog_templates import bicycle
|
||||
from glyph_rules import accept_symbol
|
||||
|
||||
out = Path('/out')
|
||||
source = Path('/fullplan/full-map.json').read_bytes()
|
||||
original = json.loads(source)
|
||||
candidate_path = out/'bicycle-candidate-map.json'
|
||||
candidate = json.loads(candidate_path.read_bytes())
|
||||
rows = json.loads((out/'bicycle-rows.json').read_text())
|
||||
report = json.loads((out/'bicycle-report.json').read_text())
|
||||
assert report['baseline_sha256'] == hashlib.sha256(source).hexdigest()
|
||||
features = {f['id']:f for f in original['features']}
|
||||
assert len(features) == len(original['features'])
|
||||
for row in rows:
|
||||
assert row['after'] and row['fit_score'] >= .8
|
||||
assert accept_symbol(row['evidence'], row['semantic_score'], row['semantic_containment'], row['fit_score'], 'bicycle')
|
||||
for feature in row['before']:
|
||||
assert feature['properties']['class'] == 'road_marking'
|
||||
assert features.pop(feature['id']) == feature
|
||||
for feature in row['after']:
|
||||
props = feature['properties']
|
||||
assert props['class'] == 'road_marking' and props['subtype'] == 'bicycle'
|
||||
assert props['template_parameters'][5] == 0.
|
||||
p = shape(feature['geometry'])
|
||||
assert p.is_valid and not p.is_empty and np.isfinite(shapely.get_coordinates(p,include_z=True)).all()
|
||||
clean = bicycle(props['template_parameters'])
|
||||
assert shapely.force_2d(p).symmetric_difference(clean).area < 1e-8
|
||||
assert feature['id'] not in features
|
||||
features[feature['id']] = feature
|
||||
assert len(candidate['features']) == len(features)
|
||||
assert features == {f['id']:f for f in candidate['features']}
|
||||
nonmarkings = lambda doc:{f['id']:f for f in doc['features'] if f['properties']['class']!='road_marking'}
|
||||
assert nonmarkings(original) == nonmarkings(candidate)
|
||||
audit = dict(passed=True,source_sha256=hashlib.sha256(source).hexdigest(),
|
||||
full_map_sha256=hashlib.sha256(candidate_path.read_bytes()).hexdigest(),
|
||||
transactions=len(rows),exact_transaction_replay=True,non_marking_layers_unchanged=True,
|
||||
clean_catalog_geometry=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'compact-audit.json').write_text(json.dumps(audit,indent=2))
|
||||
print(json.dumps(audit),flush=True)
|
||||
@@ -0,0 +1,24 @@
|
||||
"""Measure uncovered legs of all cached patterns against the current map.
|
||||
|
||||
Pure diagnosis: this cannot extend a pattern or remove a feature. Geometric
|
||||
overlap is not a recall estimate against independent ground truth.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json
|
||||
import shapely
|
||||
from shapely.geometry import shape, LineString
|
||||
|
||||
baseline=json.loads(Path('/out/full-map.json').read_text())
|
||||
zigzags=[shapely.force_2d(shape(f['geometry'])) for f in baseline['features'] if f['properties'].get('subtype')=='zigzag']
|
||||
existing=shapely.union_all(zigzags);rows=[];seen=[]
|
||||
for i,d in enumerate(json.loads(Path('/componentplan/zigzag-diagnostics.json').read_text())):
|
||||
p=LineString(d['vertices']).buffer(d['width_m']/2,cap_style=2,join_style=2)
|
||||
if any(p.intersection(q).area/min(p.area,q.area)>.85 for q in seen):continue
|
||||
seen.append(p)
|
||||
legs=[]
|
||||
for a,b in zip(d['vertices'],d['vertices'][1:]):
|
||||
q=LineString([a,b]).buffer(d['width_m']/2,cap_style=2)
|
||||
legs.append(float(existing.buffer(.12).intersection(q).area/max(q.area,1e-9)))
|
||||
rows.append(dict(index=i,leg_coverage=legs,missing_legs=sum(x<.85 for x in legs),covered_fraction=float(existing.buffer(.12).intersection(p).area/max(p.area,1e-9))))
|
||||
report=dict(existing_patterns=len(zigzags),candidate_patterns=len(rows),rows=rows,missing_legs=sum(r['missing_legs'] for r in rows),not_ground_truth_recall=True,geometry_changed=False)
|
||||
Path('/out/zigzag-coverage.json').write_text(json.dumps(report,indent=2));print(report)
|
||||
@@ -0,0 +1,87 @@
|
||||
"""Read-only, method-independent audit of final linear markings in Gaussian renders.
|
||||
|
||||
Uses the frozen two-view evidence sampler and its existing negative-evidence
|
||||
thresholds. Findings are review candidates, never an instruction to remove paint:
|
||||
inferred intervals and worn markings need separate geometric evidence.
|
||||
"""
|
||||
from collections import Counter
|
||||
from datetime import datetime, timezone
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
|
||||
from discovery_evidence import glyph_views
|
||||
from search_views import SearchViews
|
||||
from strip_validation import POLICY, unsupported
|
||||
|
||||
|
||||
def audit():
|
||||
started = time.monotonic()
|
||||
source = Path('/fullplan/full-map.json')
|
||||
raw = source.read_bytes()
|
||||
document = json.loads(raw)
|
||||
with np.load('/evidence_plan/fields.npz') as data:
|
||||
labels, low, high = data['labels'], data['bounds'][0], data['bounds'][1]
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']
|
||||
if t['status'] == 'surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, shapely.GeometryCollection())
|
||||
rows = []
|
||||
for feature in document['features']:
|
||||
props = feature['properties']
|
||||
if (props.get('class'), props.get('subtype')) != ('road_marking', 'linear_marking'):
|
||||
continue
|
||||
row = dict(id=feature['id'], method=props.get('method'),
|
||||
inferred=bool(props.get('inferred_internal_completion')),
|
||||
previous_method_gate=props.get('method') == POLICY['candidate_method'])
|
||||
polygon = shapely.force_2d(shape(feature['geometry']))
|
||||
evidence, names = [], []
|
||||
if polygon.is_empty or not polygon.is_valid:
|
||||
status = 'unassessed-invalid-geometry'
|
||||
else:
|
||||
x0, y0, x1, y1 = polygon.bounds
|
||||
# A resource guard only: no evidence is fabricated for oversized objects.
|
||||
samples = int(np.ceil((x1-x0+2)/.04)) * int(np.ceil((y1-y0+2)/.04))
|
||||
if samples > 2_000_000:
|
||||
status = 'unassessed-sampling-budget'
|
||||
else:
|
||||
x, y = np.meshgrid(np.arange(x0-1, x1+1, .04), np.arange(y0-1, y1+1, .04))
|
||||
row['target_samples'] = int(shapely.contains_xy(polygon, x, y).sum())
|
||||
del x, y
|
||||
if row['target_samples']:
|
||||
evidence, names = glyph_views(polygon, views, None, None)
|
||||
if not row['target_samples']:
|
||||
status = 'unassessed-subpixel-footprint'
|
||||
elif len(evidence) != POLICY['required_views']:
|
||||
status = 'unassessed-view-coverage'
|
||||
elif unsupported(evidence):
|
||||
status = 'negative-paint-evidence'
|
||||
elif all(e['valid'] >= POLICY['min_valid'] for e in evidence):
|
||||
status = 'not-rejected-by-paint-check'
|
||||
else:
|
||||
status = 'unassessed-occlusion-or-semantic-coverage'
|
||||
row.update(status=status, source_tiles=names, evidence=evidence)
|
||||
rows.append(row)
|
||||
assert source.read_bytes() == raw, 'Audit must never modify the source'
|
||||
report = dict(version='final-linear-support-shadow-v1', utc=datetime.now(timezone.utc).isoformat(),
|
||||
monotonic_started=started, seconds=time.monotonic()-started,
|
||||
source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
policy=dict(POLICY, candidate_method='all-linear-methods', sampling_budget=2_000_000),
|
||||
source_unchanged=True, automatic_removals=0, inferred_intervals_preserved=True,
|
||||
limitations=['Low paint support is not proof of a false marking.',
|
||||
'Whole-object two-view coverage may miss long chains.',
|
||||
'Recall and metric accuracy are not measured.'],
|
||||
counts=dict(Counter(r['status'] for r in rows)),
|
||||
methods=dict(Counter(r['method'] for r in rows)), rows=rows)
|
||||
Path('/out/linear-support-audit.json').write_text(json.dumps(report, indent=2, allow_nan=False))
|
||||
print(json.dumps(dict(checked=len(rows), counts=report['counts'], seconds=report['seconds'])), flush=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cv2.setNumThreads(2)
|
||||
audit()
|
||||
@@ -0,0 +1,88 @@
|
||||
"""Final-map audit: preserve all geometry and inferred intervals, attach local evidence."""
|
||||
from collections import Counter
|
||||
from datetime import datetime, timezone
|
||||
import copy
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
|
||||
from discovery_evidence import glyph_views
|
||||
from linear_coverage_views import LinearCoverageViews
|
||||
from linear_window_support import VERSION, POLICY, inspect
|
||||
|
||||
|
||||
def main():
|
||||
started = time.monotonic()
|
||||
source = Path('/fullplan/full-map.json')
|
||||
raw = source.read_bytes()
|
||||
original = json.loads(raw)
|
||||
baseline_path = Path('/previous-audit.json')
|
||||
baseline = json.loads(baseline_path.read_text()) if baseline_path.exists() else dict(rows=[])
|
||||
if baseline_path.exists():
|
||||
assert baseline['source_sha256'] == hashlib.sha256(raw).hexdigest()
|
||||
previous = {r['id']: r for r in baseline['rows']}
|
||||
output = copy.deepcopy(original)
|
||||
with np.load('/evidence_plan/fields.npz') as data:
|
||||
labels, low, high = data['labels'], data['bounds'][0], data['bounds'][1]
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']
|
||||
if t['status'] == 'surveyed']
|
||||
views = LinearCoverageViews(tiles, labels, low, high, shapely.GeometryCollection(),
|
||||
extra_root=os.environ.get('EXTRA_COVERAGE_ROOT'))
|
||||
results = []
|
||||
for feature in output['features']:
|
||||
props = feature['properties']
|
||||
if (props.get('class'), props.get('subtype')) != ('road_marking', 'linear_marking'):
|
||||
continue
|
||||
polygon = shapely.force_2d(shape(feature['geometry']))
|
||||
row = dict(id=feature['id'], method=props.get('method'),
|
||||
inferred=bool(props.get('inferred_internal_completion')),
|
||||
previous_status=previous.get(feature['id'], {}).get('status'))
|
||||
if polygon.is_empty or not polygon.is_valid or not polygon.area:
|
||||
row.update(status='unassessed-invalid-geometry', windows=[])
|
||||
else:
|
||||
try:
|
||||
summary, windows = inspect(polygon, lambda p: glyph_views(p, views, None, None))
|
||||
row.update(summary=summary, windows=windows, status='measured-locally')
|
||||
# Evidence only. Never replace confidence, geometry, or inferred provenance.
|
||||
props['linear_support'] = dict(version=VERSION, **summary)
|
||||
except ValueError as error:
|
||||
if str(error) != 'sampling-budget':
|
||||
raise
|
||||
row.update(status='unassessed-sampling-budget', windows=[])
|
||||
results.append(row)
|
||||
assert source.read_bytes() == raw
|
||||
assert [f['geometry'] for f in original['features']] == [f['geometry'] for f in output['features']]
|
||||
for before, after in zip(original['features'], output['features']):
|
||||
expected = copy.deepcopy(before)
|
||||
stripped = copy.deepcopy(after)
|
||||
if (before['properties'].get('class'), before['properties'].get('subtype')) == ('road_marking', 'linear_marking'):
|
||||
expected['properties'].pop('linear_support', None)
|
||||
stripped['properties'].pop('linear_support', None)
|
||||
assert stripped == expected
|
||||
blob = json.dumps(output, ensure_ascii=False, allow_nan=False).encode()
|
||||
Path('/out/full-map.json').write_bytes(blob)
|
||||
recovered = [r for r in results if r['previous_status'] == 'unassessed-view-coverage'
|
||||
and r.get('summary', {}).get('measured_fraction', 0) >= .98]
|
||||
report = dict(version=VERSION, policy=POLICY, utc=datetime.now(timezone.utc).isoformat(),
|
||||
monotonic_started=started, seconds=time.monotonic()-started,
|
||||
source_sha256=hashlib.sha256(raw).hexdigest(),
|
||||
full_map_sha256=hashlib.sha256(blob).hexdigest(), geometry_unchanged=True,
|
||||
all_features_preserved=True, inferred_intervals_preserved=True,
|
||||
recovered_full_checks=len(recovered), recovered_ids=[r['id'] for r in recovered],
|
||||
windows=dict(Counter(w['status'] for r in results for w in r['windows'])), rows=results,
|
||||
metric_accuracy_measured=False, complete_recall_measured=False,
|
||||
limitation='Two Gaussian renders are not independent physical observations.')
|
||||
Path('/out/linear-windows-audit.json').write_text(json.dumps(report, indent=2, allow_nan=False))
|
||||
print(json.dumps(dict(features=len(results), recovered=len(recovered), windows=report['windows'], seconds=report['seconds'])), flush=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cv2.setNumThreads(2)
|
||||
main()
|
||||
@@ -0,0 +1,34 @@
|
||||
"""Reconstruct fresh semantic extents and target paint from exact source bytes."""
|
||||
from pathlib import Path
|
||||
import json,hashlib
|
||||
from functools import lru_cache
|
||||
import numpy as np,shapely
|
||||
from PIL import Image
|
||||
from shapely.geometry import shape
|
||||
from component_targets import vector
|
||||
from glyph_targets import targets
|
||||
from recall_extent import semantic_extent
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
root=Path('/symbolplan');manifest=root/'symbol-patches.json';sem=root/'symbol-semantics.json'
|
||||
patches={p['id']:p for p in json.loads(manifest.read_text())['patches']}
|
||||
doc=json.loads(sem.read_text());assert doc['patch_manifest_sha256']==sha(manifest)
|
||||
records={r['id']:r for r in doc['records']};seen={}
|
||||
@lru_cache(maxsize=4)
|
||||
def source(patch):
|
||||
p=patches[patch];im=root/'symbol-patches'/(patch+'.png');mask=root/'symbol-masks'/(patch+'.npz')
|
||||
assert sha(im)==p['sha256'] and sha(mask)==records[patch]['sha256']
|
||||
seen[patch]=dict(image=sha(im),mask=sha(mask))
|
||||
with np.load(mask)as z:
|
||||
regs=[(i,vector(m,p))for i,(m,s,c)in enumerate(zip(z['masks'],z['scores'],z['classes']))if c==1 and s>=.5]
|
||||
proposals=targets(np.asarray(Image.open(im).convert('RGB')),p,z['masks'],z['scores'],z['classes'])
|
||||
return proposals,regs
|
||||
path=Path('/gateplan/arrow-gates.json');rows=json.loads(path.read_bytes())
|
||||
for row in rows:
|
||||
proposals,regs=source(row['patch'])
|
||||
matches=[d for d in proposals if d['ci']==1 and d['masks']==row['masks'] and abs(d['score']-row['semantic_score'])<1e-8 and d['target'].symmetric_difference(shape(row['target'])).area<1e-8]
|
||||
assert matches,'Target changed'
|
||||
d=matches[0];extent,_=semantic_extent(d['region'],regs)
|
||||
assert d['region'].symmetric_difference(shape(row['region'])).area<1e-8
|
||||
assert extent.symmetric_difference(shape(row['extent'])).area<1e-8
|
||||
Path('/out/arrow-source-audit.json').write_text(json.dumps(dict(passed=True,hypotheses_sha256=sha(path),patch_manifest_sha256=sha(manifest),semantic_sha256=sha(sem),verified_candidates=len(rows),sources=seen),indent=2))
|
||||
print('VERIFIED_UNIFORM_SOURCES',len(rows),flush=True)
|
||||
@@ -0,0 +1,24 @@
|
||||
"""Measure uncovered legs of all cached patterns against the current map.
|
||||
|
||||
Pure diagnosis: this cannot extend a pattern or remove a feature. Geometric
|
||||
overlap is not a recall estimate against independent ground truth.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json
|
||||
import shapely
|
||||
from shapely.geometry import shape, LineString
|
||||
|
||||
baseline=json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
zigzags=[shapely.force_2d(shape(f['geometry'])) for f in baseline['features'] if f['properties'].get('subtype')=='zigzag']
|
||||
existing=shapely.union_all(zigzags);rows=[];seen=[]
|
||||
for i,d in enumerate(json.loads(Path('/componentplan/zigzag-diagnostics.json').read_text())):
|
||||
p=LineString(d['vertices']).buffer(d['width_m']/2,cap_style=2,join_style=2)
|
||||
if any(p.intersection(q).area/min(p.area,q.area)>.85 for q in seen):continue
|
||||
seen.append(p)
|
||||
legs=[]
|
||||
for a,b in zip(d['vertices'],d['vertices'][1:]):
|
||||
q=LineString([a,b]).buffer(d['width_m']/2,cap_style=2)
|
||||
legs.append(float(existing.buffer(.12).intersection(q).area/max(q.area,1e-9)))
|
||||
rows.append(dict(index=i,leg_coverage=legs,missing_legs=sum(x<.85 for x in legs),covered_fraction=float(existing.buffer(.12).intersection(p).area/max(p.area,1e-9))))
|
||||
report=dict(existing_patterns=len(zigzags),candidate_patterns=len(rows),rows=rows,missing_legs=sum(r['missing_legs'] for r in rows),not_ground_truth_recall=True,geometry_changed=False)
|
||||
Path('/out/zigzag-coverage.json').write_text(json.dumps(report,indent=2));print(report)
|
||||
@@ -0,0 +1,54 @@
|
||||
"""OpenCV raster / SciPy registration with global orientation initialization."""
|
||||
import numpy as np, cv2, shapely
|
||||
from shapely.geometry import Polygon
|
||||
from scipy.optimize import minimize
|
||||
from catalog_templates import bicycle
|
||||
|
||||
def fit_bicycle(p,all_hypotheses=False,proposal_only=False):
|
||||
if p.is_empty or p.area<.025:return None
|
||||
rect=cv2.minAreaRect(np.asarray(p.convex_hull.exterior.coords,'float32')[:,:2]);corners=cv2.boxPoints(rect);edges=np.roll(corners,-1,axis=0)-corners;k=np.argmax(np.linalg.norm(edges,axis=1));L=float(np.linalg.norm(edges[k]));W=float(min(rect[1]));u=edges[k]/L;ang=np.arctan2(u[1],u[0]);origin=np.asarray(rect[0]);fill=p.area/max(L*W,1e-6)
|
||||
if not(.35<L<4.5 and .25<W<2.2 and 1.05<L/W<4 and .10<fill<.70):return None
|
||||
closed=p.buffer(.04).buffer(-.04)
|
||||
holes=[Polygon(h)for q in ([closed]if closed.geom_type=='Polygon'else getattr(closed,'geoms',[]))if q.geom_type=='Polygon'for h in q.interiors]
|
||||
# Semantic seeding supplies class identity; holes are checked in the fitted preset negative space.
|
||||
cell=min(.02,max(.005,W/80));lo=np.asarray(p.bounds[:2])-.4;hi=np.asarray(p.bounds[2:])+.4;size=np.ceil((hi-lo)/cell).astype(int)[::-1]
|
||||
def draw(poly):
|
||||
m=np.zeros(size,np.uint8)
|
||||
for q in ([poly]if poly.geom_type=='Polygon'else getattr(poly,'geoms',[])):
|
||||
if q.is_empty or q.geom_type!='Polygon':continue
|
||||
cv2.fillPoly(m,[np.rint((np.asarray(q.exterior.coords)[:,:2]-lo)/cell).astype('int32')],1)
|
||||
for h in q.interiors:cv2.fillPoly(m,[np.rint((np.asarray(h.coords)[:,:2]-lo)/cell).astype('int32')],0)
|
||||
return m
|
||||
target=draw(p);radius=max(1,int(round(min(.04,W*.06)/cell)));kernel=cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(2*radius+1,2*radius+1));near=cv2.dilate(target,kernel);best=None
|
||||
def quality(x):
|
||||
m=draw(bicycle(x,fast=True));wide=cv2.dilate(m,kernel);cover=float((m&near).sum()/max(m.sum(),1));recall=float((wide&target).sum()/max(target.sum(),1));iou=float((m&target).sum()/max((m|target).sum(),1));return cover,recall,.6*2*cover*recall/max(cover+recall,1e-6)+.4*iou
|
||||
coordinates=shapely.get_coordinates(p)
|
||||
seeds=[]
|
||||
# Global orientation search, rotated around the symbol centre. The final
|
||||
# parameters still use the shared SVG base-point convention.
|
||||
def from_center(x):
|
||||
cx,cy,a,ll,ww,b=x
|
||||
return np.r_[np.array([cx,cy])-ll/2*np.array([np.cos(a),np.sin(a)]),a,ll,ww,b]
|
||||
for a in np.arange(24)*np.pi/12:
|
||||
axis=np.array([np.cos(a),np.sin(a)]);normal=np.array([-axis[1],axis[0]])
|
||||
uv=np.c_[coordinates@axis,coordinates@normal]
|
||||
for trim in [0.,.02]:
|
||||
low,high=np.quantile(uv,[trim,1-trim],axis=0);ll,ww=high-low
|
||||
if min(ll,ww)<.3:continue
|
||||
center=((low+high)/2)[0]*axis+((low+high)/2)[1]*normal
|
||||
x=np.r_[center,a,ll,ww,0.];seeds.append((quality(from_center(x))[2],x))
|
||||
if proposal_only:return max((score for score,_ in seeds),default=0.)
|
||||
starts=[]
|
||||
for score,x in sorted(seeds,key=lambda v:-v[0]):
|
||||
if any(abs(np.arctan2(np.sin(x[2]-q[2]),np.cos(x[2]-q[2])))<np.deg2rad(25)for q in starts):continue
|
||||
starts.append(x)
|
||||
if len(starts)==6:break
|
||||
hypotheses=[]
|
||||
for x in starts:
|
||||
cx,cy,a,ll,ww,_=x
|
||||
bounds=[(cx-.30,cx+.30),(cy-.30,cy+.30),(a-.26,a+.26),(ll*.80,ll*1.20),(ww*.75,ww*1.25),(-.02,.025)]
|
||||
opt=minimize(lambda z:1-quality(from_center(z))[2],x,method='Powell',bounds=bounds,options=dict(maxiter=40,xtol=.002,ftol=.002))
|
||||
z=from_center(opt.x if quality(from_center(opt.x))[2]>=quality(from_center(x))[2]else x);q=quality(z)
|
||||
clean=z.copy();clean[5]=0.
|
||||
hypothesis=dict(polygon=bicycle(clean),score=q[2],support=q[0],recall=q[1],parameters=clean.tolist(),raster_blur_m=float(z[5]));hypotheses.append(hypothesis)
|
||||
return sorted(hypotheses,key=lambda x:-x['score'])if all_hypotheses else max(hypotheses,key=lambda x:x['score'],default=None)
|
||||
@@ -0,0 +1,61 @@
|
||||
from paint_channels import paint_mask
|
||||
import numpy as np,cv2,shapely
|
||||
from discovery_rules import POLICY
|
||||
def glyph_score(rgb,allowed,points,polygon,cell=.04,kind=None,parameters=None,observed=None,paint_override=None,connectivity_open_m=0.,tolerance_m=.03):
|
||||
"""Check positive paint, unpainted negative space, and unexplained pixels."""
|
||||
h,w=allowed.shape;observed=np.ones((h,w),bool)if observed is None else observed;gray=cv2.cvtColor(rgb,cv2.COLOR_RGB2GRAY)
|
||||
bg=cv2.morphologyEx(gray,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(19,19)))
|
||||
hsv=cv2.cvtColor(rgb,cv2.COLOR_RGB2HSV)
|
||||
paint=paint_mask(rgb,channel='white',observed=observed)if paint_override is None else paint_override
|
||||
target=shapely.contains_xy(polygon,points[:,0],points[:,1]).reshape(h,w)
|
||||
near=cv2.dilate(paint.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(2*int(np.ceil(tolerance_m/cell))+1,)*2))>0
|
||||
wide=cv2.dilate(target.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(2*int(np.ceil(tolerance_m/cell))+1,)*2))>0
|
||||
region=shapely.contains_xy(polygon.convex_hull.buffer(.15),points[:,0],points[:,1]).reshape(h,w)
|
||||
negative=region&~wide
|
||||
result=dict(valid=float(allowed[region&observed].mean())if (region&observed).any()else 0.,
|
||||
support=float(near[target&observed].mean())if (target&observed).any()else 0.,
|
||||
recall=float(wide[paint®ion&allowed].mean())if (paint®ion&allowed).any()else 0.,
|
||||
negative_paint=float(paint[negative&allowed].mean())if (negative&allowed).any()else 1.)
|
||||
# A complete template must explain the connected paint object, not just
|
||||
# one head cut out of a longer curved arrow. Unfinished image edges veto it.
|
||||
connectivity=paint.astype('uint8')
|
||||
if connectivity_open_m>0:
|
||||
k=max(3,int(round(connectivity_open_m/cell))//2*2+1)
|
||||
connectivity=cv2.morphologyEx(connectivity,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
count,components=cv2.connectedComponents(connectivity,8)
|
||||
touching=set(np.unique(components[target&near]))-{0}
|
||||
connected=np.isin(components,list(touching))&observed
|
||||
result['connected_recall']=float(wide[connected].mean())if connected.any()else 0.
|
||||
result['connected_at_window_edge']=bool(connected[0].any()or connected[-1].any()or connected[:,0].any()or connected[:,-1].any())
|
||||
if kind is not None and parameters is not None:
|
||||
px,py,a,L,W,stroke=parameters;u=np.array([np.cos(a),np.sin(a)]);n=np.array([-u[1],u[0]]);local=points-[px,py];t=(local@u).reshape(h,w);side=(local@n).reshape(h,w)
|
||||
regions=[('head',t>L*.80),('tail',t<L*.25)]
|
||||
if kind.startswith('straight_')and kind!='straight_arrow':regions.append(('branch',side*(1 if 'left'in kind else -1)>W*.24))
|
||||
result['parts']=[]
|
||||
for name,where in regions:
|
||||
select=target&where;coverage=float(observed[select].mean())if select.any()else 0.;select=select&observed
|
||||
result['parts'].append(dict(part=name,coverage=coverage,valid=float(allowed[select].mean())if select.any()else 0.,support=float(near[select].mean())if select.any()else 0.))
|
||||
result['ends']=[]
|
||||
for name,interior,exterior in [('tail',t<L*.20,(t<-POLICY['glyph_end_probe_start_m'])&(t>-POLICY['glyph_end_probe_stop_m'])),('head',t>L*.90,(t>L+POLICY['glyph_end_probe_start_m'])&(t<L+POLICY['glyph_end_probe_stop_m']))]:
|
||||
observed_side=side[target&interior]
|
||||
offset=float(np.median(observed_side))if len(observed_side)else 0.
|
||||
select=exterior&(abs(side-offset)<max(.12,stroke*.6));coverage=float(observed[select].mean())if select.any()else 0.;select=select&observed
|
||||
result['ends'].append(dict(end=name,coverage=coverage,valid=float(allowed[select].mean())if select.any()else 0.,paint_fraction=float(paint[select].mean())if select.any()else 1.))
|
||||
return result
|
||||
|
||||
def directional_score(rgb,allowed,points,polygon,cell=.04,kind=None,parameters=None,observed=None,paint_override=None,connectivity_open_m=0.,tolerance_m=.03):
|
||||
result=glyph_score(rgb,allowed,points,polygon,cell,kind,parameters,observed,paint_override,connectivity_open_m,tolerance_m)
|
||||
if kind!='straight_arrow' or parameters is None:return result
|
||||
# A reversed template on a detached triangular head can have good positive
|
||||
# overlap and clear axial end probes. Its tip flanks still contain broad paint.
|
||||
h,w=allowed.shape;observed=np.ones((h,w),bool)if observed is None else observed;gray=cv2.cvtColor(rgb,cv2.COLOR_RGB2GRAY);hsv=cv2.cvtColor(rgb,cv2.COLOR_RGB2HSV)
|
||||
bg=cv2.morphologyEx(gray,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(19,19)))
|
||||
paint=paint_mask(rgb,channel='white',observed=observed)if paint_override is None else paint_override
|
||||
target=shapely.contains_xy(polygon,points[:,0],points[:,1]).reshape(h,w)
|
||||
wide=cv2.dilate(target.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(2*int(np.ceil(tolerance_m/cell))+1,)*2))>0
|
||||
px,py,a,L,W,stroke=parameters;u=np.array([np.cos(a),np.sin(a)]);n=np.array([-u[1],u[0]]);local=points-[px,py];t=(local@u).reshape(h,w);side=(local@n).reshape(h,w)
|
||||
flank=(t>L*.80)&(t<L*1.05)&(abs(side)<W*.55)&~wide&allowed&observed
|
||||
result['head_flank_paint']=float(paint[flank].mean())if flank.any()else 1.
|
||||
return result
|
||||
|
||||
base_score=glyph_score
|
||||
@@ -0,0 +1,44 @@
|
||||
from paint_channels import paint_mask
|
||||
from component_surface import planar_vehicle_clearance
|
||||
from glyph_identity import branch_evidence
|
||||
"""Two geometry-selected image mosaics for every point of a finite object.
|
||||
|
||||
No demand that both complete camera rectangles contain a long polygon's bbox.
|
||||
Unknown paint pixels remain unknown; different ranks never use the same tile.
|
||||
"""
|
||||
import numpy as np,cv2,shapely
|
||||
from fit_scene import project
|
||||
from layer_common import sample
|
||||
from row_evidence import choose_owners
|
||||
from compact_evidence import directional_score as glyph_score
|
||||
|
||||
def mosaic_views(p,views,kind=None,parameters=None,allow_pedestrian=False,calibrate_ground=False,connectivity_open_m=0.):
|
||||
lo=np.asarray(p.bounds[:2])-1.;hi=np.asarray(p.bounds[2:])+1.;cell=.01
|
||||
xx=np.arange(lo[0],hi[0],cell);yy=np.arange(lo[1],hi[1],cell);x,y=np.meshgrid(xx,yy);points=np.c_[x.ravel(),y.ravel()]
|
||||
distance=np.linalg.norm(points[:,None,:]-views.centers[None,:,:],axis=2);coverage=np.zeros(distance.shape,bool)
|
||||
for i,tile in enumerate(views.tiles):
|
||||
uv=project(points,views.geometry(tile['id']));coverage[:,i]=(uv.min(1)>=20)&(uv.max(1)<1180)
|
||||
planar=planar_vehicle_clearance(points,views)
|
||||
owners=choose_owners(distance,coverage);ev=[];names=set();target=shapely.contains_xy(p,points[:,0],points[:,1])
|
||||
for rank in [0,1]:
|
||||
colors=np.zeros((len(points),3),'uint8');allowed=np.zeros(len(points),bool);covered=np.zeros(len(points),bool);source_counts={};native_cells=[];alpha_good=np.zeros(len(points),bool);vehicle_good=alpha_good.copy();surface_good=alpha_good.copy()
|
||||
for i in np.unique(owners[:,rank]):
|
||||
if i<0:continue
|
||||
select=np.flatnonzero(owners[:,rank]==i);name=views.tiles[i]['id'];g=views.geometry(name);rgb,vehicle=views.inputs(name);native_cells.append(1200/rgb.shape[0]/min(abs(np.diag(g['intrinsics'])[:2])));uv=project(points[select],g).astype('float32');native=(uv+.5)*(rgb.shape[0]/1200)-.5
|
||||
def read(a,q):return np.concatenate([cv2.remap(a,b[:,0,None],b[:,1,None],cv2.INTER_LINEAR).reshape(len(b),-1)for b in np.array_split(q,max(1,int(np.ceil(len(q)/20000))))])
|
||||
colors[select]=read(rgb,native);allowed[select]=(read(g['alpha'].astype('float32'),uv).ravel()>=.65)&((read(vehicle,uv).ravel()<.2)|planar[select])&(np.isin(sample(views.labels,points[select],views.low,views.high),[1,2]if allow_pedestrian else[1]));covered[select]=True;alpha_good[select]=read(g['alpha'].astype('float32'),uv).ravel()>=.65;vehicle_good[select]=read(vehicle,uv).ravel()<.2;surface_good[select]=np.isin(sample(views.labels,points[select],views.low,views.high),[1,2]if allow_pedestrian else[1])
|
||||
if target[select].any():names.add(name);source_counts[name]=int(target[select].sum())
|
||||
rgb=colors.reshape(len(yy),len(xx),3)
|
||||
paint=paint_mask(rgb,channel='white',cell=cell,observed=covered.reshape(len(yy),len(xx)),calibration=allowed.reshape(len(yy),len(xx))if calibrate_ground else None)
|
||||
tolerance=min(.04,max(.02,2*max(native_cells,default=.01)))
|
||||
score=glyph_score(rgb,allowed.reshape(len(yy),len(xx)),points,p,cell=cell,kind=kind,parameters=parameters,observed=covered.reshape(len(yy),len(xx)),paint_override=paint,connectivity_open_m=connectivity_open_m,tolerance_m=tolerance)
|
||||
if parameters is not None:
|
||||
score['branch_identity']=branch_evidence(paint,allowed.reshape(len(yy),len(xx)),covered.reshape(len(yy),len(xx)),points,p,kind,parameters)
|
||||
rgb=colors.reshape(len(yy),len(xx),3);gray=cv2.cvtColor(rgb,cv2.COLOR_RGB2GRAY);hsv=cv2.cvtColor(rgb,cv2.COLOR_RGB2HSV)
|
||||
bg=cv2.morphologyEx(gray,cv2.MORPH_OPEN,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(19,19)))
|
||||
near=cv2.dilate(paint.astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(2*int(np.ceil(tolerance/cell))+1,)*2)).ravel()>0
|
||||
known=target&allowed&covered
|
||||
score['observed_support']=float(near[known].mean())if known.any()else 0.
|
||||
score.update(paint_tolerance_m=tolerance,native_cell_m=max(native_cells,default=.01),paint_valid=float(allowed[target].mean())if target.any()else 0.,paint_coverage=float(covered[target].mean())if target.any()else 0.,source_counts=source_counts,ownership='nearest-covering-geometry-per-pixel',rank=rank)
|
||||
score['planar_vehicle_override']=float((planar&~vehicle_good)[target].mean())if target.any()else 0.;score['surface_checks']={key:float(a[target].mean())if target.any()else 0. for key,a in [('alpha',alpha_good),('vehicle',vehicle_good),('paved',surface_good)]};ev.append(score)
|
||||
return ev,sorted(names)
|
||||
@@ -0,0 +1,398 @@
|
||||
{
|
||||
"schema": "missioncore.offline-plan-bundle/v1",
|
||||
"root": "simulation/urban-plan-research",
|
||||
"files": {
|
||||
"assembly_evidence.py": "assembly_pass/assembly_evidence.py",
|
||||
"assembly_rules.py": "assembly_pass/assembly_rules.py",
|
||||
"assembly_templates.py": "assembly_pass/assembly_templates.py",
|
||||
"assembly_zigzag.py": "assembly_pass/assembly_zigzag.py",
|
||||
"audit_assembly.py": "assembly_pass/audit_assembly.py",
|
||||
"audit_assembly_joins.py": "assembly_pass/audit_assembly_joins.py",
|
||||
"audit_beta.py": "beta_pass/audit_beta.py",
|
||||
"audit_catalog.py": "catalog_pass/audit_catalog.py",
|
||||
"audit_completion.py": "completion_pass/audit_completion.py",
|
||||
"audit_components.py": "component_pass/audit_components.py",
|
||||
"audit_consensus.py": "consensus_pass/audit_consensus.py",
|
||||
"audit_corridor.py": "corridor_pass/audit_corridor.py",
|
||||
"audit_discovery.py": "discovery_pass/audit_discovery.py",
|
||||
"audit_norms.py": "norms_pass/audit_norms.py",
|
||||
"audit_rows.py": "rows_pass/audit_rows.py",
|
||||
"audit_search.py": "search_pass/audit_search.py",
|
||||
"audit_sections.py": "sections_pass/audit_sections.py",
|
||||
"audit_symbols.py": "symbol_pass/audit_symbols.py",
|
||||
"audit_transitions.py": "transitions_pass/audit_transitions.py",
|
||||
"beta_profiles.py": "beta_pass/beta_profiles.py",
|
||||
"bicycle_artwork.py": "catalog_pass/bicycle_artwork.py",
|
||||
"catalog_context.py": "catalog_pass/catalog_context.py",
|
||||
"catalog_dependencies.py": "catalog_pass/catalog_dependencies.py",
|
||||
"catalog_dependency_pins.py": "catalog_pass/catalog_dependency_pins.py",
|
||||
"catalog_evidence.py": "symbol_pass/catalog_evidence.py",
|
||||
"catalog_rules.py": "catalog_pass/catalog_rules.py",
|
||||
"catalog_templates.py": "catalog_pass/catalog_templates.py",
|
||||
"catalog_zigzag.py": "catalog_pass/catalog_zigzag.py",
|
||||
"completion_profiles.py": "completion_pass/completion_profiles.py",
|
||||
"component_arrows.py": "component_pass/component_arrows.py",
|
||||
"component_bicycle.py": "component_pass/component_bicycle.py",
|
||||
"component_conflicts.py": "component_pass/component_conflicts.py",
|
||||
"component_evidence.py": "component_pass/component_evidence.py",
|
||||
"component_mosaics.py": "component_pass/component_mosaics.py",
|
||||
"component_rules.py": "component_pass/component_rules.py",
|
||||
"component_surface.py": "component_pass/component_surface.py",
|
||||
"component_targets.py": "component_pass/component_targets.py",
|
||||
"component_zigzag_rules.py": "component_pass/component_zigzag_rules.py",
|
||||
"consensus_profiles.py": "consensus_pass/consensus_profiles.py",
|
||||
"coordinate_cache.py": "orthophoto/coordinate_cache.py",
|
||||
"corridor_profiles.py": "search_pass/corridor_profiles.py",
|
||||
"coverage_evidence.py": "coverage_pass/coverage_evidence.py",
|
||||
"coverage_plan.py": "corridor_pass/coverage_plan.py",
|
||||
"diagnose_assembly.py": "assembly_pass/diagnose_assembly.py",
|
||||
"diagnose_components.py": "component_pass/diagnose_components.py",
|
||||
"diagnose_corridor.py": "corridor_pass/diagnose_corridor.py",
|
||||
"diagnose_coverage.py": "corridor_pass/diagnose_coverage.py",
|
||||
"discovery_evidence.py": "discovery_pass/discovery_evidence.py",
|
||||
"discovery_rules.py": "discovery_pass/discovery_rules.py",
|
||||
"extract_assembly.py": "assembly_pass/extract_assembly.py",
|
||||
"extract_catalog.py": "catalog_pass/extract_catalog.py",
|
||||
"extract_discovery.py": "discovery_pass/extract_discovery.py",
|
||||
"extract_search.py": "search_pass/extract_search.py",
|
||||
"fit_scene.py": "full_plan/fit_scene.py",
|
||||
"fragment_templates.py": "discovery_pass/fragment_templates.py",
|
||||
"gost_catalog.py": "norms_pass/gost_catalog.py",
|
||||
"image_profiles.py": "lines_pass/image_profiles.py",
|
||||
"inspect_bicycles.py": "catalog_pass/inspect_bicycles.py",
|
||||
"inspect_catalog.py": "catalog_pass/inspect_catalog.py",
|
||||
"interval_profiles.py": "intervals_pass/interval_profiles.py",
|
||||
"join_assembly.py": "assembly_pass/join_assembly.py",
|
||||
"layer_common.py": "full_plan/layer_common.py",
|
||||
"line_reconstruction.py": "intervals_pass/line_reconstruction.py",
|
||||
"mapping.py": "corridor_pass/mapping.py",
|
||||
"norm_profiles.py": "norms_pass/norm_profiles.py",
|
||||
"ortho_terrain.py": "orthophoto/ortho_terrain.py",
|
||||
"paint_channels.py": "component_pass/paint_channels.py",
|
||||
"paint_templates.py": "continuation_pass/paint_templates.py",
|
||||
"prepare_symbols.py": "symbol_pass/prepare_symbols.py",
|
||||
"refine_assembly.py": "assembly_pass/refine_assembly.py",
|
||||
"refine_beta.py": "beta_pass/refine_beta.py",
|
||||
"refine_catalog.py": "catalog_pass/refine_catalog.py",
|
||||
"refine_completion.py": "completion_pass/refine_completion.py",
|
||||
"refine_components.py": "component_pass/refine_components.py",
|
||||
"refine_consensus.py": "consensus_pass/refine_consensus.py",
|
||||
"refine_corridor.py": "corridor_pass/refine_corridor.py",
|
||||
"refine_discovery.py": "discovery_pass/refine_discovery.py",
|
||||
"refine_norms.py": "norms_pass/refine_norms.py",
|
||||
"refine_rows.py": "rows_pass/refine_rows.py",
|
||||
"refine_search.py": "search_pass/refine_search.py",
|
||||
"refine_sections.py": "sections_pass/refine_sections.py",
|
||||
"refine_symbols.py": "symbol_pass/refine_symbols.py",
|
||||
"refine_transitions.py": "transitions_pass/refine_transitions.py",
|
||||
"refine_zigzags.py": "component_pass/refine_zigzags.py",
|
||||
"render_assembly.py": "assembly_pass/render_assembly.py",
|
||||
"render_beta.py": "beta_pass/render_beta.py",
|
||||
"render_catalog.py": "catalog_pass/render_catalog.py",
|
||||
"render_completion.py": "completion_pass/render_completion.py",
|
||||
"render_components.py": "component_pass/render_components.py",
|
||||
"render_consensus.py": "consensus_pass/render_consensus.py",
|
||||
"render_corridor.py": "corridor_pass/render_corridor.py",
|
||||
"render_coverage.py": "corridor_pass/render_coverage.py",
|
||||
"render_discovery.py": "discovery_pass/render_discovery.py",
|
||||
"render_hypotheses.py": "component_pass/render_hypotheses.py",
|
||||
"render_norms.py": "norms_pass/render_norms.py",
|
||||
"render_plan.py": "catalog_pass/render_plan.py",
|
||||
"render_rows.py": "rows_pass/render_rows.py",
|
||||
"render_search.py": "search_pass/render_search.py",
|
||||
"render_sections.py": "sections_pass/render_sections.py",
|
||||
"render_symbols.py": "symbol_pass/render_symbols.py",
|
||||
"render_transitions.py": "transitions_pass/render_transitions.py",
|
||||
"review_symbols.py": "symbol_pass/review_symbols.py",
|
||||
"road_glyph_presets.py": "continuation_pass/road_glyph_presets.py",
|
||||
"row_evidence.py": "corridor_pass/row_evidence.py",
|
||||
"row_profiles.py": "rows_pass/row_profiles.py",
|
||||
"search_rules.py": "search_pass/search_rules.py",
|
||||
"search_views.py": "search_pass/search_views.py",
|
||||
"section_profiles.py": "sections_pass/section_profiles.py",
|
||||
"semantic_symbols.py": "symbol_pass/semantic_symbols.py",
|
||||
"symbol_evidence.py": "symbol_pass/symbol_evidence.py",
|
||||
"symbol_rules.py": "symbol_pass/symbol_rules.py",
|
||||
"test_assembly.py": "assembly_pass/test_assembly.py",
|
||||
"test_beta.py": "beta_pass/test_beta.py",
|
||||
"test_catalog.py": "catalog_pass/test_catalog.py",
|
||||
"test_completion.py": "completion_pass/test_completion.py",
|
||||
"test_components.py": "component_pass/test_components.py",
|
||||
"test_consensus.py": "consensus_pass/test_consensus.py",
|
||||
"test_corridor.py": "corridor_pass/test_corridor.py",
|
||||
"test_discovery.py": "discovery_pass/test_discovery.py",
|
||||
"test_intervals.py": "intervals_pass/test_intervals.py",
|
||||
"test_lines.py": "lines_pass/test_lines.py",
|
||||
"test_norms.py": "norms_pass/test_norms.py",
|
||||
"test_rows.py": "rows_pass/test_rows.py",
|
||||
"test_search.py": "search_pass/test_search.py",
|
||||
"test_sections.py": "sections_pass/test_sections.py",
|
||||
"test_symbols.py": "symbol_pass/test_symbols.py",
|
||||
"test_transitions.py": "transitions_pass/test_transitions.py",
|
||||
"transition_profiles.py": "transitions_pass/transition_profiles.py",
|
||||
"validation.py": "corridor_pass/validation.py",
|
||||
"zigzag_evidence.py": "component_pass/zigzag_evidence.py",
|
||||
"zigzag_mosaics.py": "component_pass/zigzag_mosaics.py",
|
||||
"audit_coverage.py": "coverage_pass/audit_coverage.py",
|
||||
"render_coverage_changes.py": "coverage_pass/render_coverage_changes.py",
|
||||
"test_coverage.py": "coverage_pass/test_coverage.py",
|
||||
"coverage_crossings.py": "coverage_pass/coverage_crossings.py",
|
||||
"zigzag_segments.py": "coverage_pass/zigzag_segments.py",
|
||||
"audit_scene.py": "coverage_pass/audit_scene.py",
|
||||
"refine_coverage.py": "coverage_pass/refine_coverage.py",
|
||||
"coverage_rules.py": "coverage_pass/coverage_rules.py",
|
||||
"refine_patterns.py": "coverage_pass/refine_patterns.py",
|
||||
"refine_crossings.py": "coverage_pass/refine_crossings.py",
|
||||
"coverage_patterns.py": "coverage_pass/coverage_patterns.py",
|
||||
"crossing_completion.py": "families_pass/crossing_completion.py",
|
||||
"crosswalk_family.py": "full_plan/crosswalk_family.py",
|
||||
"recall_extent.py": "recall_pass/recall_extent.py",
|
||||
"render_recall.py": "recall_pass/render_recall.py",
|
||||
"refine_recall.py": "recall_pass/refine_recall.py",
|
||||
"recall_rules.py": "recall_pass/recall_rules.py",
|
||||
"recall_templates.py": "recall_pass/recall_templates.py",
|
||||
"diagnose_recall.py": "recall_pass/diagnose_recall.py",
|
||||
"recall_targets.py": "recall_pass/recall_targets.py",
|
||||
"test_recall.py": "recall_pass/test_recall.py",
|
||||
"audit_recall.py": "recall_pass/audit_recall.py",
|
||||
"glyph_mosaics_inspect.py": "glyph_pass/glyph_mosaics_inspect.py",
|
||||
"glyph_registration.py": "glyph_pass/glyph_registration.py",
|
||||
"diagnose_glyph.py": "glyph_pass/diagnose_glyph.py",
|
||||
"refine_glyph.py": "glyph_pass/refine_glyph.py",
|
||||
"render_glyph.py": "glyph_pass/render_glyph.py",
|
||||
"glyph_mosaics.py": "glyph_pass/glyph_mosaics.py",
|
||||
"test_glyph.py": "glyph_pass/test_glyph.py",
|
||||
"glyph_identity.py": "glyph_pass/glyph_identity.py",
|
||||
"glyph_rules.py": "glyph_pass/glyph_rules.py",
|
||||
"audit_glyph.py": "glyph_pass/audit_glyph.py",
|
||||
"glyph_templates.py": "glyph_pass/glyph_templates.py",
|
||||
"diagnose_projection.py": "glyph_pass/diagnose_projection.py",
|
||||
"glyph_targets.py": "glyph_pass/glyph_targets.py",
|
||||
"registration.py": "joint_pass/registration.py",
|
||||
"refine_registration.py": "joint_pass/refine_registration.py",
|
||||
"registered_template.py": "joint_pass/registered_template.py",
|
||||
"render_registration.py": "joint_pass/render_registration.py",
|
||||
"audit_registration.py": "joint_pass/audit_registration.py",
|
||||
"test_registration.py": "joint_pass/test_registration.py",
|
||||
"probe_bicycles.py": "joint_pass/probe_bicycles.py",
|
||||
"inspect_recall.py": "joint_pass/inspect_recall.py",
|
||||
"small_bicycle.py": "joint_pass/small_bicycle.py",
|
||||
"compact_evidence.py": "replay/compact_evidence.py",
|
||||
"audit_compact_symbols.py": "replay/audit_compact_symbols.py",
|
||||
"prefilter_compact_shape.py": "replay/prefilter_compact_shape.py",
|
||||
"render_compact_symbols.py": "replay/render_compact_symbols.py",
|
||||
"prefilter_compact_symbols.py": "replay/prefilter_compact_symbols.py",
|
||||
"test_compact_symbols.py": "replay/test_compact_symbols.py",
|
||||
"compact_mosaics.py": "replay/compact_mosaics.py",
|
||||
"compact_bicycle.py": "replay/compact_bicycle.py",
|
||||
"compact_targets.py": "replay/compact_targets.py",
|
||||
"probe_compact_symbols.py": "replay/probe_compact_symbols.py",
|
||||
"prepare_compact_symbols.py": "replay/prepare_compact_symbols.py",
|
||||
"semantic_compact_symbols.py": "replay/semantic_compact_symbols.py"
|
||||
},
|
||||
"source_sha256": {
|
||||
"assembly_evidence.py": "0fda82c403f9734ea0b0267504ac82437092d410882dc21417a492de9509c09b",
|
||||
"assembly_rules.py": "04798c28e0daccc8be5fb045cc736160721308f7c41189f287b97a509999ddbf",
|
||||
"assembly_templates.py": "41ec0428032ae328d5f46c34702d5b0be43f724e5821278e745554c72326d402",
|
||||
"assembly_zigzag.py": "dbee99c505381fbdccbecec0817e0ec4e028ac1eb475124829cd58811251b9ca",
|
||||
"audit_assembly.py": "8defc22e391c330962c503b27c49b9d13cecee90b0170dab1b8372858bda3638",
|
||||
"audit_assembly_joins.py": "e8a3ded181b69961c8a0a5f88e171ff5ada82f0a43e55c217bb40734e411c094",
|
||||
"audit_beta.py": "f6dfe314f5f0f9875035f08ae279e64309fafcd9c04e0feb468dcf106cc2990f",
|
||||
"audit_catalog.py": "19d5f0f156c0f90d2e1e2548fee99eee521b76e7152f0b53ae12b43ed48553b2",
|
||||
"audit_completion.py": "ef6adcfec3e1a4bd894b54a150fe3b8559bf73e94665bb9da6bd68007e90575d",
|
||||
"audit_components.py": "b472856305839483fcf806eb76a29b46650f2188b1e0cf0f94afdc250eb1fa28",
|
||||
"audit_consensus.py": "7056d6195b320ae165aeef44e802c29697ae8163abb99d4593e0c8df6e186bc2",
|
||||
"audit_corridor.py": "3f792b1830e9097644dd66c38eb2cf7efa11d75a0fda928ffa0a7780afb85bfe",
|
||||
"audit_discovery.py": "9e5f1bdd0d752d82a52121fe86d4e6fb00068a6af9330a072fe7311a909bc974",
|
||||
"audit_norms.py": "234e431040e38d9c999f10a62d05454f217673cda5e2ab3e3119a2fabf9e703d",
|
||||
"audit_rows.py": "7298fddd8baf9798e6dd5251d4f261e97a5b92f0beeb60f3198c6aa7498d7f01",
|
||||
"audit_search.py": "0de9929d983c97045444131b9255ec4c256ae652b6adb82551e42b94c4bec0eb",
|
||||
"audit_sections.py": "755d129ef5e1c6503c784393f67cc0dae1c9ebaaecb9c08b8ad440cde7dceea7",
|
||||
"audit_symbols.py": "105c7a7939c43643299e071d94f5b1e4acc45a29d8b45482a3d7fabc9508ecea",
|
||||
"audit_transitions.py": "35a3ecb08d96ee21badf438a18bdddf800263032078e2daee888673ab4209c4a",
|
||||
"beta_profiles.py": "172ab1f02b8767e9e96c21d99925c8fd7568403434f951feadc2857036d07c6e",
|
||||
"bicycle_artwork.py": "2e5220e6e82024c683b65c81695b53fa3070d58eed89d61f5cbda41f6c3c554f",
|
||||
"catalog_context.py": "f2e654ea068a758be1f929299786559f02672898047893cdc20e6f1cb204bb80",
|
||||
"catalog_dependencies.py": "d6407445db28f6f15201f4ec09e3401141fca90e11a9cef52392f88175634fca",
|
||||
"catalog_dependency_pins.py": "93ed9007288440620b8339043f1d5ae74684e39e7c3bd50d94d24f6cf29c9f3a",
|
||||
"catalog_evidence.py": "7f9fb171776faf1181705826bec206882aea13eded8664d8e3e6dfd09031ec95",
|
||||
"catalog_rules.py": "ed0f8e838908bcea9ac1ee15fe13d1b23ac29981428ea6a4bdc097c0226db3cb",
|
||||
"catalog_templates.py": "05577c611ce5ffa2c21d0f608e728eca13009c994e26913b29f39fdcf584c092",
|
||||
"catalog_zigzag.py": "2e6a804cd14440afaf27bd0f0c2123afc7bf3ea1c58cd0d49293049f1f3b498f",
|
||||
"completion_profiles.py": "b01cb280a265f170c2f3823d59d423c0cf11472050678cc4dad716c1f90ff786",
|
||||
"component_arrows.py": "8b577e22e1fb2f45cf6cf426ecd32050c9fca5066a9f5fa00d156049f8691e39",
|
||||
"component_bicycle.py": "854388ce45520abb82d8f61d1195a50525e6326c315feee5bcb84b66163dc2fe",
|
||||
"component_conflicts.py": "dccc333197b47bbbf211212b38d5a0018c8bae5f403fed1cbe3e22be0a81967e",
|
||||
"component_evidence.py": "ef889c65ce03baf5da245a45c2819927d93ac16d4575fa28e3078a340fdd57fb",
|
||||
"component_mosaics.py": "15f8aac32e73cfc72253082e9b7ce2baaaf69ff53a701d0d279990f0cffb5db5",
|
||||
"component_rules.py": "910be55c56c3b406e1727339b1054ee0693a5d7c4ec46cb3cfa8015a34eb0553",
|
||||
"component_surface.py": "e425be65d184d474c5485160547f122291529622244da73ca484469ffd994d69",
|
||||
"component_targets.py": "1719de92d38ff15377276e7b471501cf5ed21392a14113d90537eafea735e6c2",
|
||||
"component_zigzag_rules.py": "76566a1ec3b90c7d3abe7dd96054351e3fbb41ac1117f2b1eb09ce33c716da98",
|
||||
"consensus_profiles.py": "4069e7e56eff1cfe3c10884a63a8c329891bbdffa68f477281c2eebff9128091",
|
||||
"coordinate_cache.py": "930f8f521ef13c02b589d0c182ab4cf337acc4c213354808d32178bbbea3edf4",
|
||||
"corridor_profiles.py": "967902dae9137ceddb05708acbb6a7cc1e06977c6d064787a1a651422d2e5672",
|
||||
"coverage_evidence.py": "e5567525f324b77861ef5d393067f44b9edf8c0f51dc16b0e7af03e1c4f6aa53",
|
||||
"coverage_plan.py": "48e28d6781d5d04e83645ba0a9aa7f0398ae904d26bf2e81caa8d8e741bccdda",
|
||||
"diagnose_assembly.py": "44ef17e6bdecc9285ae8150ccb5c4dd397006381b34b013ebd3e2ed6c2b34bbc",
|
||||
"diagnose_components.py": "b9653a2b642c1399dd3b6388cd40a148cb4cb81f665fad3bf993d950a64579f8",
|
||||
"diagnose_corridor.py": "cff89f2a78ff315906b7d40ba1855f0f842afe1f7f74d1d38b7366e2959bcfd6",
|
||||
"diagnose_coverage.py": "f5305f0c429aea3ba5f18e4261abd64fe8254e53db24323ffcebc152734864b7",
|
||||
"discovery_evidence.py": "dc7e0594b77f6d3723a965216164427835aa5ae2ff736b5599774c4efbc626eb",
|
||||
"discovery_rules.py": "1ac148d3fd75d443d2bde69e46da775de838c9cb2013570d87c13900f0a1a491",
|
||||
"extract_assembly.py": "d2f1cd5a1fc03b95496b32e024452c3e8ba489a06299a6cba967d4d18a5c3b33",
|
||||
"extract_catalog.py": "7c3b7de0291f52d9f37590b438d1abb7e37b36665cfb5e9ba4698b78a8f42574",
|
||||
"extract_discovery.py": "5d2835cde2b9d4d895609ea39be2a94a22e894d0996d525dcc3df7046c33e681",
|
||||
"extract_search.py": "09b3c0c65d33fdd5025e3436fb1bd5df67d1e359b507f4fae74a7e61754fc92c",
|
||||
"fit_scene.py": "d130e092d0acad9994da04ca34810beaa8a31c9602d1858cb4d686c240e42ab8",
|
||||
"fragment_templates.py": "11f2eb0bdf89a76f2f3be1e8368662f45fea1dec13f7fb43bac9c3e41acf1ae7",
|
||||
"gost_catalog.py": "a55a837cc1473055ff24d340c6a669a45d8295f9efb08fd81f1bf2651c0ac537",
|
||||
"image_profiles.py": "1c497f06053ffff63a476baf6dd65ba75ee17d7c38d04c8ff8c22ae03a27eca8",
|
||||
"inspect_bicycles.py": "e12964f244645b7a4b2bdb0da5d2bb90e7d49dc35bf2f66c4a8466fabc6836bb",
|
||||
"inspect_catalog.py": "322aec8f233009eb42703132b220e1e216f8dc8b59aa6bbd27244067e651727d",
|
||||
"interval_profiles.py": "6e7dc0e0eb2cc7ed641bd786b283688ecbc831a2b3442f3f6e6c18add0bad345",
|
||||
"join_assembly.py": "293fd78d10f0ba13b1339a69d737c3f96ef003ea3f6dd63fdf02d14c40fa324f",
|
||||
"layer_common.py": "5e6a2ef463a786b81d387250b2f2be21511f3dae887c8b9ea424051b1722fa59",
|
||||
"line_reconstruction.py": "f89883a1140aca2b78e1567e3361aa69403725d9b384daca6f782951b8920738",
|
||||
"mapping.py": "1c6ba0cc111250d73bc0bc282e9cbb7a602921bca931da6441bc9a6daf88b4f4",
|
||||
"norm_profiles.py": "fe5169f850919abdbc762fcf12960ef7dc0185f1ae56330246ca322db6caa0e7",
|
||||
"ortho_terrain.py": "9c9cab9d7086144fd1a108db28f796e9d267375d7135d50d5cb3f054eae75213",
|
||||
"paint_channels.py": "46da37b13914c69c72f6f4ae1bb5ad70e6f6b77b42355b016df1b3c4d72fbc63",
|
||||
"paint_templates.py": "9cf9c4e871ea03f38e1641c1c89864a628e0fe87462cccdc0149fdf6242545b6",
|
||||
"prepare_symbols.py": "59d0f7da37f4f119b0bfa996dfe4638999bf1bce575415db087fdb55d64a144a",
|
||||
"refine_assembly.py": "0da00d12e4bda06760a3fc78fcddb6875012edc046e9f83a00074846031b4939",
|
||||
"refine_beta.py": "36f39ab464c967b1df136f992a3156deef1dfe2af858bc7cbbef43e9bf7f9831",
|
||||
"refine_catalog.py": "eeeee4d59066579c1fa8708a1be9d999a481f8f8daf05ec01704897252cc66cb",
|
||||
"refine_completion.py": "12f424d39a687e8b94823f2e2f7b2f2c95538f3504260b4373c47cc21b29c6e1",
|
||||
"refine_components.py": "57eeb116e3c61ee42d30d3d6bc557e33d2b2d8ee24910584487bec5d34b69ef5",
|
||||
"refine_consensus.py": "e0e6bf6ad7023515103be330df93b5d925cc1c62642d1a38e67f07cbe027eb36",
|
||||
"refine_corridor.py": "fd1c4d4e028a037e32538c26a66f876425088b8b5b2c7ffc8d5dc807eba3290f",
|
||||
"refine_discovery.py": "6272ca1f5052259fb3c6cfd1f1079e4e5864e1e067d12de7ff36d95857219d7b",
|
||||
"refine_norms.py": "081f6f2347a19b996d5f1b69d63194112d808071eb8c8313e173b5cd09e2dfd5",
|
||||
"refine_rows.py": "3983e8de9b6dadb349b8731335798640e4ce11c87356925f9ea79c5d0bf819b8",
|
||||
"refine_search.py": "113e8cee4f26d1f6b0bcce516388d046ced0523598ddf7f6f4e4dc365a0d9859",
|
||||
"refine_sections.py": "7fd48aa308df07b980e40153651c9c6985949245d4f3f0d1a46bbfd13f735ff3",
|
||||
"refine_symbols.py": "c210c825edb1d2469b27afac6292f911df8351e92c8f47d0b5d05f99a229a95a",
|
||||
"refine_transitions.py": "777d0a0f4d9c762768311db154f66a77880790f523ec639bbd02225ac470138b",
|
||||
"refine_zigzags.py": "8fad49227ca4fdaf72fa46a9050aaa39d699aa2620ffc765ea829e2ecb77d967",
|
||||
"render_assembly.py": "b8471dceb42be102eeb1918eb7950e038d3fc9e0ebab0a3b01b3aaea8be710fa",
|
||||
"render_beta.py": "4a5fdeaa746ce8b4f449df44c210e13fcc2cabf2e2931beab00928eda3777e1c",
|
||||
"render_catalog.py": "58ecb30ac8ddffd1489c93361dc6678c82e4dbbfbe8a6e851a1be395ee40db1b",
|
||||
"render_completion.py": "5e76d2a6ce41a6be8013f98df33951fe17fc209c078376ebfafe7c60ed0b14a7",
|
||||
"render_components.py": "2115f348228ffcbb21ac1a80c1e8c37b082af8be09ca2a182028aa1ea0a7a222",
|
||||
"render_consensus.py": "ea677bac3a4950209133268801f238c67236b0e7866f22df3e738e7592fde682",
|
||||
"render_corridor.py": "f6355e3761834fcf811c0cae9dc3ce602e7221afea4f674178d6c29085e87e9f",
|
||||
"render_coverage.py": "2cba12c09333c242841b174f201c89ffce9e715b78b26b472117ae140ff4157c",
|
||||
"render_discovery.py": "868ad8eb712f5880e944b0899205a2c0fd6dd0713eb727b1c49dda92b897fa20",
|
||||
"render_hypotheses.py": "d7ea4b19409a7b5c78c8a01ed9c190069cc109e4bfa854c77672ed1d1e64ba56",
|
||||
"render_norms.py": "3a8bcf81723d7bda4b49c8ff12e21efded4450839e11a4f23e719dfc8fa4441d",
|
||||
"render_plan.py": "9e702d51c6be09caa456d8e528bd62bc9ec238ca3689a99f38b414dafc193f66",
|
||||
"render_rows.py": "65f57b15f2b288048a75d1f4603625637f1e2af505925628ec80a2169fe9944e",
|
||||
"render_search.py": "5655641df20c2e4f0849bb35ff4029d806554cc7d3b696d26378ad9d880d0491",
|
||||
"render_sections.py": "43de78c4b1c643162f4ac9ada77411a2a4e222fa5506ec8f1061311a96bb234c",
|
||||
"render_symbols.py": "ae3bd83870aa435d2051282b65fd3015eee8c11e92831062328e39482de76d5b",
|
||||
"render_transitions.py": "eea6be5a6f90145f00d7e930f4123c87aa135a64a2c59723908cf7056520128d",
|
||||
"review_symbols.py": "264c92625648cf1930753add51496c28ef645a481e5cf13993ae0cf758d5df30",
|
||||
"road_glyph_presets.py": "619f4e9c9eeaf63537afc0e8676ab5915d78af1aee8bfb9fe4656bf81b07f322",
|
||||
"row_evidence.py": "fec784ab795470d96e48c7022e59d5206b0c07b40d84843cbc058fcc4de896c0",
|
||||
"row_profiles.py": "0b23a93b6de9b2e01efb5ce57085fac0afebcd3df6184e573d6b84793e0128df",
|
||||
"search_rules.py": "ca3cab6d24f31460d9912c351c166d89fb1c3b21df620ba1d847543bd7a71f41",
|
||||
"search_views.py": "8a123558dbef184fc85a92c9547c19644d14681329dbbd0cfeac0032bbd102be",
|
||||
"section_profiles.py": "f3f57b2f5e01962f0aca44164d95dfd2d1e03c73c1b0ecb94c6d550f509609de",
|
||||
"semantic_symbols.py": "0665fa1ba0dd08bd29b762a09fb2d03b31a1894ff0731353c2f847fb170c5658",
|
||||
"symbol_evidence.py": "2d643c9756660bd33ad208ffbe960283feb3aa12352399b6df6f81c0b507e3a2",
|
||||
"symbol_rules.py": "c349ee11f5c33da7310dcf6e530d988858243c5e99ad8072818d78802ea59527",
|
||||
"test_assembly.py": "80510625a71ea9fc04add883d9a7e40a3bfdcac4251bd702b5507ce76f9bba8f",
|
||||
"test_beta.py": "e5729c05063afb65c3e35b4e380219dee9893dfa26bb41e1c5cd24641e08358b",
|
||||
"test_catalog.py": "91a8fdbc330cecd5bc354406012852cc46245baf99ba8befdaac164f6b79c1c4",
|
||||
"test_completion.py": "a3a6a283221ae48ade8fd0cca2f145509fd6bedf8e808967c13438791654a7f1",
|
||||
"test_components.py": "71c48f0b6afda80713aef4ee6547acc1995f0dd07d901ee84a4254bee0cc1168",
|
||||
"test_consensus.py": "90cdd1be7bd2a0d1471141eb40bfa806cc149789c3d6794bbfdaba5999a369f7",
|
||||
"test_corridor.py": "42788835ec88e91a3b92ec7ead4e4c489b01ddf11256b46b7b3722c6b4770703",
|
||||
"test_discovery.py": "a75ffc22d065201f7023d8e6cfb6dc09204a80f9be607599b85479628a301538",
|
||||
"test_intervals.py": "0fd926c0739f066bf79d549e190b8641399eea39486726e5946d67388ab73a12",
|
||||
"test_lines.py": "a5b2aab9cb0627bd463d1bd37b1353e0ca14fbffa7dfbac2a928e528dc8ca29a",
|
||||
"test_norms.py": "02b0757f7c1c4498c9165dde2bd650ca9f0a1dec840d59e7828343264079905f",
|
||||
"test_rows.py": "a89932294a62a373b8c4c80556c4d23d7182c64126788d63988312bc3b9f3449",
|
||||
"test_search.py": "fc3d874c8a6639bfa007eb8fa4a869e270bddafe317868bed29450c6024f8756",
|
||||
"test_sections.py": "0b9f5da94e3f7ca8f05ab1f15b48685a6c97ac4a559147f98adb6634ad74031f",
|
||||
"test_symbols.py": "63a429e8d3324b87075bcb2a2c9902f35c45f1aceff5b46c260aec9bed666481",
|
||||
"test_transitions.py": "95837d6e04c890f514901d9b587092f79fa1552dde6df99e301849d66c004438",
|
||||
"transition_profiles.py": "7f713e5fed3a1aa88d00a4c3299b45a8970ff225ab827f82950901185b33ea2e",
|
||||
"validation.py": "ee004220db3cdf2429af2a0e875cd9a63526587422881692ce56fe9d77f5cc2c",
|
||||
"zigzag_evidence.py": "978bda848dc7dc85268e2696b918eb6f86c7377c7e9da7c5e4b875815daefa0d",
|
||||
"zigzag_mosaics.py": "b2703eb159e92680df15d4ed80cd47e55a9168ab3f1703f50faf843eca5262b5",
|
||||
"audit_coverage.py": "cb7fd23d5b9a86ec1d2a94fa6d172326024d551c0a5ae1791487d455a512d655",
|
||||
"render_coverage_changes.py": "fa79e806d806ad8a59f8b1cf3ec1df27a4032a38eb234b0695fdffcc625f5617",
|
||||
"test_coverage.py": "d4ee6c71db2e6a426e0c44b99a46acf34c2094af1148e2aade4382c784c99063",
|
||||
"coverage_crossings.py": "ecfc59bbd5ce419ffbc08f282985c0937d21f2311d581cd6fb8fe6d20671411c",
|
||||
"zigzag_segments.py": "02b46d2462f0851af3d371e927da7858bbf3f59daf89201a40e30e267cf097c0",
|
||||
"audit_scene.py": "298bc00d21fecf7c511fd2ae455d181f3998781e13b91464fb6553338847d28b",
|
||||
"refine_coverage.py": "d647727eb6c64ce60e3e98701e22c41d42f265c073fe099d9c95cc3e165d5540",
|
||||
"coverage_rules.py": "9c22f810b123a0b2d1bb4fb0717f1df2bcab2f9c2ebd76d3b537e67e6baea055",
|
||||
"refine_patterns.py": "83b053abc53fb198b21f7a8ec80e6fa2b507855c20fc4a33e06a10f7c387346d",
|
||||
"refine_crossings.py": "7e7237cd41640ea7b298754b6be40c734eee8dc933f5be920ef9426a2c88eb6f",
|
||||
"coverage_patterns.py": "76f2a539c88e3212fd0b904a0b85d1a31c1a2357e864f4b44dc9b1a28e722638",
|
||||
"crossing_completion.py": "6e75ae4b65e8d6447acae57ae17ca088a427fda39f438271bc0f1b0ca84641fb",
|
||||
"crosswalk_family.py": "68ee6327a7a24ab74e77bdbbc9c504562f6997cfb7f0e6082095b3e2eb32fc2d",
|
||||
"recall_extent.py": "fea1f876ccf52dbaf7a06a68c7bf7870a8ebbc1331c612366419a36291433fbf",
|
||||
"render_recall.py": "51d887366f79b82d3c61ed3ba9dcd01a8c07a4b609ba379cd9393d2924c702b0",
|
||||
"refine_recall.py": "b2d323ce0325265b37302673101421078cc05f52cd00415d476165c7144247cc",
|
||||
"recall_rules.py": "7a54b3ff0aaaac84d71206f685dd8479f8bfb1966294c50f56567c908794f94c",
|
||||
"recall_templates.py": "56c8f95854df245d31b1b132bf800ab8ac9356e775bed52042304047cd849497",
|
||||
"diagnose_recall.py": "83b96adf9796412d800e702608dd6e64f237718d739ff592acca0574d2dc62a1",
|
||||
"recall_targets.py": "01bb0876d092f9de660e181f6622323704b76bbd8a62e6d8f88cfd7bf398e7bb",
|
||||
"test_recall.py": "8a35c7ea7f5bb0cea6193181c75f5bba04344ee902e000c106c07caa51b7df15",
|
||||
"audit_recall.py": "ce4cb5ae9582a6b46921fb311cec626ffdc5ee8ea2a9a19c0eb9699b0d9211e3",
|
||||
"glyph_mosaics_inspect.py": "330e6aff8fde052ca94bca0908a46c3b2f5d9457e47482a99e78708634c402fa",
|
||||
"glyph_registration.py": "30a21ce2bccb6921b5b77939ed5a329787fd1f3127d63f9cc2481a326dde6c9b",
|
||||
"diagnose_glyph.py": "982a9656f4ffc67d8b833db3cd4aa738bf8d2e9f1ee8be4d73751b66922f5ba3",
|
||||
"refine_glyph.py": "ca2bea6020ce4ab458af57553931978ee1eec1beb39225a8009f7daaac81d826",
|
||||
"render_glyph.py": "e1bda83c85d6cb48481cd7aa9cd738bf67311a693d07e33188c711e9c30ab161",
|
||||
"glyph_mosaics.py": "cdedb823f1e3d49f8072b38f38f463b0e7338351fe0d032d634396f55f45b0b9",
|
||||
"test_glyph.py": "46555f5acc2319c94418b68177991d3538e6b53eb6b3b8befca913299607ac6b",
|
||||
"glyph_identity.py": "d02114510077651db8cac1b0ec4dcf6dc98e8b64a8caa44ffc37df4914ecdd5b",
|
||||
"glyph_rules.py": "747d3da1f0e0cd3301a6f20c5185eab68c431b4966c491ea77210bc4db48eac1",
|
||||
"audit_glyph.py": "31f44bdae4c2af38cbe9af5b8bbf16bfbdcf0b96e39b62078d5459e673d30758",
|
||||
"glyph_templates.py": "8ddc50348563b048c362a447d68a30872284dc08c88ca9d9c70c27a382a62758",
|
||||
"diagnose_projection.py": "d49d44c69b9bbb3c91af27851b33b7323a68727e76846af846df94cfa663a684",
|
||||
"glyph_targets.py": "e957f2d7889b4366eacc29a0d8a1440ee16b35f00a79d9e8740f0b807a232eda",
|
||||
"registration.py": "01590d3f0a57a3794ea3a24e5fc9a9399bd389d3ba7519cb9577d2ebfd1abaeb",
|
||||
"refine_registration.py": "7740076f771b3d7949d1b03f9b6fe3034aa1c646fda7751e0cc81cb1055e5579",
|
||||
"registered_template.py": "6c256bab9275c1d4924e5eb9a5982b0b777e6e637603d33f6d0df00ffad29464",
|
||||
"render_registration.py": "c1ca93d964a8ee1cca134497f05672978c43ff845980308f2a9ab3823bea06bd",
|
||||
"audit_registration.py": "0cf92896826c40b80513f25935b8abf9de99d7f51437aea98ac825474da2b6d5",
|
||||
"test_registration.py": "e565bcbf56921bb252d8a4c0bbee7515a4ba4d73ad9797cf6b6d67de5783503d",
|
||||
"probe_bicycles.py": "8e2a66e352b6e05d2eb3f631453d53e0940f046779f4cc10e87f9a80470ff4bc",
|
||||
"inspect_recall.py": "b071dcc227002ec4cc643de48302c854997d5f7b48782c780a874d13c214e689",
|
||||
"small_bicycle.py": "fecca9312cff0d4e7035f42a7c44e441f90ab4e033cfe22ae91d609de445d2af",
|
||||
"compact_evidence.py": "4ca323ba160578f26a236b691e34abc146067e1660b85e0d289596a60a969db5",
|
||||
"audit_compact_symbols.py": "09875f1be7bbbbc2f7fa711cf118f2edb2f4d4bb35da3723dad02fd3828b7357",
|
||||
"prefilter_compact_shape.py": "ea4fb1077dbb45dba663173f5e628be0343b13924965ab40c97f7075aedb25da",
|
||||
"render_compact_symbols.py": "663e290521ffeb66eedea6020a4e01db0a2900daad2e664820c4b89fc9f4a4d2",
|
||||
"prefilter_compact_symbols.py": "e010633be6bca06e51f390ad5e96659da0761b7c208566d0fb9240755da420dc",
|
||||
"test_compact_symbols.py": "90af3d25ad4f5cd43433ba732c0c82b67bc765afd327522a1e576c5b2e6c2e48",
|
||||
"compact_mosaics.py": "c6fbe39389a296df23806c022bd19dbe327cdedc90acfe4907c0ab642261e84a",
|
||||
"compact_bicycle.py": "4a0ccf65c6b2670a29f6d46a80fe2bae4115b944946983e9a50df86f9f9d7f2a",
|
||||
"compact_targets.py": "bf0031e26cc161b0c0d82c16e7a333ae2567252432b9b66c901f5c2eb260664f",
|
||||
"probe_compact_symbols.py": "c0d899e9fa3df1511f2ec413bb44fdc1098a98af59b8bda623f0aa2cc35ac4fb",
|
||||
"prepare_compact_symbols.py": "c928304838657cbf7053de404ee0146d07ee1cde2992a00f2d5d878cfa5b2851",
|
||||
"semantic_compact_symbols.py": "1165ea7159f53293a21449d937468f6bbb469abe09d51ec15ffb0cdcdc24ee18"
|
||||
},
|
||||
"source_snapshot": "b7c5b5b96622f4a7635c8627bd8eaed3ba5759afed836a2350df20bf0c6a65f6",
|
||||
"stages": [
|
||||
"prepare_compact_symbols.py",
|
||||
"prefilter_compact_symbols.py",
|
||||
"prefilter_compact_shape.py",
|
||||
"semantic_compact_symbols.py",
|
||||
"probe_compact_symbols.py",
|
||||
"audit_compact_symbols.py",
|
||||
"render_compact_symbols.py"
|
||||
],
|
||||
"runtime_images": [
|
||||
"sha256:925b093545e15c270d95d4076139ad8ed48e790eccd9434a58495d58c97671d0",
|
||||
"sha256:727ff5ab1a9eec1704ec15f9bef1b4ae5c47912aa9e1eff622f90a1dc3045cff"
|
||||
],
|
||||
"inherited_acceptance": "glyph_rules.accept_symbol",
|
||||
"publication": "external qualification and exact live-map readback required"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
"""Scale-aware proposals only; downstream full-preset acceptance is unchanged.
|
||||
|
||||
Keep semantic silhouettes and local native-resolution paint as distinct
|
||||
hypotheses. Neither is itself accepted as map geometry.
|
||||
"""
|
||||
import cv2
|
||||
import numpy as np
|
||||
from component_targets import vector
|
||||
from glyph_targets import targets as original_targets
|
||||
from paint_channels import paint_mask
|
||||
|
||||
|
||||
def targets(image, patch, masks, scores, classes):
|
||||
result = original_targets(image, patch, masks, scores, classes)
|
||||
paint = paint_mask(image, cell=patch['mpp'])
|
||||
radius = max(1, round(.08 / patch['mpp']))
|
||||
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
|
||||
(2*radius+1, 2*radius+1))
|
||||
for i, (mask, score, cls) in enumerate(zip(masks, scores, classes)):
|
||||
if cls != 0 or score < .30:
|
||||
continue
|
||||
region = vector(mask, patch)
|
||||
expanded = cv2.dilate(mask.astype('uint8'), kernel) > 0
|
||||
for kind, target in [('semantic-silhouette', region),
|
||||
('native-paint', vector(paint & expanded, patch))]:
|
||||
if target.is_empty or target.area < .025:
|
||||
continue
|
||||
if any(x['ci'] == 0 and target.symmetric_difference(x['target']).area
|
||||
/ max(target.area, x['target'].area) < .04 for x in result):
|
||||
continue
|
||||
result.append(dict(target=target, ci=0, region=region,
|
||||
score=float(score), masks=[i], candidate_source=kind))
|
||||
return result
|
||||
@@ -0,0 +1,108 @@
|
||||
"""Discover whole, previously missing crossings from semantic paint proposals.
|
||||
|
||||
OpenCV directional morphology separates merged worn bars; existing SciPy
|
||||
profiles fit a shared family. Independent original views certify contrast and
|
||||
finite ends. No scene coordinates, fabricated slots, or existing-stripe seed.
|
||||
"""
|
||||
import cv2,numpy as np
|
||||
from shapely.geometry import Polygon
|
||||
from fit_scene import world,project
|
||||
from layer_common import sample
|
||||
from scipy.ndimage import gaussian_filter1d
|
||||
VERSION='whole-crossing-discovery-v2'
|
||||
POLICY=dict(min_bars=3,min_length_m=1.5,max_length_m=9.,min_width_m=.22,max_width_m=.85,
|
||||
min_contrast=8.,min_column_support=.6,min_valid=.90,max_period_error_m=.20,
|
||||
minimum_period_m=.65,maximum_period_m=1.8,min_semantic=.3)
|
||||
|
||||
def primitives(rgb,cross,vehicle,g,labels,low,high):
|
||||
# Work only in automatically proposed crossing components, at native scale.
|
||||
size=rgb.shape[0];cell=60/size
|
||||
cross=cv2.resize(cross.astype('float32'),(size,size));veh=cv2.resize(vehicle.astype('float32'),(size,size))
|
||||
context=cv2.dilate((cross>.3).astype('uint8'),cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(int(.7/cell)*2+1,)*2))
|
||||
n,cc,stats,_=cv2.connectedComponentsWithStats(context,8);result=[]
|
||||
for i in range(1,n):
|
||||
x,y,w,h,area=stats[i]
|
||||
if area*cell*cell<2:continue
|
||||
patch=rgb[y:y+h,x:x+w];gray=cv2.cvtColor(patch,cv2.COLOR_RGB2GRAY);hsv=cv2.cvtColor(patch,cv2.COLOR_RGB2HSV)
|
||||
k=int(.85/cell)//2*2+1;ridge=cv2.morphologyEx(gray,cv2.MORPH_TOPHAT,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
domain=(cc[y:y+h,x:x+w]==i)&(veh[y:y+h,x:x+w]<.25)
|
||||
threshold=cv2.threshold(ridge[domain],0,255,cv2.THRESH_BINARY|cv2.THRESH_OTSU)[0]if domain.any()else 255
|
||||
mask=(domain&(ridge>max(8,threshold*.65))&(hsv[:,:,1]<110)&(gray>65)).astype('uint8')
|
||||
lines=cv2.HoughLinesP(mask*255,1,np.pi/360,threshold=20,minLineLength=.8/cell,maxLineGap=.25/cell)
|
||||
hypotheses=[]
|
||||
for l in []if lines is None else lines[:,0]:
|
||||
a,b=l.reshape(2,2);v=(b-a).astype(float);length=np.linalg.norm(v);v/=max(length,1e-8)
|
||||
if any(abs(v@q)>np.cos(np.deg2rad(5))for q in hypotheses):continue
|
||||
hypotheses.append(v)
|
||||
if len(hypotheses)==12:break
|
||||
for v in hypotheses:
|
||||
side=int(.8/cell)//2*2+1;kernel=np.zeros((side,side),'uint8');center=np.array([side//2]*2)
|
||||
cv2.line(kernel,tuple(np.rint(center-v*(side//2)).astype(int)),tuple(np.rint(center+v*(side//2)).astype(int)),1,max(1,int(.06/cell)))
|
||||
# Close small wear along bars, then remove perpendicular connectors.
|
||||
bridged=cv2.morphologyEx(mask,cv2.MORPH_CLOSE,np.ones((max(3,int(.10/cell)),)*2,'uint8'))
|
||||
opened=cv2.morphologyEx(bridged,cv2.MORPH_OPEN,kernel)
|
||||
contours,_=cv2.findContours(opened,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)
|
||||
for c in contours:
|
||||
rect=cv2.minAreaRect(c);width,length=np.sort(rect[1])*cell
|
||||
if not(.18<width<1.05 and 1.2<length<10 and cv2.contourArea(c)*cell**2/max(length*width,1e-8)>.55):continue
|
||||
box=cv2.boxPoints(rect)+[x,y];poly=Polygon(world((box+.5)*1200/size-.5,g))
|
||||
if not poly.is_valid:continue
|
||||
xy=np.array(poly.exterior.coords);centerxy=np.array(poly.centroid.coords)
|
||||
if np.mean(sample(labels,xy,low,high)==1)<.8:continue
|
||||
uv=np.rint(rect[0]).astype(int);uv=np.clip(uv,[0,0],[w-1,h-1])
|
||||
if cross[y+uv[1],x+uv[0]]<.25:continue
|
||||
if any(poly.intersection(q).area/min(poly.area,q.area)>.5 for q in result):continue
|
||||
result.append(poly)
|
||||
return result
|
||||
|
||||
def sample_view(xy,tile,views):
|
||||
g=views.geometry(tile);rgb,vehicle=views.inputs(tile);uv=project(xy,g).astype('float32');native=(uv+.5)*rgb.shape[0]/1200-.5
|
||||
def read(a,coords):return cv2.remap(a,coords[:,0,None],coords[:,1,None],cv2.INTER_LINEAR).reshape(len(coords),-1)
|
||||
colors=read(rgb,native);alpha=read(g['alpha'].astype('float32'),uv).ravel();veh=read(vehicle,uv).ravel()
|
||||
observed=(uv.min(1)>=5)&(uv.max(1)<1195)&(alpha>.65)&(veh<.25)
|
||||
return colors,observed
|
||||
|
||||
def evidence(poly,views):
|
||||
from crosswalk_family import rectangle_info
|
||||
box,c,u,v=rectangle_info(np.array(poly.exterior.coords));a=(box-c)@u;b=(box-c)@v;L=float(np.ptp(a));W=float(np.ptp(b))
|
||||
stations=np.linspace(-L*.4,L*.4,max(20,int(L/.06)));offsets=np.array([-.5*W-.18,-W*.25,0,W*.25,.5*W+.18])
|
||||
xy=c+stations[None,:,None]*u+offsets[:,None,None]*v
|
||||
ends=c+np.array([-L/2-.35,L/2+.35])[:,None,None]*u+np.linspace(-.25*W,.25*W,7)[None,:,None]*v
|
||||
points=np.vstack([xy.reshape(-1,2),ends.reshape(-1,2)]);records=[]
|
||||
ordered=sorted(views.tiles,key=lambda t:np.linalg.norm(np.mean(t['bounds_xy'],axis=0)-c))
|
||||
for t in ordered:
|
||||
uv=project(points,views.geometry(t['id']))
|
||||
cover=(uv.min(1)>=5)&(uv.max(1)<1195)
|
||||
if cover[:xy.size//2].mean()<.7:continue
|
||||
colors,valid=sample_view(points,t['id'],views);gray=cv2.cvtColor(colors.reshape(1,-1,3),cv2.COLOR_RGB2GRAY).ravel().astype(float)
|
||||
grid=gray[:xy.size//2].reshape(5,-1);cols=valid[:xy.size//2].reshape(5,-1).all(0)
|
||||
if cols.mean()<.7:continue
|
||||
delta=(grid[1:4]-(grid[0]+grid[4])/2)[:,cols]
|
||||
end=gray[xy.size//2:].reshape(2,7);endvalid=valid[xy.size//2:].reshape(2,7);tip_valid=endvalid.mean(1)
|
||||
tips=[float(np.median(grid[1:4,cols])-np.median(end[k,endvalid[k]]))for k in range(2)if tip_valid[k]>=.85]
|
||||
contrast=float(np.median(delta));column=float((np.mean(delta>POLICY['min_contrast'],axis=0)>=2/3).mean())
|
||||
rec=dict(tile=t['id'],valid=float(valid.mean()),body_valid=float(cols.mean()),tip_valid=tip_valid.tolist(),contrast=contrast,column_support=column,tip_contrast=min(tips)if tips else 0.,observed_tips=len(tips),length_m=L,width_m=W)
|
||||
records.append(rec)
|
||||
if len(records)>=2 and all(r['valid']>.99 for r in records):break
|
||||
return sorted(records,key=lambda r:-(r['body_valid']+min(r['tip_valid'])))[:2]
|
||||
|
||||
def supported(records):
|
||||
# One render must show the complete finite bar and both blank tips. A
|
||||
# second overlapping render verifies its observed body, even at tile edges.
|
||||
return len(records)==2 and records[0]['body_valid']>=POLICY['min_valid']and records[0]['observed_tips']==2 and all(r['body_valid']>=.7 and r['contrast']>=POLICY['min_contrast']and r['column_support']>=POLICY['min_column_support']and(not r['observed_tips']or r['tip_contrast']>=4)for r in records)
|
||||
|
||||
def periodic(positions):
|
||||
gaps=np.diff(np.sort(positions))
|
||||
if len(gaps)<2:return False
|
||||
period=float(np.median(gaps));return POLICY['minimum_period_m']<=period<=POLICY['maximum_period_m']and float(np.max(abs(gaps-period)))<=POLICY['max_period_error_m']
|
||||
|
||||
def aligned_with_anchors(poly,anchors):
|
||||
from crossing_completion import observations,model
|
||||
from crosswalk_family import rectangle_info
|
||||
obs=observations(anchors)
|
||||
if len(obs)<3:return False
|
||||
m=model(obs);centers=np.sort(m['centers']);gaps=np.diff(centers);gaps=gaps[(gaps>.65)&(gaps<1.8)]
|
||||
if len(gaps)<2:return False
|
||||
period=float(np.median(gaps));box,c,u,v=rectangle_info(np.array(poly.exterior.coords));station=float((c-m['origin'])@m['v']);distance=float(np.min(abs(centers-station)));slots=round(distance/period)
|
||||
width=float(np.ptp((box-c)@v))
|
||||
return abs(u@m['u'])>.995 and abs(width-m['width'])<=.15 and 1<=slots<=2 and abs(distance-slots*period)<=.18
|
||||
@@ -0,0 +1,48 @@
|
||||
"""Trace cached arrow hypotheses through the original admission gates."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from functools import lru_cache
|
||||
import collections
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape, mapping
|
||||
from component_targets import vector
|
||||
from catalog_context import bicycle_context
|
||||
from discovery_rules import unpack
|
||||
from recall_extent import semantic_extent, semantic_recall
|
||||
from glyph_templates import polygon
|
||||
from glyph_rules import POLICY
|
||||
|
||||
base=json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
glyphs=shapely.union_all([shapely.force_2d(shape(f['geometry'])) for f in base['features'] if f['properties']['class']=='road_marking' and f['properties'].get('subtype')!='linear_marking'])
|
||||
allmarks=shapely.union_all([shapely.force_2d(shape(f['geometry'])) for f in base['features'] if f['properties']['class']=='road_marking'])
|
||||
patches={p['id']:p for p in json.loads(Path('/symbolplan/symbol-patches.json').read_text())['patches']}
|
||||
lines=[unpack(r) for r in json.loads(Path('/searchplan/search-proposals.json').read_text())['lines']]
|
||||
@lru_cache(maxsize=8)
|
||||
def regions(patch):
|
||||
with np.load(Path('/symbolplan/symbol-masks')/(patch+'.npz')) as z:
|
||||
return {i:vector(m,patches[patch]) for i,(m,s,c) in enumerate(zip(z['masks'],z['scores'],z['classes'])) if c==1 and s>=.5}
|
||||
out=[]
|
||||
for index,d in enumerate(json.loads(Path('/glyphplan/glyph-diagnostics.json').read_text())):
|
||||
if d['semantic_class']!=1 or not d['fits']:continue
|
||||
target=shape(d['target'])
|
||||
if glyphs.buffer(.12).intersection(target).area/max(target.area,1e-9)>.5:continue
|
||||
regs=regions(d['patch']);region=shapely.union_all([regs[i] for i in d['masks'] if i in regs])
|
||||
extent,mask_ids=semantic_extent(region,list(regs.items()))
|
||||
fits=[]
|
||||
for fit in d['fits']:
|
||||
q=polygon(fit['kind'],fit['parameters']);recall=semantic_recall(q,extent)
|
||||
context=bicycle_context(q,fit['parameters'],lines)
|
||||
containment=q.intersection(region.buffer(.20)).area/max(q.area,1e-9)
|
||||
fits.append(dict(**fit,extent_recall=recall,containment=containment,context=context,
|
||||
covered_by_linear=allmarks.intersection(q).area/max(q.area,1e-9)))
|
||||
out.append(dict(index=index,patch=d['patch'],masks=d['masks'],semantic_score=d['semantic_score'],
|
||||
target=d['target'],region=mapping(region),extent=mapping(extent),fits=fits))
|
||||
Path('/out/arrow-gates.json').write_text(json.dumps(out,indent=2))
|
||||
summary=collections.Counter()
|
||||
for d in out:
|
||||
f=d['fits'][0]
|
||||
for k,v in [('context',not f['context']['passed']),('extent',f['extent_recall']<.85),('containment',f['containment']<POLICY['min_semantic_fraction']),('fit',f['score']<POLICY['arrow_fit_score'])]:
|
||||
if v:summary[k]+=1
|
||||
report=dict(candidates=len(out),failures=dict(summary))
|
||||
Path('/out/pattern-diagnostic.json').write_text(json.dumps(report,indent=2));print(report)
|
||||
@@ -0,0 +1,158 @@
|
||||
"""Whole-map diagnostics: semantic bicycle misses and elevated marking surfaces.
|
||||
|
||||
No admission decisions or geometry mutations. Both surface views are selected
|
||||
by footprint and distance before depth values are read.
|
||||
"""
|
||||
from functools import lru_cache
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
|
||||
from component_targets import vector
|
||||
from fit_scene import project
|
||||
from search_views import SearchViews
|
||||
|
||||
cv2.setNumThreads(2)
|
||||
start = time.monotonic()
|
||||
out = Path('/out')
|
||||
baseline = Path('/fullplan/full-map.json').read_bytes()
|
||||
doc = json.loads(baseline)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 17)
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels, low, high = z['labels'], z['bounds'][0], z['bounds'][1]
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']
|
||||
if t['status'] == 'surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
polys = {f['id']: shapely.force_2d(shape(f['geometry'])) for f in doc['features']}
|
||||
existing_bikes = shapely.union_all([polys[f['id']] for f in doc['features']
|
||||
if f['properties'].get('subtype') == 'bicycle'])
|
||||
|
||||
|
||||
@lru_cache(maxsize=12)
|
||||
def ground(name):
|
||||
with np.load(Path('/ortho/evidence')/(name+'.ground-dc.geometry.npz')) as z:
|
||||
return dict(z)
|
||||
|
||||
|
||||
def sample(array, uv):
|
||||
return cv2.remap(array.astype('float32'), uv[:, 0, None], uv[:, 1, None],
|
||||
cv2.INTER_LINEAR, borderMode=cv2.BORDER_CONSTANT).ravel()
|
||||
|
||||
|
||||
def draw_polygon(image, polygon, geometry):
|
||||
image = image.copy()
|
||||
draw = ImageDraw.Draw(image)
|
||||
parts = [polygon] if polygon.geom_type == 'Polygon' else polygon.geoms
|
||||
for p in parts:
|
||||
for ring in [p.exterior, *p.interiors]:
|
||||
draw.line([tuple(v) for v in project(np.asarray(ring.coords)[:, :2], geometry)*image.width/1200], fill='yellow', width=3)
|
||||
return image
|
||||
|
||||
|
||||
def save_sheets(frames, prefix):
|
||||
for i in range(0, len(frames), 3):
|
||||
chunk = frames[i:i+3]
|
||||
sheet = Image.new('RGB', (1200, 500*len(chunk)), 'white')
|
||||
for j, f in enumerate(chunk):
|
||||
sheet.paste(f, (0, j*500))
|
||||
sheet.save(out/f'{prefix}-{i//3:03d}.jpg', quality=94)
|
||||
|
||||
|
||||
surface_rows, surface_frames = [], []
|
||||
for f in doc['features']:
|
||||
if (f['properties'].get('class'), f['properties'].get('subtype')) != ('road_marking', 'linear_marking'):
|
||||
continue
|
||||
p = polys[f['id']]
|
||||
x0, y0, x1, y1 = p.bounds
|
||||
if max(x1-x0, y1-y0) > 12:
|
||||
continue # Diagnostic budget for compact suspicious fragments only.
|
||||
xx, yy = np.meshgrid(np.arange(x0, x1+.025, .05), np.arange(y0, y1+.025, .05))
|
||||
points = np.c_[xx.ravel(), yy.ravel()]
|
||||
points = points[shapely.contains_xy(p, points[:, 0], points[:, 1])]
|
||||
if len(points) < 5:
|
||||
continue
|
||||
corners = np.array([[x0,y0],[x0,y1],[x1,y0],[x1,y1]])
|
||||
eligible = []
|
||||
for t in tiles:
|
||||
name = t['id']; uv = project(corners, views.geometry(name))
|
||||
if uv.min() >= 20 and uv.max() < 1180:
|
||||
eligible.append((np.linalg.norm(np.mean(t['bounds_xy'], axis=0)-points.mean(0)), name))
|
||||
row = dict(id=f['id'], method=f['properties'].get('method'), properties=f['properties'],
|
||||
area_m2=p.area, bounds_xy=p.bounds, views=[])
|
||||
for _, name in sorted(eligible)[:2]:
|
||||
context, g = views.geometry(name), ground(name)
|
||||
assert np.allclose(context['view'], g['view']) and np.allclose(context['intrinsics'], g['intrinsics'])
|
||||
uv = project(points, context).astype('float32')
|
||||
dc, dg = sample(context['depth'],uv), sample(g['depth'],uv)
|
||||
valid = np.isfinite(dc)&np.isfinite(dg)&(sample(context['alpha'],uv)>=.85)&(sample(g['alpha'],uv)>=.85)
|
||||
gap = dg-dc
|
||||
row['views'].append(dict(name=name, valid=float(valid.mean()),
|
||||
elevated_fraction=float((valid&(gap>.25)).mean()),
|
||||
depth_gap_median_m=float(np.median(gap[valid])) if valid.any() else None,
|
||||
depth_gap_q90_m=float(np.quantile(gap[valid], .9)) if valid.any() else None))
|
||||
surface_rows.append(row)
|
||||
if len(row['views']) == 2 and min(v['elevated_fraction'] for v in row['views']) >= .5:
|
||||
name = row['views'][0]['name']; g = views.geometry(name)
|
||||
# The first image is unmodified Gaussian ground, the second adds the detection.
|
||||
raw = Image.open(Path('/ortho/evidence')/(name+'.ground.png')).convert('RGB')
|
||||
center = project(np.array([p.centroid.coords[0]]),g)[0]*raw.width/1200
|
||||
side = max(6., max(x1-x0,y1-y0)+2)*raw.width/60
|
||||
box = tuple(np.r_[center-side/2,center+side/2].astype(int))
|
||||
frame = Image.new('RGB',(1200,500),'white'); draw = ImageDraw.Draw(frame)
|
||||
for col, im in enumerate([raw,draw_polygon(raw,p,g)]):
|
||||
frame.paste(im.crop(box).resize((600,450)),(600*col,50))
|
||||
label = f"{len(surface_frames)+1} {f['id']} elevated " + str([round(v['elevated_fraction'],2) for v in row['views']])
|
||||
draw.text((8,12),label,font=font,fill='black')
|
||||
row['visual_index'] = len(surface_frames)+1
|
||||
surface_frames.append(frame)
|
||||
save_sheets(surface_frames,'surface-candidates')
|
||||
|
||||
symbol_root = Path('/symbolplan')
|
||||
patch_raw = (symbol_root/'symbol-patches.json').read_bytes()
|
||||
patches = {p['id']:p for p in json.loads(patch_raw)['patches']}
|
||||
sem = json.loads((symbol_root/'symbol-semantics.json').read_text())
|
||||
assert sem['patch_manifest_sha256'] == hashlib.sha256(patch_raw).hexdigest()
|
||||
bikes, bike_frames, seen = [], [], []
|
||||
for record in sem['records']:
|
||||
if 0 not in record.get('classes', []):
|
||||
continue
|
||||
p = patches[record['id']]
|
||||
raw_path = symbol_root/'symbol-patches'/(p['id']+'.png')
|
||||
mask_path = symbol_root/'symbol-masks'/(p['id']+'.npz')
|
||||
assert hashlib.sha256(raw_path.read_bytes()).hexdigest() == p['sha256']
|
||||
assert hashlib.sha256(mask_path.read_bytes()).hexdigest() == record['sha256']
|
||||
raw = Image.open(raw_path).convert('RGB')
|
||||
with np.load(mask_path) as z:
|
||||
masks, scores, classes = z['masks'], z['scores'], z['classes']
|
||||
for index, (mask, score, cls) in enumerate(zip(masks,scores,classes)):
|
||||
if cls != 0 or score < .3:
|
||||
continue
|
||||
region = vector(mask,p)
|
||||
if region.is_empty or region.intersection(existing_bikes.buffer(.1)).area/max(region.area,1e-9) > .5:
|
||||
continue
|
||||
if any(region.intersection(q).area/max(min(region.area,q.area),1e-9)>.7 for q in seen):
|
||||
continue
|
||||
seen.append(region)
|
||||
rect = cv2.minAreaRect(np.asarray(region.convex_hull.exterior.coords,'float32')[:,:2])
|
||||
row = dict(patch=p['id'],mask=index,semantic_score=float(score),area_m2=region.area,
|
||||
size_m=sorted(rect[1],reverse=True),bounds_xy=region.bounds,visual_index=len(bikes)+1)
|
||||
bikes.append(row)
|
||||
overlay = np.asarray(raw).copy(); overlay[mask>0] = overlay[mask>0]*.5+np.array([0,230,100])*.5
|
||||
frame = Image.new('RGB',(1200,500),'white'); draw = ImageDraw.Draw(frame)
|
||||
for col, im in enumerate([raw,Image.fromarray(overlay)]):
|
||||
im.thumbnail((590,440));frame.paste(im,(col*600,50))
|
||||
draw.text((8,12),f"{len(bikes)} {p['id']} bike {float(score):.2f} size {row['size_m']}",font=font,fill='black')
|
||||
bike_frames.append(frame)
|
||||
save_sheets(bike_frames,'missing-bicycles')
|
||||
report = dict(source_sha256=hashlib.sha256(baseline).hexdigest(),seconds=time.monotonic()-start,
|
||||
surfaces=surface_rows,unmatched_bicycle_masks=bikes,geometry_changed=False,
|
||||
raised_candidates=len(surface_frames),bicycle_candidates=len(bikes))
|
||||
(out/'diagnostic.json').write_text(json.dumps(report,indent=2))
|
||||
print(json.dumps({k:v for k,v in report.items()if k not in ['surfaces','unmatched_bicycle_masks']}),flush=True)
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Read-only whole-scene review of cached, unpublished marking hypotheses."""
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape, LineString, mapping
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from search_views import SearchViews
|
||||
from fit_scene import project
|
||||
|
||||
start = time.monotonic()
|
||||
out = Path('/out')
|
||||
doc = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
features = [f for f in doc['features'] if f['properties']['class'] == 'road_marking']
|
||||
polys = {f['id']: shapely.force_2d(shape(f['geometry'])) for f in features}
|
||||
existing = shapely.union_all(list(polys.values()))
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels, low, high = z['labels'], z['bounds'][0], z['bounds'][1]
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status'] == 'surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 17)
|
||||
rows, seen = [], []
|
||||
for family, path in [('zigzag', '/componentplan/zigzag-diagnostics.json'), ('arrow', '/glyphplan/glyph-diagnostics.json')]:
|
||||
for index, d in enumerate(json.loads(Path(path).read_text())):
|
||||
if family == 'arrow' and d['semantic_class'] != 1:
|
||||
continue
|
||||
p = LineString(d['vertices']).buffer(d['width_m']/2, cap_style=2, join_style=2) if family == 'zigzag' else shape(d['target'])
|
||||
if existing.buffer(.12).intersection(p).area / max(p.area, 1e-9) > .5:
|
||||
continue
|
||||
if any(p.intersection(q).area / max(min(p.area, q.area), 1e-9) > .6 for q in seen):
|
||||
continue
|
||||
seen.append(p)
|
||||
rows.append(dict(family=family, index=index, geometry=mapping(p), diagnostic=d))
|
||||
|
||||
for i, row in enumerate(rows):
|
||||
p = shape(row['geometry']); center = np.asarray(p.centroid.coords[0]); eligible = []
|
||||
for tile in tiles:
|
||||
uv = project(np.array([center]), views.geometry(tile['id']))[0]
|
||||
if uv.min() >= 100 and uv.max() < 1100:
|
||||
eligible.append((np.linalg.norm(center - np.mean(tile['bounds_xy'], axis=0)), tile['id']))
|
||||
if not eligible:
|
||||
continue
|
||||
name = min(eligible)[1]; g = views.geometry(name)
|
||||
raw = Image.open(Path('/ortho/evidence')/(name+'.ground.png')).convert('RGB')
|
||||
scale = raw.width / 1200
|
||||
uv = project(np.array([[p.bounds[0],p.bounds[1]],[p.bounds[2],p.bounds[3]]]),g) * scale
|
||||
# Orthographic tiles have a fixed XY camera frame; project all corners.
|
||||
corners = np.array([[x,y] for x in [p.bounds[0]-.5,p.bounds[2]+.5] for y in [p.bounds[1]-.5,p.bounds[3]+.5]])
|
||||
uv = project(corners,g)*scale
|
||||
box = tuple(np.r_[uv.min(0),uv.max(0)].astype(int))
|
||||
over = raw.copy(); draw = ImageDraw.Draw(over)
|
||||
def outline(poly, color):
|
||||
for part in [poly] if poly.geom_type == 'Polygon' else getattr(poly,'geoms',[]):
|
||||
if part.geom_type != 'Polygon': continue
|
||||
for ring in [part.exterior,*part.interiors]:
|
||||
draw.line([tuple(v) for v in project(np.asarray(ring.coords)[:,:2],g)*scale],fill=color,width=2)
|
||||
for f in features:
|
||||
if polys[f['id']].intersects(p.envelope.buffer(1)):
|
||||
outline(polys[f['id']], 'yellow')
|
||||
outline(p, '#00ddff')
|
||||
frame = Image.new('RGB',(1200,510),'white')
|
||||
for col,im in enumerate([raw,over]):
|
||||
crop = im.crop(box);crop.thumbnail((594,458));frame.paste(crop,(600*col,50))
|
||||
ImageDraw.Draw(frame).text((8,12),f"{i:03d} {row['family']} cached {row['index']} / cyan proposal, yellow existing",font=font,fill='black')
|
||||
name = f'pattern-{i:03d}.jpg';frame.save(out/name,quality=93);row['image']=name
|
||||
report = dict(rows=rows, candidates=len(rows), seconds=time.monotonic()-start, geometry_changed=False)
|
||||
(out/'pattern-diagnostic.json').write_text(json.dumps(report,indent=2))
|
||||
print('REPORT', len(rows), flush=True)
|
||||
@@ -0,0 +1,61 @@
|
||||
from pathlib import Path
|
||||
import json,hashlib,time,os
|
||||
import cv2,numpy as np,shapely
|
||||
from PIL import Image
|
||||
from shapely.geometry import shape
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature,sample
|
||||
from search_views import SearchViews
|
||||
from crossing_discovery import primitives,evidence,supported,periodic,sample_view,POLICY,VERSION
|
||||
from crossing_completion import observations,groups,model,recover
|
||||
O=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);start=time.monotonic();cv2.setNumThreads(2);cv2.setRNGSeed(2026)
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
seeds=[]
|
||||
for t in tiles:
|
||||
name=t['id'];rgb,vehicle=views.inputs(name)
|
||||
with np.load(Path('/evidence_plan/evidence')/(name+'.npz'))as z:cross=z['crosswalk']
|
||||
for p in primitives(rgb,cross,vehicle,views.geometry(name),labels,low,high):
|
||||
if any(p.intersection(q).area/min(p.area,q.area)>.5 for q in seeds):continue
|
||||
seeds.append(p)
|
||||
print('TILE',name,'seeds',len(seeds),flush=True)
|
||||
oldcross=shapely.union_all([shapely.force_2d(shape(f['geometry']))for f in base['features']if f['properties'].get('subtype')=='crosswalk'])
|
||||
(O/'crossing-seeds.json').write_text(json.dumps([feature(p,'road_marking',subtype='crosswalk')for p in seeds]))
|
||||
features=list(base['features']);rows=[];diagnostics=[]
|
||||
proposals=[(g,False)for g in groups(observations([feature(p,'road_marking',subtype='crosswalk')for p in seeds]))]
|
||||
proposals += [(g,True)for g in groups(observations(base['features']))if len(g)>=3]
|
||||
for group,anchored in proposals:
|
||||
# Two image primitives can propose a search axis; admission still requires
|
||||
# at least three separately observed, periodic bars in both original views.
|
||||
if len(group)<2:
|
||||
diagnostics.append(dict(seed_count=len(group),reason='insufficient-seeds',bounds_xy=list(shapely.union_all([r['p']for r in group]).bounds)))
|
||||
continue
|
||||
hull=shapely.union_all([r['p']for r in group]).convex_hull
|
||||
if not anchored and hull.distance(oldcross)<1.:continue
|
||||
m=model(group);center=m['origin'];tile=min(tiles,key=lambda t:np.linalg.norm(np.mean(t['bounds_xy'],axis=0)-center))['id']
|
||||
def sampler(xy):
|
||||
rgb,valid=sample_view(xy,tile,views);road=sample(labels,xy,low,high)==1
|
||||
return rgb,(~valid).astype(float),road.astype(float),np.ones(len(xy))
|
||||
fitted,rec=recover(m,sampler);candidates=[r for r in fitted if r['observed']];d=dict(seed_count=len(group),bounds_xy=list(hull.bounds),profile=rec,accepted=False,evidence=[]);diagnostics.append(d)
|
||||
if len(candidates)<3 or not periodic([r['center']for r in candidates]):d['reason']='family-period-or-count';continue
|
||||
out=[];out_evidence=[];anchors=[r['f']for r in group]if anchored else[]
|
||||
for r in candidates:
|
||||
if anchored and not r['new']:continue
|
||||
p=r['polygon'];ev=evidence(p,views);d['evidence'].append(ev)
|
||||
if anchored:
|
||||
from crossing_discovery import aligned_with_anchors
|
||||
if not aligned_with_anchors(p,anchors):continue
|
||||
if not supported(ev):continue
|
||||
if not all(POLICY['min_length_m']<=e['length_m']<=POLICY['max_length_m']and POLICY['min_width_m']<=e['width_m']<=POLICY['max_width_m']for e in ev):continue
|
||||
if any(p.intersection(shapely.force_2d(shape(f['geometry']))).area>.02 for f in features if f['properties']['class']=='road_marking'):continue
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),p)
|
||||
out.append(feature(lifted,'road_marking',subtype='crosswalk',method=VERSION,family_size=len(candidates),source_tiles=[e['tile']for e in ev],observed=True))
|
||||
out_evidence.append(ev)
|
||||
if len(out)<(1 if anchored else 3):d['reason']='two-view-original-paint';continue
|
||||
# Do not publish a sparse subset of a family: every proposed observed bar must pass.
|
||||
if not anchored and len(out)!=len(candidates):d['reason']='incomplete-family-evidence';continue
|
||||
features.extend(out);d['accepted']=True
|
||||
display=shapely.union_all([hull]+[shapely.force_2d(shape(f['geometry']))for f in out])
|
||||
rows.append(dict(kind='anchored-crossing-completion'if anchored else'whole-crossing',context_ids=[f['id']for f in anchors],before=[],after=out,source_ids=[],output_ids=[f['id']for f in out],bounds_xy=list(display.buffer(1).bounds),evidence=out_evidence))
|
||||
result={**base,'features':features,'crossing_discovery':VERSION};(O/'full-map.json').write_text(json.dumps(result,allow_nan=False));(O/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(O/'crossing-diagnostics.json').write_text(json.dumps(diagnostics,indent=2));(O/'crossing-report.json').write_text(json.dumps(dict(scene=os.environ['SCENE'],policy=POLICY,seeds=len(seeds),families=len(rows),added_stripes=sum(len(r['after'])for r in rows),seconds=time.monotonic()-start,source_sha256=hashlib.sha256(raw).hexdigest()),indent=2))
|
||||
print('RESULT',len(seeds),len(rows),sum(len(r['after'])for r in rows),flush=True)
|
||||
@@ -0,0 +1,51 @@
|
||||
"""Make fresh complete-arrow hypotheses from whole-coverage SAM observations."""
|
||||
from pathlib import Path
|
||||
import json,time,hashlib,os
|
||||
import numpy as np,cv2,shapely
|
||||
from PIL import Image
|
||||
from shapely.geometry import shape,mapping
|
||||
from component_targets import vector
|
||||
from glyph_targets import targets
|
||||
from glyph_registration import fit_glyphs
|
||||
from recall_extent import semantic_extent,semantic_recall
|
||||
from arrow_admission import already_has_symbol
|
||||
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
root=Path('/symbolplan');out=Path('/out');start=time.monotonic();cv2.setNumThreads(2)
|
||||
manifest=root/'symbol-patches.json';patches={p['id']:p for p in json.loads(manifest.read_text())['patches']}
|
||||
semantics=json.loads((root/'symbol-semantics.json').read_text());assert semantics['patch_manifest_sha256']==sha(manifest)
|
||||
base=json.loads(Path('/fullplan/full-map.json').read_text());rows=[];seen=[];diagnostics=[];pending=[]
|
||||
for rec in semantics['records']:
|
||||
if not rec['detections'] or 1 not in rec['classes']:continue
|
||||
p=patches[rec['id']];image=root/'symbol-patches'/(p['id']+'.png');npz=root/'symbol-masks'/(p['id']+'.npz')
|
||||
assert sha(image)==p['sha256'] and sha(npz)==rec['sha256']
|
||||
with np.load(npz)as z:
|
||||
regions=[(i,vector(m,p))for i,(m,s,c)in enumerate(zip(z['masks'],z['scores'],z['classes']))if c==1 and s>=.50]
|
||||
proposals=targets(np.asarray(Image.open(image).convert('RGB')),p,z['masks'],z['scores'],z['classes'])
|
||||
for d in proposals:
|
||||
if d['ci']!=1:continue
|
||||
target=d['target'];region=d['region']
|
||||
if already_has_symbol(target,base['features']):continue
|
||||
if any(target.symmetric_difference(q).area/max(target.area,q.area)<.10 for q in seen):continue
|
||||
seen.append(target);extent,mask_ids=semantic_extent(region,regions)
|
||||
length,width=sorted(cv2.minAreaRect(np.asarray(extent.convex_hull.exterior.coords,'float32'))[1],reverse=True)
|
||||
if not 1.0<=length<=10.5 or not .25<=width<=4.0:continue
|
||||
pending.append(dict(patch=p['id'],masks=d['masks'],semantic_score=d['score'],target=target,region=region,extent=extent))
|
||||
# Standard spatial non-maximum suppression runs before expensive shape fitting.
|
||||
# Retain two distinct target interpretations for each semantic object (typically
|
||||
# silhouette and observed paint), not dozens of overlapping-window copies.
|
||||
groups=[]
|
||||
for d in sorted(pending,key=lambda x:-(x['semantic_score']*x['extent'].area)):
|
||||
matches=[g for g in groups if d['extent'].intersection(g[0]['extent']).area/max(d['extent'].union(g[0]['extent']).area,1e-9)>.45]
|
||||
if not matches:groups.append([d]);continue
|
||||
g=matches[0]
|
||||
if len(g)<2 and all(d['target'].symmetric_difference(v['target']).area/max(d['target'].union(v['target']).area,1e-9)>.12 for v in g):g.append(d)
|
||||
print('SPATIAL_GROUPS',len(groups),'RAW',len(pending),flush=True)
|
||||
for group in groups:
|
||||
for d in group:
|
||||
target=d['target'];region=d['region'];extent=d['extent'];fits=fit_glyphs(target);converted=[]
|
||||
for f in fits:
|
||||
q=f['polygon'];converted.append(dict(**{k:v for k,v in f.items()if k!='polygon'},extent_recall=semantic_recall(q,extent),containment=q.intersection(region.buffer(.20)).area/max(q.area,1e-9)))
|
||||
rows.append(dict(index=len(rows),patch=d['patch'],masks=d['masks'],semantic_score=d['semantic_score'],target=mapping(target),region=mapping(region),extent=mapping(extent),fits=converted))
|
||||
print('HYPOTHESIS',len(rows),d['patch'],len(fits),flush=True)
|
||||
(out/'arrow-gates.json').write_text(json.dumps(rows,indent=2));(out/'discovery-report.json').write_text(json.dumps(dict(patches=len(patches),candidates=len(rows),seconds=time.monotonic()-start,semantic_sha256=sha(root/'symbol-semantics.json'),manual_rois=[]),indent=2))
|
||||
@@ -0,0 +1,97 @@
|
||||
"""Apply the existing symbol fit floor to inherited template detections.
|
||||
|
||||
No fitting, geometry editing, location selectors, or new threshold. Missing
|
||||
legacy evidence is reported as unassessed rather than invented or vetoed.
|
||||
The immutable input and rejected features remain available for review.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import ast
|
||||
from copy import deepcopy
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
from pathlib import Path
|
||||
|
||||
VERSION = "inherited-symbol-fit-admission-v1"
|
||||
|
||||
|
||||
def existing_fit_floor(source: str) -> float:
|
||||
"""Read the frozen policy without importing its scientific dependencies."""
|
||||
tree = ast.parse(source)
|
||||
for node in tree.body:
|
||||
if not isinstance(node, ast.Assign):
|
||||
continue
|
||||
if not any(isinstance(t, ast.Name) and t.id == "POLICY" for t in node.targets):
|
||||
continue
|
||||
value = node.value
|
||||
if not (isinstance(value, ast.Call) and isinstance(value.func, ast.Name)
|
||||
and value.func.id == "dict"):
|
||||
raise ValueError("Unsupported frozen symbol policy")
|
||||
fields = {k.arg: ast.literal_eval(k.value) for k in value.keywords}
|
||||
floor = fields["fit_score"]
|
||||
if isinstance(floor, bool) or not isinstance(floor, (int, float)) or not 0 < floor <= 1:
|
||||
raise ValueError("Invalid symbol fit floor")
|
||||
return float(floor)
|
||||
raise ValueError("Frozen symbol policy is missing")
|
||||
|
||||
|
||||
def admit(document: dict, minimum_fit: float) -> tuple[dict, dict]:
|
||||
if isinstance(minimum_fit, bool) or not isinstance(minimum_fit, (int, float)) or not 0 < minimum_fit <= 1:
|
||||
raise ValueError("Invalid symbol fit floor")
|
||||
output = deepcopy(document)
|
||||
retained, rejected, unassessed = [], [], []
|
||||
assessed = 0
|
||||
for feature in output["features"]:
|
||||
prop = feature.get("properties", {})
|
||||
kind = prop.get("subtype", "")
|
||||
is_symbol = (prop.get("class") == "road_marking" and isinstance(kind, str)
|
||||
and (kind in {"bicycle", "letter_A"} or kind.endswith("_arrow")))
|
||||
if is_symbol:
|
||||
score = prop.get("template_fit_score")
|
||||
if score is None:
|
||||
unassessed.append(dict(id=feature.get("id"), reason="missing-template-fit"))
|
||||
else:
|
||||
assessed += 1
|
||||
valid = (not isinstance(score, bool) and isinstance(score, (int, float))
|
||||
and math.isfinite(score) and 0 <= score <= 1)
|
||||
if not valid or score < minimum_fit:
|
||||
rejected.append(dict(feature=feature, reason="below-existing-fit-floor" if valid else "invalid-template-fit"))
|
||||
continue
|
||||
retained.append(feature)
|
||||
output["features"] = retained
|
||||
report = dict(version=VERSION, minimum_template_fit=minimum_fit,
|
||||
input_features=len(document["features"]), output_features=len(retained),
|
||||
assessed_symbols=assessed, rejected=rejected, unassessed=unassessed,
|
||||
retained_geometry_unchanged=True, manual_geometry=False,
|
||||
point_cloud_input=False, recall_measured=False)
|
||||
output["final_symbol_admission"] = {k: report[k] for k in
|
||||
("version", "minimum_template_fit", "retained_geometry_unchanged")}
|
||||
output["final_symbol_admission"].update(rejected=len(rejected), unassessed=len(unassessed))
|
||||
return output, report
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("input", type=Path)
|
||||
parser.add_argument("policy", type=Path)
|
||||
parser.add_argument("output", type=Path)
|
||||
args = parser.parse_args()
|
||||
if args.input.resolve() == (args.output / "full-map.json").resolve():
|
||||
raise ValueError("Input evidence must remain immutable")
|
||||
raw = args.input.read_bytes()
|
||||
policy = args.policy.read_bytes()
|
||||
result, report = admit(json.loads(raw), existing_fit_floor(policy.decode()))
|
||||
encoded = json.dumps(result, ensure_ascii=False, allow_nan=False, separators=(",", ":")).encode()
|
||||
sha = lambda data: hashlib.sha256(data).hexdigest()
|
||||
report.update(input_sha256=sha(raw), output_sha256=sha(encoded),
|
||||
policy_sha256=sha(policy), implementation_sha256=sha(Path(__file__).read_bytes()))
|
||||
args.output.mkdir(parents=True, exist_ok=True)
|
||||
(args.output / "full-map.json").write_bytes(encoded)
|
||||
(args.output / "admission-report.json").write_text(json.dumps(report, ensure_ascii=False, indent=2, allow_nan=False))
|
||||
print(json.dumps({k: v for k, v in report.items() if k not in {"rejected", "unassessed"}}, ensure_ascii=False))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,45 @@
|
||||
"""Four-parameter OpenCV/SciPy alignment of an immutable arrow preset."""
|
||||
import cv2,numpy as np,shapely
|
||||
from scipy.optimize import differential_evolution,minimize
|
||||
from standard_arrow_templates import preset,polygon,PROFILES
|
||||
|
||||
def fit(kind,seed,angle,grid):
|
||||
points=grid['points'];size=grid['size'];lo=grid['lo'];cell=.025
|
||||
target=[v['target']&v['allowed']&v['observed'] for v in grid['views']]
|
||||
valid=[v['allowed']&v['observed']for v in grid['views']]
|
||||
landmark_fields=[]
|
||||
for v in grid['views']:
|
||||
paint=v.get('paint',v['target'])&v['allowed']&v['observed']
|
||||
edge=paint&~cv2.erode(paint.astype('uint8'),np.ones((3,3),'uint8')).astype(bool)
|
||||
landmark_fields.append(cv2.distanceTransform((~edge).astype('uint8'),cv2.DIST_L2,cv2.DIST_MASK_PRECISE)*cell)
|
||||
if not target[0].any():return []
|
||||
candidates=[];center=np.asarray(seed.centroid.coords[0]);a=angle
|
||||
rot=np.array([[np.cos(a),np.sin(a)],[-np.sin(a),np.cos(a)]])
|
||||
axis=np.array([np.cos(a),np.sin(a)]);span=np.ptp(shapely.get_coordinates(seed)@axis)
|
||||
for profile,d in PROFILES.items():
|
||||
initial_scale=span/d['L']
|
||||
if not .65<=initial_scale<=1.40:continue
|
||||
unit=np.asarray(preset(kind,profile).exterior.coords);factor=float(np.clip(initial_scale,.75,1.25))
|
||||
xy=center-np.asarray(preset(kind,profile).centroid.coords[0])*factor@rot
|
||||
base=np.r_[xy,a,factor];bounds=[(xy[0]-.7,xy[0]+.7),(xy[1]-.7,xy[1]+.7),(a-.20,a+.20),(.75,1.25)]
|
||||
def score(p,exact=False):
|
||||
q=polygon(kind,profile,p)
|
||||
if exact:mask=shapely.contains_xy(q,points[:,0],points[:,1]).reshape(size)
|
||||
else:
|
||||
pix=np.rint((shapely.get_coordinates(q)-lo)/cell).astype('int32')
|
||||
mask=np.zeros(size,'uint8');cv2.fillPoly(mask,[pix],1);mask=mask.astype(bool)
|
||||
scores=[]
|
||||
uv=((shapely.get_coordinates(q)[:-1]-lo)/cell).astype('float32')
|
||||
for rank,(v,t,dt) in enumerate(zip(valid,target,landmark_fields)):
|
||||
inter=(mask&t&v).sum();union=((mask|t)&v).sum()
|
||||
if not t.any():continue
|
||||
errors=cv2.remap(dt,uv[:,0,None],uv[:,1,None],cv2.INTER_LINEAR,borderMode=cv2.BORDER_CONSTANT,borderValue=1e3).ravel()
|
||||
margin=.09 if rank==0 else .13
|
||||
penalty=.3*float(errors.mean())+6.*float(np.maximum(errors-margin,0.).max())
|
||||
scores.append(float(inter/max(union,1))-penalty)
|
||||
return .5*np.mean(scores)+.5*min(scores) if scores else -1.
|
||||
global_fit=differential_evolution(lambda p:-score(p),bounds,x0=base,seed=2026,popsize=7,maxiter=38,tol=.001,polish=False,workers=1)
|
||||
refined=minimize(lambda p:-score(p,True),global_fit.x,method='Powell',bounds=bounds,options=dict(maxiter=30,xtol=.0005,ftol=.0001))
|
||||
best=max([base,global_fit.x,refined.x],key=lambda p:score(p,True))
|
||||
candidates.append(dict(profile=profile,pose=best.tolist(),score=score(best,True),geometry=polygon(kind,profile,best)))
|
||||
return sorted(candidates,key=lambda v:-v['score'])
|
||||
@@ -0,0 +1,409 @@
|
||||
{
|
||||
"schema": "missioncore.urban-refinement-bundle/v1",
|
||||
"root": "simulation/urban-plan-research",
|
||||
"files": {
|
||||
"assembly_evidence.py": "assembly_pass/assembly_evidence.py",
|
||||
"assembly_rules.py": "assembly_pass/assembly_rules.py",
|
||||
"assembly_templates.py": "assembly_pass/assembly_templates.py",
|
||||
"assembly_zigzag.py": "assembly_pass/assembly_zigzag.py",
|
||||
"audit_assembly.py": "assembly_pass/audit_assembly.py",
|
||||
"audit_assembly_joins.py": "assembly_pass/audit_assembly_joins.py",
|
||||
"audit_beta.py": "beta_pass/audit_beta.py",
|
||||
"audit_catalog.py": "catalog_pass/audit_catalog.py",
|
||||
"audit_completion.py": "completion_pass/audit_completion.py",
|
||||
"audit_components.py": "component_pass/audit_components.py",
|
||||
"audit_consensus.py": "consensus_pass/audit_consensus.py",
|
||||
"audit_corridor.py": "corridor_pass/audit_corridor.py",
|
||||
"audit_discovery.py": "discovery_pass/audit_discovery.py",
|
||||
"audit_norms.py": "norms_pass/audit_norms.py",
|
||||
"audit_rows.py": "rows_pass/audit_rows.py",
|
||||
"audit_search.py": "search_pass/audit_search.py",
|
||||
"audit_sections.py": "sections_pass/audit_sections.py",
|
||||
"audit_symbols.py": "symbol_pass/audit_symbols.py",
|
||||
"audit_transitions.py": "transitions_pass/audit_transitions.py",
|
||||
"beta_profiles.py": "beta_pass/beta_profiles.py",
|
||||
"bicycle_artwork.py": "catalog_pass/bicycle_artwork.py",
|
||||
"catalog_context.py": "catalog_pass/catalog_context.py",
|
||||
"catalog_dependencies.py": "catalog_pass/catalog_dependencies.py",
|
||||
"catalog_dependency_pins.py": "catalog_pass/catalog_dependency_pins.py",
|
||||
"catalog_evidence.py": "symbol_pass/catalog_evidence.py",
|
||||
"catalog_rules.py": "catalog_pass/catalog_rules.py",
|
||||
"catalog_templates.py": "catalog_pass/catalog_templates.py",
|
||||
"catalog_zigzag.py": "catalog_pass/catalog_zigzag.py",
|
||||
"completion_profiles.py": "completion_pass/completion_profiles.py",
|
||||
"component_arrows.py": "component_pass/component_arrows.py",
|
||||
"component_bicycle.py": "component_pass/component_bicycle.py",
|
||||
"component_conflicts.py": "component_pass/component_conflicts.py",
|
||||
"component_evidence.py": "component_pass/component_evidence.py",
|
||||
"component_mosaics.py": "component_pass/component_mosaics.py",
|
||||
"component_rules.py": "component_pass/component_rules.py",
|
||||
"component_surface.py": "component_pass/component_surface.py",
|
||||
"component_targets.py": "component_pass/component_targets.py",
|
||||
"component_zigzag_rules.py": "component_pass/component_zigzag_rules.py",
|
||||
"consensus_profiles.py": "consensus_pass/consensus_profiles.py",
|
||||
"coordinate_cache.py": "orthophoto/coordinate_cache.py",
|
||||
"corridor_profiles.py": "search_pass/corridor_profiles.py",
|
||||
"coverage_evidence.py": "coverage_pass/coverage_evidence.py",
|
||||
"coverage_plan.py": "corridor_pass/coverage_plan.py",
|
||||
"diagnose_assembly.py": "assembly_pass/diagnose_assembly.py",
|
||||
"diagnose_components.py": "component_pass/diagnose_components.py",
|
||||
"diagnose_corridor.py": "corridor_pass/diagnose_corridor.py",
|
||||
"diagnose_coverage.py": "corridor_pass/diagnose_coverage.py",
|
||||
"discovery_evidence.py": "discovery_pass/discovery_evidence.py",
|
||||
"discovery_rules.py": "discovery_pass/discovery_rules.py",
|
||||
"extract_assembly.py": "assembly_pass/extract_assembly.py",
|
||||
"extract_catalog.py": "catalog_pass/extract_catalog.py",
|
||||
"extract_discovery.py": "discovery_pass/extract_discovery.py",
|
||||
"extract_search.py": "search_pass/extract_search.py",
|
||||
"fit_scene.py": "full_plan/fit_scene.py",
|
||||
"fragment_templates.py": "discovery_pass/fragment_templates.py",
|
||||
"gost_catalog.py": "norms_pass/gost_catalog.py",
|
||||
"image_profiles.py": "lines_pass/image_profiles.py",
|
||||
"inspect_bicycles.py": "catalog_pass/inspect_bicycles.py",
|
||||
"inspect_catalog.py": "catalog_pass/inspect_catalog.py",
|
||||
"interval_profiles.py": "intervals_pass/interval_profiles.py",
|
||||
"join_assembly.py": "assembly_pass/join_assembly.py",
|
||||
"layer_common.py": "full_plan/layer_common.py",
|
||||
"line_reconstruction.py": "intervals_pass/line_reconstruction.py",
|
||||
"mapping.py": "corridor_pass/mapping.py",
|
||||
"norm_profiles.py": "norms_pass/norm_profiles.py",
|
||||
"ortho_terrain.py": "orthophoto/ortho_terrain.py",
|
||||
"paint_channels.py": "component_pass/paint_channels.py",
|
||||
"paint_templates.py": "continuation_pass/paint_templates.py",
|
||||
"prepare_symbols.py": "symbol_pass/prepare_symbols.py",
|
||||
"refine_assembly.py": "assembly_pass/refine_assembly.py",
|
||||
"refine_beta.py": "beta_pass/refine_beta.py",
|
||||
"refine_catalog.py": "catalog_pass/refine_catalog.py",
|
||||
"refine_completion.py": "completion_pass/refine_completion.py",
|
||||
"refine_components.py": "component_pass/refine_components.py",
|
||||
"refine_consensus.py": "consensus_pass/refine_consensus.py",
|
||||
"refine_corridor.py": "corridor_pass/refine_corridor.py",
|
||||
"refine_discovery.py": "discovery_pass/refine_discovery.py",
|
||||
"refine_norms.py": "norms_pass/refine_norms.py",
|
||||
"refine_rows.py": "rows_pass/refine_rows.py",
|
||||
"refine_search.py": "search_pass/refine_search.py",
|
||||
"refine_sections.py": "sections_pass/refine_sections.py",
|
||||
"refine_symbols.py": "symbol_pass/refine_symbols.py",
|
||||
"refine_transitions.py": "transitions_pass/refine_transitions.py",
|
||||
"refine_zigzags.py": "component_pass/refine_zigzags.py",
|
||||
"render_assembly.py": "assembly_pass/render_assembly.py",
|
||||
"render_beta.py": "beta_pass/render_beta.py",
|
||||
"render_catalog.py": "catalog_pass/render_catalog.py",
|
||||
"render_completion.py": "completion_pass/render_completion.py",
|
||||
"render_components.py": "component_pass/render_components.py",
|
||||
"render_consensus.py": "consensus_pass/render_consensus.py",
|
||||
"render_corridor.py": "corridor_pass/render_corridor.py",
|
||||
"render_coverage.py": "corridor_pass/render_coverage.py",
|
||||
"render_discovery.py": "discovery_pass/render_discovery.py",
|
||||
"render_hypotheses.py": "component_pass/render_hypotheses.py",
|
||||
"render_norms.py": "norms_pass/render_norms.py",
|
||||
"render_plan.py": "catalog_pass/render_plan.py",
|
||||
"render_rows.py": "rows_pass/render_rows.py",
|
||||
"render_search.py": "search_pass/render_search.py",
|
||||
"render_sections.py": "sections_pass/render_sections.py",
|
||||
"render_symbols.py": "symbol_pass/render_symbols.py",
|
||||
"render_transitions.py": "transitions_pass/render_transitions.py",
|
||||
"review_symbols.py": "symbol_pass/review_symbols.py",
|
||||
"road_glyph_presets.py": "continuation_pass/road_glyph_presets.py",
|
||||
"row_evidence.py": "corridor_pass/row_evidence.py",
|
||||
"row_profiles.py": "rows_pass/row_profiles.py",
|
||||
"search_rules.py": "search_pass/search_rules.py",
|
||||
"search_views.py": "search_pass/search_views.py",
|
||||
"section_profiles.py": "sections_pass/section_profiles.py",
|
||||
"semantic_symbols.py": "symbol_pass/semantic_symbols.py",
|
||||
"symbol_evidence.py": "symbol_pass/symbol_evidence.py",
|
||||
"symbol_rules.py": "symbol_pass/symbol_rules.py",
|
||||
"test_assembly.py": "assembly_pass/test_assembly.py",
|
||||
"test_beta.py": "beta_pass/test_beta.py",
|
||||
"test_catalog.py": "catalog_pass/test_catalog.py",
|
||||
"test_completion.py": "completion_pass/test_completion.py",
|
||||
"test_components.py": "component_pass/test_components.py",
|
||||
"test_consensus.py": "consensus_pass/test_consensus.py",
|
||||
"test_corridor.py": "corridor_pass/test_corridor.py",
|
||||
"test_discovery.py": "discovery_pass/test_discovery.py",
|
||||
"test_intervals.py": "intervals_pass/test_intervals.py",
|
||||
"test_lines.py": "lines_pass/test_lines.py",
|
||||
"test_norms.py": "norms_pass/test_norms.py",
|
||||
"test_rows.py": "rows_pass/test_rows.py",
|
||||
"test_search.py": "search_pass/test_search.py",
|
||||
"test_sections.py": "sections_pass/test_sections.py",
|
||||
"test_symbols.py": "symbol_pass/test_symbols.py",
|
||||
"test_transitions.py": "transitions_pass/test_transitions.py",
|
||||
"transition_profiles.py": "transitions_pass/transition_profiles.py",
|
||||
"validation.py": "corridor_pass/validation.py",
|
||||
"zigzag_evidence.py": "component_pass/zigzag_evidence.py",
|
||||
"zigzag_mosaics.py": "component_pass/zigzag_mosaics.py",
|
||||
"audit_coverage.py": "coverage_pass/audit_coverage.py",
|
||||
"render_coverage_changes.py": "coverage_pass/render_coverage_changes.py",
|
||||
"test_coverage.py": "coverage_pass/test_coverage.py",
|
||||
"coverage_crossings.py": "coverage_pass/coverage_crossings.py",
|
||||
"zigzag_segments.py": "coverage_pass/zigzag_segments.py",
|
||||
"audit_scene.py": "coverage_pass/audit_scene.py",
|
||||
"refine_coverage.py": "coverage_pass/refine_coverage.py",
|
||||
"coverage_rules.py": "coverage_pass/coverage_rules.py",
|
||||
"refine_patterns.py": "coverage_pass/refine_patterns.py",
|
||||
"refine_crossings.py": "coverage_pass/refine_crossings.py",
|
||||
"coverage_patterns.py": "coverage_pass/coverage_patterns.py",
|
||||
"crossing_completion.py": "families_pass/crossing_completion.py",
|
||||
"crosswalk_family.py": "full_plan/crosswalk_family.py",
|
||||
"recall_extent.py": "recall_pass/recall_extent.py",
|
||||
"render_recall.py": "recall_pass/render_recall.py",
|
||||
"refine_recall.py": "recall_pass/refine_recall.py",
|
||||
"recall_rules.py": "recall_pass/recall_rules.py",
|
||||
"recall_templates.py": "recall_pass/recall_templates.py",
|
||||
"diagnose_recall.py": "recall_pass/diagnose_recall.py",
|
||||
"recall_targets.py": "recall_pass/recall_targets.py",
|
||||
"test_recall.py": "recall_pass/test_recall.py",
|
||||
"audit_recall.py": "recall_pass/audit_recall.py",
|
||||
"glyph_mosaics_inspect.py": "glyph_pass/glyph_mosaics_inspect.py",
|
||||
"glyph_registration.py": "glyph_pass/glyph_registration.py",
|
||||
"diagnose_glyph.py": "glyph_pass/diagnose_glyph.py",
|
||||
"refine_glyph.py": "glyph_pass/refine_glyph.py",
|
||||
"render_glyph.py": "glyph_pass/render_glyph.py",
|
||||
"glyph_mosaics.py": "glyph_pass/glyph_mosaics.py",
|
||||
"test_glyph.py": "glyph_pass/test_glyph.py",
|
||||
"glyph_identity.py": "glyph_pass/glyph_identity.py",
|
||||
"glyph_rules.py": "glyph_pass/glyph_rules.py",
|
||||
"audit_glyph.py": "glyph_pass/audit_glyph.py",
|
||||
"glyph_templates.py": "glyph_pass/glyph_templates.py",
|
||||
"diagnose_projection.py": "glyph_pass/diagnose_projection.py",
|
||||
"glyph_targets.py": "glyph_pass/glyph_targets.py",
|
||||
"registration.py": "replay/paved_registration.py",
|
||||
"refine_registration.py": "joint_pass/refine_registration.py",
|
||||
"registered_template.py": "joint_pass/registered_template.py",
|
||||
"render_registration.py": "joint_pass/render_registration.py",
|
||||
"audit_registration.py": "joint_pass/audit_registration.py",
|
||||
"test_registration.py": "joint_pass/test_registration.py",
|
||||
"probe_bicycles.py": "joint_pass/probe_bicycles.py",
|
||||
"inspect_recall.py": "joint_pass/inspect_recall.py",
|
||||
"small_bicycle.py": "joint_pass/small_bicycle.py",
|
||||
"standard_arrow_evidence.py": "replay/standard_arrow_evidence.py",
|
||||
"standard_arrow_templates.py": "replay/standard_arrow_templates.py",
|
||||
"fit_standard_arrows.py": "replay/fit_standard_arrows.py",
|
||||
"refine_standard_arrows.py": "replay/refine_standard_arrows.py",
|
||||
"verify_standard_arrows.py": "replay/verify_standard_arrows.py",
|
||||
"test_standard_arrows.py": "replay/test_standard_arrows.py",
|
||||
"render_standard_proposals.py": "replay/render_standard_proposals.py",
|
||||
"inspect_zigzag_gaps.py": "replay/inspect_zigzag_gaps.py",
|
||||
"arrow_admission.py": "replay/arrow_admission.py",
|
||||
"refine_arrow_admission.py": "replay/refine_arrow_admission.py",
|
||||
"arrow_mosaics.py": "replay/arrow_mosaics.py",
|
||||
"arrow_evidence.py": "replay/arrow_evidence.py",
|
||||
"arrow_frames.py": "replay/arrow_frames.py",
|
||||
"arrow_tip_registration.py": "replay/arrow_tip_registration.py",
|
||||
"audit_arrow_sources.py": "replay/audit_arrow_sources.py",
|
||||
"verify_arrow_observations.py": "replay/verify_arrow_observations.py",
|
||||
"render_marking_overview.py": "replay/render_marking_overview.py",
|
||||
"test_arrow_admission.py": "replay/test_arrow_admission.py",
|
||||
"audit_arrow_admission.py": "replay/audit_arrow_admission.py",
|
||||
"render_arrow_admission.py": "replay/render_arrow_admission.py",
|
||||
"audit_zigzag_coverage.py": "replay/audit_zigzag_coverage.py"
|
||||
},
|
||||
"source_sha256": {
|
||||
"assembly_evidence.py": "0fda82c403f9734ea0b0267504ac82437092d410882dc21417a492de9509c09b",
|
||||
"assembly_rules.py": "04798c28e0daccc8be5fb045cc736160721308f7c41189f287b97a509999ddbf",
|
||||
"assembly_templates.py": "41ec0428032ae328d5f46c34702d5b0be43f724e5821278e745554c72326d402",
|
||||
"assembly_zigzag.py": "dbee99c505381fbdccbecec0817e0ec4e028ac1eb475124829cd58811251b9ca",
|
||||
"audit_assembly.py": "8defc22e391c330962c503b27c49b9d13cecee90b0170dab1b8372858bda3638",
|
||||
"audit_assembly_joins.py": "e8a3ded181b69961c8a0a5f88e171ff5ada82f0a43e55c217bb40734e411c094",
|
||||
"audit_beta.py": "f6dfe314f5f0f9875035f08ae279e64309fafcd9c04e0feb468dcf106cc2990f",
|
||||
"audit_catalog.py": "19d5f0f156c0f90d2e1e2548fee99eee521b76e7152f0b53ae12b43ed48553b2",
|
||||
"audit_completion.py": "ef6adcfec3e1a4bd894b54a150fe3b8559bf73e94665bb9da6bd68007e90575d",
|
||||
"audit_components.py": "b472856305839483fcf806eb76a29b46650f2188b1e0cf0f94afdc250eb1fa28",
|
||||
"audit_consensus.py": "7056d6195b320ae165aeef44e802c29697ae8163abb99d4593e0c8df6e186bc2",
|
||||
"audit_corridor.py": "3f792b1830e9097644dd66c38eb2cf7efa11d75a0fda928ffa0a7780afb85bfe",
|
||||
"audit_discovery.py": "9e5f1bdd0d752d82a52121fe86d4e6fb00068a6af9330a072fe7311a909bc974",
|
||||
"audit_norms.py": "234e431040e38d9c999f10a62d05454f217673cda5e2ab3e3119a2fabf9e703d",
|
||||
"audit_rows.py": "7298fddd8baf9798e6dd5251d4f261e97a5b92f0beeb60f3198c6aa7498d7f01",
|
||||
"audit_search.py": "0de9929d983c97045444131b9255ec4c256ae652b6adb82551e42b94c4bec0eb",
|
||||
"audit_sections.py": "755d129ef5e1c6503c784393f67cc0dae1c9ebaaecb9c08b8ad440cde7dceea7",
|
||||
"audit_symbols.py": "105c7a7939c43643299e071d94f5b1e4acc45a29d8b45482a3d7fabc9508ecea",
|
||||
"audit_transitions.py": "35a3ecb08d96ee21badf438a18bdddf800263032078e2daee888673ab4209c4a",
|
||||
"beta_profiles.py": "172ab1f02b8767e9e96c21d99925c8fd7568403434f951feadc2857036d07c6e",
|
||||
"bicycle_artwork.py": "2e5220e6e82024c683b65c81695b53fa3070d58eed89d61f5cbda41f6c3c554f",
|
||||
"catalog_context.py": "f2e654ea068a758be1f929299786559f02672898047893cdc20e6f1cb204bb80",
|
||||
"catalog_dependencies.py": "d6407445db28f6f15201f4ec09e3401141fca90e11a9cef52392f88175634fca",
|
||||
"catalog_dependency_pins.py": "93ed9007288440620b8339043f1d5ae74684e39e7c3bd50d94d24f6cf29c9f3a",
|
||||
"catalog_evidence.py": "7f9fb171776faf1181705826bec206882aea13eded8664d8e3e6dfd09031ec95",
|
||||
"catalog_rules.py": "ed0f8e838908bcea9ac1ee15fe13d1b23ac29981428ea6a4bdc097c0226db3cb",
|
||||
"catalog_templates.py": "05577c611ce5ffa2c21d0f608e728eca13009c994e26913b29f39fdcf584c092",
|
||||
"catalog_zigzag.py": "2e6a804cd14440afaf27bd0f0c2123afc7bf3ea1c58cd0d49293049f1f3b498f",
|
||||
"completion_profiles.py": "b01cb280a265f170c2f3823d59d423c0cf11472050678cc4dad716c1f90ff786",
|
||||
"component_arrows.py": "8b577e22e1fb2f45cf6cf426ecd32050c9fca5066a9f5fa00d156049f8691e39",
|
||||
"component_bicycle.py": "854388ce45520abb82d8f61d1195a50525e6326c315feee5bcb84b66163dc2fe",
|
||||
"component_conflicts.py": "dccc333197b47bbbf211212b38d5a0018c8bae5f403fed1cbe3e22be0a81967e",
|
||||
"component_evidence.py": "ef889c65ce03baf5da245a45c2819927d93ac16d4575fa28e3078a340fdd57fb",
|
||||
"component_mosaics.py": "15f8aac32e73cfc72253082e9b7ce2baaaf69ff53a701d0d279990f0cffb5db5",
|
||||
"component_rules.py": "910be55c56c3b406e1727339b1054ee0693a5d7c4ec46cb3cfa8015a34eb0553",
|
||||
"component_surface.py": "e425be65d184d474c5485160547f122291529622244da73ca484469ffd994d69",
|
||||
"component_targets.py": "1719de92d38ff15377276e7b471501cf5ed21392a14113d90537eafea735e6c2",
|
||||
"component_zigzag_rules.py": "76566a1ec3b90c7d3abe7dd96054351e3fbb41ac1117f2b1eb09ce33c716da98",
|
||||
"consensus_profiles.py": "4069e7e56eff1cfe3c10884a63a8c329891bbdffa68f477281c2eebff9128091",
|
||||
"coordinate_cache.py": "930f8f521ef13c02b589d0c182ab4cf337acc4c213354808d32178bbbea3edf4",
|
||||
"corridor_profiles.py": "967902dae9137ceddb05708acbb6a7cc1e06977c6d064787a1a651422d2e5672",
|
||||
"coverage_evidence.py": "e5567525f324b77861ef5d393067f44b9edf8c0f51dc16b0e7af03e1c4f6aa53",
|
||||
"coverage_plan.py": "48e28d6781d5d04e83645ba0a9aa7f0398ae904d26bf2e81caa8d8e741bccdda",
|
||||
"diagnose_assembly.py": "44ef17e6bdecc9285ae8150ccb5c4dd397006381b34b013ebd3e2ed6c2b34bbc",
|
||||
"diagnose_components.py": "b9653a2b642c1399dd3b6388cd40a148cb4cb81f665fad3bf993d950a64579f8",
|
||||
"diagnose_corridor.py": "cff89f2a78ff315906b7d40ba1855f0f842afe1f7f74d1d38b7366e2959bcfd6",
|
||||
"diagnose_coverage.py": "f5305f0c429aea3ba5f18e4261abd64fe8254e53db24323ffcebc152734864b7",
|
||||
"discovery_evidence.py": "dc7e0594b77f6d3723a965216164427835aa5ae2ff736b5599774c4efbc626eb",
|
||||
"discovery_rules.py": "1ac148d3fd75d443d2bde69e46da775de838c9cb2013570d87c13900f0a1a491",
|
||||
"extract_assembly.py": "d2f1cd5a1fc03b95496b32e024452c3e8ba489a06299a6cba967d4d18a5c3b33",
|
||||
"extract_catalog.py": "7c3b7de0291f52d9f37590b438d1abb7e37b36665cfb5e9ba4698b78a8f42574",
|
||||
"extract_discovery.py": "5d2835cde2b9d4d895609ea39be2a94a22e894d0996d525dcc3df7046c33e681",
|
||||
"extract_search.py": "09b3c0c65d33fdd5025e3436fb1bd5df67d1e359b507f4fae74a7e61754fc92c",
|
||||
"fit_scene.py": "d130e092d0acad9994da04ca34810beaa8a31c9602d1858cb4d686c240e42ab8",
|
||||
"fragment_templates.py": "11f2eb0bdf89a76f2f3be1e8368662f45fea1dec13f7fb43bac9c3e41acf1ae7",
|
||||
"gost_catalog.py": "a55a837cc1473055ff24d340c6a669a45d8295f9efb08fd81f1bf2651c0ac537",
|
||||
"image_profiles.py": "1c497f06053ffff63a476baf6dd65ba75ee17d7c38d04c8ff8c22ae03a27eca8",
|
||||
"inspect_bicycles.py": "e12964f244645b7a4b2bdb0da5d2bb90e7d49dc35bf2f66c4a8466fabc6836bb",
|
||||
"inspect_catalog.py": "322aec8f233009eb42703132b220e1e216f8dc8b59aa6bbd27244067e651727d",
|
||||
"interval_profiles.py": "6e7dc0e0eb2cc7ed641bd786b283688ecbc831a2b3442f3f6e6c18add0bad345",
|
||||
"join_assembly.py": "293fd78d10f0ba13b1339a69d737c3f96ef003ea3f6dd63fdf02d14c40fa324f",
|
||||
"layer_common.py": "5e6a2ef463a786b81d387250b2f2be21511f3dae887c8b9ea424051b1722fa59",
|
||||
"line_reconstruction.py": "f89883a1140aca2b78e1567e3361aa69403725d9b384daca6f782951b8920738",
|
||||
"mapping.py": "1c6ba0cc111250d73bc0bc282e9cbb7a602921bca931da6441bc9a6daf88b4f4",
|
||||
"norm_profiles.py": "fe5169f850919abdbc762fcf12960ef7dc0185f1ae56330246ca322db6caa0e7",
|
||||
"ortho_terrain.py": "9c9cab9d7086144fd1a108db28f796e9d267375d7135d50d5cb3f054eae75213",
|
||||
"paint_channels.py": "46da37b13914c69c72f6f4ae1bb5ad70e6f6b77b42355b016df1b3c4d72fbc63",
|
||||
"paint_templates.py": "9cf9c4e871ea03f38e1641c1c89864a628e0fe87462cccdc0149fdf6242545b6",
|
||||
"prepare_symbols.py": "59d0f7da37f4f119b0bfa996dfe4638999bf1bce575415db087fdb55d64a144a",
|
||||
"refine_assembly.py": "0da00d12e4bda06760a3fc78fcddb6875012edc046e9f83a00074846031b4939",
|
||||
"refine_beta.py": "36f39ab464c967b1df136f992a3156deef1dfe2af858bc7cbbef43e9bf7f9831",
|
||||
"refine_catalog.py": "eeeee4d59066579c1fa8708a1be9d999a481f8f8daf05ec01704897252cc66cb",
|
||||
"refine_completion.py": "12f424d39a687e8b94823f2e2f7b2f2c95538f3504260b4373c47cc21b29c6e1",
|
||||
"refine_components.py": "57eeb116e3c61ee42d30d3d6bc557e33d2b2d8ee24910584487bec5d34b69ef5",
|
||||
"refine_consensus.py": "e0e6bf6ad7023515103be330df93b5d925cc1c62642d1a38e67f07cbe027eb36",
|
||||
"refine_corridor.py": "fd1c4d4e028a037e32538c26a66f876425088b8b5b2c7ffc8d5dc807eba3290f",
|
||||
"refine_discovery.py": "6272ca1f5052259fb3c6cfd1f1079e4e5864e1e067d12de7ff36d95857219d7b",
|
||||
"refine_norms.py": "081f6f2347a19b996d5f1b69d63194112d808071eb8c8313e173b5cd09e2dfd5",
|
||||
"refine_rows.py": "3983e8de9b6dadb349b8731335798640e4ce11c87356925f9ea79c5d0bf819b8",
|
||||
"refine_search.py": "113e8cee4f26d1f6b0bcce516388d046ced0523598ddf7f6f4e4dc365a0d9859",
|
||||
"refine_sections.py": "7fd48aa308df07b980e40153651c9c6985949245d4f3f0d1a46bbfd13f735ff3",
|
||||
"refine_symbols.py": "c210c825edb1d2469b27afac6292f911df8351e92c8f47d0b5d05f99a229a95a",
|
||||
"refine_transitions.py": "777d0a0f4d9c762768311db154f66a77880790f523ec639bbd02225ac470138b",
|
||||
"refine_zigzags.py": "8fad49227ca4fdaf72fa46a9050aaa39d699aa2620ffc765ea829e2ecb77d967",
|
||||
"render_assembly.py": "b8471dceb42be102eeb1918eb7950e038d3fc9e0ebab0a3b01b3aaea8be710fa",
|
||||
"render_beta.py": "4a5fdeaa746ce8b4f449df44c210e13fcc2cabf2e2931beab00928eda3777e1c",
|
||||
"render_catalog.py": "58ecb30ac8ddffd1489c93361dc6678c82e4dbbfbe8a6e851a1be395ee40db1b",
|
||||
"render_completion.py": "5e76d2a6ce41a6be8013f98df33951fe17fc209c078376ebfafe7c60ed0b14a7",
|
||||
"render_components.py": "2115f348228ffcbb21ac1a80c1e8c37b082af8be09ca2a182028aa1ea0a7a222",
|
||||
"render_consensus.py": "ea677bac3a4950209133268801f238c67236b0e7866f22df3e738e7592fde682",
|
||||
"render_corridor.py": "f6355e3761834fcf811c0cae9dc3ce602e7221afea4f674178d6c29085e87e9f",
|
||||
"render_coverage.py": "2cba12c09333c242841b174f201c89ffce9e715b78b26b472117ae140ff4157c",
|
||||
"render_discovery.py": "868ad8eb712f5880e944b0899205a2c0fd6dd0713eb727b1c49dda92b897fa20",
|
||||
"render_hypotheses.py": "d7ea4b19409a7b5c78c8a01ed9c190069cc109e4bfa854c77672ed1d1e64ba56",
|
||||
"render_norms.py": "3a8bcf81723d7bda4b49c8ff12e21efded4450839e11a4f23e719dfc8fa4441d",
|
||||
"render_plan.py": "9e702d51c6be09caa456d8e528bd62bc9ec238ca3689a99f38b414dafc193f66",
|
||||
"render_rows.py": "65f57b15f2b288048a75d1f4603625637f1e2af505925628ec80a2169fe9944e",
|
||||
"render_search.py": "5655641df20c2e4f0849bb35ff4029d806554cc7d3b696d26378ad9d880d0491",
|
||||
"render_sections.py": "43de78c4b1c643162f4ac9ada77411a2a4e222fa5506ec8f1061311a96bb234c",
|
||||
"render_symbols.py": "ae3bd83870aa435d2051282b65fd3015eee8c11e92831062328e39482de76d5b",
|
||||
"render_transitions.py": "eea6be5a6f90145f00d7e930f4123c87aa135a64a2c59723908cf7056520128d",
|
||||
"review_symbols.py": "264c92625648cf1930753add51496c28ef645a481e5cf13993ae0cf758d5df30",
|
||||
"road_glyph_presets.py": "619f4e9c9eeaf63537afc0e8676ab5915d78af1aee8bfb9fe4656bf81b07f322",
|
||||
"row_evidence.py": "fec784ab795470d96e48c7022e59d5206b0c07b40d84843cbc058fcc4de896c0",
|
||||
"row_profiles.py": "0b23a93b6de9b2e01efb5ce57085fac0afebcd3df6184e573d6b84793e0128df",
|
||||
"search_rules.py": "ca3cab6d24f31460d9912c351c166d89fb1c3b21df620ba1d847543bd7a71f41",
|
||||
"search_views.py": "8a123558dbef184fc85a92c9547c19644d14681329dbbd0cfeac0032bbd102be",
|
||||
"section_profiles.py": "f3f57b2f5e01962f0aca44164d95dfd2d1e03c73c1b0ecb94c6d550f509609de",
|
||||
"semantic_symbols.py": "0665fa1ba0dd08bd29b762a09fb2d03b31a1894ff0731353c2f847fb170c5658",
|
||||
"symbol_evidence.py": "2d643c9756660bd33ad208ffbe960283feb3aa12352399b6df6f81c0b507e3a2",
|
||||
"symbol_rules.py": "c349ee11f5c33da7310dcf6e530d988858243c5e99ad8072818d78802ea59527",
|
||||
"test_assembly.py": "80510625a71ea9fc04add883d9a7e40a3bfdcac4251bd702b5507ce76f9bba8f",
|
||||
"test_beta.py": "e5729c05063afb65c3e35b4e380219dee9893dfa26bb41e1c5cd24641e08358b",
|
||||
"test_catalog.py": "91a8fdbc330cecd5bc354406012852cc46245baf99ba8befdaac164f6b79c1c4",
|
||||
"test_completion.py": "a3a6a283221ae48ade8fd0cca2f145509fd6bedf8e808967c13438791654a7f1",
|
||||
"test_components.py": "71c48f0b6afda80713aef4ee6547acc1995f0dd07d901ee84a4254bee0cc1168",
|
||||
"test_consensus.py": "90cdd1be7bd2a0d1471141eb40bfa806cc149789c3d6794bbfdaba5999a369f7",
|
||||
"test_corridor.py": "42788835ec88e91a3b92ec7ead4e4c489b01ddf11256b46b7b3722c6b4770703",
|
||||
"test_discovery.py": "a75ffc22d065201f7023d8e6cfb6dc09204a80f9be607599b85479628a301538",
|
||||
"test_intervals.py": "0fd926c0739f066bf79d549e190b8641399eea39486726e5946d67388ab73a12",
|
||||
"test_lines.py": "a5b2aab9cb0627bd463d1bd37b1353e0ca14fbffa7dfbac2a928e528dc8ca29a",
|
||||
"test_norms.py": "02b0757f7c1c4498c9165dde2bd650ca9f0a1dec840d59e7828343264079905f",
|
||||
"test_rows.py": "a89932294a62a373b8c4c80556c4d23d7182c64126788d63988312bc3b9f3449",
|
||||
"test_search.py": "fc3d874c8a6639bfa007eb8fa4a869e270bddafe317868bed29450c6024f8756",
|
||||
"test_sections.py": "0b9f5da94e3f7ca8f05ab1f15b48685a6c97ac4a559147f98adb6634ad74031f",
|
||||
"test_symbols.py": "63a429e8d3324b87075bcb2a2c9902f35c45f1aceff5b46c260aec9bed666481",
|
||||
"test_transitions.py": "95837d6e04c890f514901d9b587092f79fa1552dde6df99e301849d66c004438",
|
||||
"transition_profiles.py": "7f713e5fed3a1aa88d00a4c3299b45a8970ff225ab827f82950901185b33ea2e",
|
||||
"validation.py": "ee004220db3cdf2429af2a0e875cd9a63526587422881692ce56fe9d77f5cc2c",
|
||||
"zigzag_evidence.py": "978bda848dc7dc85268e2696b918eb6f86c7377c7e9da7c5e4b875815daefa0d",
|
||||
"zigzag_mosaics.py": "b2703eb159e92680df15d4ed80cd47e55a9168ab3f1703f50faf843eca5262b5",
|
||||
"audit_coverage.py": "cb7fd23d5b9a86ec1d2a94fa6d172326024d551c0a5ae1791487d455a512d655",
|
||||
"render_coverage_changes.py": "fa79e806d806ad8a59f8b1cf3ec1df27a4032a38eb234b0695fdffcc625f5617",
|
||||
"test_coverage.py": "d4ee6c71db2e6a426e0c44b99a46acf34c2094af1148e2aade4382c784c99063",
|
||||
"coverage_crossings.py": "ecfc59bbd5ce419ffbc08f282985c0937d21f2311d581cd6fb8fe6d20671411c",
|
||||
"zigzag_segments.py": "02b46d2462f0851af3d371e927da7858bbf3f59daf89201a40e30e267cf097c0",
|
||||
"audit_scene.py": "298bc00d21fecf7c511fd2ae455d181f3998781e13b91464fb6553338847d28b",
|
||||
"refine_coverage.py": "d647727eb6c64ce60e3e98701e22c41d42f265c073fe099d9c95cc3e165d5540",
|
||||
"coverage_rules.py": "9c22f810b123a0b2d1bb4fb0717f1df2bcab2f9c2ebd76d3b537e67e6baea055",
|
||||
"refine_patterns.py": "83b053abc53fb198b21f7a8ec80e6fa2b507855c20fc4a33e06a10f7c387346d",
|
||||
"refine_crossings.py": "7e7237cd41640ea7b298754b6be40c734eee8dc933f5be920ef9426a2c88eb6f",
|
||||
"coverage_patterns.py": "76f2a539c88e3212fd0b904a0b85d1a31c1a2357e864f4b44dc9b1a28e722638",
|
||||
"crossing_completion.py": "6e75ae4b65e8d6447acae57ae17ca088a427fda39f438271bc0f1b0ca84641fb",
|
||||
"crosswalk_family.py": "68ee6327a7a24ab74e77bdbbc9c504562f6997cfb7f0e6082095b3e2eb32fc2d",
|
||||
"recall_extent.py": "fea1f876ccf52dbaf7a06a68c7bf7870a8ebbc1331c612366419a36291433fbf",
|
||||
"render_recall.py": "51d887366f79b82d3c61ed3ba9dcd01a8c07a4b609ba379cd9393d2924c702b0",
|
||||
"refine_recall.py": "b2d323ce0325265b37302673101421078cc05f52cd00415d476165c7144247cc",
|
||||
"recall_rules.py": "7a54b3ff0aaaac84d71206f685dd8479f8bfb1966294c50f56567c908794f94c",
|
||||
"recall_templates.py": "56c8f95854df245d31b1b132bf800ab8ac9356e775bed52042304047cd849497",
|
||||
"diagnose_recall.py": "83b96adf9796412d800e702608dd6e64f237718d739ff592acca0574d2dc62a1",
|
||||
"recall_targets.py": "01bb0876d092f9de660e181f6622323704b76bbd8a62e6d8f88cfd7bf398e7bb",
|
||||
"test_recall.py": "8a35c7ea7f5bb0cea6193181c75f5bba04344ee902e000c106c07caa51b7df15",
|
||||
"audit_recall.py": "ce4cb5ae9582a6b46921fb311cec626ffdc5ee8ea2a9a19c0eb9699b0d9211e3",
|
||||
"glyph_mosaics_inspect.py": "330e6aff8fde052ca94bca0908a46c3b2f5d9457e47482a99e78708634c402fa",
|
||||
"glyph_registration.py": "30a21ce2bccb6921b5b77939ed5a329787fd1f3127d63f9cc2481a326dde6c9b",
|
||||
"diagnose_glyph.py": "982a9656f4ffc67d8b833db3cd4aa738bf8d2e9f1ee8be4d73751b66922f5ba3",
|
||||
"refine_glyph.py": "ca2bea6020ce4ab458af57553931978ee1eec1beb39225a8009f7daaac81d826",
|
||||
"render_glyph.py": "e1bda83c85d6cb48481cd7aa9cd738bf67311a693d07e33188c711e9c30ab161",
|
||||
"glyph_mosaics.py": "cdedb823f1e3d49f8072b38f38f463b0e7338351fe0d032d634396f55f45b0b9",
|
||||
"test_glyph.py": "46555f5acc2319c94418b68177991d3538e6b53eb6b3b8befca913299607ac6b",
|
||||
"glyph_identity.py": "d02114510077651db8cac1b0ec4dcf6dc98e8b64a8caa44ffc37df4914ecdd5b",
|
||||
"glyph_rules.py": "747d3da1f0e0cd3301a6f20c5185eab68c431b4966c491ea77210bc4db48eac1",
|
||||
"audit_glyph.py": "31f44bdae4c2af38cbe9af5b8bbf16bfbdcf0b96e39b62078d5459e673d30758",
|
||||
"glyph_templates.py": "8ddc50348563b048c362a447d68a30872284dc08c88ca9d9c70c27a382a62758",
|
||||
"diagnose_projection.py": "d49d44c69b9bbb3c91af27851b33b7323a68727e76846af846df94cfa663a684",
|
||||
"glyph_targets.py": "e957f2d7889b4366eacc29a0d8a1440ee16b35f00a79d9e8740f0b807a232eda",
|
||||
"registration.py": "1f66a2c70789251813ad19f92f77d5a0244a0dbafbb6bc98d6c6b0239f32192d",
|
||||
"refine_registration.py": "7740076f771b3d7949d1b03f9b6fe3034aa1c646fda7751e0cc81cb1055e5579",
|
||||
"registered_template.py": "6c256bab9275c1d4924e5eb9a5982b0b777e6e637603d33f6d0df00ffad29464",
|
||||
"render_registration.py": "c1ca93d964a8ee1cca134497f05672978c43ff845980308f2a9ab3823bea06bd",
|
||||
"audit_registration.py": "0cf92896826c40b80513f25935b8abf9de99d7f51437aea98ac825474da2b6d5",
|
||||
"test_registration.py": "e565bcbf56921bb252d8a4c0bbee7515a4ba4d73ad9797cf6b6d67de5783503d",
|
||||
"probe_bicycles.py": "8e2a66e352b6e05d2eb3f631453d53e0940f046779f4cc10e87f9a80470ff4bc",
|
||||
"inspect_recall.py": "b071dcc227002ec4cc643de48302c854997d5f7b48782c780a874d13c214e689",
|
||||
"small_bicycle.py": "fecca9312cff0d4e7035f42a7c44e441f90ab4e033cfe22ae91d609de445d2af",
|
||||
"standard_arrow_evidence.py": "1678afe91acd81be83c79c6d52c223532b0e3d742a00b10c3e1870b1131e775b",
|
||||
"standard_arrow_templates.py": "9b090b9a4042cff0f759a72ccd375095ea68f93229e0e90d1715314c46ec6227",
|
||||
"fit_standard_arrows.py": "b6cb0bcc8a83d9d4da8eb5664b9a5b9fe266a3d06e56127dd06b1f0f56c9362d",
|
||||
"refine_standard_arrows.py": "252b746681f8eff8bcaf28a6f8b7a01d00d5e1117aafd3336d9b6db01e8177a4",
|
||||
"verify_standard_arrows.py": "ac6c4a8017b00e2fb8fd2026e36d3e728b241539a7e286f62d6df4cb8bd1d9bf",
|
||||
"test_standard_arrows.py": "84e52e4b568105853ad6a31bf7f9f93360ff22ebb3aa6fc98e0ca5545d3535fe",
|
||||
"render_standard_proposals.py": "0dbcc01ea9e19e18d99c799ed84b7974d57a109ea24eed69fb3f55064336db5c",
|
||||
"inspect_zigzag_gaps.py": "6669720ffd19d174df7b3873aaeddfa9bd65c3851e45bb3dbd4ea6bfaffe7ac3",
|
||||
"arrow_admission.py": "2ed5a28706416dc3a2b674cc4d8cf007049db91e3c70b530ea14f1eec986c516",
|
||||
"refine_arrow_admission.py": "c55ce2548da5795b32d7fe6718619b0d681ddd229075937a1c7ca131c394b3d0",
|
||||
"arrow_mosaics.py": "a55c3560961577c381f21f087b632a73ba778869a7f60ba58c095135523a0763",
|
||||
"arrow_evidence.py": "047c0d9fe6e17c1500b993f8a6166406db1950e38c0af4562886143238c377ad",
|
||||
"arrow_frames.py": "4be5a3d96ca29981be698a3200f7d1447d8c9848fde0e67dab5f5b3b529bc9ca",
|
||||
"arrow_tip_registration.py": "0d74cb29a0cef1c40267152a6a1fec6397d5118de0cd6c94a402fc3738354056",
|
||||
"audit_arrow_sources.py": "8d5315e52f5c414e94104aa52914eee85ab3b1c3237cfc9b042f8683a0d37525",
|
||||
"verify_arrow_observations.py": "0351443c94f6eb5c7cf87642ab785c85a2e7eb8a85f8f6ac3f59f898eb74b09e",
|
||||
"render_marking_overview.py": "1cf79de953f94f26a846c9a14872ddee7465fccad9764c8ecf17876ce1bc2115",
|
||||
"test_arrow_admission.py": "543a7c64b6c4232d8612cd0d63eb6b137466b610daa78c1f0ccd614115310425",
|
||||
"audit_arrow_admission.py": "9e365af391f403e7eb9619e4e434c336e2f7ecf703852ae3e9484e9e85cb8dc7",
|
||||
"render_arrow_admission.py": "527b9f9e65c7a522eae06309b99efa7fb0701f8ce91b4e8b388807c63b0ffb2b",
|
||||
"audit_zigzag_coverage.py": "085ef1fe01f43f4ff40b0c89df026f329120dfb8b6050269047d3422ac864eff"
|
||||
},
|
||||
"source_snapshot": "3f41a57db9ae05067b9c66b1ff28fb5699df9b5e6db862bb948b96ae27d0030d",
|
||||
"execution_snapshot": "99a7e43e8882d6371b84dd9e638c81a04411401cc8e5668261e4827f0d384878",
|
||||
"runtime_images": [
|
||||
"sha256:925b093545e15c270d95d4076139ad8ed48e790eccd9434a58495d58c97671d0"
|
||||
],
|
||||
"inputs": "accepted baseline; original Gaussian renders; cached semantic evidence",
|
||||
"manual_regions": [],
|
||||
"transform": "immutable-preset-similarity",
|
||||
"publication": "external visual acceptance and exact canonical API readback"
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
"""Read-only whole-scene review of cached, unpublished marking hypotheses."""
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import shape, LineString, mapping
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from search_views import SearchViews
|
||||
from fit_scene import project
|
||||
|
||||
start = time.monotonic()
|
||||
out = Path('/out')
|
||||
doc = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
features = [f for f in doc['features'] if f['properties']['class'] == 'road_marking']
|
||||
polys = {f['id']: shapely.force_2d(shape(f['geometry'])) for f in features}
|
||||
existing = shapely.union_all(list(polys.values()))
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels, low, high = z['labels'], z['bounds'][0], z['bounds'][1]
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status'] == 'surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 17)
|
||||
rows, seen = [], []
|
||||
for family, path in [('zigzag', '/componentplan/zigzag-diagnostics.json')]:
|
||||
for index, d in enumerate(json.loads(Path(path).read_text())):
|
||||
if family == 'arrow' and d['semantic_class'] != 1:
|
||||
continue
|
||||
p = LineString(d['vertices']).buffer(d['width_m']/2, cap_style=2, join_style=2) if family == 'zigzag' else shape(d['target'])
|
||||
legs=[LineString([a,b]).buffer(d['width_m']/2,cap_style=2) for a,b in zip(d['vertices'],d['vertices'][1:])]
|
||||
zigzags=shapely.union_all([polys[f['id']]for f in features if f['properties'].get('subtype')=='zigzag'])
|
||||
if all(zigzags.buffer(.12).intersection(leg).area/max(leg.area,1e-9)>=.85 for leg in legs):
|
||||
continue
|
||||
if any(p.intersection(q).area / max(min(p.area, q.area), 1e-9) > .6 for q in seen):
|
||||
continue
|
||||
seen.append(p)
|
||||
rows.append(dict(family=family, index=index, geometry=mapping(p), diagnostic=d))
|
||||
|
||||
for i, row in enumerate(rows):
|
||||
p = shape(row['geometry']); center = np.asarray(p.centroid.coords[0]); eligible = []
|
||||
for tile in tiles:
|
||||
uv = project(np.array([center]), views.geometry(tile['id']))[0]
|
||||
if uv.min() >= 100 and uv.max() < 1100:
|
||||
eligible.append((np.linalg.norm(center - np.mean(tile['bounds_xy'], axis=0)), tile['id']))
|
||||
if not eligible:
|
||||
continue
|
||||
name = min(eligible)[1]; g = views.geometry(name)
|
||||
raw = Image.open(Path('/ortho/evidence')/(name+'.ground.png')).convert('RGB')
|
||||
scale = raw.width / 1200
|
||||
uv = project(np.array([[p.bounds[0],p.bounds[1]],[p.bounds[2],p.bounds[3]]]),g) * scale
|
||||
# Orthographic tiles have a fixed XY camera frame; project all corners.
|
||||
corners = np.array([[x,y] for x in [p.bounds[0]-.5,p.bounds[2]+.5] for y in [p.bounds[1]-.5,p.bounds[3]+.5]])
|
||||
uv = project(corners,g)*scale
|
||||
box = tuple(np.r_[uv.min(0),uv.max(0)].astype(int))
|
||||
over = raw.copy(); draw = ImageDraw.Draw(over)
|
||||
def outline(poly, color):
|
||||
for part in [poly] if poly.geom_type == 'Polygon' else getattr(poly,'geoms',[]):
|
||||
if part.geom_type != 'Polygon': continue
|
||||
for ring in [part.exterior,*part.interiors]:
|
||||
draw.line([tuple(v) for v in project(np.asarray(ring.coords)[:,:2],g)*scale],fill=color,width=2)
|
||||
for f in features:
|
||||
if polys[f['id']].intersects(p.envelope.buffer(1)):
|
||||
outline(polys[f['id']], 'yellow')
|
||||
outline(p, '#00ddff')
|
||||
frame = Image.new('RGB',(1200,510),'white')
|
||||
for col,im in enumerate([raw,over]):
|
||||
crop = im.crop(box);crop.thumbnail((594,458));frame.paste(crop,(600*col,50))
|
||||
ImageDraw.Draw(frame).text((8,12),f"{i:03d} {row['family']} cached {row['index']} / cyan proposal, yellow existing",font=font,fill='black')
|
||||
name = f'pattern-{i:03d}.jpg';frame.save(out/name,quality=93);row['image']=name
|
||||
report = dict(rows=rows, candidates=len(rows), seconds=time.monotonic()-start, geometry_changed=False)
|
||||
(out/'pattern-diagnostic.json').write_text(json.dumps(report,indent=2))
|
||||
print('REPORT', len(rows), flush=True)
|
||||
@@ -0,0 +1,43 @@
|
||||
"""Append automatic coverage renders without changing or copying previous evidence."""
|
||||
from functools import lru_cache
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from search_views import SearchViews
|
||||
|
||||
|
||||
class LinearCoverageViews(SearchViews):
|
||||
def __init__(self, tiles, *args, extra_root=None):
|
||||
super().__init__(tiles, *args)
|
||||
self.extra_root = Path(extra_root) if extra_root else None
|
||||
self.extra = {}
|
||||
if self.extra_root:
|
||||
manifest = json.loads((self.extra_root/'manifest.json').read_text())
|
||||
for name, expected in manifest['sha256'].items():
|
||||
with (self.extra_root/name).open('rb') as file:
|
||||
assert hashlib.file_digest(file, 'sha256').hexdigest() == expected
|
||||
for tile in manifest['tiles']:
|
||||
name = 'window-' + tile['id']
|
||||
assert name not in {t['id'] for t in self.tiles}
|
||||
self.extra[name] = tile['id']
|
||||
self.tiles.append(dict(tile, id=name))
|
||||
self.centers = np.array([np.mean(t['bounds_xy'], axis=0) for t in self.tiles])
|
||||
|
||||
@lru_cache(maxsize=128)
|
||||
def geometry(self, name):
|
||||
if name not in self.extra:
|
||||
return super().geometry(name)
|
||||
with np.load(self.extra_root/self.extra[name]/'top.geometry.npz') as data:
|
||||
return dict(data)
|
||||
|
||||
@lru_cache(maxsize=12)
|
||||
def inputs(self, name):
|
||||
if name not in self.extra:
|
||||
return super().inputs(name)
|
||||
folder = self.extra_root/self.extra[name]
|
||||
with np.load(folder/'vehicle.npz') as data:
|
||||
vehicle = data['vehicle'].astype('float32')
|
||||
return np.asarray(Image.open(folder/'ground.png').convert('RGB')), vehicle
|
||||
@@ -0,0 +1,79 @@
|
||||
"""Spatially bounded paint checks, using Shapely and the existing Gaussian sampler.
|
||||
|
||||
Disjoint ownership cells avoid counting overlaps twice. Each cell is sampled with
|
||||
the sampler's one-metre context halo, so adjacent evidence windows overlap.
|
||||
Neither a weak paint score nor missing evidence authorizes deleting geometry.
|
||||
"""
|
||||
import math
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.geometry import box
|
||||
|
||||
VERSION = 'overlapping-linear-support-v1'
|
||||
POLICY = dict(core_m=3., context_m=1., sample_m=.04, max_grid_cells=20000,
|
||||
required_views=2, min_valid=.98, negative_support=.20,
|
||||
positive_support=.85, automatic_removal=False)
|
||||
|
||||
|
||||
def cells(polygon):
|
||||
x0, y0, x1, y1 = polygon.bounds
|
||||
step = POLICY['core_m']
|
||||
nx, ny = max(1, math.ceil((x1-x0)/step)), max(1, math.ceil((y1-y0)/step))
|
||||
if nx*ny > POLICY['max_grid_cells']:
|
||||
raise ValueError('sampling-budget')
|
||||
for ix in range(nx):
|
||||
for iy in range(ny):
|
||||
cell = box(x0+ix*step, y0+iy*step,
|
||||
min(x1, x0+(ix+1)*step), min(y1, y0+(iy+1)*step))
|
||||
part = polygon.intersection(cell)
|
||||
if part.area > 0:
|
||||
yield part
|
||||
|
||||
|
||||
def sample_count(polygon):
|
||||
x0, y0, x1, y1 = polygon.bounds
|
||||
halo, step = POLICY['context_m'], POLICY['sample_m']
|
||||
x, y = np.meshgrid(np.arange(x0-halo, x1+halo, step), np.arange(y0-halo, y1+halo, step))
|
||||
return int(shapely.contains_xy(polygon, x, y).sum())
|
||||
|
||||
|
||||
def classify(evidence, samples):
|
||||
if not samples:
|
||||
return 'unmeasured-footprint'
|
||||
if len(evidence) != POLICY['required_views']:
|
||||
return 'missing-two-view-coverage'
|
||||
if any(not all(isinstance(e.get(k), (int, float)) and math.isfinite(e[k])
|
||||
and 0 <= e[k] <= 1 for k in ['valid', 'support']) for e in evidence):
|
||||
return 'invalid-evidence'
|
||||
if not all(e['valid'] >= POLICY['min_valid'] for e in evidence):
|
||||
return 'occluded-or-outside-road'
|
||||
if all(e['support'] <= POLICY['negative_support'] for e in evidence):
|
||||
return 'weak-paint'
|
||||
if all(e['support'] >= POLICY['positive_support'] for e in evidence):
|
||||
return 'paint-supported'
|
||||
return 'mixed-paint'
|
||||
|
||||
|
||||
def summarize(rows, area):
|
||||
areas = {}
|
||||
for row in rows:
|
||||
areas[row['status']] = areas.get(row['status'], 0.) + row['area_m2']
|
||||
total = sum(areas.values())
|
||||
if not math.isclose(total, area, rel_tol=1e-7, abs_tol=1e-8):
|
||||
raise ValueError('Window ownership does not cover the original polygon exactly')
|
||||
fractions = {k: v/area for k, v in areas.items()} if area else {}
|
||||
measured = sum(fractions.get(k, 0.) for k in ['paint-supported', 'mixed-paint', 'weak-paint'])
|
||||
return dict(windows=len(rows), measured_fraction=min(1., measured), area_m2=area,
|
||||
area_fractions=fractions, automatic_removal=False)
|
||||
|
||||
|
||||
def inspect(polygon, sample):
|
||||
"""sample returns evidence + tile names; selection never depends on paint score."""
|
||||
rows = []
|
||||
for part in cells(polygon):
|
||||
count = sample_count(part)
|
||||
evidence, names = sample(part) if count else ([], [])
|
||||
rows.append(dict(bounds_xy=list(part.bounds), area_m2=part.area,
|
||||
samples=count, status=classify(evidence, count),
|
||||
source_tiles=names, evidence=evidence))
|
||||
return summarize(rows, polygon.area), rows
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"schema": "missioncore.offline-plan-bundle/v1",
|
||||
"root": "simulation/urban-plan-research",
|
||||
"files": {
|
||||
"audit_linear_windows.py": "replay/audit_linear_windows.py",
|
||||
"discovery_evidence.py": "marking_pass/discovery_evidence.py",
|
||||
"discovery_rules.py": "marking_pass/discovery_rules.py",
|
||||
"fit_scene.py": "full_plan/fit_scene.py",
|
||||
"interval_profiles.py": "marking_pass/interval_profiles.py",
|
||||
"layer_common.py": "full_plan/layer_common.py",
|
||||
"line_reconstruction.py": "marking_pass/line_reconstruction.py",
|
||||
"linear_coverage_views.py": "replay/linear_coverage_views.py",
|
||||
"linear_window_support.py": "replay/linear_window_support.py",
|
||||
"row_evidence.py": "corridor_pass/row_evidence.py",
|
||||
"row_profiles.py": "rows_pass/row_profiles.py",
|
||||
"search_views.py": "marking_pass/search_views.py"
|
||||
},
|
||||
"source_sha256": {
|
||||
"audit_linear_windows.py": "7104eaabfe4c9301e1d7aeb9eabd7bd4f47a8f6d034ebcffb1d01952cd23bccc",
|
||||
"discovery_evidence.py": "dc7e0594b77f6d3723a965216164427835aa5ae2ff736b5599774c4efbc626eb",
|
||||
"discovery_rules.py": "1ac148d3fd75d443d2bde69e46da775de838c9cb2013570d87c13900f0a1a491",
|
||||
"fit_scene.py": "d130e092d0acad9994da04ca34810beaa8a31c9602d1858cb4d686c240e42ab8",
|
||||
"interval_profiles.py": "6e7dc0e0eb2cc7ed641bd786b283688ecbc831a2b3442f3f6e6c18add0bad345",
|
||||
"layer_common.py": "5e6a2ef463a786b81d387250b2f2be21511f3dae887c8b9ea424051b1722fa59",
|
||||
"line_reconstruction.py": "f89883a1140aca2b78e1567e3361aa69403725d9b384daca6f782951b8920738",
|
||||
"linear_coverage_views.py": "18a4588cf93eba4de76ebbdb7eed42ae2fb26ab459c7dab389ab8549b2fa1ecd",
|
||||
"linear_window_support.py": "e91fe2e84100b785c29d7adff2fa9f2c0afce7cd1fc7212eee887b0449505659",
|
||||
"row_evidence.py": "fec784ab795470d96e48c7022e59d5206b0c07b40d84843cbc058fcc4de896c0",
|
||||
"row_profiles.py": "0b23a93b6de9b2e01efb5ce57085fac0afebcd3df6184e573d6b84793e0128df",
|
||||
"search_views.py": "8a123558dbef184fc85a92c9547c19644d14681329dbbd0cfeac0032bbd102be"
|
||||
},
|
||||
"source_snapshot": "bc69511b407282628a10cae69d70416fa618fbf824f0cee57f10addf87ae6999",
|
||||
"entrypoint": "audit_linear_windows.py",
|
||||
"runtime_image": "sha256:925b093545e15c270d95d4076139ad8ed48e790eccd9434a58495d58c97671d0"
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"source": "GOST R 51256-2018 figure B.6",
|
||||
"construction": "fixed cubic Bezier vectorization of published grid",
|
||||
"standard_compliance": "not_assessed",
|
||||
"profiles": {
|
||||
"short": {
|
||||
"outer": [
|
||||
[
|
||||
0,
|
||||
0.14
|
||||
],
|
||||
[
|
||||
1.8,
|
||||
0.14
|
||||
],
|
||||
[
|
||||
3.1,
|
||||
0.1
|
||||
],
|
||||
[
|
||||
3.56,
|
||||
-0.33
|
||||
]
|
||||
],
|
||||
"head": [
|
||||
[
|
||||
3.79,
|
||||
-0.16
|
||||
],
|
||||
[
|
||||
5.0,
|
||||
-0.99
|
||||
],
|
||||
[
|
||||
3.05,
|
||||
-0.7
|
||||
],
|
||||
[
|
||||
3.29,
|
||||
-0.5
|
||||
]
|
||||
],
|
||||
"inner": [
|
||||
[
|
||||
3.29,
|
||||
-0.5
|
||||
],
|
||||
[
|
||||
2.9,
|
||||
-0.2
|
||||
],
|
||||
[
|
||||
1.65,
|
||||
-0.14
|
||||
],
|
||||
[
|
||||
0,
|
||||
-0.14
|
||||
]
|
||||
]
|
||||
},
|
||||
"long": {
|
||||
"outer": [
|
||||
[
|
||||
0,
|
||||
0.14
|
||||
],
|
||||
[
|
||||
3.0,
|
||||
0.14
|
||||
],
|
||||
[
|
||||
4.85,
|
||||
-0.03
|
||||
],
|
||||
[
|
||||
5.3,
|
||||
-0.33
|
||||
]
|
||||
],
|
||||
"head": [
|
||||
[
|
||||
5.7,
|
||||
-0.16
|
||||
],
|
||||
[
|
||||
7.5,
|
||||
-1.01
|
||||
],
|
||||
[
|
||||
4.6,
|
||||
-0.71
|
||||
],
|
||||
[
|
||||
4.98,
|
||||
-0.53
|
||||
]
|
||||
],
|
||||
"inner": [
|
||||
[
|
||||
4.98,
|
||||
-0.53
|
||||
],
|
||||
[
|
||||
4.55,
|
||||
-0.23
|
||||
],
|
||||
[
|
||||
2.65,
|
||||
-0.14
|
||||
],
|
||||
[
|
||||
0,
|
||||
-0.14
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
"""Bounded OpenCV ECC registration of a complete existing glyph to Gaussian paint.
|
||||
|
||||
Metric grids use pixel centres consistently. No image-derived vertex tracing and
|
||||
no scene-specific parameters. ECC and a bounded catalog fit propose whole glyph geometry;
|
||||
undilated overlap and contour residuals independently decide acceptance.
|
||||
"""
|
||||
import cv2
|
||||
import numpy as np
|
||||
import shapely
|
||||
from shapely.affinity import affine_transform
|
||||
from fit_scene import project
|
||||
from layer_common import sample
|
||||
from row_evidence import choose_owners
|
||||
from component_surface import planar_vehicle_clearance
|
||||
from paint_channels import paint_mask
|
||||
|
||||
CELL = .025
|
||||
POLICY = dict(cell_m=CELL, context_m=1.2, max_displacement_m=.60,
|
||||
min_scale=.85, max_scale=1.15, max_rotation_deg=8.,
|
||||
min_iou=.65, min_iou_gain=.025, max_boundary_mean_m=.075,
|
||||
max_boundary_p90_m=.15, max_endpoint_error_m=.12, min_valid=.97,
|
||||
secondary_iou_tolerance=.01, point_cloud_input=False,
|
||||
manual_rois=[], template_fit=dict(translation_m=.4,rotation_rad=.14,length_scale=[.85,1.15],width_scale=[.8,1.2],head_knot=[.45,.85],branch_station=[-.15,.15],branch_skew=[-.8,.8],branch_longitudinal_scale=[.65,1.8],seed=2026), registration='OpenCV ECC and joint-view constrained catalog registration', fit_views=2, endpoint_optimization_margin_m=.03)
|
||||
VERSION = 'joint-view-registered-glyph-v5'
|
||||
|
||||
def raster(poly, points, size):
|
||||
return shapely.contains_xy(poly, points[:, 0], points[:, 1]).reshape(size)
|
||||
|
||||
def grids(poly, views, surface_classes=(1,), object_region=None):
|
||||
lo=np.asarray(poly.bounds[:2])-POLICY['context_m']; hi=np.asarray(poly.bounds[2:])+POLICY['context_m']
|
||||
xx=np.arange(lo[0],hi[0],CELL); yy=np.arange(lo[1],hi[1],CELL)
|
||||
x,y=np.meshgrid(xx,yy); points=np.c_[x.ravel(),y.ravel()]; size=x.shape
|
||||
distances=np.linalg.norm(points[:,None,:]-views.centers[None,:,:],axis=2)
|
||||
coverage=np.zeros(distances.shape,bool)
|
||||
for i,t in enumerate(views.tiles):
|
||||
uv=project(points,views.geometry(t['id'])); coverage[:,i]=(uv.min(1)>=20)&(uv.max(1)<1180)
|
||||
owners=choose_owners(distances,coverage); planar=planar_vehicle_clearance(points,views)
|
||||
result=[]
|
||||
for rank in [0,1]:
|
||||
rgb=np.zeros((len(points),3),'uint8'); allowed=np.zeros(len(points),bool); observed=owners[:,rank]>=0; names=[]
|
||||
for i in np.unique(owners[:,rank]):
|
||||
if i<0: continue
|
||||
ix=np.flatnonzero(owners[:,rank]==i); name=views.tiles[i]['id']; names.append(name)
|
||||
g=views.geometry(name); raw,vehicle=views.inputs(name); uv=project(points[ix],g).astype('float32')
|
||||
native=(uv+.5)*np.array([raw.shape[1],raw.shape[0]])/1200-.5
|
||||
def read(a,coords):
|
||||
return np.concatenate([cv2.remap(a,v[:,0,None],v[:,1,None],cv2.INTER_LINEAR).reshape(len(v),-1)for v in np.array_split(coords,max(1,int(np.ceil(len(coords)/20000))))])
|
||||
rgb[ix]=read(raw,native.astype('float32'))
|
||||
allowed[ix]=(read(g['alpha'].astype('float32'),uv).ravel()>=.65)&((read(vehicle,uv).ravel()<.2)|planar[ix])&np.isin(sample(views.labels,points[ix],views.low,views.high),surface_classes)
|
||||
rgb=rgb.reshape(*size,3); allowed=allowed.reshape(size); observed=observed.reshape(size)
|
||||
paint=paint_mask(rgb,cell=CELL,observed=observed,calibration=allowed)
|
||||
target=raster(poly,points,size); limit=raster(poly.buffer(.60),points,size)
|
||||
closed=cv2.morphologyEx((paint&allowed).astype('uint8'),cv2.MORPH_CLOSE,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(3,3)))
|
||||
n,labels=cv2.connectedComponents(closed,8); selected=[]
|
||||
for k in range(1,n):
|
||||
c=labels==k
|
||||
if (c&target).sum()*CELL**2>=.03 and (c&limit).sum()/c.sum()>=.85:
|
||||
selected.append(k)
|
||||
selected=np.isin(labels,selected)&paint&allowed
|
||||
if object_region is not None:
|
||||
# SAM's whole-object region is independent of the fitted catalog.
|
||||
# It isolates original paint when road texture connects to a glyph.
|
||||
selected=paint&allowed&raster(object_region.buffer(.20),points,size)
|
||||
result.append(dict(rgb=rgb,paint=paint,target=selected,allowed=allowed,observed=observed,names=names))
|
||||
return dict(lo=lo,points=points,size=size,views=result)
|
||||
|
||||
def metrics(poly,grid,view):
|
||||
mask=raster(poly,grid['points'],grid['size']); valid=view['observed']&view['allowed']; paint=view['target']
|
||||
axis=np.array([np.cos(grid.get('angle',0.)),np.sin(grid.get('angle',0.))]);dots=grid['points']@axis
|
||||
ends=np.quantile(dots[(paint&valid).ravel()],[.002,.998])if (paint&valid).any()else np.array([1e6,1e6]);md=dots[mask.ravel()];endpoint=float(max(abs(np.array([md.min(),md.max()])-ends)))if len(md)else 1e6
|
||||
endpoint_xy=1e6
|
||||
if len(md) and (paint&valid).any():
|
||||
maskflat=mask.ravel();ink=(paint&valid).ravel();base_ends=np.array([md.min(),md.max()])
|
||||
def xyends(select,ends):
|
||||
return np.stack([grid['points'][select&(dots<=ends[0]+.04)].mean(0),grid['points'][select&(dots>=ends[1]-.04)].mean(0)])
|
||||
endpoint_xy=float(np.linalg.norm(xyends(maskflat,base_ends)-xyends(ink,ends),axis=1).max())
|
||||
denom=max(int(mask.sum()),1); c=float((mask&view['observed']).sum()/denom)
|
||||
inter=(mask&paint&valid).sum(); union=((mask|paint)&valid).sum()
|
||||
edge=lambda m:m&~(cv2.erode(m.astype('uint8'),np.ones((3,3),'uint8'))>0)
|
||||
e1=edge(mask)&valid; e2=edge(paint)&valid
|
||||
if e1.any()and e2.any():
|
||||
dt=cv2.distanceTransform((~e2).astype('uint8'),cv2.DIST_L2,cv2.DIST_MASK_PRECISE)*CELL
|
||||
dist=dt[e1]; mean=float(dist.mean()); p90=float(np.quantile(dist,.90))
|
||||
else: mean=p90=1e6
|
||||
return dict(endpoint_xy_error_m=endpoint_xy,endpoint_error_m=endpoint,coverage=c,valid=float((mask&valid).sum()/denom),iou=float(inter/max(union,1)),boundary_mean_m=mean,boundary_p90_m=p90,
|
||||
direct_support=float(inter/max((mask&valid).sum(),1)),paint_pixels=int(paint.sum()))
|
||||
|
||||
def transform_polygon(poly, matrix):
|
||||
from shapely.ops import transform
|
||||
h=np.asarray(matrix)
|
||||
def projective(x,y,z=None):
|
||||
a=np.c_[x,y,np.ones(len(x))]@h.T
|
||||
return a[:,0]/a[:,2],a[:,1]/a[:,2]
|
||||
return transform(projective,poly)
|
||||
|
||||
def propose(poly,grid,kind=None,parameters=None):
|
||||
mask=raster(poly,grid['points'],grid['size']).astype('float32'); target=grid['views'][0]['target'].astype('float32')
|
||||
if not target.any():return None
|
||||
candidates=[]
|
||||
for motion in [cv2.MOTION_AFFINE,cv2.MOTION_HOMOGRAPHY]:
|
||||
try:
|
||||
corr,w=cv2.findTransformECC(mask,target,np.eye(3,dtype='float32')if motion==cv2.MOTION_HOMOGRAPHY else np.eye(2,3,dtype='float32'),motion,
|
||||
(cv2.TERM_CRITERIA_COUNT|cv2.TERM_CRITERIA_EPS,300,1e-6),None,5)
|
||||
except cv2.error:continue
|
||||
if w.shape==(2,3):w=np.vstack([w,[0,0,1]])
|
||||
pixel_to_world=np.array([[CELL,0,grid['lo'][0]],[0,CELL,grid['lo'][1]],[0,0,1]])
|
||||
matrix=pixel_to_world@w@np.linalg.inv(pixel_to_world);matrix/=matrix[2,2]
|
||||
coords=shapely.get_coordinates(poly);hom=np.c_[coords,np.ones(len(coords))]@matrix.T
|
||||
if np.min(abs(hom[:,2]))<1e-5:continue
|
||||
moved=hom[:,:2]/hom[:,2,None];displacement=float(np.linalg.norm(moved-coords,axis=1).max())
|
||||
j=(matrix[:2,:2][None,:,:]-moved[:,:,None]*matrix[2,:2][None,None,:])/hom[:,2,None,None]
|
||||
singular=np.linalg.svd(j,compute_uv=False);angles=np.rad2deg(np.arctan2(j[:,1,0]-j[:,0,1],j[:,0,0]+j[:,1,1]))
|
||||
bounds_ok=np.all(np.linalg.det(j)>0)and singular.min()>=POLICY['min_scale']and singular.max()<=POLICY['max_scale']and max(abs(angles))<=POLICY['max_rotation_deg']and displacement<=POLICY['max_displacement_m']
|
||||
q=transform_polygon(poly,matrix)
|
||||
evidence=metrics(q,grid,grid['views'][0])
|
||||
candidates.append(dict(polygon=q,matrix=matrix.tolist(),motion='homography'if motion==cv2.MOTION_HOMOGRAPHY else'affine',correlation=float(corr),singular_values=[float(singular.min()),float(singular.max())],rotation_deg=float(max(abs(angles))),max_displacement_m=displacement,bounds_ok=bool(bounds_ok),candidate_metric=evidence))
|
||||
if kind and parameters:
|
||||
from registered_template import fit
|
||||
q,p,score=fit(kind,parameters,grid,CELL)
|
||||
delta=float(q.hausdorff_distance(poly))
|
||||
candidates.append(dict(polygon=q,matrix=None,motion='parametric-catalog',parameters=p,kind=kind,correlation=score,max_displacement_m=delta,bounds_ok=bool(q.is_valid and q.geom_type=='Polygon' and delta<=POLICY['max_displacement_m']),candidate_metric=metrics(q,grid,grid['views'][0])))
|
||||
if not candidates:return None
|
||||
legal=[v for v in candidates if v['bounds_ok']]or candidates
|
||||
before=[metrics(poly,grid,v)for v in grid['views']]
|
||||
passing=[v for v in legal if accept(before,[metrics(v['polygon'],grid,w)for w in grid['views']],v)]
|
||||
best=max(passing or legal,key=lambda v:v['candidate_metric']['iou']-.5*v['candidate_metric']['boundary_mean_m']-.3*v['candidate_metric']['endpoint_error_m']);best['alternatives']=[{k:v for k,v in t.items()if k!='polygon'}for t in candidates];return best
|
||||
|
||||
def accept(before,after,proposal):
|
||||
if proposal is None or not proposal['bounds_ok']:return False
|
||||
p=after[0]; b=before[0]
|
||||
if p['endpoint_error_m']>POLICY['max_endpoint_error_m']:return False
|
||||
if p['coverage']<1. or p['valid']<POLICY['min_valid']:return False
|
||||
if p['iou']<POLICY['min_iou']or p['iou']-b['iou']<POLICY['min_iou_gain']:return False
|
||||
if p['boundary_mean_m']>POLICY['max_boundary_mean_m']or p['boundary_p90_m']>POLICY['max_boundary_p90_m']:return False
|
||||
if p['boundary_mean_m']>b['boundary_mean_m']+.002:return False
|
||||
b,p=before[1],after[1]
|
||||
if p['coverage']>=.95:
|
||||
if p['endpoint_error_m']>POLICY['max_endpoint_error_m']+.04:return False
|
||||
if p['valid']/max(p['coverage'],1e-9)<POLICY['min_valid']:return False
|
||||
if p['iou']<b['iou']-POLICY['secondary_iou_tolerance']:return False
|
||||
if p['boundary_mean_m']>POLICY['max_boundary_mean_m']or p['boundary_p90_m']>POLICY['max_boundary_p90_m']:return False
|
||||
return True
|
||||
@@ -0,0 +1,25 @@
|
||||
"""Adapt all missing-window footprints to the existing automatic coverage planner."""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from coverage_plan import plan_centers, POLICY
|
||||
|
||||
raw = Path('/window-audit.json').read_bytes()
|
||||
audit = json.loads(raw)
|
||||
records = []
|
||||
for row in audit['rows']:
|
||||
for window in row['windows']:
|
||||
if window['status'] != 'missing-two-view-coverage':
|
||||
continue
|
||||
x0, y0, x1, y1 = window['bounds_xy']
|
||||
records.append(dict(feature_id=row['id'], center_xy=[(x0+x1)/2, (y0+y1)/2],
|
||||
reason='two-render-footprint-unavailable',
|
||||
# Planner request, not a claim that all views were invisible.
|
||||
views=[dict(gates=dict(coverage=0.))]))
|
||||
plan = plan_centers(records)
|
||||
Path('/out/corridor-census.json').write_text(json.dumps(dict(
|
||||
source_audit_sha256=hashlib.sha256(raw).hexdigest(), records=records,
|
||||
planner='existing-coverage-plan', policy=POLICY, selected_centers=plan,
|
||||
manual_regions=[], thresholds_changed=False), indent=2))
|
||||
print(json.dumps(dict(missing_windows=len(records), render_tiles=len(plan))), flush=True)
|
||||
@@ -0,0 +1,83 @@
|
||||
"""Bootstrap the existing Gaussian orthophoto adapter from original scan poses.
|
||||
|
||||
Uniform 40 m grid with 10 m overlap, within 20 m of the scanner path. Gaussian
|
||||
RGB/expected depth supplies the terrain samples. No collider or point cloud.
|
||||
The broad scanner-relative cut is only a bootstrap; ortho_terrain performs the
|
||||
existing independent height/frame admission before the production observation.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json, math, time, gc
|
||||
import numpy as np
|
||||
import torch
|
||||
from scipy.spatial import cKDTree
|
||||
from plyfile import PlyData
|
||||
from PIL import Image
|
||||
from gsplat import rasterization
|
||||
from mapping import camera, digest
|
||||
from coordinate_cache import transformed
|
||||
from survey_grid import corridor_cells
|
||||
|
||||
R=Path('/blind'); S=Path('/base_survey'); S.mkdir(exist_ok=True)
|
||||
request=json.loads((R/'request.json').read_text())
|
||||
pose_path=R/'poses.json'
|
||||
poses=np.asarray([p['T']for p in json.loads(pose_path.read_text())['poses']],float)
|
||||
assert poses.ndim==2 and poses.shape[1]==3 and np.isfinite(poses).all()
|
||||
source=Path('/input')/request['source']['ply']
|
||||
assert digest(source)==request['source']['sha256']
|
||||
T=np.asarray(request['source']['source_to_world'],float)
|
||||
data=PlyData.read(source,mmap='r')['vertex'].data
|
||||
assert all(n in data.dtype.names for n in ['opacity','rot_0','scale_0','f_dc_0'])
|
||||
world=transformed(data,T,str(source),proof_path=S/'coordinate-cache-proof.json')
|
||||
tree=cKDTree(poses[:,:2]); relative=np.empty(len(data),np.float32);distance=relative.copy()
|
||||
for begin in range(0,len(data),250000):
|
||||
p=world[begin:begin+250000];dd,ix=tree.query(p[:,:2]);distance[begin:begin+len(p)]=dd
|
||||
relative[begin:begin+len(p)]=p[:,2]-poses[ix,2]
|
||||
origin=np.floor((poses[:,:2].min(0)-20)/40)*40
|
||||
extent=np.ceil((poses[:,:2].max(0)+20-origin)/40).astype(int)
|
||||
cells=corridor_cells(poses[:,:2],origin,extent)
|
||||
tiles=[];start=time.monotonic()
|
||||
rest=sorted([n for n in data.dtype.names if n.startswith('f_rest_')],key=lambda n:int(n.split('_')[-1]))
|
||||
for ix,iy in cells:
|
||||
lo=origin+np.array([ix,iy])*40;hi=lo+40;centre=(lo+hi)/2
|
||||
close=np.linalg.norm(np.maximum(np.maximum(lo-poses[:,:2],poses[:,:2]-hi),0),axis=1)<=20
|
||||
if not close.any():continue
|
||||
bounds=np.array([lo-10,hi+10]);name=f'tile-{ix:03d}-{iy:03d}'
|
||||
mask=((world[:,:2]>=bounds[0]-10)&(world[:,:2]<=bounds[1]+10)).all(1)
|
||||
mask&=(distance<=30)&(relative>=-3.0)&(relative<=.25)
|
||||
d=data[mask].copy()
|
||||
if len(d)<100:continue
|
||||
top_z=float(poses[close,2].max()+25)
|
||||
spec=dict(id='top',projection='ortho',size=[600,600],width_m=60,
|
||||
eye=[*centre,top_z],target=[*centre,top_z-1],up=[0,1,0])
|
||||
def tensor(names):return torch.tensor(np.column_stack([d[n]for n in names]),device='cuda',dtype=torch.float32)
|
||||
means=tensor(['x','y','z']);quats=tensor([f'rot_{i}'for i in range(4)])
|
||||
scales=tensor([f'scale_{i}'for i in range(3)]).exp();opacity=tensor(['opacity']).squeeze(-1).sigmoid()
|
||||
dc=tensor([f'f_dc_{i}'for i in range(3)])[:,None,:]
|
||||
sh=torch.cat([dc,tensor(rest).reshape(len(d),3,-1).transpose(1,2)],dim=1)if rest else dc
|
||||
view,k=camera(spec)
|
||||
with torch.inference_mode():
|
||||
rgbd,aa,_=rasterization(means,quats,scales,opacity,sh,
|
||||
torch.tensor(view@T,device='cuda',dtype=torch.float32)[None],torch.tensor(k,device='cuda')[None],
|
||||
600,600,sh_degree=int(math.sqrt(sh.shape[1]))-1,camera_model='ortho',render_mode='RGB+ED',packed=True)
|
||||
rgbd=rgbd[0].cpu().numpy();aa=aa[0,:,:,0].cpu().numpy()
|
||||
z=np.where(aa>.8,view[2,3]-rgbd[:,:,3],np.nan)
|
||||
if np.isfinite(z).sum()<100:
|
||||
del means,quats,scales,opacity,dc,sh,rgbd,aa,d;gc.collect();torch.cuda.empty_cache();continue
|
||||
folder=S/name;folder.mkdir(exist_ok=True)
|
||||
rgbd[:,:,:3]+=1-aa[:,:,None]
|
||||
Image.fromarray(np.uint8(np.clip(rgbd[:,:,:3],0,1)*255)).save(folder/'bootstrap.png')
|
||||
np.savez_compressed(folder/'surface-atlas.npz',z=z.astype(np.float32),bounds=bounds,cell_m=.1)
|
||||
spec['size']=[1200,1200]
|
||||
job=dict(schema_version='missioncore.urban-mapping-job/v1',source=request['source'],bounds_xy=bounds.tolist(),views=[spec])
|
||||
(folder/'job.json').write_text(json.dumps(job))
|
||||
tiles.append(dict(id=name,status='surveyed',core_bounds=[lo.tolist(),hi.tolist()],bounds_xy=bounds.tolist()))
|
||||
print(json.dumps(dict(stage='pose-survey',tiles=len(tiles),name=name,ground_pixels=int(np.isfinite(z).sum()))),flush=True)
|
||||
del means,quats,scales,opacity,dc,sh,rgbd,aa,d;gc.collect();torch.cuda.empty_cache()
|
||||
if not tiles:raise ValueError('No Gaussian ground supports the native trajectory frame')
|
||||
(S/'tile-index.json').write_text(json.dumps(dict(tiles=tiles,bounds_xy=[poses[:,:2].min(0).tolist(),poses[:,:2].max(0).tolist()])))
|
||||
(S/'request.json').write_text(json.dumps(request))
|
||||
(S/'bootstrap-report.json').write_text(json.dumps(dict(tiles=len(tiles),poses=len(poses),seconds=time.monotonic()-start,
|
||||
source_sha256=digest(source),poses_sha256=digest(pose_path),manual_rois=[],
|
||||
surface_source='Gaussian expected depth only; broad scanner-relative pre-cut [-3,+.25]m',
|
||||
camera_planning='uniform 40m grid / 10m halo within 20m of original scanner positions',
|
||||
frame_admission='pending existing ortho_terrain validation'),indent=2))
|
||||
@@ -0,0 +1,73 @@
|
||||
"""Coarse OpenCV catalog matching precedes expensive semantic classification.
|
||||
|
||||
This is proposal recall only (.55); final registration still requires .80 and
|
||||
independent paint evidence. Previously recognized semantic bicycle seeds always
|
||||
reach refinement. No map name, coordinates, or feature IDs select candidates.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from component_targets import vector
|
||||
from compact_bicycle import fit_bicycle
|
||||
|
||||
out = Path('/out')
|
||||
path = out/'symbol-patches.json'
|
||||
raw = path.read_bytes(); doc = json.loads(raw)
|
||||
kept, rows = [], []
|
||||
cv2.setNumThreads(2)
|
||||
# A topology seed can win spatial deduplication over a semantic seed at the
|
||||
# same position. Recover this provenance from the immutable cached masks.
|
||||
cached = Path('/symbolplan')
|
||||
cached_raw = cached/'symbol-patches.json'
|
||||
cached_patches = {p['id']:p for p in json.loads(cached_raw.read_text())['patches']}
|
||||
semantics = json.loads((cached/'symbol-semantics.json').read_text())
|
||||
assert semantics['patch_manifest_sha256'] == hashlib.sha256(cached_raw.read_bytes()).hexdigest()
|
||||
semantic_centers = []
|
||||
for rec in semantics['records']:
|
||||
if 0 not in rec.get('classes',[]):continue
|
||||
masks_file = cached/'symbol-masks'/(rec['id']+'.npz')
|
||||
assert hashlib.sha256(masks_file.read_bytes()).hexdigest() == rec['sha256']
|
||||
with np.load(masks_file) as z:
|
||||
for mask,score,cls in zip(z['masks'],z['scores'],z['classes']):
|
||||
if cls != 0 or score < .30:continue
|
||||
region = vector(mask,cached_patches[rec['id']])
|
||||
if not region.is_empty:semantic_centers.append(np.asarray(region.centroid.coords[0]))
|
||||
for patch in doc['patches']:
|
||||
center = np.mean(patch['world_corners'],axis=0)
|
||||
if patch['proposal']['source'] == 'recentered-semantic' or any(np.linalg.norm(center-c)<.8 for c in semantic_centers):
|
||||
kept.append(patch); rows.append(dict(id=patch['id'],reason='semantic-seed'))
|
||||
continue
|
||||
image = np.asarray(Image.open(out/'symbol-patches'/(patch['id']+'.png')).convert('RGB'))
|
||||
gray = cv2.cvtColor(image,cv2.COLOR_RGB2GRAY); hsv = cv2.cvtColor(image,cv2.COLOR_RGB2HSV)
|
||||
cell = patch['mpp']; k = max(3,round(.72/cell)//2*2+1)
|
||||
ridge = cv2.morphologyEx(gray,cv2.MORPH_TOPHAT,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
paint = ((ridge>12)&(gray>100)&(hsv[:,:,1]<100)).astype('uint8')
|
||||
best = 0.
|
||||
for closing in [.04,.08]:
|
||||
k = max(3,round(2*closing/cell)//2*2+1)
|
||||
grouped = cv2.morphologyEx(paint,cv2.MORPH_CLOSE,cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(k,k)))
|
||||
count, labels, stats, centers = cv2.connectedComponentsWithStats(grouped,8)
|
||||
for index in range(1,count):
|
||||
x,y,w,h,area = stats[index]
|
||||
if min(w,h)*cell<.25 or max(w,h)*cell>2.6 or area*cell**2<.025:
|
||||
continue
|
||||
if np.linalg.norm(centers[index]-np.array([image.shape[1],image.shape[0]])/2)*cell>.7:
|
||||
continue
|
||||
selected = (labels==index)&(paint>0)
|
||||
target = vector(selected,patch)
|
||||
score = fit_bicycle(target,proposal_only=True) or 0.
|
||||
best = max(best,score)
|
||||
if best>=.55:break
|
||||
if best>=.55:break
|
||||
accepted = best>=.55
|
||||
if accepted:kept.append(patch)
|
||||
rows.append(dict(id=patch['id'],seed_fit_score=best,selected=accepted))
|
||||
if len(rows)%100==0:print('SHAPE',len(rows),'/',len(doc['patches']),'KEPT',len(kept),flush=True)
|
||||
(out/'context-symbol-patches.json').write_bytes(raw)
|
||||
doc['patches'] = kept
|
||||
doc['shape_proposal_filter'] = dict(source_sha256=hashlib.sha256(raw).hexdigest(),threshold=.55,rows=rows)
|
||||
path.write_text(json.dumps(doc,indent=2))
|
||||
print('SHAPE PREFILTER',len(kept),'of',len(rows),flush=True)
|
||||
@@ -0,0 +1,33 @@
|
||||
"""Cheap necessary lane-context bound before expensive semantic inference.
|
||||
|
||||
The final context gate requires six metres of nearby thin strips. Even summing
|
||||
all strips (including duplicate views and incompatible directions) must reach
|
||||
that length. This is an upper bound, never new positive evidence.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
from shapely.geometry import Polygon
|
||||
from discovery_rules import unpack
|
||||
from catalog_rules import POLICY
|
||||
|
||||
out = Path('/out')
|
||||
path = out/'symbol-patches.json'
|
||||
original = path.read_bytes()
|
||||
doc = json.loads(original)
|
||||
lines = [unpack(r) for r in json.loads(Path('/searchplan/search-proposals.json').read_text())['lines']]
|
||||
kept, excluded = [], []
|
||||
for patch in doc['patches']:
|
||||
footprint = Polygon(patch['world_corners']).buffer(.8)
|
||||
maximum = sum(r['L'] for r in lines if r['W'] <= .35 and
|
||||
r['polygon'].distance(footprint) < POLICY['bicycle_context_radius_m'])
|
||||
if maximum >= POLICY['bicycle_context_length_m']:
|
||||
kept.append(patch)
|
||||
else:
|
||||
excluded.append(dict(id=patch['id'], context_upper_bound_m=maximum))
|
||||
(out/'all-symbol-patches.json').write_bytes(original)
|
||||
doc['patches'] = kept
|
||||
doc['necessary_context_filter'] = dict(source_sha256=hashlib.sha256(original).hexdigest(),
|
||||
excluded=excluded, acceptance_rule_changed=False)
|
||||
path.write_text(json.dumps(doc, indent=2))
|
||||
print('CONTEXT PREFILTER', len(kept), 'of', len(kept)+len(excluded), flush=True)
|
||||
@@ -0,0 +1,132 @@
|
||||
"""Native paint topology proposes compact symbols on every surveyed pavement.
|
||||
|
||||
OpenCV connected components with two enclosed regions propose bicycles; SAM
|
||||
and full preset checks must still establish identity. Existing semantic bicycle
|
||||
proposals are recentered so patch boundaries cannot truncate a second attempt.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
import shapely
|
||||
from shapely.geometry import shape
|
||||
from component_targets import vector
|
||||
from fit_scene import project, world
|
||||
from layer_common import sample
|
||||
from search_views import SearchViews
|
||||
|
||||
start = time.monotonic()
|
||||
cv2.setNumThreads(2)
|
||||
out = Path('/out')
|
||||
sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
baseline = Path('/fullplan/full-map.json')
|
||||
old = json.loads(baseline.read_text())
|
||||
represented = shapely.union_all([shapely.force_2d(shape(f['geometry'])).convex_hull
|
||||
for f in old['features'] if f['properties'].get('subtype') == 'bicycle'])
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels = z['labels']; low, high = z['bounds']
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']
|
||||
if t['status'] == 'surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
proposals, reports = [], []
|
||||
for tile in ([]if os.environ.get('COMPACT_PROPOSAL_MODE')=='semantic-only'else views.tiles):
|
||||
name = tile['id']; geometry = views.geometry(name)
|
||||
rgb, vehicle = views.inputs(name)
|
||||
size = rgb.shape[0]; cell = 60 / size
|
||||
yy, xx = np.mgrid[:1200, :1200]
|
||||
xy = world(np.c_[xx.ravel(), yy.ravel()], geometry)
|
||||
paved = np.isin(sample(labels, xy, low, high), [1, 2]).reshape(1200, 1200)
|
||||
known = paved & (geometry['alpha'] >= .8) & (vehicle < .2)
|
||||
known = cv2.resize(known.astype('uint8'), (size, size), interpolation=cv2.INTER_NEAREST) > 0
|
||||
gray = cv2.cvtColor(rgb, cv2.COLOR_RGB2GRAY)
|
||||
hsv = cv2.cvtColor(rgb, cv2.COLOR_RGB2HSV)
|
||||
k = max(3, round(.72 / cell) // 2 * 2 + 1)
|
||||
ridge = cv2.morphologyEx(gray, cv2.MORPH_TOPHAT,
|
||||
cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (k, k)))
|
||||
paint = (known & (ridge > 12) & (gray > 100) & (hsv[:, :, 1] < 100)).astype('uint8')
|
||||
count = 0
|
||||
for closing_m in [0., .04, .08]:
|
||||
radius = max(1, round(closing_m / cell))
|
||||
binary = cv2.morphologyEx(paint, cv2.MORPH_CLOSE,
|
||||
cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (2*radius+1, 2*radius+1))) if closing_m else paint
|
||||
contours, hierarchy = cv2.findContours(binary, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE)
|
||||
if hierarchy is None:
|
||||
continue
|
||||
for i, contour in enumerate(contours):
|
||||
if hierarchy[0, i, 3] >= 0 or len(contour) < 4:
|
||||
continue
|
||||
rect = cv2.minAreaRect(contour)
|
||||
length, width = sorted(np.asarray(rect[1])*cell, reverse=True)
|
||||
if not (.35 < length < 2.5 and .25 < width < 1.7):
|
||||
continue
|
||||
holes = 0; j = hierarchy[0, i, 2]
|
||||
while j >= 0:
|
||||
holes += cv2.contourArea(contours[j]) >= 9
|
||||
j = hierarchy[0, j, 0]
|
||||
if holes < 2:
|
||||
continue
|
||||
center = world((np.asarray(rect[0])[None, :]+.5)*1200/size-.5, geometry)[0]
|
||||
if shapely.intersects_xy(represented.buffer(.25), *center):
|
||||
continue
|
||||
proposals.append(dict(center=center.tolist(), source='paint-topology', seed_tile=name))
|
||||
count += 1
|
||||
reports.append(dict(tile=name, candidates=count))
|
||||
print('TILE', name, 'CANDIDATES', count, flush=True)
|
||||
|
||||
cached = Path('/symbolplan')
|
||||
patch_raw = cached/'symbol-patches.json'
|
||||
cached_patches = {p['id']:p for p in json.loads(patch_raw.read_text())['patches']}
|
||||
semantics = json.loads((cached/'symbol-semantics.json').read_text())
|
||||
assert semantics['patch_manifest_sha256'] == sha(patch_raw)
|
||||
for rec in semantics['records']:
|
||||
if 0 not in rec.get('classes', []):
|
||||
continue
|
||||
path = cached/'symbol-masks'/(rec['id']+'.npz')
|
||||
assert sha(path) == rec['sha256']
|
||||
with np.load(path) as z:
|
||||
for mask, score, cls in zip(z['masks'], z['scores'], z['classes']):
|
||||
if cls != 0 or score < .30:
|
||||
continue
|
||||
region = vector(mask, cached_patches[rec['id']])
|
||||
if region.is_empty or region.intersection(represented).area/max(region.area, 1e-9) > .5:
|
||||
continue
|
||||
proposals.append(dict(center=list(region.centroid.coords[0]), source='recentered-semantic', seed_tile=cached_patches[rec['id']]['source_tile']))
|
||||
|
||||
centers, patches = [], []
|
||||
folder = out/'symbol-patches'; folder.mkdir(exist_ok=True)
|
||||
for seed in sorted(proposals, key=lambda s:(s['center'][0],s['center'][1],s['source'])):
|
||||
center = np.asarray(seed['center'])
|
||||
if any(np.linalg.norm(center-c) < .65 for c in centers):
|
||||
continue
|
||||
width = 3.
|
||||
selected = None
|
||||
for index in np.argsort(np.linalg.norm(views.centers-center, axis=1)):
|
||||
name = views.tiles[index]['id']; geometry = views.geometry(name)
|
||||
uv = project(center[None, :], geometry)[0]
|
||||
if np.all(uv-width*10 >= 10) and np.all(uv+width*10 < 1190):
|
||||
selected = (name, geometry, uv)
|
||||
break
|
||||
if selected is None:
|
||||
continue
|
||||
name, geometry, uv = selected
|
||||
rgb, _ = views.inputs(name); size = rgb.shape[0]
|
||||
native = (uv+.5)*size/1200-.5; half = width*size/120
|
||||
x0, y0 = np.floor(native-half).astype(int)
|
||||
x1, y1 = np.ceil(native+half).astype(int)
|
||||
crop = rgb[y0:y1, x0:x1]
|
||||
pid = f'compact-{len(patches):04d}'; path = folder/(pid+'.png')
|
||||
Image.fromarray(crop).save(path)
|
||||
corners = world((np.array([[x0,y0],[x1,y0],[x1,y1],[x0,y1]])+.5)*1200/size-.5, geometry)
|
||||
patches.append(dict(id=pid, source_tile=name, box_native=[int(x0),int(y0),int(x1),int(y1)],
|
||||
native_size=size, world_corners=corners.tolist(), width_px=crop.shape[1], height_px=crop.shape[0],
|
||||
mpp=60/size, sha256=sha(path), proposal=seed))
|
||||
centers.append(center)
|
||||
report = dict(scene=os.environ['SCENE'], patches=patches, tile_reports=reports,
|
||||
baseline_sha256=sha(baseline), cached_patch_sha256=sha(patch_raw), seconds=time.monotonic()-start,
|
||||
manual_rois=[], point_clouds=False, selection=('recentered uniform semantic seeds'if os.environ.get('COMPACT_PROPOSAL_MODE')=='semantic-only'else'all native paved frames; compact paint topology and recentered semantic seeds')+'; nearest covering view')
|
||||
(out/'symbol-patches.json').write_text(json.dumps(report, indent=2))
|
||||
print('PATCHES', len(patches), flush=True)
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Observe all paved grid cells, independent of existing paint candidates.
|
||||
|
||||
Fixed 16 m windows / 8 m stride keep a <=7.5 m symbol whole in at least
|
||||
one interior window. Nearest covering native view supplies unchanged pixels.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json,hashlib,time,os
|
||||
import numpy as np,cv2
|
||||
from PIL import Image
|
||||
from scipy.ndimage import map_coordinates
|
||||
from search_views import SearchViews
|
||||
from fit_scene import project,world
|
||||
|
||||
VERSION='uniform-paved-symbol-windows-v1'
|
||||
POLICY=dict(window_m=16.,stride_m=8.,min_paved_core_fraction=.03,min_native_margin_px=10)
|
||||
start=time.monotonic();out=Path('/out');cv2.setNumThreads(2)
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels=z['labels'];low,high=z['bounds']
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed']
|
||||
views=SearchViews(tiles,labels,low,high,None);folder=out/'symbol-patches';folder.mkdir(exist_ok=True)
|
||||
cell=(high-low)/np.array(labels.shape[::-1]);paved=(labels==1)|(labels==2)
|
||||
step=POLICY['stride_m'];width=POLICY['window_m'];origin=np.floor(low/step)*step
|
||||
patches=[];skipped=[]
|
||||
# Selection only reads the central assigned grid cell. Window overlap supplies
|
||||
# context, but cannot invent evidence outside the observed paved mask.
|
||||
for ix in range(int(np.ceil((high[0]-origin[0])/step))):
|
||||
for iy in range(int(np.ceil((high[1]-origin[1])/step))):
|
||||
center=origin+(np.array([ix,iy])+.5)*step
|
||||
x0,x1=np.clip(np.rint((center[0]+np.array([-step,step])/2-low[0])/cell[0]).astype(int),0,labels.shape[1])
|
||||
y0,y1=np.clip(np.rint((high[1]-center[1]+np.array([-step,step])/2)/cell[1]).astype(int),0,labels.shape[0])
|
||||
core=paved[y0:y1,x0:x1]
|
||||
if not core.size or core.mean()<POLICY['min_paved_core_fraction']:continue
|
||||
selected=None
|
||||
for k in np.argsort(np.linalg.norm(views.centers-center,axis=1)):
|
||||
name=views.tiles[k]['id'];g=views.geometry(name);uv=project(center[None,:],g)[0];half=width*10
|
||||
if np.all(uv-half>=10)and np.all(uv+half<1190):selected=(name,g,uv);break
|
||||
if selected is None:skipped.append(dict(center=center.tolist(),reason='no-covering-native-view'));continue
|
||||
name,g,uv=selected;rgb,_=views.inputs(name);size=rgb.shape[0];half=width*size/120
|
||||
native=(uv+.5)*size/1200-.5;x0,y0=np.floor(native-half).astype(int);x1,y1=np.ceil(native+half).astype(int)
|
||||
crop=rgb[y0:y1,x0:x1];pid=f'grid-{ix:04d}-{iy:04d}';path=folder/(pid+'.png');Image.fromarray(crop).save(path)
|
||||
corners=np.array([[x0,y0],[x1,y0],[x1,y1],[x0,y1]],float);xy=world((corners+.5)*1200/size-.5,g)
|
||||
patches.append(dict(id=pid,source_tile=name,box_native=[int(x0),int(y0),int(x1),int(y1)],native_size=size,world_corners=xy.tolist(),width_px=crop.shape[1],height_px=crop.shape[0],mpp=60/size,sha256=hashlib.sha256(path.read_bytes()).hexdigest()))
|
||||
if len(patches)%50==0:print('PATCHES',len(patches),flush=True)
|
||||
manifest=dict(scene=os.environ['SCENE'],patches=patches,policy=POLICY,version=VERSION,manual_rois=[],selection='uniform grid over observed paved surface; no paint or existing-object selection',skipped=skipped,seconds=time.monotonic()-start)
|
||||
(out/'symbol-patches.json').write_text(json.dumps(manifest,indent=2));print('PREPARED',len(patches),'SKIPPED',len(skipped),flush=True)
|
||||
@@ -0,0 +1,72 @@
|
||||
from pathlib import Path
|
||||
import json,time,hashlib,os,collections
|
||||
import numpy as np,cv2,shapely
|
||||
from shapely.geometry import shape,mapping
|
||||
from shapely.ops import transform
|
||||
from PIL import Image
|
||||
from layer_common import O,S,sample,parts,feature
|
||||
from search_views import SearchViews
|
||||
from discovery_rules import uncovered,unpack
|
||||
from catalog_context import bicycle_context
|
||||
from compact_mosaics import mosaic_views
|
||||
from compact_bicycle import fit_bicycle
|
||||
from glyph_registration import fit_glyphs
|
||||
from compact_targets import targets
|
||||
from recall_templates import template,KINDS
|
||||
from component_targets import vector
|
||||
from recall_extent import semantic_extent,semantic_recall,EXTENT_POLICY
|
||||
from glyph_rules import VERSION,POLICY,accept_symbol
|
||||
from component_conflicts import symbol_replacements,FRAGMENT_POLICY
|
||||
VERSION='compact-bicycle-catalog-v3'
|
||||
POLICY={**POLICY,'paint_tolerance':'two-native-pixels-bounded-2-to-4cm','evidence_cell_m':.01,'published_artwork_offset_m':0.,'proposal_min_length_m':.35,'publication_enabled':False}
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
start=time.monotonic();cv2.setNumThreads(3);baseline=Path('/fullplan/full-map.json');old=json.loads(baseline.read_text());current={f['id']:f for f in old['features']}
|
||||
I=Path('/symbolplan');patch_file=I/'symbol-patches.json';patch_doc=json.loads(patch_file.read_text());semantic_file=I/'symbol-semantics.json';semantic=json.loads(semantic_file.read_text())
|
||||
assert semantic['patch_manifest_sha256']==sha(patch_file)
|
||||
patches={p['id']:p for p in patch_doc['patches']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels=z['labels'];height=z['z'];low,high=z['bounds']
|
||||
tiles=[t for t in json.loads((S/'tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
lines=[unpack(r)for r in json.loads(Path('/searchplan/search-proposals.json').read_text())['lines']]
|
||||
poly=lambda f:shapely.force_2d(shape(f['geometry']))
|
||||
existing=shapely.union_all([poly(f)for f in old['features']if f['properties']['class']=='road_marking']);transactions=[];diagnostics=[];seen=[]
|
||||
def lift(p):return transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),p)
|
||||
for rec in semantic['records']:
|
||||
if 0 not in rec.get('classes',[]):continue
|
||||
p=patches[rec['id']];path=I/'symbol-patches'/(p['id']+'.png');assert sha(path)==p['sha256'];image=np.asarray(Image.open(path).convert('RGB'));npz=I/'symbol-masks'/(p['id']+'.npz');assert sha(npz)==rec['sha256']
|
||||
with np.load(npz)as z:
|
||||
proposals=targets(image,p,z['masks'],z['scores'],z['classes']);regions={ci:[(i,vector(m,p))for i,(m,score,cls)in enumerate(zip(z['masks'],z['scores'],z['classes']))if cls==ci and score>=(.30 if ci==0 else .50)]for ci in [0,1]}
|
||||
for proposal in proposals:
|
||||
if proposal['ci']!=0:continue
|
||||
target=proposal['target'];region=proposal['region'];ci=proposal['ci'];score=proposal['score'];extent,extent_masks=semantic_extent(region,regions[ci])
|
||||
if target.intersection(existing.buffer(.1)).area/target.area>.50:continue
|
||||
if any(ci==c and target.symmetric_difference(q).area/max(target.area,q.area)<.08 for c,q in seen):continue
|
||||
seen.append((ci,target));diag=dict(patch=p['id'],masks=proposal['masks'],semantic_score=score,semantic_class=ci,target=mapping(target));diagnostics.append(diag)
|
||||
fits=fit_bicycle(target,all_hypotheses=True)or[] if ci==0 else fit_glyphs(target)
|
||||
if ci==0:fits=[dict(f,kind='bicycle')for f in fits]
|
||||
diag['fits']=[{k:v for k,v in f.items()if k!='polygon'}for f in fits];diag['evaluated']=[]
|
||||
for f in fits:
|
||||
kind=f['kind'];q=f['polygon'];complete=semantic_recall(q,extent)
|
||||
f['semantic_recall']=complete
|
||||
assessment=dict(score=f['score'],parameters=f['parameters'],semantic_recall=complete);diag.setdefault('gates',[]).append(assessment)
|
||||
if complete<EXTENT_POLICY['min_semantic_recall']:continue
|
||||
containment=q.intersection(region.buffer(.20)).area/max(q.area,1e-9)
|
||||
assessment['containment']=containment
|
||||
if f['score']<POLICY['bicycle_fit_score'if ci==0 else'arrow_fit_score']or containment<POLICY['min_semantic_fraction']:continue
|
||||
context=bicycle_context(q,f['parameters'],lines)
|
||||
assessment['context']=context
|
||||
if not context['passed']:continue
|
||||
ev,names=mosaic_views(q,views,kind=kind if ci!=0 else None,parameters=f['parameters'][:6]if ci!=0 else None,allow_pedestrian=ci==0,calibrate_ground=True,connectivity_open_m=0. if ci==0 else .08);passed=accept_symbol(ev,score,containment,f['score'],kind)
|
||||
diag['evaluated'].append(dict(kind=kind,parameters=f['parameters'],evidence=ev,semantic_containment=containment,semantic_recall=complete,semantic_extent_masks=extent_masks,passed=passed,covered=not uncovered(q,existing)))
|
||||
if not passed:continue
|
||||
replacements=symbol_replacements(q,kind,current.values())
|
||||
if replacements is None:continue
|
||||
out=feature(lift(q),'road_marking',subtype=kind,method=VERSION,source_tile=p['source_tile'],source_tiles=names,standard_compliance='not_assessed',template_parameters=f['parameters'],template_fit_score=f['score'],semantic_score=score,semantic_patch=p['id'],semantic_masks=proposal['masks'],semantic_extent_masks=extent_masks,semantic_recall=complete,lane_context=context)
|
||||
if kind=='bicycle':out['properties']['template_artwork']=dict(author='Major Alexey',source='https://commons.wikimedia.org/wiki/File:1.23.3_Russian_road_marking.svg',license='CC-BY-SA-4.0',changes='curve sampling, normalization, metric registration')
|
||||
if kind.startswith('merge_'):out['properties']['template_artwork']=dict(author='Major Alexey',source='https://commons.wikimedia.org/wiki/File:1.19_Russian_road_marking.svg',license='CC-BY-SA-4.0',changes='curve sampling, normalization, metric registration')
|
||||
if out['id']in current:continue
|
||||
for replaced in replacements:del current[replaced['id']]
|
||||
current[out['id']]=out;existing=shapely.union_all([poly(v)for v in current.values()if v['properties']['class']=='road_marking']);transactions.append(dict(kind='assembled-symbol',source_ids=[v['id']for v in replacements],output_ids=[out['id']],before=replacements,after=[out],bounds_xy=q.bounds,source_tiles=names,evidence=ev,semantic_containment=containment,semantic_score=score,fit_score=f['score'],patch=p['id'],masks=proposal['masks'],semantic_extent_masks=extent_masks,semantic_recall=complete));print('ADMIT',len(transactions),kind,p['id'],flush=True);break
|
||||
print('PATCH',p['id'],'CANDIDATES',len(diagnostics),'ADMITTED',len(transactions),flush=True)
|
||||
result={**old,'features':list(current.values()),'glyph_refinement':VERSION};(O/'bicycle-candidate-map.json').write_text(json.dumps(result,allow_nan=False));(O/'bicycle-rows.json').write_text(json.dumps(transactions,indent=2));(O/'bicycle-diagnostics.json').write_text(json.dumps(diagnostics,indent=2))
|
||||
report=dict(scene=os.environ['SCENE'],seconds=time.monotonic()-start,baseline_sha256=sha(baseline),semantic_sha256=sha(semantic_file),patch_manifest_sha256=sha(patch_file),changed_segments=len(transactions),added_objects=len(transactions),added_subtypes=dict(collections.Counter(t['after'][0]['properties']['subtype']for t in transactions)),removed_fragments=sum(len(t['before'])for t in transactions),fragment_policy=FRAGMENT_POLICY,policy=POLICY,policy_version=VERSION,manual_geometry=False,manual_rois=[],legal_compliance_assessed=False)
|
||||
(O/'bicycle-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,118 @@
|
||||
"""Qualify complete cached SAM/catalog arrows against original Gaussian views.
|
||||
|
||||
No scene identity participates in admission. The cached hypotheses retain
|
||||
their semantic extent, class score and template-fit gates. Joint registration
|
||||
then verifies absolute image residuals before the original whole-glyph gate.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json, time, hashlib, os, collections
|
||||
import numpy as np, cv2, shapely
|
||||
from shapely.geometry import shape
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature, sample
|
||||
from search_views import SearchViews
|
||||
from glyph_templates import polygon
|
||||
from arrow_mosaics import mosaic_views
|
||||
from component_conflicts import symbol_replacements
|
||||
from recall_extent import semantic_recall
|
||||
from registration import grids, metrics, propose
|
||||
from registered_template import polygon as registered_polygon
|
||||
from arrow_frames import geometry_in_frame
|
||||
from arrow_admission import VERSION, POLICY, accept_symbol, already_has_symbol, registered_geometry_passes
|
||||
|
||||
cv2.setNumThreads(2);start=time.monotonic();out=Path('/out')
|
||||
raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);current={f['id']:f for f in base['features']}
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
views=SearchViews(tiles,labels,low,high,None)
|
||||
cache_raw=Path('/gateplan/arrow-gates.json').read_bytes();source=json.loads(cache_raw)
|
||||
cache_file=Path('/registrationcache/arrow-diagnostics.json')
|
||||
registration_cache=json.loads(cache_file.read_text()) if cache_file.exists() else []
|
||||
cache_key=lambda row,fit:(row['patch'],fit['kind'],tuple(fit['parameters']))
|
||||
reuse={cache_key(d,d['fit']):d for d in registration_cache}
|
||||
candidates=[]
|
||||
for row in source:
|
||||
for fit in row['fits']:
|
||||
if fit['score']<POLICY['arrow_fit_score'] or fit['extent_recall']<.85 or fit['containment']<POLICY['min_semantic_fraction']:continue
|
||||
candidates.append((row,fit))
|
||||
candidates.sort(key=lambda rf:-(rf[0]['semantic_score']*rf[1]['score']))
|
||||
seen=[];rows=[];diagnostics=[]
|
||||
for row,fit in candidates:
|
||||
kind=fit['kind'];params=fit['parameters'];q=polygon(kind,params);extent=shape(row['extent']);region=shape(row['region'])
|
||||
if already_has_symbol(q,current.values()):continue
|
||||
if any(k==kind and p.intersection(extent).area/max(min(p.area,extent.area),1e-9)>.85 for k,p in seen):continue
|
||||
seen.append((kind,extent))
|
||||
diag=dict(patch=row['patch'],kind=kind,semantic_score=row['semantic_score'],fit=fit);diagnostics.append(diag)
|
||||
ev,names=mosaic_views(q,views,kind=kind,parameters=params[:6],allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent)
|
||||
diag['evidence_before']=ev
|
||||
# Necessary cheap bounds only: a registerable seed needs observed surface
|
||||
# and actual paint. This is a compute budget, never an acceptance bypass.
|
||||
if ev[0]['paint_coverage']<1. or ev[0]['paint_valid']<.9 or ev[0]['observed_support']<.6:
|
||||
diag['reject']='insufficient-seed-evidence';continue
|
||||
grid=grids(q,views,surface_classes=(1,2),object_region=extent);grid['angle']=params[2]
|
||||
initial=[metrics(q,grid,v) for v in grid['views']]
|
||||
print('FIT',len(diagnostics),row['patch'],kind,flush=True)
|
||||
cached=reuse.get(cache_key(row,fit))
|
||||
proposal=dict(alternatives=cached['registration_options']) if cached and 'registration_options' in cached else propose(q,grid,kind,params)
|
||||
choices=[dict(polygon=q,parameters=params,matrix=None,motion='seed',bounds_ok=True)]
|
||||
if proposal is not None:
|
||||
for v in proposal.get('alternatives',[proposal]):
|
||||
if not v['bounds_ok'] or v['motion']=='seed':continue
|
||||
pars=v.get('parameters') or params
|
||||
geometry=registered_polygon(kind,pars) if v['motion']=='parametric-catalog' else geometry_in_frame(q,v['matrix'])
|
||||
choices.append(dict(v,polygon=geometry,parameters=pars))
|
||||
assessed=[]
|
||||
for option in choices:
|
||||
met=[metrics(option['polygon'],grid,v) for v in grid['views']]
|
||||
option['metrics']=met
|
||||
if registered_geometry_passes(met):assessed.append(option)
|
||||
if not assessed:
|
||||
# A longitudinal endpoint check alone misses lateral tip displacement.
|
||||
# Refine a qualified whole-shape candidate against 2D head/tail centres.
|
||||
from arrow_tip_registration import fit_tip
|
||||
legacy_ok=[]
|
||||
for option in choices:
|
||||
if option['motion']!='parametric-catalog':continue
|
||||
coarse=[{k:v for k,v in m.items() if k!='endpoint_xy_error_m'} for m in option['metrics']]
|
||||
if registered_geometry_passes(coarse):legacy_ok.append(option)
|
||||
if legacy_ok:
|
||||
seed=max(legacy_ok,key=lambda v:v['metrics'][0]['iou'])
|
||||
geometry,pars,score=fit_tip(kind,seed['parameters'],grid,.025)
|
||||
met=[metrics(geometry,grid,v) for v in grid['views']]
|
||||
option=dict(polygon=geometry,parameters=pars,matrix=None,motion='parametric-catalog',bounds_ok=geometry.is_valid and geometry.hausdorff_distance(q)<=.60,metrics=met,tip_refined=True,correlation=score)
|
||||
choices.append(option)
|
||||
if option['bounds_ok'] and registered_geometry_passes(met):assessed.append(option)
|
||||
diag['registration_options']=[{k:v for k,v in option.items() if k not in ['polygon','alternatives']} for option in choices]
|
||||
if not assessed:diag['reject']='registration-residual';continue
|
||||
diag['evaluated']=[];selected=None
|
||||
for option in sorted(assessed,key=lambda v:-v['metrics'][0]['iou']):
|
||||
candidate=option['polygon'];pars=option['parameters'];frame=option.get('matrix')
|
||||
ev,names=mosaic_views(candidate,views,kind=kind,parameters=pars[:6],allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent,probe_frame=frame)
|
||||
containment=candidate.intersection(region.buffer(.2)).area/max(candidate.area,1e-9);extent_recall=semantic_recall(candidate,extent)
|
||||
passed=extent_recall>=.85 and accept_symbol(ev,row['semantic_score'],containment,fit['score'],kind)
|
||||
replacements=symbol_replacements(candidate,kind,current.values()) if passed else None
|
||||
diag['evaluated'].append(dict(evidence=ev,passed=passed,foreign_conflict=passed and replacements is None,semantic_recall=extent_recall,motion=option['motion']))
|
||||
if passed and replacements is not None:
|
||||
selected=option;break
|
||||
if selected is None:diag['reject']='whole-symbol-or-conflict';continue
|
||||
q=selected['polygon'];params=selected['parameters'];met=selected['metrics'];reg=selected
|
||||
diag.update(passed=True,geometry=shapely.geometry.mapping(q))
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),q)
|
||||
props=dict(subtype=kind,method=VERSION,source_tiles=names,source_tile=names[0],template_fit_score=fit['score'],
|
||||
template_parameters=params,semantic_score=row['semantic_score'],semantic_patch=row['patch'],semantic_masks=row['masks'],
|
||||
semantic_recall=extent_recall,standard_compliance='not_assessed',surface_context='observed-paved-ground',
|
||||
template_artwork=dict(author='Major Alexey',license='CC-BY-SA-4.0',source='https://commons.wikimedia.org/wiki/File:1.19_Russian_road_marking.svg' if kind.startswith('merge_') else 'https://commons.wikimedia.org/wiki/File:1.18_Russian_road_marking.svg',changes='sampling, normalization, metric registration'))
|
||||
props['registration']=dict(version=VERSION,motion=reg['motion'],registered_parameters=params if reg['motion']=='parametric-catalog' else None,homography_xy=reg.get('matrix'),input_parameters=fit['parameters'],after=met)
|
||||
result=feature(lifted,'road_marking',**props)
|
||||
for f in replacements:del current[f['id']]
|
||||
current[result['id']]=result
|
||||
rows.append(dict(kind='complete-arrow-admission',before=replacements,after=[result],source_ids=[f['id'] for f in replacements],output_ids=[result['id']],bounds_xy=q.bounds,evidence=ev,registration_metrics=met,semantic_recall=extent_recall,semantic_containment=containment,source_tiles=names,patch=row['patch']))
|
||||
print('ADMIT',len(rows),kind,row['patch'],flush=True)
|
||||
(out/'progress.json').write_text(json.dumps(dict(examined=len(diagnostics),accepted=len(rows))))
|
||||
result={**base,'features':list(current.values()),'arrow_admission':VERSION}
|
||||
(out/'full-map.json').write_text(json.dumps(result,allow_nan=False))
|
||||
(out/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(out/'arrow-diagnostics.json').write_text(json.dumps(diagnostics,indent=2))
|
||||
(out/'crosswalk-standard-check.json').write_bytes(Path('/fullplan/crosswalk-standard-check.json').read_bytes())
|
||||
report=dict(scene=os.environ['SCENE'],seconds=time.monotonic()-start,baseline_sha256=hashlib.sha256(raw).hexdigest(),hypotheses_sha256=hashlib.sha256(cache_raw).hexdigest(),examined=len(diagnostics),added_objects=len(rows),replaced_fragments=sum(len(t['before']) for t in rows),subtypes=dict(collections.Counter(t['after'][0]['properties']['subtype'] for t in rows)),rejections=dict(collections.Counter(d.get('reject','accepted') for d in diagnostics)),policy=POLICY,policy_version=VERSION,manual_geometry=False,point_cloud_input=False,registration_cache_sha256=hashlib.sha256(cache_file.read_bytes()).hexdigest() if cache_file.exists() else None)
|
||||
(out/'arrow-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,78 @@
|
||||
"""Replace observed arrows with immutable dimensioned presets, uniformly fitted."""
|
||||
from pathlib import Path
|
||||
import os,json,time,hashlib,collections
|
||||
import cv2,numpy as np,shapely
|
||||
from shapely.geometry import shape,mapping
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature,sample
|
||||
from search_views import SearchViews
|
||||
from registered_template import current_parameters
|
||||
from registration import grids
|
||||
from standard_arrow_evidence import metrics,passes as registered_geometry_passes
|
||||
from arrow_admission import accept_symbol
|
||||
from arrow_mosaics import mosaic_views
|
||||
from component_conflicts import symbol_replacements
|
||||
from recall_extent import semantic_recall
|
||||
from standard_arrow_templates import VERSION,SOURCE,KINDS,polygon,dimensions
|
||||
from fit_standard_arrows import fit
|
||||
from standard_arrow_regions import region_for
|
||||
|
||||
cv2.setNumThreads(2);start=time.monotonic();out=Path('/out')
|
||||
raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);current={f['id']:f for f in base['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
sources=json.loads(Path('/gateplan/arrow-gates.json').read_text());rows=[];diagnostics=[];proposals=[]
|
||||
for original in base['features']:
|
||||
props=original['properties'];kind=props.get('subtype')
|
||||
if kind not in KINDS:continue
|
||||
seed=shapely.force_2d(shape(original['geometry']))
|
||||
prior=props.get('preset')or{}
|
||||
if prior.get('version') in ('fixed-118-similarity-v4',VERSION) and prior.get('kind')==kind:
|
||||
expected=polygon(kind,prior['profile'],prior['pose'])
|
||||
if expected.symmetric_difference(seed).area<1e-8:
|
||||
continue
|
||||
pars=current_parameters(props)
|
||||
diag=dict(id=original['id'],kind=kind);diagnostics.append(diag)
|
||||
if pars is None:diag['reject']='missing-pose-provenance';continue
|
||||
extent,source_patch,extent_source=region_for(seed,sources)
|
||||
grid=grids(seed,views,surface_classes=(1,2),object_region=extent);grid['angle']=pars[2]
|
||||
candidates=fit(kind,seed,pars[2],grid)
|
||||
if not candidates:diag['reject']='no-fixed-profile';continue
|
||||
candidates=[dict(c,metrics=[metrics(c['geometry'],grid,v)for v in grid['views']])for c in candidates]
|
||||
diag['options']=[{k:v for k,v in c.items()if k!='geometry'}for c in candidates]
|
||||
chosen=None
|
||||
for c in candidates:
|
||||
q=c['geometry'];met=c['metrics'];c['bounds_ok']=q.hausdorff_distance(seed)<=.65
|
||||
if not c['bounds_ok'] or not registered_geometry_passes(met):continue
|
||||
ev,names=mosaic_views(q,views,kind=kind,parameters=dimensions(kind,c['profile'],c['pose']),allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent)
|
||||
score=props.get('semantic_score',.99);fit_score=props.get('template_fit_score',.99)
|
||||
contain=q.intersection(extent.buffer(.2)).area/max(q.area,1e-9)
|
||||
c.update(evidence=ev,names=names,containment=contain)
|
||||
# Re-fitting an existing identity does not manufacture a new semantic class.
|
||||
if not accept_symbol(ev,score,contain,fit_score,kind):continue
|
||||
others=[f for f in current.values()if f['id']!=original['id']]
|
||||
replaced=symbol_replacements(q,kind,others)
|
||||
if replaced is None:continue
|
||||
chosen=c;chosen['replaced']=replaced;break
|
||||
diag['options']=[{k:v for k,v in c.items()if k!='geometry'}for c in candidates]
|
||||
c=chosen or candidates[0];q=c['geometry']
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),q)
|
||||
newprops={**props,'method':VERSION,'preset':dict(version=VERSION,kind=kind,profile=c['profile'],pose=c['pose'],transform='similarity',source=SOURCE,figure='B.6'if kind.startswith('merge_')else'B.5',table=None if kind.startswith('merge_')else'B.1'),
|
||||
'template_parameters':dimensions(kind,c['profile'],c['pose']),'standard_compliance':'not_assessed',
|
||||
'registration':dict(version=VERSION,motion='similarity',after=c['metrics'],input_parameters=pars),
|
||||
'template_artwork':dict(source=SOURCE,changes='dimensioned preset construction and similarity placement')}
|
||||
newprops.pop('class',None);newprops.pop('class_name',None)
|
||||
result=feature(lifted,'road_marking',**newprops)
|
||||
row=dict(kind='fixed-preset-replacement',before=[original]+(c.get('replaced')or[]),after=[result],source_ids=[original['id']]+[f['id']for f in c.get('replaced',[])],output_ids=[result['id']],bounds_xy=seed.union(q).bounds,registration_metrics=c['metrics'],extent=mapping(extent),source_patch=source_patch,extent_source=extent_source,input_parameters=pars,profile=c['profile'],pose=c['pose'],accepted=chosen is not None)
|
||||
proposals.append(row)
|
||||
if chosen is None:diag['reject']='fixed-shape-evidence';print('REJECT',kind,original['id'],flush=True);continue
|
||||
row.update(evidence=c['evidence'],source_tiles=c['names'],semantic_containment=c['containment'])
|
||||
result['properties']['source_tiles']=c['names'];result['properties']['source_tile']=c['names'][0]
|
||||
for f in row['before']:assert current.pop(f['id'])==f
|
||||
current[result['id']]=result;rows.append(row);diag['accepted']=True
|
||||
print('ADMIT',kind,len(rows),flush=True)
|
||||
result={**base,'features':list(current.values()),'fixed_arrow_presets':VERSION}
|
||||
(out/'full-map.json').write_text(json.dumps(result,allow_nan=False));(out/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(out/'arrow-proposals.json').write_text(json.dumps(proposals,indent=2));(out/'arrow-diagnostics.json').write_text(json.dumps(diagnostics,indent=2))
|
||||
(out/'crosswalk-standard-check.json').write_bytes(Path('/fullplan/crosswalk-standard-check.json').read_bytes())
|
||||
report=dict(scene=os.environ['SCENE'],seconds=time.monotonic()-start,baseline_sha256=hashlib.sha256(raw).hexdigest(),examined=len(diagnostics),updated_objects=len(rows),added_objects=0,replaced_fragments=sum(len(t['before'])-1 for t in rows),rejections=dict(collections.Counter(d.get('reject','accepted')for d in diagnostics)),policy_version=VERSION,manual_geometry=False,point_cloud_input=False,transform_dof=4)
|
||||
(out/'arrow-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,66 @@
|
||||
"""Admit newly observed whole arrows only as immutable fixed presets."""
|
||||
from pathlib import Path
|
||||
import json,time,hashlib,os,collections
|
||||
import numpy as np,cv2,shapely
|
||||
from shapely.geometry import shape,mapping
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature,sample
|
||||
from search_views import SearchViews
|
||||
from glyph_templates import polygon as seed_polygon
|
||||
from arrow_admission import POLICY,accept_symbol,already_has_symbol
|
||||
from arrow_mosaics import mosaic_views
|
||||
from component_conflicts import symbol_replacements
|
||||
from recall_extent import semantic_recall
|
||||
from registration import grids
|
||||
from standard_arrow_evidence import metrics,passes
|
||||
from standard_arrow_templates import VERSION,SOURCE,KINDS,polygon,dimensions
|
||||
from fit_standard_arrows import fit
|
||||
|
||||
out=Path('/out');start=time.monotonic();cv2.setNumThreads(2)
|
||||
raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);current={f['id']:f for f in base['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
gate_raw=Path('/gateplan/arrow-gates.json').read_bytes();gates=json.loads(gate_raw)
|
||||
candidates=[(r,f)for r in gates for f in r['fits']if f['kind']in KINDS and r['semantic_score']>=POLICY['arrow_semantic_score'] and f['score']>=POLICY['arrow_fit_score'] and f['extent_recall']>=.85 and f['containment']>=POLICY['min_semantic_fraction']]
|
||||
candidates.sort(key=lambda v:-(v[0]['semantic_score']*v[1]['score']))
|
||||
seen=[];rows=[];diagnostics=[]
|
||||
for source,hypothesis in candidates:
|
||||
kind=hypothesis['kind'];pars=hypothesis['parameters'];seed=seed_polygon(kind,pars);extent=shape(source['extent']);region=shape(source['region'])
|
||||
if already_has_symbol(seed,current.values()):continue
|
||||
if any(k==kind and p.intersection(extent).area/max(p.union(extent).area,1e-9)>.6 for k,p in seen):continue
|
||||
seen.append((kind,extent));diag=dict(patch=source['patch'],kind=kind,source_index=source['index']);diagnostics.append(diag)
|
||||
first,names=mosaic_views(seed,views,kind=kind,parameters=pars[:6],allow_pedestrian=True,calibrate_ground=True,semantic_extent=extent)
|
||||
if first[0]['paint_coverage']<1. or first[0]['paint_valid']<.9 or first[0]['observed_support']<.6:
|
||||
diag['reject']='insufficient-observed-seed';continue
|
||||
grid=grids(seed,views,surface_classes=(1,2),object_region=extent);grid['angle']=pars[2]
|
||||
options=fit(kind,seed,pars[2],grid);diag['options']=[];selected=None
|
||||
for c in options:
|
||||
q=c['geometry'];met=[metrics(q,grid,v)for v in grid['views']]
|
||||
evaluation=dict(profile=c['profile'],pose=c['pose'],metrics=met);diag['options'].append(evaluation)
|
||||
if q.hausdorff_distance(seed)>.65 or not passes(met):continue
|
||||
parameters=dimensions(kind,c['profile'],c['pose'])
|
||||
ev,names=mosaic_views(q,views,kind=kind,parameters=parameters,allow_pedestrian=True,calibrate_ground=True,semantic_extent=extent)
|
||||
contain=q.intersection(region.buffer(.2)).area/max(q.area,1e-9);recall=semantic_recall(q,extent)
|
||||
evaluation.update(evidence=ev,containment=contain,recall=recall)
|
||||
if recall<.85 or not accept_symbol(ev,source['semantic_score'],contain,hypothesis['score'],kind):continue
|
||||
replacements=symbol_replacements(q,kind,current.values())
|
||||
if replacements is None:continue
|
||||
selected=c;break
|
||||
if selected is None:diag['reject']='fixed-preset-evidence';continue
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),q)
|
||||
result=feature(lifted,'road_marking',subtype=kind,method=VERSION,source_tiles=names,source_tile=names[0],
|
||||
semantic_score=source['semantic_score'],semantic_patch=source['patch'],semantic_masks=source['masks'],
|
||||
template_fit_score=hypothesis['score'],template_parameters=parameters,standard_compliance='not_assessed',
|
||||
preset=dict(version=VERSION,kind=kind,profile=c['profile'],pose=c['pose'],transform='similarity',source=SOURCE,figure='B.6'if kind.startswith('merge_')else'B.5'),
|
||||
template_artwork=dict(source=SOURCE,changes='fixed drawing preset with similarity placement'),
|
||||
registration=dict(version=VERSION,motion='similarity',after=met,input_parameters=pars))
|
||||
row=dict(kind='uniform-fixed-arrow',before=replacements,after=[result],source_ids=[f['id']for f in replacements],output_ids=[result['id']],bounds_xy=q.bounds,
|
||||
evidence=ev,source_tiles=names,registration_metrics=met,extent=mapping(extent),region=mapping(region),source_index=source['index'],source_patch=source['patch'],input_parameters=pars,
|
||||
semantic_containment=contain,semantic_recall=recall)
|
||||
for f in replacements:assert current.pop(f['id'])==f
|
||||
current[result['id']]=result;rows.append(row);diag['accepted']=True
|
||||
print('ADMIT',len(rows),kind,source['patch'],flush=True)
|
||||
result={**base,'features':list(current.values()),'uniform_arrow_search':VERSION}
|
||||
(out/'full-map.json').write_text(json.dumps(result,allow_nan=False));(out/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(out/'arrow-diagnostics.json').write_text(json.dumps(diagnostics,indent=2))
|
||||
report=dict(scene=os.environ['SCENE'],baseline_sha256=hashlib.sha256(raw).hexdigest(),hypotheses_sha256=hashlib.sha256(gate_raw).hexdigest(),examined=len(diagnostics),added_objects=len(rows),replaced_fragments=sum(len(t['before'])for t in rows),subtypes=dict(collections.Counter(r['after'][0]['properties']['subtype']for r in rows)),rejections=dict(collections.Counter(d.get('reject','accepted')for d in diagnostics)),manual_geometry=False,point_cloud_input=False,seconds=time.monotonic()-start,transform_dof=4)
|
||||
(out/'arrow-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Qualify supported periodic end legs for every existing zigzag in a scene."""
|
||||
from pathlib import Path
|
||||
import json,time,hashlib,os,collections
|
||||
import numpy as np,cv2,shapely
|
||||
from shapely.geometry import shape,LineString
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature,sample
|
||||
from search_views import SearchViews
|
||||
from zigzag_mosaics import mosaic_views
|
||||
from component_conflicts import symbol_replacements
|
||||
from zigzag_extension import VERSION,POLICY,proposal,supported,fit_end
|
||||
|
||||
cv2.setNumThreads(2);start=time.monotonic();out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);current={f['id']:f for f in base['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
rows=[];diagnostics=[]
|
||||
for initial in base['features']:
|
||||
if initial['properties'].get('subtype')!='zigzag':continue
|
||||
original=initial
|
||||
for reverse in [False,True]:
|
||||
props=original['properties'];vertices=props.get('vertices',[]);width=props.get('width_m',0)
|
||||
if props.get('terminal_ends',{}).get('start'if reverse else'end'):continue
|
||||
if len(vertices)<2:continue
|
||||
oldpoly=shapely.force_2d(shape(original['geometry']));clean=LineString(vertices).buffer(width/2,cap_style=2,join_style=2)
|
||||
if clean.symmetric_difference(oldpoly).area>1e-7:continue
|
||||
p=proposal(vertices,width,reverse)
|
||||
if p is None:continue
|
||||
fitted=fit_end(vertices,width,reverse,lambda leg,q:mosaic_views(leg,views,negative_context=q))
|
||||
d=dict(id=original['id'],reverse=reverse,passed=fitted is not None);diagnostics.append(d)
|
||||
if fitted is None:continue
|
||||
newvertices,q,leg=fitted['points'],fitted['polygon'],fitted['leg'];ev,names=fitted['evidence'],fitted['names']
|
||||
d.update(vertices=newvertices,evidence=ev,fraction=fitted['fraction'],exterior=fitted['exterior'])
|
||||
others=[f for f in current.values()if f['id']!=original['id']];replaced=symbol_replacements(q,'zigzag',others)
|
||||
if replaced is None:d['passed']=False;d['reject']='foreign-marking-conflict';continue
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),q)
|
||||
newprops={k:v for k,v in props.items()if k not in ['class','class_name']}
|
||||
newprops.update(method=VERSION,vertices=newvertices,leg_count=len(newvertices)-1,source_tiles=sorted(set(props.get('source_tiles',[])+names)),source_ids=[original['id']]+[f['id']for f in replaced],observed_extension=dict(reverse=reverse,added_legs=1,source_tiles=names,phase='inherited-two-leg-period'))
|
||||
if fitted['fraction']<1.:newprops['terminal_ends']={**props.get('terminal_ends',{}),('start'if reverse else'end'):True}
|
||||
result=feature(lifted,'road_marking',**newprops)
|
||||
row=dict(kind='observed-zigzag-end',before=[original]+replaced,after=[result],source_ids=[original['id']]+[f['id']for f in replaced],output_ids=[result['id']],bounds_xy=leg.buffer(1).bounds,evidence=ev,source_tiles=names,reverse=reverse,fraction=fitted['fraction'],exterior=fitted['exterior'])
|
||||
for f in row['before']:assert current.pop(f['id'])==f
|
||||
current[result['id']]=result;rows.append(row);original=result
|
||||
print('ADMIT',len(rows),flush=True)
|
||||
new={**base,'features':list(current.values()),'zigzag_extension':VERSION}
|
||||
(out/'full-map.json').write_text(json.dumps(new,allow_nan=False));(out/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(out/'arrow-diagnostics.json').write_text(json.dumps(diagnostics,indent=2));(out/'crosswalk-standard-check.json').write_bytes(Path('/fullplan/crosswalk-standard-check.json').read_bytes())
|
||||
report=dict(scene=os.environ['SCENE'],baseline_sha256=hashlib.sha256(raw).hexdigest(),updated_objects=len(rows),added_objects=0,examined=len(diagnostics),policy=POLICY,policy_version=VERSION,seconds=time.monotonic()-start)
|
||||
(out/'arrow-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,45 @@
|
||||
"""Qualify supported periodic end legs for every existing zigzag in a scene."""
|
||||
from pathlib import Path
|
||||
import json,time,hashlib,os,collections
|
||||
import numpy as np,cv2,shapely
|
||||
from shapely.geometry import shape,LineString
|
||||
from shapely.ops import transform
|
||||
from layer_common import feature,sample
|
||||
from search_views import SearchViews
|
||||
from zigzag_mosaics import mosaic_views
|
||||
from component_conflicts import symbol_replacements
|
||||
from zigzag_terminal import VERSION,POLICY,fit_terminal
|
||||
|
||||
cv2.setNumThreads(2);start=time.monotonic();out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();base=json.loads(raw);current={f['id']:f for f in base['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
rows=[];diagnostics=[]
|
||||
for initial in base['features']:
|
||||
if initial['properties'].get('subtype')!='zigzag':continue
|
||||
original=initial
|
||||
for reverse in [False,True]:
|
||||
props=original['properties'];vertices=props.get('vertices',[]);width=props.get('width_m',0)
|
||||
if props.get('observed_terminal_returns',{}).get('start'if reverse else'end'):continue
|
||||
if len(vertices)<2:continue
|
||||
oldpoly=shapely.force_2d(shape(original['geometry']));clean=LineString(vertices).buffer(width/2,cap_style=2,join_style=2)
|
||||
if clean.symmetric_difference(oldpoly).area>1e-7:continue
|
||||
proposal_audit={};fitted=fit_terminal(vertices,width,reverse,views,audit=proposal_audit)
|
||||
d=dict(id=original['id'],reverse=reverse,passed=fitted is not None,proposal_audit=proposal_audit);diagnostics.append(d)
|
||||
if fitted is None:continue
|
||||
newvertices,q,leg=fitted['points'],fitted['polygon'],fitted['leg'];ev,names=fitted['evidence'],fitted['names']
|
||||
d.update(vertices=newvertices,evidence=ev,fraction=fitted['fraction'],exterior=fitted['exterior'])
|
||||
others=[f for f in current.values()if f['id']!=original['id']];replaced=symbol_replacements(q,'zigzag',others)
|
||||
if replaced is None:d['passed']=False;d['reject']='foreign-marking-conflict';continue
|
||||
lifted=transform(lambda x,y,z=None:(x,y,sample(height,np.c_[x,y],low,high)),q)
|
||||
newprops={k:v for k,v in props.items()if k not in ['class','class_name']}
|
||||
newprops.update(method=VERSION,vertices=newvertices,leg_count=len(newvertices)-1,source_tiles=sorted(set(props.get('source_tiles',[])+names)),source_ids=[original['id']]+[f['id']for f in replaced],observed_extension=dict(reverse=reverse,added_legs=1,source_tiles=names,phase='observed-short-terminal-stroke'))
|
||||
newprops['observed_terminal_returns']={**props.get('observed_terminal_returns',{}),('start'if reverse else'end'):True}
|
||||
result=feature(lifted,'road_marking',**newprops)
|
||||
row=dict(kind='observed-zigzag-end',before=[original]+replaced,after=[result],source_ids=[original['id']]+[f['id']for f in replaced],output_ids=[result['id']],bounds_xy=leg.buffer(1).bounds,evidence=ev,source_tiles=names,reverse=reverse,fraction=fitted['fraction'],exterior=fitted['exterior'])
|
||||
for f in row['before']:assert current.pop(f['id'])==f
|
||||
current[result['id']]=result;rows.append(row);original=result
|
||||
print('ADMIT',len(rows),flush=True)
|
||||
new={**base,'features':list(current.values()),'zigzag_extension':VERSION}
|
||||
(out/'full-map.json').write_text(json.dumps(new,allow_nan=False));(out/'arrow-rows.json').write_text(json.dumps(rows,indent=2));(out/'arrow-diagnostics.json').write_text(json.dumps(diagnostics,indent=2));(out/'crosswalk-standard-check.json').write_bytes(Path('/fullplan/crosswalk-standard-check.json').read_bytes())
|
||||
report=dict(scene=os.environ['SCENE'],baseline_sha256=hashlib.sha256(raw).hexdigest(),updated_objects=len(rows),added_objects=0,examined=len(diagnostics),policy=POLICY,policy_version=VERSION,seconds=time.monotonic()-start)
|
||||
(out/'arrow-report.json').write_text(json.dumps(report,indent=2));print('REPORT',json.dumps(report),flush=True)
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Review actual Gaussian pixels and complete before/after symbol geometry."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from fit_scene import project
|
||||
from search_views import SearchViews
|
||||
|
||||
out = Path('/out')
|
||||
before = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
after = json.loads((out/'full-map.json').read_text())
|
||||
rows = json.loads((out/'arrow-rows.json').read_text())
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels = z['labels']; low, high = z['bounds']
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 24)
|
||||
manifest = []
|
||||
for i, row in enumerate(rows):
|
||||
x0,y0,x1,y1 = row['bounds_xy']; center = np.array([(x0+x1)/2,(y0+y1)/2])
|
||||
name = min(views.tiles, key=lambda t:np.linalg.norm(np.mean(t['bounds_xy'],axis=0)-center))['id']
|
||||
geometry = views.geometry(name); raw, _ = views.inputs(name)
|
||||
base = Image.fromarray(raw)
|
||||
uv = project(center[None,:],geometry)[0]*base.width/1200
|
||||
side = max(3.,max(x1-x0,y1-y0)+1.)*base.width/60
|
||||
box = tuple(np.r_[uv-side/2,uv+side/2].astype(int))
|
||||
def draw(features):
|
||||
image = base.copy(); d = ImageDraw.Draw(image)
|
||||
for feature in features:
|
||||
if feature['properties'].get('class') != 'road_marking': continue
|
||||
g = feature['geometry']
|
||||
polygons = [g['coordinates']] if g['type']=='Polygon' else g['coordinates'] if g['type']=='MultiPolygon' else []
|
||||
for poly in polygons:
|
||||
for ring in poly:
|
||||
d.line([tuple(v) for v in project(ring,geometry)*base.width/1200],fill='#ffe000',width=1)
|
||||
return image
|
||||
frame = Image.new('RGB',(1800,655),'white'); d = ImageDraw.Draw(frame)
|
||||
for col,(im,title) in enumerate([(base,'Гауссы'),(draw(before['features']),'До'),(draw(after['features']),'После')]):
|
||||
frame.paste(im.crop(box).resize((600,600),Image.Resampling.LANCZOS),(col*600,55))
|
||||
d.text((col*600+12,14),f'{i+1} · {title}',font=font,fill='#263640')
|
||||
path = out/f'arrow-change-{i+1:03d}.jpg'; frame.save(path,quality=95)
|
||||
manifest.append(dict(file=path.name,output_ids=row['output_ids'],source_tile=name))
|
||||
(out/'arrow-visual-manifest.json').write_text(json.dumps(manifest,indent=2))
|
||||
print('RENDERED',len(manifest),'changes',flush=True)
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Review actual Gaussian pixels and complete before/after symbol geometry."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from fit_scene import project
|
||||
from search_views import SearchViews
|
||||
|
||||
out = Path('/out')
|
||||
before = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
after = json.loads((out/'bicycle-candidate-map.json').read_text())
|
||||
rows = json.loads((out/'bicycle-rows.json').read_text())
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels = z['labels']; low, high = z['bounds']
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 24)
|
||||
manifest = []
|
||||
for i, row in enumerate(rows):
|
||||
x0,y0,x1,y1 = row['bounds_xy']; center = np.array([(x0+x1)/2,(y0+y1)/2])
|
||||
name = min(views.tiles, key=lambda t:np.linalg.norm(np.mean(t['bounds_xy'],axis=0)-center))['id']
|
||||
geometry = views.geometry(name); raw, _ = views.inputs(name)
|
||||
base = Image.fromarray(raw)
|
||||
uv = project(center[None,:],geometry)[0]*base.width/1200
|
||||
side = max(3.,max(x1-x0,y1-y0)+1.)*base.width/60
|
||||
box = tuple(np.r_[uv-side/2,uv+side/2].astype(int))
|
||||
def draw(features):
|
||||
image = base.copy(); d = ImageDraw.Draw(image)
|
||||
for feature in features:
|
||||
if feature['properties'].get('class') != 'road_marking': continue
|
||||
g = feature['geometry']
|
||||
polygons = [g['coordinates']] if g['type']=='Polygon' else g['coordinates'] if g['type']=='MultiPolygon' else []
|
||||
for poly in polygons:
|
||||
for ring in poly:
|
||||
d.line([tuple(v) for v in project(ring,geometry)*base.width/1200],fill='#ffe000',width=1)
|
||||
return image
|
||||
frame = Image.new('RGB',(1800,655),'white'); d = ImageDraw.Draw(frame)
|
||||
for col,(im,title) in enumerate([(base,'Гауссы'),(draw(before['features']),'До'),(draw(after['features']),'После')]):
|
||||
frame.paste(im.crop(box).resize((600,600),Image.Resampling.LANCZOS),(col*600,55))
|
||||
d.text((col*600+12,14),f'{i+1} · {title}',font=font,fill='#263640')
|
||||
path = out/f'compact-change-{i+1:03d}.jpg'; frame.save(path,quality=95)
|
||||
manifest.append(dict(file=path.name,output_ids=row['output_ids'],source_tile=name))
|
||||
(out/'compact-visual-manifest.json').write_text(json.dumps(manifest,indent=2))
|
||||
print('RENDERED',len(manifest),'changes',flush=True)
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Render every proposed transaction, using source Gaussian images, before and after."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
from fit_scene import project
|
||||
from layer_common import S, O
|
||||
|
||||
old = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
new = json.loads((O/'full-map.json').read_text())
|
||||
changes = json.loads((O/'corridor-rows.json').read_text())
|
||||
tiles = [t for t in json.loads((S/'tile-index.json').read_text())['tiles'] if t['status'] == 'surveyed']
|
||||
extra = json.loads((O/'coverage/manifest.json').read_text())['tiles']
|
||||
extra_ids = {t['id'] for t in extra}
|
||||
tiles += extra
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 22)
|
||||
manifest, frames = [], []
|
||||
|
||||
|
||||
def lines(image, geometry, features):
|
||||
result = image.copy()
|
||||
draw = ImageDraw.Draw(result)
|
||||
factor = image.width/1200
|
||||
for feature in features:
|
||||
if feature['properties'].get('class') != 'road_marking':
|
||||
continue
|
||||
geo = feature['geometry']
|
||||
rings = geo['coordinates'] if geo['type'] == 'Polygon' else [geo['coordinates']]
|
||||
for ring in rings:
|
||||
draw.line([tuple(p) for p in project(ring, geometry)*factor], fill='#f1c300', width=3)
|
||||
return result
|
||||
|
||||
|
||||
for index, change in enumerate(changes):
|
||||
x0, y0, x1, y1 = change['bounds_xy']
|
||||
center = np.array([(x0+x1)/2, (y0+y1)/2])
|
||||
tile = min(tiles, key=lambda t: np.linalg.norm(np.mean(t['bounds_xy'], axis=0)-center))
|
||||
name = tile['id']
|
||||
if name in extra_ids:
|
||||
path = O/'coverage'/name
|
||||
geometry = dict(np.load(path/'top.geometry.npz'))
|
||||
raw = Image.open(path/'ground.png').convert('RGB')
|
||||
else:
|
||||
geometry = dict(np.load(S/name/'top.geometry.npz'))
|
||||
raw = Image.open(Path('/ortho/evidence')/(name+'.ground.png')).convert('RGB')
|
||||
uv = project([[x0,y0],[x0,y1],[x1,y0],[x1,y1]], geometry)*raw.width/1200
|
||||
c = (uv.min(0)+uv.max(0))/2
|
||||
side = max((uv.max(0)-uv.min(0)).max()+raw.width*4/60, raw.width*10/60)
|
||||
bbox = tuple(np.r_[c-side/2, c+side/2].astype(int))
|
||||
frame = Image.new('RGB', (1800, 655), 'white')
|
||||
draw = ImageDraw.Draw(frame)
|
||||
for col, (image, label) in enumerate([(raw,'Гауссы'),(lines(raw,geometry,old['features']),'До'),
|
||||
(lines(raw,geometry,new['features']),'После')]):
|
||||
frame.paste(image.crop(bbox).resize((600,600),Image.Resampling.LANCZOS),(600*col,55))
|
||||
draw.text((600*col+10,13),f'{index+1} · {label}',font=font,fill='#263640')
|
||||
file = f'linear-change-{index+1:03d}.jpg'
|
||||
frame.save(O/file,quality=95)
|
||||
frames.append(frame)
|
||||
manifest.append(dict(file=file,index=index,kind=change['kind'],source_tile=name,
|
||||
source_ids=change['source_ids'],output_ids=change['output_ids']))
|
||||
for start in range(0,len(frames),4):
|
||||
chunk=frames[start:start+4]
|
||||
sheet=Image.new('RGB',(1800,655*len(chunk)),'white')
|
||||
for i,frame in enumerate(chunk):sheet.paste(frame,(0,655*i))
|
||||
sheet.save(O/f'linear-sheet-{start//4+1:03d}.jpg',quality=93)
|
||||
(O/'linear-visual-manifest.json').write_text(json.dumps(manifest,indent=2))
|
||||
print('REVIEWED TRANSACTIONS TO RENDER',len(frames),flush=True)
|
||||
@@ -0,0 +1,46 @@
|
||||
"""Whole-scene Gaussian evidence with all infrastructure layers; review only."""
|
||||
from pathlib import Path
|
||||
import json
|
||||
import cv2,numpy as np
|
||||
from PIL import Image,ImageDraw,ImageFont
|
||||
from fit_scene import project
|
||||
|
||||
out=Path('/out');doc=json.loads((out/'full-map.json').read_text())
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
lo=np.min([t['bounds_xy'][0] for t in tiles],axis=0);hi=np.max([t['bounds_xy'][1] for t in tiles],axis=0)
|
||||
cell=max(.10,float(max(hi-lo)/2600));width,height=np.ceil((hi-lo)/cell).astype(int)
|
||||
rgb=np.full((height,width,3),255,np.uint8);quality=np.zeros((height,width),np.float32)
|
||||
for tile in tiles:
|
||||
low,high=np.asarray(tile['bounds_xy']);x0,y0=np.floor([(low[0]-lo[0])/cell,(hi[1]-high[1])/cell]).astype(int);x1,y1=np.ceil([(high[0]-lo[0])/cell,(hi[1]-low[1])/cell]).astype(int)
|
||||
x0,y0=max(x0,0),max(y0,0);x1,y1=min(x1,width),min(y1,height)
|
||||
yy,xx=np.mgrid[y0:y1,x0:x1];points=np.c_[lo[0]+(xx.ravel()+.5)*cell,hi[1]-(yy.ravel()+.5)*cell]
|
||||
with np.load(Path('/survey')/tile['id']/'top.geometry.npz') as z:g=dict(z)
|
||||
raw=np.asarray(Image.open(Path('/ortho/evidence')/(tile['id']+'.ground.png')).convert('RGB'))
|
||||
uv=project(points,g).astype('float32');native=(uv+.5)*np.array([raw.shape[1],raw.shape[0]])/1200-.5
|
||||
coords=native.astype('float32').reshape(y1-y0,x1-x0,2)
|
||||
patch=cv2.remap(raw,coords[:,:,0],coords[:,:,1],cv2.INTER_LINEAR,borderMode=cv2.BORDER_CONSTANT,borderValue=(255,255,255))
|
||||
alpha=cv2.remap(g['alpha'].astype('float32'),uv[:,0].reshape(yy.shape),uv[:,1].reshape(yy.shape),cv2.INTER_LINEAR)
|
||||
center=(low+high)/2;score=alpha/(1+np.linalg.norm(points-center,axis=1).reshape(yy.shape));select=(score>quality[y0:y1,x0:x1])&(alpha>.05)
|
||||
rgb[y0:y1,x0:x1][select]=patch[select];quality[y0:y1,x0:x1][select]=score[select]
|
||||
image=Image.fromarray(rgb).convert('RGBA');fill=Image.new('RGBA',image.size);df=ImageDraw.Draw(fill)
|
||||
def xy(coords):
|
||||
p=np.asarray(coords);return [tuple(v) for v in np.c_[(p[:,0]-lo[0])/cell,(hi[1]-p[:,1])/cell]]
|
||||
def polygons(g):return [g['coordinates']] if g['type']=='Polygon' else g['coordinates'] if g['type']=='MultiPolygon' else []
|
||||
for f in doc['features']:
|
||||
if f['properties']['class']!='pedestrian_area':continue
|
||||
for rings in polygons(f['geometry']):
|
||||
df.polygon(xy(rings[0]),fill=(25,193,120,58))
|
||||
for hole in rings[1:]:df.polygon(xy(hole),fill=(0,0,0,0))
|
||||
image=Image.alpha_composite(image,fill);draw=ImageDraw.Draw(image)
|
||||
colors={'road_boundary':'#ec7c19','pedestrian_boundary':'#12a55c','building_facade':'#0097e0','road_marking':'#f1c300'}
|
||||
for cls,color in colors.items():
|
||||
for f in doc['features']:
|
||||
if f['properties']['class']!=cls:continue
|
||||
g=f['geometry'];rings=[r for p in polygons(g) for r in p] if polygons(g) else g['coordinates'] if g['type']=='MultiLineString' else [g['coordinates']]
|
||||
for ring in rings:draw.line(xy(ring),fill=color,width=1 if cls=='road_marking' else 2,joint='curve')
|
||||
frame=Image.new('RGB',(width,height+68),'white');frame.paste(image.convert('RGB'),(0,68));d=ImageDraw.Draw(frame);font=ImageFont.truetype('/candidate/review-font.ttf',20)
|
||||
d.text((14,8),'Все слои инфраструктуры поверх гауссов',font=font,fill='#263640');x=14
|
||||
for label,color in [('Дороги','#ec7c19'),('Пешеходные зоны','#12a55c'),('Фасады','#0097e0'),('Разметка','#d0a000')]:
|
||||
d.rectangle((x,42,x+17,57),fill=color);d.text((x+25,36),label,font=font,fill='#263640');x+=int(d.textlength(label,font=font))+60
|
||||
frame.save(out/'overview.jpg',quality=95)
|
||||
print('OVERVIEW',width,height)
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Review actual Gaussian pixels and complete before/after symbol geometry."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from fit_scene import project
|
||||
from search_views import SearchViews
|
||||
|
||||
out = Path('/out')
|
||||
before = json.loads(Path('/fullplan/full-map.json').read_text())
|
||||
after = json.loads((out/'full-map.json').read_text())
|
||||
rows = json.loads((out/'arrow-proposals.json').read_text())
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels = z['labels']; low, high = z['bounds']
|
||||
tiles = [t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
views = SearchViews(tiles, labels, low, high, None)
|
||||
font = ImageFont.truetype('/candidate/review-font.ttf', 24)
|
||||
manifest = []
|
||||
for i, row in enumerate(rows):
|
||||
x0,y0,x1,y1 = row['bounds_xy']; center = np.array([(x0+x1)/2,(y0+y1)/2])
|
||||
name = min(views.tiles, key=lambda t:np.linalg.norm(np.mean(t['bounds_xy'],axis=0)-center))['id']
|
||||
geometry = views.geometry(name); raw, _ = views.inputs(name)
|
||||
base = Image.fromarray(raw)
|
||||
uv = project(center[None,:],geometry)[0]*base.width/1200
|
||||
side = max(3.,max(x1-x0,y1-y0)+1.)*base.width/60
|
||||
box = tuple(np.r_[uv-side/2,uv+side/2].astype(int))
|
||||
def draw(features):
|
||||
image = base.copy(); d = ImageDraw.Draw(image)
|
||||
for feature in features:
|
||||
if feature['properties'].get('class') != 'road_marking': continue
|
||||
g = feature['geometry']
|
||||
polygons = [g['coordinates']] if g['type']=='Polygon' else g['coordinates'] if g['type']=='MultiPolygon' else []
|
||||
for poly in polygons:
|
||||
for ring in poly:
|
||||
d.line([tuple(v) for v in project(ring,geometry)*base.width/1200],fill='#ffe000',width=1)
|
||||
return image
|
||||
frame = Image.new('RGB',(1800,655),'white'); d = ImageDraw.Draw(frame)
|
||||
for col,(im,title) in enumerate([(base,'Гауссы'),(draw(before['features']),'До'),(draw(row['after']),'Шаблон' if row['accepted'] else 'Кандидат — не принят')]):
|
||||
frame.paste(im.crop(box).resize((600,600),Image.Resampling.LANCZOS),(col*600,55))
|
||||
d.text((col*600+12,14),f'{i+1} · {title}',font=font,fill='#263640')
|
||||
path = out/f'arrow-proposal-{i+1:03d}.jpg'; frame.save(path,quality=95)
|
||||
manifest.append(dict(file=path.name,output_ids=row['output_ids'],source_tile=name))
|
||||
(out/'arrow-proposal-manifest.json').write_text(json.dumps(manifest,indent=2))
|
||||
print('RENDERED',len(manifest),'changes',flush=True)
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Frozen SAM3 concept segmentation on geometry-selected native patches."""
|
||||
from pathlib import Path
|
||||
import sys,json,time,hashlib,gc
|
||||
import numpy as np,cv2,torch
|
||||
from PIL import Image
|
||||
sys.path.insert(0,'/release/simulation/ai-polygon/sam3-research')
|
||||
from qualify import load_exact,sha
|
||||
import sam3.model_builder as builder
|
||||
from sam3.model.sam3_image_processor import Sam3Processor
|
||||
O=Path('/out');start=time.monotonic();torch.set_num_threads(3);cv2.setNumThreads(3)
|
||||
d=json.loads(Path('/release/simulation/ai-polygon/sam3-research/large-model.json').read_text());assets=Path('/assets')
|
||||
for n,h in d['files'].items():assert sha(assets/n)==h
|
||||
builder._load_checkpoint=load_exact
|
||||
model=builder.build_sam3_image_model(bpe_path='/source/assets/bpe_simple_vocab_16e6.txt.gz',checkpoint_path=str(assets/next(iter(d['files']))),load_from_HF=False,enable_segmentation=True,enable_inst_interactivity=False,compile=False,text_encoder_type=d['text_encoder'],text_encoder_context_length=16,device='cuda')
|
||||
processor=Sam3Processor(model,device='cuda',confidence_threshold=.30)
|
||||
prompts=['bicycle','bike symbol','bicycle road marking'];class_ids=[0,0,0];manifest=json.loads((O/'symbol-patches.json').read_text());folder=O/'symbol-masks';folder.mkdir(exist_ok=True);records=[]
|
||||
reuse=Path('/semantic_reuse');cached={}
|
||||
if (reuse/'symbol-semantics.json').exists():
|
||||
previous=json.loads((reuse/'symbol-semantics.json').read_text());raw=reuse/'symbol-patches.json'
|
||||
assert sha(raw)==previous['patch_manifest_sha256'] and previous['prompts']==prompts
|
||||
prior_patches={p['id']:p for p in json.loads(raw.read_text())['patches']}
|
||||
for rec in previous['records']:
|
||||
cached[rec['id']]=(rec,prior_patches[rec['id']])
|
||||
for p in manifest['patches']:
|
||||
if p['id']in cached:
|
||||
rec,old=cached[p['id']]
|
||||
assert old['sha256']==p['sha256'] and old['world_corners']==p['world_corners']
|
||||
if rec['detections']:
|
||||
source=reuse/'symbol-masks'/(p['id']+'.npz');assert sha(source)==rec['sha256']
|
||||
(folder/source.name).write_bytes(source.read_bytes())
|
||||
records.append(rec)
|
||||
(O/'symbol-semantics.json').write_text(json.dumps(dict(model=d,prompts=prompts,class_ids=class_ids,class_labels=['bicycle'],threshold=.30,patch_manifest_sha256=sha(O/'symbol-patches.json'),records=records,seconds=time.monotonic()-start,manual_rois=[],reused_source=str(reuse)),indent=2))
|
||||
continue
|
||||
image_path=O/'symbol-patches'/(p['id']+'.png');assert sha(image_path)==p['sha256'];im=Image.open(image_path).convert('RGB');masks=[];scores=[];classes=[]
|
||||
with torch.inference_mode(),torch.autocast('cuda',dtype=torch.bfloat16):
|
||||
state=processor.set_image(im)
|
||||
for ci,prompt in enumerate(prompts):
|
||||
state=processor.set_text_prompt(prompt,state)
|
||||
mm=state['masks'].reshape(-1,im.height,im.width).cpu().numpy();ss=state['scores'].float().cpu().numpy().reshape(-1)
|
||||
for m,s in zip(mm,ss):
|
||||
if m.sum()*p['mpp']**2<.03:continue
|
||||
masks.append(m.astype('uint8'));scores.append(float(s));classes.append(class_ids[ci])
|
||||
if masks:
|
||||
dst=folder/(p['id']+'.npz');np.savez_compressed(dst,masks=np.asarray(masks),scores=np.asarray(scores),classes=np.asarray(classes));digest=sha(dst)
|
||||
else:digest=None
|
||||
records.append(dict(id=p['id'],detections=len(masks),scores=scores,classes=classes,sha256=digest));print('SEMANTIC',len(records),'/',len(manifest['patches']),p['id'],list(zip(classes,[round(s,3)for s in scores])),flush=True)
|
||||
(O/'symbol-semantics.json').write_text(json.dumps(dict(model=d,prompts=prompts,class_ids=class_ids,class_labels=['bicycle','arrow','letter_A'],threshold=.30,patch_manifest_sha256=sha(O/'symbol-patches.json'),records=records,seconds=time.monotonic()-start,manual_rois=[]),indent=2));im.close()
|
||||
del state;gc.collect()
|
||||
print('SEMANTICS COMPLETE',len(records),'SECONDS',time.monotonic()-start,flush=True)
|
||||
@@ -0,0 +1,32 @@
|
||||
"""Fixed-preset corners are landmarks; unrelated paint extrema are not endpoints.
|
||||
|
||||
All preset corners must meet observed paint edges. Whole-component completeness
|
||||
and head/tail identity remain independently required by arrow_mosaics.
|
||||
"""
|
||||
import cv2,numpy as np,shapely
|
||||
from registration import metrics as raster_metrics,CELL,POLICY
|
||||
|
||||
def metrics(poly,grid,view):
|
||||
result=raster_metrics(poly,grid,view)
|
||||
# The fitting target is clipped by a semantic region. A real thin wing tip
|
||||
# may fall outside that imperfect region. Check corners on original paint,
|
||||
# never on an artificial mask cut. Global shape and continuation gates stay.
|
||||
paint=view.get('paint',view['target'])&view['allowed']&view['observed']
|
||||
edge=paint&~cv2.erode(paint.astype('uint8'),np.ones((3,3),'uint8')).astype(bool)
|
||||
if not edge.any():result['landmark_max_error_m']=1e6;return result
|
||||
distances=cv2.distanceTransform((~edge).astype('uint8'),cv2.DIST_L2,cv2.DIST_MASK_PRECISE)*CELL
|
||||
vertices=shapely.get_coordinates(poly)[:-1];uv=((vertices-grid['lo'])/CELL).astype('float32')
|
||||
ds=cv2.remap(distances,uv[:,0,None],uv[:,1,None],cv2.INTER_LINEAR,borderMode=cv2.BORDER_CONSTANT,borderValue=1e6).ravel()
|
||||
result['landmark_max_error_m']=float(ds.max());result['landmark_errors_m']=ds.tolist()
|
||||
result['landmark_scope']='all-immutable-preset-corners-to-observed-paint-edge'
|
||||
return result
|
||||
|
||||
def passes(records):
|
||||
if records[0]['coverage']!=1. or records[0]['valid']<POLICY['min_valid']:return False
|
||||
for rank,m in enumerate(records):
|
||||
if rank and m['coverage']<.95:continue
|
||||
if m['valid']/max(m['coverage'],1e-9)<POLICY['min_valid']:return False
|
||||
if m['iou']<POLICY['min_iou']:return False
|
||||
if m['boundary_mean_m']>POLICY['max_boundary_mean_m']or m['boundary_p90_m']>POLICY['max_boundary_p90_m']:return False
|
||||
if m['landmark_max_error_m']>POLICY['max_endpoint_error_m']+(.04 if rank else 0.):return False
|
||||
return True
|
||||
@@ -0,0 +1,35 @@
|
||||
"""Prefer a verified fresh whole-object mask over a seed-derived context box."""
|
||||
import json,hashlib
|
||||
from pathlib import Path
|
||||
from functools import lru_cache
|
||||
import numpy as np
|
||||
from shapely.geometry import shape
|
||||
from component_targets import vector
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def uniform_regions(root):
|
||||
root=Path(root);manifest=root/'symbol-patches.json';semantic=root/'symbol-semantics.json'
|
||||
if not semantic.exists():return []
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
doc=json.loads(semantic.read_bytes());assert doc['patch_manifest_sha256']==sha(manifest)
|
||||
patches={p['id']:p for p in json.loads(manifest.read_bytes())['patches']};result=[]
|
||||
for rec in doc['records']:
|
||||
if 1 not in rec['classes']:continue
|
||||
p=patches[rec['id']];mask=root/'symbol-masks'/(rec['id']+'.npz')
|
||||
assert sha(mask)==rec['sha256'] and sha(root/'symbol-patches'/(rec['id']+'.png'))==p['sha256']
|
||||
with np.load(mask)as z:
|
||||
for m,score,cls in zip(z['masks'],z['scores'],z['classes']):
|
||||
if cls==1 and score>=.50:result.append((vector(m,p),p['id']))
|
||||
return result
|
||||
|
||||
def region_for(seed,legacy):
|
||||
candidates=[(p,patch)for p,patch in uniform_regions('/uniformplan')
|
||||
if p.intersection(seed).area/max(seed.area,1e-9)>.4]
|
||||
if candidates:
|
||||
p,patch=max(candidates,key=lambda v:v[0].intersection(seed).area/max(v[0].union(seed).area,1e-9))
|
||||
return p,patch,'uniform-semantic'
|
||||
matches=[d for d in legacy if shape(d['extent']).intersection(seed).area/max(seed.area,1e-9)>.4]
|
||||
if matches:
|
||||
d=max(matches,key=lambda d:shape(d['extent']).intersection(seed).area/max(shape(d['extent']).union(seed).area,1e-9))
|
||||
return shape(d['extent']),d['patch'],'cached-semantic'
|
||||
return seed.buffer(.30),None,'existing-symbol-context'
|
||||
@@ -0,0 +1,73 @@
|
||||
"""Immutable metric 1.18 presets, constructed from figure B.5/table B.1.
|
||||
|
||||
Reference: GOST R 51256-2018, the published dimensioned drawing, not a scan.
|
||||
Only a similarity transform is allowed. No shear, vertex, head or stem fitting.
|
||||
Profile names describe the drawing's two size variants, not inferred speed limits.
|
||||
"""
|
||||
import numpy as np
|
||||
from functools import lru_cache
|
||||
from shapely.geometry import Polygon
|
||||
from shapely.affinity import scale, rotate, translate
|
||||
from shapely.ops import unary_union
|
||||
|
||||
SOURCE='https://www.mos.ru/upload/documents/files/1106/GOSTR51256-2018TehnicheskiesredstvaorganizaciidorojnogodvijeniyaR_.pdf'
|
||||
VERSION='fixed-118-119-similarity-v5'
|
||||
KINDS=('straight_arrow','left_arrow','right_arrow','straight_left_arrow','straight_right_arrow','merge_left_arrow','merge_right_arrow')
|
||||
PROFILES={
|
||||
'short':dict(L=5.,L1=2.05,a1=.70,a2=.80,b=.50,d1=.35,d2=2.60),
|
||||
'long':dict(L=7.50,L1=2.05,a1=1.20,a2=1.30,b=.50,d1=1.45,d2=4.60),
|
||||
}
|
||||
|
||||
@lru_cache(maxsize=32)
|
||||
def preset(kind,profile):
|
||||
if kind not in KINDS:raise ValueError(kind)
|
||||
if kind.startswith('merge_'):return merge_preset(kind,profile)
|
||||
d=PROFILES[profile];L=d['L'];stem=.15;half=stem/2
|
||||
straight=Polygon([(0,-half),(L-d['L1'],-half),(L-d['L1'],-.375),(L,0),(L-d['L1'],.375),(L-d['L1'],half),(0,half)])
|
||||
if kind=='straight_arrow':return straight
|
||||
# Figure coordinates: longitudinal is upwards; lateral dimensions are
|
||||
# measured from the stem's outer edge. Wing x=.75, tip x=1.05; 45-degree neck.
|
||||
upper=L-d['a2'];tip=upper-d['b'];lower=tip-d['b']
|
||||
vertices=[(0,0),(stem,0),(stem,d['d2']),(.75,lower),(.75,lower-d['a1']),
|
||||
(1.05,tip),(.75,L),(.75,upper),(0,upper-.75)]
|
||||
turn=Polygon([(y,-(x-half)) for x,y in vertices])
|
||||
assert turn.is_valid and abs(lower-d['d2']-(.75-stem))<1e-8
|
||||
if kind.startswith('straight_'):
|
||||
turn=translate(turn,xoff=d['d1']-d['d2'])
|
||||
# Trim the shifted tail below the common base, then union the fixed branch.
|
||||
from shapely.geometry import box
|
||||
turn=unary_union([straight,turn.intersection(box(0,-2,L,2))])
|
||||
if 'left' in kind:turn=scale(turn,xfact=1,yfact=-1,origin=(0,0))
|
||||
assert turn.geom_type=='Polygon' and turn.is_valid
|
||||
return turn
|
||||
|
||||
def polygon(kind,profile,pose):
|
||||
x,y,angle,factor=map(float,pose)
|
||||
if not .75<=factor<=1.25:raise ValueError('Uniform scale outside profile envelope')
|
||||
q=scale(preset(kind,profile),xfact=factor,yfact=factor,origin=(0,0))
|
||||
return translate(rotate(q,angle,origin=(0,0),use_radians=True),xoff=x,yoff=y)
|
||||
|
||||
def dimensions(kind,profile,pose):
|
||||
q=preset(kind,profile);b=q.bounds;s=pose[3]
|
||||
return [pose[0],pose[1],pose[2],(b[2]-b[0])*s,(b[3]-b[1])*s,(.28 if kind.startswith('merge_') else .15)*s]
|
||||
|
||||
|
||||
def merge_preset(kind,profile):
|
||||
"""Fixed B.6 artwork: 5/7.5 m length and .28 m tail, mirrored by class.
|
||||
|
||||
Curves are digitized once from the published 0.1 m grid. This reference
|
||||
artwork is independent of every observed scan; compliance is not asserted.
|
||||
Cubic Bezier interpolation is only authoring the reusable preset, never
|
||||
a degree of freedom in its placement on a scene.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import json
|
||||
d=json.loads(Path(__file__).with_name('merge_arrow_artwork.json').read_text())['profiles'][profile]
|
||||
def bezier(c):
|
||||
c=np.asarray(c,float);t=np.linspace(0.,1.,33)[:,None]
|
||||
return (1-t)**3*c[0]+3*(1-t)**2*t*c[1]+3*(1-t)*t**2*c[2]+t**3*c[3]
|
||||
coordinates=np.vstack([bezier(d['outer']),d['head'],bezier(d['inner'])])
|
||||
p=Polygon(coordinates)
|
||||
if kind=='merge_left_arrow':p=scale(p,xfact=1,yfact=-1,origin=(0,0))
|
||||
assert p.is_valid and abs(p.bounds[2]-PROFILES[profile]['L'])<1e-10
|
||||
return p
|
||||
@@ -0,0 +1,17 @@
|
||||
"""Bound actual corridor tiles, not empty cells of its enclosing rectangle."""
|
||||
import numpy as np
|
||||
|
||||
def corridor_cells(xy, origin, extent, *, step=40., radius=20., limit=256):
|
||||
xy=np.asarray(xy,float)
|
||||
if xy.ndim!=2 or xy.shape[1]!=2 or not len(xy) or not np.isfinite(xy).all():
|
||||
raise ValueError('Invalid trajectory XY')
|
||||
cells=[]
|
||||
for ix in range(int(extent[0])):
|
||||
for iy in range(int(extent[1])):
|
||||
low=np.asarray(origin)+np.array([ix,iy])*step
|
||||
distance=np.linalg.norm(np.maximum(np.maximum(low-xy,xy-low-step),0),axis=1)
|
||||
if np.any(distance<=radius):
|
||||
cells.append((ix,iy))
|
||||
if len(cells)>limit:
|
||||
raise ValueError('Pose corridor exceeds the 256-tile envelope')
|
||||
return cells
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Synthetic regressions for whole-symbol ownership and image admission."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from shapely.geometry import box, mapping
|
||||
from arrow_admission import already_has_symbol, registered_geometry_passes
|
||||
from component_conflicts import symbol_replacements
|
||||
from glyph_templates import polygon
|
||||
|
||||
def feature(p,kind,identity):
|
||||
return dict(id=identity,geometry=mapping(p),properties=dict(**{'class':'road_marking'},subtype=kind))
|
||||
|
||||
def test_stem_is_not_a_complete_symbol():
|
||||
arrow=polygon('straight_arrow',[0,0,0,5,1.5,.16,.65,0])
|
||||
stem=box(.2,-.07,2.9,.07)
|
||||
f=feature(stem,'linear_marking','stem')
|
||||
assert not already_has_symbol(arrow,[f])
|
||||
assert symbol_replacements(arrow,'straight_arrow',[f])==[f]
|
||||
assert already_has_symbol(arrow,[feature(arrow,'straight_arrow','whole')])
|
||||
|
||||
def test_crossing_line_cannot_be_consumed():
|
||||
arrow=polygon('straight_arrow',[0,0,0,5,1.5,.16,.65,0])
|
||||
crossing=feature(box(1.9,-3,2.1,3),'linear_marking','crossing')
|
||||
assert symbol_replacements(arrow,'straight_arrow',[crossing]) is None
|
||||
|
||||
def test_absolute_registration_rejects_offset_or_wrong_ends():
|
||||
good=dict(coverage=1.,valid=1.,iou=.85,boundary_mean_m=.025,boundary_p90_m=.06,endpoint_error_m=.05)
|
||||
assert registered_geometry_passes([good,good])
|
||||
for bad in [dict(good,boundary_p90_m=.25),dict(good,endpoint_error_m=.30),dict(good,iou=.40),dict(good,valid=.80)]:
|
||||
assert not registered_geometry_passes([bad,good])
|
||||
assert not registered_geometry_passes([good,dict(good,boundary_mean_m=.3)])
|
||||
assert not registered_geometry_passes([good,dict(good,valid=.5)])
|
||||
assert not registered_geometry_passes([dict(good,endpoint_xy_error_m=.25),good])
|
||||
|
||||
def test_observed_continuation_is_not_hidden_by_semantic_mask():
|
||||
import numpy as np,shapely
|
||||
from arrow_evidence import directional_score
|
||||
pars=[0,0,0,5,1.5,.16];q=polygon('straight_arrow',pars+[.65,0])
|
||||
x,y=np.meshgrid(np.arange(-1,7,.04),np.arange(-2,2,.04));pts=np.c_[x.ravel(),y.ravel()]
|
||||
paint=shapely.contains_xy(q.union(box(4.9,-.12,7,.12)),pts[:,0],pts[:,1]).reshape(x.shape)
|
||||
known=np.ones(x.shape,bool);rgb=np.zeros((*x.shape,3),np.uint8)
|
||||
score=directional_score(rgb,known,pts,q,kind='straight_arrow',parameters=pars,observed=known,paint_override=paint,semantic_extent=q,alpha_good=known)
|
||||
assert score['ends'][1]['paint_fraction']>.25
|
||||
assert score['connected_at_window_edge']
|
||||
assert score['connected_recall']<.85
|
||||
paved=known&(x<5.05)
|
||||
background=directional_score(rgb,paved,pts,q,kind='straight_arrow',parameters=pars,observed=known,paint_override=paint,semantic_extent=q,alpha_good=known)
|
||||
assert background['ends'][1]['paint_fraction']==0.
|
||||
assert background['ends'][1]['valid']==1.
|
||||
isolated=shapely.contains_xy(q.union(box(5.15,-.12,7,.12)),pts[:,0],pts[:,1]).reshape(x.shape)
|
||||
separate=directional_score(rgb,known,pts,q,kind='straight_arrow',parameters=pars,observed=known,paint_override=isolated,semantic_extent=q,alpha_good=known)
|
||||
assert separate['ends'][1]['paint_fraction']==0.
|
||||
assert separate['ends'][1]['unconnected_paint_fraction']>.25
|
||||
|
||||
def test_geometry_and_end_probes_share_projective_frame():
|
||||
import numpy as np,shapely
|
||||
from arrow_frames import geometry_in_frame,points_in_frame
|
||||
q=polygon('straight_left_arrow',[0,0,0,5,1.5,.16,.65,0])
|
||||
h=np.array([[1.03,.04,3.],[-.02,.97,-2.],[.001,-.002,1.]])
|
||||
warped=geometry_in_frame(q,h);inverse=np.linalg.inv(h)
|
||||
assert geometry_in_frame(warped,inverse).symmetric_difference(q).area<1e-9
|
||||
x,y=np.meshgrid(np.arange(2,10,.07),np.arange(-4,1,.07));pts=np.c_[x.ravel(),y.ravel()]
|
||||
original=points_in_frame(pts,inverse)
|
||||
assert np.array_equal(shapely.contains_xy(warped,pts[:,0],pts[:,1]),shapely.contains_xy(q,original[:,0],original[:,1]))
|
||||
|
||||
if __name__=='__main__':
|
||||
tests=[test_stem_is_not_a_complete_symbol,test_crossing_line_cannot_be_consumed,test_absolute_registration_rejects_offset_or_wrong_ends,test_observed_continuation_is_not_hidden_by_semantic_mask,test_geometry_and_end_probes_share_projective_frame]
|
||||
for test in tests:test()
|
||||
Path('/out/arrow-tests.json').write_text(json.dumps(dict(passed=len(tests))))
|
||||
print('PASSED',len(tests))
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Synthetic metric registration checks, independent of any survey location."""
|
||||
import numpy as np
|
||||
from shapely.geometry import box
|
||||
from catalog_templates import bicycle
|
||||
from compact_bicycle import fit_bicycle
|
||||
import shapely
|
||||
from shapely.affinity import translate
|
||||
from compact_evidence import glyph_score
|
||||
|
||||
|
||||
def test_small_bicycle_registration_keeps_clean_artwork():
|
||||
for parameters in ([0., 0., .4, .56, .75, 0.], [18., -12., 2., .8, 1.1, 0.]):
|
||||
target = bicycle(parameters)
|
||||
assert fit_bicycle(target, proposal_only=True) >= .55
|
||||
fits = fit_bicycle(target, all_hypotheses=True)
|
||||
assert fits
|
||||
best = max(fits, key=lambda f: f['polygon'].intersection(target).area /
|
||||
f['polygon'].union(target).area)
|
||||
overlap = best['polygon'].intersection(target).area / best['polygon'].union(target).area
|
||||
assert overlap > .80, overlap
|
||||
assert best['parameters'][5] == 0.
|
||||
assert best['polygon'].is_valid
|
||||
assert best['polygon'].area > 0
|
||||
assert best['polygon'].equals_exact(bicycle(best['parameters']), 1e-9)
|
||||
|
||||
|
||||
def test_solid_and_unresolved_fragments_are_not_bicycles():
|
||||
assert fit_bicycle(box(0, 0, .7, .5)) is None
|
||||
assert fit_bicycle(box(0, 0, .04, .04)) is None
|
||||
|
||||
|
||||
def test_native_pixel_tolerance_does_not_depend_on_evidence_grid():
|
||||
target = box(.4, .5, .5, 1.3)
|
||||
for cell in [.01, .005]:
|
||||
yy, xx = np.mgrid[0:1.8:cell, 0:1.8:cell]
|
||||
points = np.c_[xx.ravel(), yy.ravel()]
|
||||
known = np.ones(xx.shape, bool)
|
||||
rgb = np.zeros((*xx.shape,3), 'uint8')
|
||||
for shift, expected in [(.02, True), (.15, False)]:
|
||||
paint = shapely.contains_xy(translate(target,xoff=shift), points[:,0], points[:,1]).reshape(xx.shape)
|
||||
result = glyph_score(rgb,known,points,target,cell=cell,paint_override=paint,tolerance_m=.03)
|
||||
assert (result['support'] > .95) == expected
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_small_bicycle_registration_keeps_clean_artwork()
|
||||
test_solid_and_unresolved_fragments_are_not_bicycles()
|
||||
test_native_pixel_tolerance_does_not_depend_on_evidence_grid()
|
||||
print('3 synthetic compact-symbol tests passed')
|
||||
@@ -0,0 +1,36 @@
|
||||
"""Metric/rotation/brightness and false-positive regression cases."""
|
||||
import numpy as np,cv2,json
|
||||
from pathlib import Path
|
||||
from crossing_discovery import primitives,periodic,supported,aligned_with_anchors
|
||||
from crossing_completion import observations,groups
|
||||
from layer_common import feature
|
||||
from shapely.geometry import box
|
||||
from shapely.affinity import translate,rotate
|
||||
|
||||
assert periodic([0,.95,1.90,2.85])and periodic([100,100.95,101.90,102.85])
|
||||
assert not periodic([0,.95,2.5])and not periodic([0,3,6])and not periodic([0,.95])
|
||||
good=dict(valid=1.,body_valid=1.,observed_tips=2,contrast=20.,column_support=.9,tip_contrast=15.)
|
||||
assert supported([good,good])and not supported([good])
|
||||
for key,value in [('body_valid',.3),('contrast',2.),('column_support',.2),('tip_contrast',-4)]:assert not supported([good,dict(good,**{key:value})])
|
||||
assert supported([good,dict(good,body_valid=.8,observed_tips=1)])
|
||||
assert not supported([dict(good,observed_tips=1)]*2)
|
||||
anchors=[feature(box(-2,s-.25,2,s+.25),'road_marking',subtype='crosswalk')for s in [0,.95,1.9,2.85]]
|
||||
next_bar=box(-2,3.8-.25,2,3.8+.25)
|
||||
assert aligned_with_anchors(next_bar,anchors)
|
||||
assert not aligned_with_anchors(translate(next_bar,yoff=.3),anchors)
|
||||
assert not aligned_with_anchors(rotate(next_bar,20),anchors)
|
||||
assert not aligned_with_anchors(box(-2,3.3,2,4.3),anchors)
|
||||
# Simulated native image with metric camera calibration; rotations and lighting
|
||||
# change image evidence, never classifier rules or location parameters.
|
||||
size=1200;cell=60/size;g=dict(view=np.eye(4),intrinsics=np.array([[20,0,600],[0,20,600],[0,0,1.]]));g['view'][1,1]=-1
|
||||
low=np.array([-30.,-30.]);high=np.array([30.,30.]);labels=np.ones((600,600),'uint8');counts=[]
|
||||
for degrees,level in [(0,150),(35,150),(80,110),(125,180)]:
|
||||
rgb=np.full((size,size,3),65,'uint8');cross=np.zeros((size,size),'float32');angle=np.deg2rad(degrees);u=np.array([np.cos(angle),np.sin(angle)]);v=np.array([-u[1],u[0]])
|
||||
for s in [-1.5,-.5,.5,1.5]:
|
||||
pts=(np.array([[-2,-.25],[2,-.25],[2,.25],[-2,.25]])@np.array([u,v])+v*s)/cell+size/2
|
||||
pts=np.rint(pts).astype('int32');cv2.fillPoly(rgb,[pts],(level,)*3);cv2.fillPoly(cross,[pts],1.)
|
||||
ps=primitives(rgb,cross,np.zeros((1200,1200),'float32'),g,labels,low,high)
|
||||
obs=observations([feature(p,'road_marking',subtype='crosswalk')for p in ps]);families=groups(obs);counts.append(len(ps));assert max(map(len,families),default=0)>=3,(degrees,level,len(ps))
|
||||
assert not primitives(rgb,cross,np.zeros((1200,1200),'float32'),g,labels*2,low,high),'paving is not road paint'
|
||||
Path('/out/crossing-tests.json').write_text(json.dumps(dict(passed=True,rotation_brightness_cases=4,counts=counts,road_context_veto=True,period_and_two_view_guards=True)))
|
||||
print('CROSSING TESTS PASSED',counts,flush=True)
|
||||
@@ -0,0 +1,49 @@
|
||||
"""A fitted preset must preserve every pairwise length ratio and mirror identity."""
|
||||
import json,numpy as np,shapely
|
||||
from pathlib import Path
|
||||
from shapely.affinity import scale
|
||||
from standard_arrow_templates import KINDS,PROFILES,preset,polygon
|
||||
|
||||
checks={}
|
||||
for profile in PROFILES:
|
||||
for kind in KINDS:
|
||||
p=preset(kind,profile);q=polygon(kind,profile,[13.,-9.,.71,1.12])
|
||||
x=shapely.get_coordinates(p);y=shapely.get_coordinates(q)
|
||||
assert p.is_valid and q.is_valid and len(x)==len(y)
|
||||
assert np.allclose(np.linalg.norm(y[:,None]-y[None,:],axis=2),1.12*np.linalg.norm(x[:,None]-x[None,:],axis=2),atol=1e-10)
|
||||
checks[profile+'-'+kind]=True
|
||||
for stem in ['', 'straight_', 'merge_']:
|
||||
left=preset(stem+'left_arrow',profile);right=scale(preset(stem+'right_arrow',profile),xfact=1,yfact=-1,origin=(0,0))
|
||||
assert left.symmetric_difference(right).area<1e-10
|
||||
assert preset('straight_arrow','short').bounds==(0.,-.375,5.,.375)
|
||||
for bad in [.74,1.26]:
|
||||
try:polygon('straight_arrow','short',[0,0,0,bad])
|
||||
except ValueError:pass
|
||||
else:raise AssertionError('unbounded scale')
|
||||
from standard_arrow_evidence import metrics,passes
|
||||
from shapely.geometry import box
|
||||
q=preset('right_arrow','short')
|
||||
x,y=np.meshgrid(np.arange(-.5,6.,.025),np.arange(-1.5,.5,.025));points=np.c_[x.ravel(),y.ravel()];known=np.ones(x.shape,bool)
|
||||
paint=shapely.contains_xy(q,points[:,0],points[:,1]).reshape(x.shape)
|
||||
grid=dict(lo=np.array([-.5,-1.5]),points=points,size=x.shape,angle=0.)
|
||||
view=dict(target=paint,allowed=known,observed=known)
|
||||
a=metrics(q,grid,view);assert passes([a,a])
|
||||
# Unrelated bright paint must not redefine the arrow's far endpoint.
|
||||
foreign=shapely.contains_xy(box(5.4,-.8,5.5,-.7),points[:,0],points[:,1]).reshape(x.shape)
|
||||
b=metrics(q,grid,dict(view,target=paint|foreign));assert b['endpoint_error_m']>.3 and passes([b,b])
|
||||
assert not passes([dict(a,landmark_max_error_m=.25),a])
|
||||
checks['unrelated-paint-is-not-arrow-end']=True
|
||||
checks['displaced-landmark-rejected']=True
|
||||
clipped=paint&(x<4.8)
|
||||
c=metrics(q,grid,dict(view,target=clipped,paint=paint))
|
||||
assert c['landmark_max_error_m']==a['landmark_max_error_m']
|
||||
checks['semantic-mask-cut-cannot-remove-real-corner']=True
|
||||
from fit_standard_arrows import fit
|
||||
from shapely.affinity import translate
|
||||
full_view=dict(view,paint=paint)
|
||||
fit_grid=dict(grid,views=[full_view,full_view])
|
||||
fitted=fit('right_arrow',translate(q,xoff=.08,yoff=.04),.03,fit_grid)
|
||||
assert fitted and fitted[0]['geometry'].hausdorff_distance(q)<.10
|
||||
checks['whole-preset-pose-recovered-from-offset-seed']=True
|
||||
Path('/out/standard-tests.json').write_text(json.dumps(dict(passed=True,checks=checks)))
|
||||
print('PASSED',len(checks),'preset invariants',flush=True)
|
||||
@@ -0,0 +1,31 @@
|
||||
import numpy as np,json
|
||||
from pathlib import Path
|
||||
from zigzag_extension import proposal,supported
|
||||
v=np.c_[np.arange(6)*2.,[0,2,0,2,0,2]]
|
||||
assert np.allclose(proposal(v,.1)[0][-1],[12,0])
|
||||
assert np.allclose(proposal(v,.1,True)[0][0],[-2,2])
|
||||
shift=np.array([181.,-273.]);assert np.allclose(np.array(proposal(v+shift,.1)[0])-shift,proposal(v,.1)[0])
|
||||
bad=v.copy();bad[2]+=[.5,0];assert proposal(bad,.1)is None
|
||||
assert proposal(v[:4],.1)is None
|
||||
assert proposal(np.c_[np.arange(6)*2.,np.zeros(6)],.1)is None
|
||||
good=dict(paint_coverage=1.,paint_valid=1.,observed_support=.99,recall=.99,negative_paint=.01)
|
||||
assert supported([good,good])
|
||||
for bad in [dict(good,paint_coverage=.9),dict(good,observed_support=.4),dict(good,negative_paint=.4)]:assert not supported([good,bad])
|
||||
print('PASSED phase and evidence regressions',flush=True)
|
||||
|
||||
from zigzag_extension import shortened,quiet_end,fit_end
|
||||
from shapely.geometry import LineString
|
||||
p=shortened(v,.1,False,.5)
|
||||
assert np.allclose(p[0][-1],[11,1]) and np.allclose(p[0][:-1],v)
|
||||
quiet=dict(good,observed_support=0.)
|
||||
assert quiet_end([quiet,quiet]) and not quiet_end([quiet,dict(quiet,paint_valid=.5)])
|
||||
def measure(leg,context):
|
||||
# Synthetic paint stops halfway through the next leg; unknown ground
|
||||
# beyond it must not be accepted as endpoint evidence.
|
||||
if leg.area<.03:return [quiet,quiet],['a','b']
|
||||
ok=leg.area<=.15
|
||||
return [good if ok else dict(good,observed_support=.4)]*2,['a','b']
|
||||
r=fit_end(v,.1,False,measure)
|
||||
assert r and r['fraction']<1. and r['exterior']
|
||||
|
||||
Path('/out/standard-tests.json').write_text(json.dumps(dict(passed=True,phase_and_translation=True,unsupported_extensions_rejected=True)))
|
||||
@@ -0,0 +1,19 @@
|
||||
import numpy as np,json
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
from zigzag_terminal import fit_terminal
|
||||
vertices=np.c_[np.arange(6)*2.,[0,2,0,2,0,2]];before=vertices.copy()
|
||||
good=dict(paint_coverage=1.,paint_valid=1.,observed_support=.99,recall=.99,negative_paint=.01)
|
||||
quiet=dict(good,observed_support=0.)
|
||||
views=[dict(rgb=np.full((2,2,3),i,'uint8'),observed=np.ones((2,2),bool),allowed=np.ones((2,2),bool))for i in [0,1]]
|
||||
def propose(paint,*args):return [(np.array([1.,-1.])/2**.5,1.,1.)]if paint.any()else[]
|
||||
def measure(poly,*args,**kwargs):return ([quiet,quiet]if poly.area<.04 else[good,good]),['primary','secondary']
|
||||
audit={}
|
||||
with patch('zigzag_terminal.grids',return_value=dict(views=views,lo=np.zeros(2))),patch('zigzag_terminal.paint_mask',side_effect=lambda rgb,**kw:rgb[:,:,0]>0),patch('zigzag_terminal.directions',side_effect=propose),patch('zigzag_terminal.mosaic_views',side_effect=measure):
|
||||
fitted=fit_terminal(vertices,.1,False,None,audit=audit)
|
||||
assert fitted is not None and audit['proposal_views']==[dict(rank=0,directions=0),dict(rank=1,directions=1)]
|
||||
assert np.array_equal(vertices,before)and np.allclose(fitted['points'][:-1],vertices)
|
||||
with patch('zigzag_terminal.grids',return_value=dict(views=views,lo=np.zeros(2))),patch('zigzag_terminal.paint_mask',side_effect=lambda rgb,**kw:rgb[:,:,0]>0),patch('zigzag_terminal.directions',side_effect=propose),patch('zigzag_terminal.mosaic_views',return_value=([dict(good,observed_support=.3)]*2,['a','b'])):
|
||||
assert fit_terminal(vertices,.1,False,None)is None
|
||||
Path('/out/terminal-view-tests.json').write_text(json.dumps(dict(passed=True,secondary_view_proposal=True,both_views_still_required=True,old_vertices_immutable=True)))
|
||||
print('TERMINAL VIEW TESTS PASSED',flush=True)
|
||||
@@ -0,0 +1,45 @@
|
||||
"""Remeasure every published candidate from Gaussian images, independently."""
|
||||
import json,hashlib
|
||||
from pathlib import Path
|
||||
import numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from layer_common import sample
|
||||
from search_views import SearchViews
|
||||
from glyph_templates import polygon
|
||||
from registration import grids,metrics
|
||||
from arrow_mosaics import mosaic_views
|
||||
from arrow_admission import accept_symbol,registered_geometry_passes
|
||||
from recall_extent import semantic_recall
|
||||
|
||||
out=Path('/out');rows=json.loads((out/'arrow-rows.json').read_text())
|
||||
source=json.loads(Path('/gateplan/arrow-gates.json').read_text())
|
||||
with np.load('/evidence_plan/fields.npz') as z:
|
||||
labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles'] if t['status']=='surveyed']
|
||||
views=SearchViews(tiles,labels,low,high,None);results=[]
|
||||
def equal(a,b):
|
||||
if isinstance(a,dict):return a.keys()==b.keys() and all(equal(v,b[k]) for k,v in a.items())
|
||||
if isinstance(a,list):return len(a)==len(b) and all(equal(x,y) for x,y in zip(a,b))
|
||||
if isinstance(a,(float,int)) and not isinstance(a,bool):return abs(a-b)<1e-7
|
||||
return a==b
|
||||
for row in rows:
|
||||
f=row['after'][0];p=f['properties'];reg=p['registration'];initial=reg['input_parameters']
|
||||
match=[d for d in source if d['patch']==p['semantic_patch'] and d['masks']==p['semantic_masks'] and any(x['kind']==p['subtype'] and x['parameters']==initial for x in d['fits'])]
|
||||
assert match
|
||||
extent=shape(match[0]['extent']);region=shape(match[0]['region'])
|
||||
assert all(extent.symmetric_difference(shape(d['extent'])).area<1e-9 for d in match)
|
||||
seed=polygon(p['subtype'],initial);q=shapely.force_2d(shape(f['geometry']))
|
||||
grid=grids(seed,views,surface_classes=(1,2),object_region=extent);grid['angle']=initial[2]
|
||||
met=[metrics(q,grid,v) for v in grid['views']]
|
||||
assert equal(met,row['registration_metrics']) and registered_geometry_passes(met)
|
||||
ev,names=mosaic_views(q,views,kind=p['subtype'],parameters=p['template_parameters'][:6],allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent,probe_frame=reg.get('homography_xy'))
|
||||
assert equal(ev,row['evidence']) and names==row['source_tiles']
|
||||
containment=q.intersection(region.buffer(.2)).area/max(q.area,1e-9)
|
||||
recall=semantic_recall(q,extent)
|
||||
assert abs(containment-row['semantic_containment'])<1e-7 and abs(recall-row['semantic_recall'])<1e-7
|
||||
assert accept_symbol(ev,p['semantic_score'],containment,p['template_fit_score'],p['subtype'])
|
||||
xyz=shapely.get_coordinates(shape(f['geometry']),include_z=True)
|
||||
assert np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
results.append(dict(id=f['id'],original_images_remeasured=True,height_from_gaussians=True))
|
||||
report=dict(passed=True,verified=len(results),rows=results,full_map_sha256=hashlib.sha256((out/'full-map.json').read_bytes()).hexdigest())
|
||||
(out/'arrow-observations-audit.json').write_text(json.dumps(report,indent=2));print('REMEASURED',len(results))
|
||||
@@ -0,0 +1,31 @@
|
||||
"""Independent publication checks: remeasure pixels and replay exact additions."""
|
||||
from pathlib import Path
|
||||
import json,hashlib,numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from layer_common import sample
|
||||
from crossing_discovery import evidence,supported,periodic,aligned_with_anchors,POLICY
|
||||
from crosswalk_family import rectangle_info
|
||||
from search_views import SearchViews
|
||||
O=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw);new=json.loads((O/'full-map.json').read_bytes());rows=json.loads((O/'arrow-rows.json').read_bytes());current={f['id']:f for f in old['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_bytes())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
for row in rows:
|
||||
anchors=[current[i]for i in row.get('context_ids',[])];anchored=bool(anchors)
|
||||
assert row['before']==[]and len(row['after'])>=(1 if anchored else POLICY['min_bars']);centers=[];angles=[]
|
||||
for f,ev in zip(row['after'],row['evidence']):
|
||||
assert f['id']not in current and f['properties']['subtype']=='crosswalk'
|
||||
p=shape(f['geometry']);xy=shapely.force_2d(p);assert xy.is_valid and len(p.exterior.coords)==5 and not p.interiors
|
||||
if anchored:assert aligned_with_anchors(xy,anchors)
|
||||
xyz=shapely.get_coordinates(p,include_z=True);assert np.isfinite(xyz).all()and np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
measured=evidence(xy,views);assert measured==ev and supported(measured)
|
||||
for e in measured:assert POLICY['min_length_m']<=e['length_m']<=POLICY['max_length_m']and POLICY['min_width_m']<=e['width_m']<=POLICY['max_width_m']
|
||||
box,c,u,v=rectangle_info(np.array(p.exterior.coords));centers.append(c);angles.append(u)
|
||||
for prior in current.values():
|
||||
if prior['properties']['class']=='road_marking':assert xy.intersection(shapely.force_2d(shape(prior['geometry']))).area<=.02
|
||||
current[f['id']]=f
|
||||
assert all(abs(angles[0]@u)>.999 for u in angles)
|
||||
v=np.array([-angles[0][1],angles[0][0]])
|
||||
if not anchored:assert periodic(np.array(centers)@v)
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256((O/'full-map.json').read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,original_images_remeasured=True,gaussian_height_remeasured=True,all_existing_features_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(O/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit,flush=True)
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Replay replacements and remeasure original pixels, height and fixed presets."""
|
||||
import json,hashlib,numpy as np,shapely
|
||||
from pathlib import Path
|
||||
from shapely.geometry import shape
|
||||
from search_views import SearchViews
|
||||
from layer_common import sample
|
||||
from standard_arrow_templates import polygon,dimensions
|
||||
from registration import grids
|
||||
from standard_arrow_regions import region_for
|
||||
from standard_arrow_evidence import metrics,passes as registered_geometry_passes
|
||||
from arrow_mosaics import mosaic_views
|
||||
from arrow_admission import accept_symbol
|
||||
from component_conflicts import symbol_replacements
|
||||
|
||||
out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw);new=json.loads((out/'full-map.json').read_bytes());rows=json.loads((out/'arrow-rows.json').read_text())
|
||||
current={f['id']:f for f in old['features']}
|
||||
sources=json.loads(Path('/gateplan/arrow-gates.json').read_text())
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
def same(a,b):
|
||||
if isinstance(a,dict):return a.keys()==b.keys()and all(same(v,b[k])for k,v in a.items())
|
||||
if isinstance(a,list):return len(a)==len(b)and all(same(x,y)for x,y in zip(a,b))
|
||||
if isinstance(a,(float,int)):return abs(a-b)<1e-7
|
||||
return a==b
|
||||
for row in rows:
|
||||
f=row['after'][0];props=f['properties'];p=shape(f['geometry']);q=shapely.force_2d(p);original=row['before'][0];kind=props['subtype']
|
||||
assert kind==original['properties']['subtype']
|
||||
spec=props['preset'];assert len(spec['pose'])==4 and spec['transform']=='similarity'
|
||||
clean=polygon(kind,spec['profile'],spec['pose']);assert clean.symmetric_difference(q).area<1e-8
|
||||
assert p.is_valid and np.isfinite(shapely.get_coordinates(p,include_z=True)).all()
|
||||
seed=shapely.force_2d(shape(original['geometry']));extent=shape(row['extent'])
|
||||
expected,patch,scope=region_for(seed,sources)
|
||||
assert expected.symmetric_difference(extent).area<1e-8 and patch==row['source_patch'] and scope==row['extent_source']
|
||||
grid=grids(seed,views,surface_classes=(1,2),object_region=extent);grid['angle']=row['input_parameters'][2]
|
||||
met=[metrics(q,grid,v)for v in grid['views']];assert same(met,row['registration_metrics'])and registered_geometry_passes(met)
|
||||
ev,names=mosaic_views(q,views,kind=kind,parameters=dimensions(kind,spec['profile'],spec['pose']),allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent)
|
||||
assert same(ev,row['evidence'])and names==row['source_tiles']
|
||||
assert accept_symbol(ev,props.get('semantic_score',.99),row['semantic_containment'],props.get('template_fit_score',.99),kind)
|
||||
other=[f for f in current.values()if f['id']!=original['id']];assert symbol_replacements(q,kind,other)==row['before'][1:]
|
||||
xyz=shapely.get_coordinates(p,include_z=True);assert np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
for f0 in row['before']:assert current.pop(f0['id'])==f0
|
||||
assert f['id']not in current;current[f['id']]=f
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
nonmark=lambda d:{f['id']:f for f in d['features']if f['properties']['class']!='road_marking'}
|
||||
assert nonmark(old)==nonmark(new)
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256((out/'full-map.json').read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,immutable_preset_geometry=True,original_images_remeasured=True,gaussian_height_remeasured=True,non_marking_layers_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit,flush=True)
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Replay replacements and remeasure original pixels, height and fixed presets."""
|
||||
import json,hashlib,numpy as np,shapely
|
||||
from pathlib import Path
|
||||
from shapely.geometry import shape
|
||||
from search_views import SearchViews
|
||||
from layer_common import sample
|
||||
from standard_arrow_templates import polygon,dimensions
|
||||
from registration import grids
|
||||
from standard_arrow_evidence import metrics,passes as registered_geometry_passes
|
||||
from arrow_mosaics import mosaic_views
|
||||
from arrow_admission import accept_symbol
|
||||
from component_conflicts import symbol_replacements
|
||||
|
||||
out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw);new=json.loads((out/'full-map.json').read_bytes());rows=json.loads((out/'arrow-rows.json').read_text())
|
||||
current={f['id']:f for f in old['features']}
|
||||
hypotheses=json.loads(Path('/gateplan/arrow-gates.json').read_text())
|
||||
from glyph_templates import polygon as seed_polygon
|
||||
from recall_extent import semantic_recall
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
def same(a,b):
|
||||
if isinstance(a,dict):return a.keys()==b.keys()and all(same(v,b[k])for k,v in a.items())
|
||||
if isinstance(a,list):return len(a)==len(b)and all(same(x,y)for x,y in zip(a,b))
|
||||
if isinstance(a,(float,int)):return abs(a-b)<1e-7
|
||||
return a==b
|
||||
for row in rows:
|
||||
f=row['after'][0];props=f['properties'];p=shape(f['geometry']);q=shapely.force_2d(p);kind=props['subtype']
|
||||
source=next(d for d in hypotheses if d['index']==row['source_index'])
|
||||
assert source['patch']==row['source_patch'] and source['masks']==props['semantic_masks']
|
||||
assert any(v['kind']==kind and v['parameters']==row['input_parameters']for v in source['fits'])
|
||||
spec=props['preset'];assert len(spec['pose'])==4 and spec['transform']=='similarity'
|
||||
clean=polygon(kind,spec['profile'],spec['pose']);assert clean.symmetric_difference(q).area<1e-8
|
||||
assert p.is_valid and np.isfinite(shapely.get_coordinates(p,include_z=True)).all()
|
||||
seed=seed_polygon(kind,row['input_parameters']);extent=shape(source['extent'])
|
||||
assert extent.symmetric_difference(shape(row['extent'])).area<1e-8;grid=grids(seed,views,surface_classes=(1,2),object_region=extent);grid['angle']=row['input_parameters'][2]
|
||||
met=[metrics(q,grid,v)for v in grid['views']];assert same(met,row['registration_metrics'])and registered_geometry_passes(met)
|
||||
ev,names=mosaic_views(q,views,kind=kind,parameters=dimensions(kind,spec['profile'],spec['pose']),allow_pedestrian=True,calibrate_ground=True,connectivity_open_m=0.,semantic_extent=extent)
|
||||
assert same(ev,row['evidence'])and names==row['source_tiles']
|
||||
assert accept_symbol(ev,props.get('semantic_score',.99),row['semantic_containment'],props.get('template_fit_score',.99),kind)
|
||||
assert semantic_recall(q,extent)>=.85
|
||||
assert symbol_replacements(q,kind,current.values())==row['before']
|
||||
xyz=shapely.get_coordinates(p,include_z=True);assert np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
for f0 in row['before']:assert current.pop(f0['id'])==f0
|
||||
assert f['id']not in current;current[f['id']]=f
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
nonmark=lambda d:{f['id']:f for f in d['features']if f['properties']['class']!='road_marking'}
|
||||
assert nonmark(old)==nonmark(new)
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256((out/'full-map.json').read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,immutable_preset_geometry=True,original_images_remeasured=True,gaussian_height_remeasured=True,non_marking_layers_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit,flush=True)
|
||||
@@ -0,0 +1,29 @@
|
||||
"""Exact replay, preserved phase, remeasured original pixels and Gaussian height."""
|
||||
from pathlib import Path
|
||||
import json,hashlib,numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from layer_common import sample
|
||||
from search_views import SearchViews
|
||||
from zigzag_mosaics import mosaic_views
|
||||
from zigzag_extension import proposal,supported,fit_end
|
||||
from component_conflicts import symbol_replacements
|
||||
|
||||
out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw);new=json.loads((out/'full-map.json').read_text());rows=json.loads((out/'arrow-rows.json').read_text());current={f['id']:f for f in old['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
for row in rows:
|
||||
first=row['before'][0];props=first['properties'];fitted=fit_end(props['vertices'],props['width_m'],row['reverse'],lambda leg,q:mosaic_views(leg,views,negative_context=q));assert fitted is not None
|
||||
points,q,leg=fitted['points'],fitted['polygon'],fitted['leg'];f=row['after'][0];p=shape(f['geometry'])
|
||||
assert fitted['fraction']==row['fraction']and fitted['exterior']==row['exterior']
|
||||
assert f['properties']['vertices']==points and f['properties']['subtype']=='zigzag'
|
||||
assert q.symmetric_difference(shapely.force_2d(p)).area<1e-8 and p.is_valid
|
||||
ev,names=fitted['evidence'],fitted['names'];assert ev==row['evidence']and names==row['source_tiles']and supported(ev)
|
||||
others=[f for f in current.values()if f['id']!=first['id']];assert symbol_replacements(q,'zigzag',others)==row['before'][1:]
|
||||
xyz=shapely.get_coordinates(p,include_z=True);assert np.isfinite(xyz).all()and np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
for f0 in row['before']:assert current.pop(f0['id'])==f0
|
||||
assert f['id']not in current;current[f['id']]=f
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
nonmark=lambda d:{f['id']:f for f in d['features']if f['properties']['class']!='road_marking'}
|
||||
assert nonmark(old)==nonmark(new)
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256((out/'full-map.json').read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,original_images_remeasured=True,gaussian_height_remeasured=True,non_marking_layers_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit,flush=True)
|
||||
@@ -0,0 +1,30 @@
|
||||
"""Exact replay, preserved phase, remeasured original pixels and Gaussian height."""
|
||||
from pathlib import Path
|
||||
import json,hashlib,numpy as np,shapely
|
||||
from shapely.geometry import shape
|
||||
from layer_common import sample
|
||||
from search_views import SearchViews
|
||||
from zigzag_mosaics import mosaic_views
|
||||
from zigzag_extension import supported
|
||||
from zigzag_terminal import fit_terminal
|
||||
from component_conflicts import symbol_replacements
|
||||
|
||||
out=Path('/out');raw=Path('/fullplan/full-map.json').read_bytes();old=json.loads(raw);new=json.loads((out/'full-map.json').read_text());rows=json.loads((out/'arrow-rows.json').read_text());current={f['id']:f for f in old['features']}
|
||||
with np.load('/evidence_plan/fields.npz')as z:labels,height,low,high=z['labels'],z['z'],z['bounds'][0],z['bounds'][1]
|
||||
tiles=[t for t in json.loads(Path('/survey/tile-index.json').read_text())['tiles']if t['status']=='surveyed'];views=SearchViews(tiles,labels,low,high,None)
|
||||
for row in rows:
|
||||
first=row['before'][0];props=first['properties'];fitted=fit_terminal(props['vertices'],props['width_m'],row['reverse'],views);assert fitted is not None
|
||||
points,q,leg=fitted['points'],fitted['polygon'],fitted['leg'];f=row['after'][0];p=shape(f['geometry'])
|
||||
assert fitted['fraction']==row['fraction']and fitted['exterior']==row['exterior']
|
||||
assert f['properties']['vertices']==points and f['properties']['subtype']=='zigzag'
|
||||
assert q.symmetric_difference(shapely.force_2d(p)).area<1e-8 and p.is_valid
|
||||
ev,names=fitted['evidence'],fitted['names'];assert ev==row['evidence']and names==row['source_tiles']and supported(ev)
|
||||
others=[f for f in current.values()if f['id']!=first['id']];assert symbol_replacements(q,'zigzag',others)==row['before'][1:]
|
||||
xyz=shapely.get_coordinates(p,include_z=True);assert np.isfinite(xyz).all()and np.allclose(xyz[:,2],sample(height,xyz[:,:2],low,high),atol=1e-7)
|
||||
for f0 in row['before']:assert current.pop(f0['id'])==f0
|
||||
assert f['id']not in current;current[f['id']]=f
|
||||
assert current=={f['id']:f for f in new['features']}
|
||||
nonmark=lambda d:{f['id']:f for f in d['features']if f['properties']['class']!='road_marking'}
|
||||
assert nonmark(old)==nonmark(new)
|
||||
audit=dict(passed=True,source_sha256=hashlib.sha256(raw).hexdigest(),full_map_sha256=hashlib.sha256((out/'full-map.json').read_bytes()).hexdigest(),transactions=len(rows),exact_transaction_replay=True,original_images_remeasured=True,gaussian_height_remeasured=True,non_marking_layers_unchanged=True,manual_regions=[],point_cloud_input=False)
|
||||
(out/'arrow-audit.json').write_text(json.dumps(audit,indent=2));print(audit,flush=True)
|
||||
@@ -0,0 +1,64 @@
|
||||
"""One observed leg at a periodic pattern end; never invent an unseen zigzag."""
|
||||
import numpy as np
|
||||
from shapely.geometry import LineString
|
||||
VERSION='observed-periodic-zigzag-end-v2'
|
||||
POLICY=dict(min_existing_legs=5,max_leg_residual_m=.15,min_support=.93,min_recall=.85,min_valid=.97,max_negative_paint=.08,max_new_legs_per_end=1)
|
||||
|
||||
def proposal(vertices,width,reverse=False):
|
||||
points=np.asarray(vertices,float)
|
||||
if reverse:points=points[::-1]
|
||||
if len(points)<POLICY['min_existing_legs']+1 or not .06<=width<=.22:return None
|
||||
vectors=np.diff(points,axis=0);phases=[vectors[-1::-2],vectors[-2::-2]]
|
||||
if any(len(v)<2 for v in phases):return None
|
||||
means=[np.median(v,axis=0)for v in phases]
|
||||
if max(np.linalg.norm(v-m,axis=1).max()for v,m in zip(phases,means))>POLICY['max_leg_residual_m']:return None
|
||||
if any(not .7<=np.linalg.norm(v)<=4.5 for v in means):return None
|
||||
cosine=float(means[0]@means[1]/np.prod([np.linalg.norm(v)for v in means]))
|
||||
if not -.65<=cosine<=.65:return None
|
||||
extended=np.vstack([points,points[-1]+means[1]])
|
||||
leg=LineString(extended[-2:]).buffer(width/2,cap_style=2,join_style=2)
|
||||
if reverse:extended=extended[::-1]
|
||||
line=LineString(extended)
|
||||
if not line.is_simple:return None
|
||||
return extended.tolist(),line.buffer(width/2,cap_style=2,join_style=2),leg
|
||||
|
||||
def supported(evidence):
|
||||
return len(evidence)>=2 and all(e['paint_coverage']==1. and e['paint_valid']>=POLICY['min_valid'] and e['observed_support']>=POLICY['min_support'] and e['recall']>=POLICY['min_recall'] and e['negative_paint']<=POLICY['max_negative_paint']for e in evidence)
|
||||
|
||||
def shortened(vertices,width,reverse,fraction):
|
||||
"""Preserve the periodic direction; shorten only the new terminal segment."""
|
||||
if not .20 <= fraction <= 1.:return None
|
||||
full=proposal(vertices,width,reverse)
|
||||
if full is None:return None
|
||||
points=np.asarray(full[0]);oriented=points[::-1].copy()if reverse else points.copy()
|
||||
origin=oriented[-2];vector=oriented[-1]-origin
|
||||
if np.linalg.norm(vector)*fraction < .45:return None
|
||||
oriented[-1]=origin+fraction*vector
|
||||
leg=LineString(oriented[-2:]).buffer(width/2,cap_style=2,join_style=2)
|
||||
points=oriented[::-1]if reverse else oriented
|
||||
return points.tolist(),LineString(points).buffer(width/2,cap_style=2,join_style=2),leg
|
||||
|
||||
def quiet_end(evidence):
|
||||
# A worn/occluded continuation is not a measured endpoint.
|
||||
return len(evidence)==2 and all(e['paint_coverage']==1. and e['paint_valid']>=.97
|
||||
and e['observed_support']<.15 for e in evidence)
|
||||
|
||||
def fit_end(vertices,width,reverse,measure):
|
||||
full=proposal(vertices,width,reverse)
|
||||
if full is None:return None
|
||||
ev,names=measure(full[2],full[1])
|
||||
if supported(ev):return dict(points=full[0],polygon=full[1],leg=full[2],fraction=1.,evidence=ev,names=names,exterior=[])
|
||||
points=np.asarray(full[0]);points=points[::-1]if reverse else points
|
||||
origin=points[-2];vector=points[-1]-origin;direction=vector/np.linalg.norm(vector)
|
||||
# Longest observed prefix wins. Fixed 5 cm sampling depends on metric
|
||||
# length only, never on scene identity or a manually selected endpoint.
|
||||
for length in np.arange(np.linalg.norm(vector)-.05,.44,-.05):
|
||||
fraction=length/np.linalg.norm(vector);p=shortened(vertices,width,reverse,fraction)
|
||||
if p is None:continue
|
||||
ev,names=measure(p[2],p[1])
|
||||
if not supported(ev):continue
|
||||
end=origin+direction*length
|
||||
exterior=LineString([end+direction*.15,end+direction*.40]).buffer(width/2,cap_style=2)
|
||||
stop,extra=measure(exterior,p[1])
|
||||
if quiet_end(stop):return dict(points=p[0],polygon=p[1],leg=p[2],fraction=fraction,evidence=ev,names=sorted(set(names+extra)),exterior=stop)
|
||||
return None
|
||||
@@ -0,0 +1,419 @@
|
||||
{
|
||||
"schema": "missioncore.urban-refinement-bundle/v1",
|
||||
"root": "simulation/urban-plan-research",
|
||||
"files": {
|
||||
"assembly_evidence.py": "assembly_pass/assembly_evidence.py",
|
||||
"assembly_rules.py": "assembly_pass/assembly_rules.py",
|
||||
"assembly_templates.py": "assembly_pass/assembly_templates.py",
|
||||
"assembly_zigzag.py": "assembly_pass/assembly_zigzag.py",
|
||||
"audit_assembly.py": "assembly_pass/audit_assembly.py",
|
||||
"audit_assembly_joins.py": "assembly_pass/audit_assembly_joins.py",
|
||||
"audit_beta.py": "beta_pass/audit_beta.py",
|
||||
"audit_catalog.py": "catalog_pass/audit_catalog.py",
|
||||
"audit_completion.py": "completion_pass/audit_completion.py",
|
||||
"audit_components.py": "component_pass/audit_components.py",
|
||||
"audit_consensus.py": "consensus_pass/audit_consensus.py",
|
||||
"audit_corridor.py": "corridor_pass/audit_corridor.py",
|
||||
"audit_discovery.py": "discovery_pass/audit_discovery.py",
|
||||
"audit_norms.py": "norms_pass/audit_norms.py",
|
||||
"audit_rows.py": "rows_pass/audit_rows.py",
|
||||
"audit_search.py": "search_pass/audit_search.py",
|
||||
"audit_sections.py": "sections_pass/audit_sections.py",
|
||||
"audit_symbols.py": "symbol_pass/audit_symbols.py",
|
||||
"audit_transitions.py": "transitions_pass/audit_transitions.py",
|
||||
"beta_profiles.py": "beta_pass/beta_profiles.py",
|
||||
"bicycle_artwork.py": "catalog_pass/bicycle_artwork.py",
|
||||
"catalog_context.py": "catalog_pass/catalog_context.py",
|
||||
"catalog_dependencies.py": "catalog_pass/catalog_dependencies.py",
|
||||
"catalog_dependency_pins.py": "catalog_pass/catalog_dependency_pins.py",
|
||||
"catalog_evidence.py": "symbol_pass/catalog_evidence.py",
|
||||
"catalog_rules.py": "catalog_pass/catalog_rules.py",
|
||||
"catalog_templates.py": "catalog_pass/catalog_templates.py",
|
||||
"catalog_zigzag.py": "catalog_pass/catalog_zigzag.py",
|
||||
"completion_profiles.py": "completion_pass/completion_profiles.py",
|
||||
"component_arrows.py": "component_pass/component_arrows.py",
|
||||
"component_bicycle.py": "component_pass/component_bicycle.py",
|
||||
"component_conflicts.py": "component_pass/component_conflicts.py",
|
||||
"component_evidence.py": "component_pass/component_evidence.py",
|
||||
"component_mosaics.py": "component_pass/component_mosaics.py",
|
||||
"component_rules.py": "component_pass/component_rules.py",
|
||||
"component_surface.py": "component_pass/component_surface.py",
|
||||
"component_targets.py": "component_pass/component_targets.py",
|
||||
"component_zigzag_rules.py": "component_pass/component_zigzag_rules.py",
|
||||
"consensus_profiles.py": "consensus_pass/consensus_profiles.py",
|
||||
"coordinate_cache.py": "orthophoto/coordinate_cache.py",
|
||||
"corridor_profiles.py": "search_pass/corridor_profiles.py",
|
||||
"coverage_evidence.py": "coverage_pass/coverage_evidence.py",
|
||||
"coverage_plan.py": "corridor_pass/coverage_plan.py",
|
||||
"diagnose_assembly.py": "assembly_pass/diagnose_assembly.py",
|
||||
"diagnose_components.py": "component_pass/diagnose_components.py",
|
||||
"diagnose_corridor.py": "corridor_pass/diagnose_corridor.py",
|
||||
"diagnose_coverage.py": "corridor_pass/diagnose_coverage.py",
|
||||
"discovery_evidence.py": "discovery_pass/discovery_evidence.py",
|
||||
"discovery_rules.py": "discovery_pass/discovery_rules.py",
|
||||
"extract_assembly.py": "assembly_pass/extract_assembly.py",
|
||||
"extract_catalog.py": "catalog_pass/extract_catalog.py",
|
||||
"extract_discovery.py": "discovery_pass/extract_discovery.py",
|
||||
"extract_search.py": "search_pass/extract_search.py",
|
||||
"fit_scene.py": "full_plan/fit_scene.py",
|
||||
"fragment_templates.py": "discovery_pass/fragment_templates.py",
|
||||
"gost_catalog.py": "norms_pass/gost_catalog.py",
|
||||
"image_profiles.py": "lines_pass/image_profiles.py",
|
||||
"inspect_bicycles.py": "catalog_pass/inspect_bicycles.py",
|
||||
"inspect_catalog.py": "catalog_pass/inspect_catalog.py",
|
||||
"interval_profiles.py": "intervals_pass/interval_profiles.py",
|
||||
"join_assembly.py": "assembly_pass/join_assembly.py",
|
||||
"layer_common.py": "full_plan/layer_common.py",
|
||||
"line_reconstruction.py": "intervals_pass/line_reconstruction.py",
|
||||
"mapping.py": "corridor_pass/mapping.py",
|
||||
"norm_profiles.py": "norms_pass/norm_profiles.py",
|
||||
"ortho_terrain.py": "orthophoto/ortho_terrain.py",
|
||||
"paint_channels.py": "component_pass/paint_channels.py",
|
||||
"paint_templates.py": "continuation_pass/paint_templates.py",
|
||||
"prepare_symbols.py": "symbol_pass/prepare_symbols.py",
|
||||
"refine_assembly.py": "assembly_pass/refine_assembly.py",
|
||||
"refine_beta.py": "beta_pass/refine_beta.py",
|
||||
"refine_catalog.py": "catalog_pass/refine_catalog.py",
|
||||
"refine_completion.py": "completion_pass/refine_completion.py",
|
||||
"refine_components.py": "component_pass/refine_components.py",
|
||||
"refine_consensus.py": "consensus_pass/refine_consensus.py",
|
||||
"refine_corridor.py": "corridor_pass/refine_corridor.py",
|
||||
"refine_discovery.py": "discovery_pass/refine_discovery.py",
|
||||
"refine_norms.py": "norms_pass/refine_norms.py",
|
||||
"refine_rows.py": "rows_pass/refine_rows.py",
|
||||
"refine_search.py": "search_pass/refine_search.py",
|
||||
"refine_sections.py": "sections_pass/refine_sections.py",
|
||||
"refine_symbols.py": "symbol_pass/refine_symbols.py",
|
||||
"refine_transitions.py": "transitions_pass/refine_transitions.py",
|
||||
"refine_zigzags.py": "component_pass/refine_zigzags.py",
|
||||
"render_assembly.py": "assembly_pass/render_assembly.py",
|
||||
"render_beta.py": "beta_pass/render_beta.py",
|
||||
"render_catalog.py": "catalog_pass/render_catalog.py",
|
||||
"render_completion.py": "completion_pass/render_completion.py",
|
||||
"render_components.py": "component_pass/render_components.py",
|
||||
"render_consensus.py": "consensus_pass/render_consensus.py",
|
||||
"render_corridor.py": "corridor_pass/render_corridor.py",
|
||||
"render_coverage.py": "corridor_pass/render_coverage.py",
|
||||
"render_discovery.py": "discovery_pass/render_discovery.py",
|
||||
"render_hypotheses.py": "component_pass/render_hypotheses.py",
|
||||
"render_norms.py": "norms_pass/render_norms.py",
|
||||
"render_plan.py": "catalog_pass/render_plan.py",
|
||||
"render_rows.py": "rows_pass/render_rows.py",
|
||||
"render_search.py": "search_pass/render_search.py",
|
||||
"render_sections.py": "sections_pass/render_sections.py",
|
||||
"render_symbols.py": "symbol_pass/render_symbols.py",
|
||||
"render_transitions.py": "transitions_pass/render_transitions.py",
|
||||
"review_symbols.py": "symbol_pass/review_symbols.py",
|
||||
"road_glyph_presets.py": "continuation_pass/road_glyph_presets.py",
|
||||
"row_evidence.py": "corridor_pass/row_evidence.py",
|
||||
"row_profiles.py": "rows_pass/row_profiles.py",
|
||||
"search_rules.py": "search_pass/search_rules.py",
|
||||
"search_views.py": "search_pass/search_views.py",
|
||||
"section_profiles.py": "sections_pass/section_profiles.py",
|
||||
"semantic_symbols.py": "symbol_pass/semantic_symbols.py",
|
||||
"symbol_evidence.py": "symbol_pass/symbol_evidence.py",
|
||||
"symbol_rules.py": "symbol_pass/symbol_rules.py",
|
||||
"test_assembly.py": "assembly_pass/test_assembly.py",
|
||||
"test_beta.py": "beta_pass/test_beta.py",
|
||||
"test_catalog.py": "catalog_pass/test_catalog.py",
|
||||
"test_completion.py": "completion_pass/test_completion.py",
|
||||
"test_components.py": "component_pass/test_components.py",
|
||||
"test_consensus.py": "consensus_pass/test_consensus.py",
|
||||
"test_corridor.py": "corridor_pass/test_corridor.py",
|
||||
"test_discovery.py": "discovery_pass/test_discovery.py",
|
||||
"test_intervals.py": "intervals_pass/test_intervals.py",
|
||||
"test_lines.py": "lines_pass/test_lines.py",
|
||||
"test_norms.py": "norms_pass/test_norms.py",
|
||||
"test_rows.py": "rows_pass/test_rows.py",
|
||||
"test_search.py": "search_pass/test_search.py",
|
||||
"test_sections.py": "sections_pass/test_sections.py",
|
||||
"test_symbols.py": "symbol_pass/test_symbols.py",
|
||||
"test_transitions.py": "transitions_pass/test_transitions.py",
|
||||
"transition_profiles.py": "transitions_pass/transition_profiles.py",
|
||||
"validation.py": "corridor_pass/validation.py",
|
||||
"zigzag_evidence.py": "component_pass/zigzag_evidence.py",
|
||||
"zigzag_mosaics.py": "component_pass/zigzag_mosaics.py",
|
||||
"audit_coverage.py": "coverage_pass/audit_coverage.py",
|
||||
"render_coverage_changes.py": "coverage_pass/render_coverage_changes.py",
|
||||
"test_coverage.py": "coverage_pass/test_coverage.py",
|
||||
"coverage_crossings.py": "coverage_pass/coverage_crossings.py",
|
||||
"zigzag_segments.py": "coverage_pass/zigzag_segments.py",
|
||||
"audit_scene.py": "coverage_pass/audit_scene.py",
|
||||
"refine_coverage.py": "coverage_pass/refine_coverage.py",
|
||||
"coverage_rules.py": "coverage_pass/coverage_rules.py",
|
||||
"refine_patterns.py": "coverage_pass/refine_patterns.py",
|
||||
"refine_crossings.py": "coverage_pass/refine_crossings.py",
|
||||
"coverage_patterns.py": "coverage_pass/coverage_patterns.py",
|
||||
"crossing_completion.py": "families_pass/crossing_completion.py",
|
||||
"crosswalk_family.py": "full_plan/crosswalk_family.py",
|
||||
"recall_extent.py": "recall_pass/recall_extent.py",
|
||||
"render_recall.py": "recall_pass/render_recall.py",
|
||||
"refine_recall.py": "recall_pass/refine_recall.py",
|
||||
"recall_rules.py": "recall_pass/recall_rules.py",
|
||||
"recall_templates.py": "recall_pass/recall_templates.py",
|
||||
"diagnose_recall.py": "recall_pass/diagnose_recall.py",
|
||||
"recall_targets.py": "recall_pass/recall_targets.py",
|
||||
"test_recall.py": "recall_pass/test_recall.py",
|
||||
"audit_recall.py": "recall_pass/audit_recall.py",
|
||||
"glyph_mosaics_inspect.py": "glyph_pass/glyph_mosaics_inspect.py",
|
||||
"glyph_registration.py": "glyph_pass/glyph_registration.py",
|
||||
"diagnose_glyph.py": "glyph_pass/diagnose_glyph.py",
|
||||
"refine_glyph.py": "glyph_pass/refine_glyph.py",
|
||||
"render_glyph.py": "glyph_pass/render_glyph.py",
|
||||
"glyph_mosaics.py": "glyph_pass/glyph_mosaics.py",
|
||||
"test_glyph.py": "glyph_pass/test_glyph.py",
|
||||
"glyph_identity.py": "glyph_pass/glyph_identity.py",
|
||||
"glyph_rules.py": "glyph_pass/glyph_rules.py",
|
||||
"audit_glyph.py": "glyph_pass/audit_glyph.py",
|
||||
"glyph_templates.py": "glyph_pass/glyph_templates.py",
|
||||
"diagnose_projection.py": "glyph_pass/diagnose_projection.py",
|
||||
"glyph_targets.py": "glyph_pass/glyph_targets.py",
|
||||
"registration.py": "replay/paved_registration.py",
|
||||
"refine_registration.py": "joint_pass/refine_registration.py",
|
||||
"registered_template.py": "joint_pass/registered_template.py",
|
||||
"render_registration.py": "joint_pass/render_registration.py",
|
||||
"audit_registration.py": "joint_pass/audit_registration.py",
|
||||
"test_registration.py": "joint_pass/test_registration.py",
|
||||
"probe_bicycles.py": "joint_pass/probe_bicycles.py",
|
||||
"inspect_recall.py": "joint_pass/inspect_recall.py",
|
||||
"small_bicycle.py": "joint_pass/small_bicycle.py",
|
||||
"zigzag_extension.py": "replay/zigzag_extension.py",
|
||||
"refine_zigzag_extensions.py": "replay/refine_zigzag_extensions.py",
|
||||
"verify_zigzag_extensions.py": "replay/verify_zigzag_extensions.py",
|
||||
"test_zigzag_extensions.py": "replay/test_zigzag_extensions.py",
|
||||
"audit_completed_zigzags.py": "replay/audit_completed_zigzags.py",
|
||||
"standard_arrow_evidence.py": "replay/standard_arrow_evidence.py",
|
||||
"standard_arrow_templates.py": "replay/standard_arrow_templates.py",
|
||||
"fit_standard_arrows.py": "replay/fit_standard_arrows.py",
|
||||
"refine_standard_arrows.py": "replay/refine_standard_arrows.py",
|
||||
"verify_standard_arrows.py": "replay/verify_standard_arrows.py",
|
||||
"test_standard_arrows.py": "replay/test_standard_arrows.py",
|
||||
"render_standard_proposals.py": "replay/render_standard_proposals.py",
|
||||
"inspect_zigzag_gaps.py": "replay/inspect_zigzag_gaps.py",
|
||||
"arrow_admission.py": "replay/arrow_admission.py",
|
||||
"refine_arrow_admission.py": "replay/refine_arrow_admission.py",
|
||||
"arrow_mosaics.py": "replay/arrow_mosaics.py",
|
||||
"arrow_evidence.py": "replay/arrow_evidence.py",
|
||||
"arrow_frames.py": "replay/arrow_frames.py",
|
||||
"arrow_tip_registration.py": "replay/arrow_tip_registration.py",
|
||||
"audit_arrow_sources.py": "replay/audit_arrow_sources.py",
|
||||
"verify_arrow_observations.py": "replay/verify_arrow_observations.py",
|
||||
"render_marking_overview.py": "replay/render_marking_overview.py",
|
||||
"test_arrow_admission.py": "replay/test_arrow_admission.py",
|
||||
"audit_arrow_admission.py": "replay/audit_arrow_admission.py",
|
||||
"render_arrow_admission.py": "replay/render_arrow_admission.py",
|
||||
"audit_zigzag_coverage.py": "replay/audit_zigzag_coverage.py"
|
||||
},
|
||||
"source_sha256": {
|
||||
"assembly_evidence.py": "0fda82c403f9734ea0b0267504ac82437092d410882dc21417a492de9509c09b",
|
||||
"assembly_rules.py": "04798c28e0daccc8be5fb045cc736160721308f7c41189f287b97a509999ddbf",
|
||||
"assembly_templates.py": "41ec0428032ae328d5f46c34702d5b0be43f724e5821278e745554c72326d402",
|
||||
"assembly_zigzag.py": "dbee99c505381fbdccbecec0817e0ec4e028ac1eb475124829cd58811251b9ca",
|
||||
"audit_assembly.py": "8defc22e391c330962c503b27c49b9d13cecee90b0170dab1b8372858bda3638",
|
||||
"audit_assembly_joins.py": "e8a3ded181b69961c8a0a5f88e171ff5ada82f0a43e55c217bb40734e411c094",
|
||||
"audit_beta.py": "f6dfe314f5f0f9875035f08ae279e64309fafcd9c04e0feb468dcf106cc2990f",
|
||||
"audit_catalog.py": "19d5f0f156c0f90d2e1e2548fee99eee521b76e7152f0b53ae12b43ed48553b2",
|
||||
"audit_completion.py": "ef6adcfec3e1a4bd894b54a150fe3b8559bf73e94665bb9da6bd68007e90575d",
|
||||
"audit_components.py": "b472856305839483fcf806eb76a29b46650f2188b1e0cf0f94afdc250eb1fa28",
|
||||
"audit_consensus.py": "7056d6195b320ae165aeef44e802c29697ae8163abb99d4593e0c8df6e186bc2",
|
||||
"audit_corridor.py": "3f792b1830e9097644dd66c38eb2cf7efa11d75a0fda928ffa0a7780afb85bfe",
|
||||
"audit_discovery.py": "9e5f1bdd0d752d82a52121fe86d4e6fb00068a6af9330a072fe7311a909bc974",
|
||||
"audit_norms.py": "234e431040e38d9c999f10a62d05454f217673cda5e2ab3e3119a2fabf9e703d",
|
||||
"audit_rows.py": "7298fddd8baf9798e6dd5251d4f261e97a5b92f0beeb60f3198c6aa7498d7f01",
|
||||
"audit_search.py": "0de9929d983c97045444131b9255ec4c256ae652b6adb82551e42b94c4bec0eb",
|
||||
"audit_sections.py": "755d129ef5e1c6503c784393f67cc0dae1c9ebaaecb9c08b8ad440cde7dceea7",
|
||||
"audit_symbols.py": "105c7a7939c43643299e071d94f5b1e4acc45a29d8b45482a3d7fabc9508ecea",
|
||||
"audit_transitions.py": "35a3ecb08d96ee21badf438a18bdddf800263032078e2daee888673ab4209c4a",
|
||||
"beta_profiles.py": "172ab1f02b8767e9e96c21d99925c8fd7568403434f951feadc2857036d07c6e",
|
||||
"bicycle_artwork.py": "2e5220e6e82024c683b65c81695b53fa3070d58eed89d61f5cbda41f6c3c554f",
|
||||
"catalog_context.py": "f2e654ea068a758be1f929299786559f02672898047893cdc20e6f1cb204bb80",
|
||||
"catalog_dependencies.py": "d6407445db28f6f15201f4ec09e3401141fca90e11a9cef52392f88175634fca",
|
||||
"catalog_dependency_pins.py": "93ed9007288440620b8339043f1d5ae74684e39e7c3bd50d94d24f6cf29c9f3a",
|
||||
"catalog_evidence.py": "7f9fb171776faf1181705826bec206882aea13eded8664d8e3e6dfd09031ec95",
|
||||
"catalog_rules.py": "ed0f8e838908bcea9ac1ee15fe13d1b23ac29981428ea6a4bdc097c0226db3cb",
|
||||
"catalog_templates.py": "05577c611ce5ffa2c21d0f608e728eca13009c994e26913b29f39fdcf584c092",
|
||||
"catalog_zigzag.py": "2e6a804cd14440afaf27bd0f0c2123afc7bf3ea1c58cd0d49293049f1f3b498f",
|
||||
"completion_profiles.py": "b01cb280a265f170c2f3823d59d423c0cf11472050678cc4dad716c1f90ff786",
|
||||
"component_arrows.py": "8b577e22e1fb2f45cf6cf426ecd32050c9fca5066a9f5fa00d156049f8691e39",
|
||||
"component_bicycle.py": "854388ce45520abb82d8f61d1195a50525e6326c315feee5bcb84b66163dc2fe",
|
||||
"component_conflicts.py": "dccc333197b47bbbf211212b38d5a0018c8bae5f403fed1cbe3e22be0a81967e",
|
||||
"component_evidence.py": "ef889c65ce03baf5da245a45c2819927d93ac16d4575fa28e3078a340fdd57fb",
|
||||
"component_mosaics.py": "15f8aac32e73cfc72253082e9b7ce2baaaf69ff53a701d0d279990f0cffb5db5",
|
||||
"component_rules.py": "910be55c56c3b406e1727339b1054ee0693a5d7c4ec46cb3cfa8015a34eb0553",
|
||||
"component_surface.py": "e425be65d184d474c5485160547f122291529622244da73ca484469ffd994d69",
|
||||
"component_targets.py": "1719de92d38ff15377276e7b471501cf5ed21392a14113d90537eafea735e6c2",
|
||||
"component_zigzag_rules.py": "76566a1ec3b90c7d3abe7dd96054351e3fbb41ac1117f2b1eb09ce33c716da98",
|
||||
"consensus_profiles.py": "4069e7e56eff1cfe3c10884a63a8c329891bbdffa68f477281c2eebff9128091",
|
||||
"coordinate_cache.py": "930f8f521ef13c02b589d0c182ab4cf337acc4c213354808d32178bbbea3edf4",
|
||||
"corridor_profiles.py": "967902dae9137ceddb05708acbb6a7cc1e06977c6d064787a1a651422d2e5672",
|
||||
"coverage_evidence.py": "e5567525f324b77861ef5d393067f44b9edf8c0f51dc16b0e7af03e1c4f6aa53",
|
||||
"coverage_plan.py": "48e28d6781d5d04e83645ba0a9aa7f0398ae904d26bf2e81caa8d8e741bccdda",
|
||||
"diagnose_assembly.py": "44ef17e6bdecc9285ae8150ccb5c4dd397006381b34b013ebd3e2ed6c2b34bbc",
|
||||
"diagnose_components.py": "b9653a2b642c1399dd3b6388cd40a148cb4cb81f665fad3bf993d950a64579f8",
|
||||
"diagnose_corridor.py": "cff89f2a78ff315906b7d40ba1855f0f842afe1f7f74d1d38b7366e2959bcfd6",
|
||||
"diagnose_coverage.py": "f5305f0c429aea3ba5f18e4261abd64fe8254e53db24323ffcebc152734864b7",
|
||||
"discovery_evidence.py": "dc7e0594b77f6d3723a965216164427835aa5ae2ff736b5599774c4efbc626eb",
|
||||
"discovery_rules.py": "1ac148d3fd75d443d2bde69e46da775de838c9cb2013570d87c13900f0a1a491",
|
||||
"extract_assembly.py": "d2f1cd5a1fc03b95496b32e024452c3e8ba489a06299a6cba967d4d18a5c3b33",
|
||||
"extract_catalog.py": "7c3b7de0291f52d9f37590b438d1abb7e37b36665cfb5e9ba4698b78a8f42574",
|
||||
"extract_discovery.py": "5d2835cde2b9d4d895609ea39be2a94a22e894d0996d525dcc3df7046c33e681",
|
||||
"extract_search.py": "09b3c0c65d33fdd5025e3436fb1bd5df67d1e359b507f4fae74a7e61754fc92c",
|
||||
"fit_scene.py": "d130e092d0acad9994da04ca34810beaa8a31c9602d1858cb4d686c240e42ab8",
|
||||
"fragment_templates.py": "11f2eb0bdf89a76f2f3be1e8368662f45fea1dec13f7fb43bac9c3e41acf1ae7",
|
||||
"gost_catalog.py": "a55a837cc1473055ff24d340c6a669a45d8295f9efb08fd81f1bf2651c0ac537",
|
||||
"image_profiles.py": "1c497f06053ffff63a476baf6dd65ba75ee17d7c38d04c8ff8c22ae03a27eca8",
|
||||
"inspect_bicycles.py": "e12964f244645b7a4b2bdb0da5d2bb90e7d49dc35bf2f66c4a8466fabc6836bb",
|
||||
"inspect_catalog.py": "322aec8f233009eb42703132b220e1e216f8dc8b59aa6bbd27244067e651727d",
|
||||
"interval_profiles.py": "6e7dc0e0eb2cc7ed641bd786b283688ecbc831a2b3442f3f6e6c18add0bad345",
|
||||
"join_assembly.py": "293fd78d10f0ba13b1339a69d737c3f96ef003ea3f6dd63fdf02d14c40fa324f",
|
||||
"layer_common.py": "5e6a2ef463a786b81d387250b2f2be21511f3dae887c8b9ea424051b1722fa59",
|
||||
"line_reconstruction.py": "f89883a1140aca2b78e1567e3361aa69403725d9b384daca6f782951b8920738",
|
||||
"mapping.py": "1c6ba0cc111250d73bc0bc282e9cbb7a602921bca931da6441bc9a6daf88b4f4",
|
||||
"norm_profiles.py": "fe5169f850919abdbc762fcf12960ef7dc0185f1ae56330246ca322db6caa0e7",
|
||||
"ortho_terrain.py": "9c9cab9d7086144fd1a108db28f796e9d267375d7135d50d5cb3f054eae75213",
|
||||
"paint_channels.py": "46da37b13914c69c72f6f4ae1bb5ad70e6f6b77b42355b016df1b3c4d72fbc63",
|
||||
"paint_templates.py": "9cf9c4e871ea03f38e1641c1c89864a628e0fe87462cccdc0149fdf6242545b6",
|
||||
"prepare_symbols.py": "59d0f7da37f4f119b0bfa996dfe4638999bf1bce575415db087fdb55d64a144a",
|
||||
"refine_assembly.py": "0da00d12e4bda06760a3fc78fcddb6875012edc046e9f83a00074846031b4939",
|
||||
"refine_beta.py": "36f39ab464c967b1df136f992a3156deef1dfe2af858bc7cbbef43e9bf7f9831",
|
||||
"refine_catalog.py": "eeeee4d59066579c1fa8708a1be9d999a481f8f8daf05ec01704897252cc66cb",
|
||||
"refine_completion.py": "12f424d39a687e8b94823f2e2f7b2f2c95538f3504260b4373c47cc21b29c6e1",
|
||||
"refine_components.py": "57eeb116e3c61ee42d30d3d6bc557e33d2b2d8ee24910584487bec5d34b69ef5",
|
||||
"refine_consensus.py": "e0e6bf6ad7023515103be330df93b5d925cc1c62642d1a38e67f07cbe027eb36",
|
||||
"refine_corridor.py": "fd1c4d4e028a037e32538c26a66f876425088b8b5b2c7ffc8d5dc807eba3290f",
|
||||
"refine_discovery.py": "6272ca1f5052259fb3c6cfd1f1079e4e5864e1e067d12de7ff36d95857219d7b",
|
||||
"refine_norms.py": "081f6f2347a19b996d5f1b69d63194112d808071eb8c8313e173b5cd09e2dfd5",
|
||||
"refine_rows.py": "3983e8de9b6dadb349b8731335798640e4ce11c87356925f9ea79c5d0bf819b8",
|
||||
"refine_search.py": "113e8cee4f26d1f6b0bcce516388d046ced0523598ddf7f6f4e4dc365a0d9859",
|
||||
"refine_sections.py": "7fd48aa308df07b980e40153651c9c6985949245d4f3f0d1a46bbfd13f735ff3",
|
||||
"refine_symbols.py": "c210c825edb1d2469b27afac6292f911df8351e92c8f47d0b5d05f99a229a95a",
|
||||
"refine_transitions.py": "777d0a0f4d9c762768311db154f66a77880790f523ec639bbd02225ac470138b",
|
||||
"refine_zigzags.py": "8fad49227ca4fdaf72fa46a9050aaa39d699aa2620ffc765ea829e2ecb77d967",
|
||||
"render_assembly.py": "b8471dceb42be102eeb1918eb7950e038d3fc9e0ebab0a3b01b3aaea8be710fa",
|
||||
"render_beta.py": "4a5fdeaa746ce8b4f449df44c210e13fcc2cabf2e2931beab00928eda3777e1c",
|
||||
"render_catalog.py": "58ecb30ac8ddffd1489c93361dc6678c82e4dbbfbe8a6e851a1be395ee40db1b",
|
||||
"render_completion.py": "5e76d2a6ce41a6be8013f98df33951fe17fc209c078376ebfafe7c60ed0b14a7",
|
||||
"render_components.py": "2115f348228ffcbb21ac1a80c1e8c37b082af8be09ca2a182028aa1ea0a7a222",
|
||||
"render_consensus.py": "ea677bac3a4950209133268801f238c67236b0e7866f22df3e738e7592fde682",
|
||||
"render_corridor.py": "f6355e3761834fcf811c0cae9dc3ce602e7221afea4f674178d6c29085e87e9f",
|
||||
"render_coverage.py": "2cba12c09333c242841b174f201c89ffce9e715b78b26b472117ae140ff4157c",
|
||||
"render_discovery.py": "868ad8eb712f5880e944b0899205a2c0fd6dd0713eb727b1c49dda92b897fa20",
|
||||
"render_hypotheses.py": "d7ea4b19409a7b5c78c8a01ed9c190069cc109e4bfa854c77672ed1d1e64ba56",
|
||||
"render_norms.py": "3a8bcf81723d7bda4b49c8ff12e21efded4450839e11a4f23e719dfc8fa4441d",
|
||||
"render_plan.py": "9e702d51c6be09caa456d8e528bd62bc9ec238ca3689a99f38b414dafc193f66",
|
||||
"render_rows.py": "65f57b15f2b288048a75d1f4603625637f1e2af505925628ec80a2169fe9944e",
|
||||
"render_search.py": "5655641df20c2e4f0849bb35ff4029d806554cc7d3b696d26378ad9d880d0491",
|
||||
"render_sections.py": "43de78c4b1c643162f4ac9ada77411a2a4e222fa5506ec8f1061311a96bb234c",
|
||||
"render_symbols.py": "ae3bd83870aa435d2051282b65fd3015eee8c11e92831062328e39482de76d5b",
|
||||
"render_transitions.py": "eea6be5a6f90145f00d7e930f4123c87aa135a64a2c59723908cf7056520128d",
|
||||
"review_symbols.py": "264c92625648cf1930753add51496c28ef645a481e5cf13993ae0cf758d5df30",
|
||||
"road_glyph_presets.py": "619f4e9c9eeaf63537afc0e8676ab5915d78af1aee8bfb9fe4656bf81b07f322",
|
||||
"row_evidence.py": "fec784ab795470d96e48c7022e59d5206b0c07b40d84843cbc058fcc4de896c0",
|
||||
"row_profiles.py": "0b23a93b6de9b2e01efb5ce57085fac0afebcd3df6184e573d6b84793e0128df",
|
||||
"search_rules.py": "ca3cab6d24f31460d9912c351c166d89fb1c3b21df620ba1d847543bd7a71f41",
|
||||
"search_views.py": "8a123558dbef184fc85a92c9547c19644d14681329dbbd0cfeac0032bbd102be",
|
||||
"section_profiles.py": "f3f57b2f5e01962f0aca44164d95dfd2d1e03c73c1b0ecb94c6d550f509609de",
|
||||
"semantic_symbols.py": "0665fa1ba0dd08bd29b762a09fb2d03b31a1894ff0731353c2f847fb170c5658",
|
||||
"symbol_evidence.py": "2d643c9756660bd33ad208ffbe960283feb3aa12352399b6df6f81c0b507e3a2",
|
||||
"symbol_rules.py": "c349ee11f5c33da7310dcf6e530d988858243c5e99ad8072818d78802ea59527",
|
||||
"test_assembly.py": "80510625a71ea9fc04add883d9a7e40a3bfdcac4251bd702b5507ce76f9bba8f",
|
||||
"test_beta.py": "e5729c05063afb65c3e35b4e380219dee9893dfa26bb41e1c5cd24641e08358b",
|
||||
"test_catalog.py": "91a8fdbc330cecd5bc354406012852cc46245baf99ba8befdaac164f6b79c1c4",
|
||||
"test_completion.py": "a3a6a283221ae48ade8fd0cca2f145509fd6bedf8e808967c13438791654a7f1",
|
||||
"test_components.py": "71c48f0b6afda80713aef4ee6547acc1995f0dd07d901ee84a4254bee0cc1168",
|
||||
"test_consensus.py": "90cdd1be7bd2a0d1471141eb40bfa806cc149789c3d6794bbfdaba5999a369f7",
|
||||
"test_corridor.py": "42788835ec88e91a3b92ec7ead4e4c489b01ddf11256b46b7b3722c6b4770703",
|
||||
"test_discovery.py": "a75ffc22d065201f7023d8e6cfb6dc09204a80f9be607599b85479628a301538",
|
||||
"test_intervals.py": "0fd926c0739f066bf79d549e190b8641399eea39486726e5946d67388ab73a12",
|
||||
"test_lines.py": "a5b2aab9cb0627bd463d1bd37b1353e0ca14fbffa7dfbac2a928e528dc8ca29a",
|
||||
"test_norms.py": "02b0757f7c1c4498c9165dde2bd650ca9f0a1dec840d59e7828343264079905f",
|
||||
"test_rows.py": "a89932294a62a373b8c4c80556c4d23d7182c64126788d63988312bc3b9f3449",
|
||||
"test_search.py": "fc3d874c8a6639bfa007eb8fa4a869e270bddafe317868bed29450c6024f8756",
|
||||
"test_sections.py": "0b9f5da94e3f7ca8f05ab1f15b48685a6c97ac4a559147f98adb6634ad74031f",
|
||||
"test_symbols.py": "63a429e8d3324b87075bcb2a2c9902f35c45f1aceff5b46c260aec9bed666481",
|
||||
"test_transitions.py": "95837d6e04c890f514901d9b587092f79fa1552dde6df99e301849d66c004438",
|
||||
"transition_profiles.py": "7f713e5fed3a1aa88d00a4c3299b45a8970ff225ab827f82950901185b33ea2e",
|
||||
"validation.py": "ee004220db3cdf2429af2a0e875cd9a63526587422881692ce56fe9d77f5cc2c",
|
||||
"zigzag_evidence.py": "978bda848dc7dc85268e2696b918eb6f86c7377c7e9da7c5e4b875815daefa0d",
|
||||
"zigzag_mosaics.py": "b2703eb159e92680df15d4ed80cd47e55a9168ab3f1703f50faf843eca5262b5",
|
||||
"audit_coverage.py": "cb7fd23d5b9a86ec1d2a94fa6d172326024d551c0a5ae1791487d455a512d655",
|
||||
"render_coverage_changes.py": "fa79e806d806ad8a59f8b1cf3ec1df27a4032a38eb234b0695fdffcc625f5617",
|
||||
"test_coverage.py": "d4ee6c71db2e6a426e0c44b99a46acf34c2094af1148e2aade4382c784c99063",
|
||||
"coverage_crossings.py": "ecfc59bbd5ce419ffbc08f282985c0937d21f2311d581cd6fb8fe6d20671411c",
|
||||
"zigzag_segments.py": "02b46d2462f0851af3d371e927da7858bbf3f59daf89201a40e30e267cf097c0",
|
||||
"audit_scene.py": "298bc00d21fecf7c511fd2ae455d181f3998781e13b91464fb6553338847d28b",
|
||||
"refine_coverage.py": "d647727eb6c64ce60e3e98701e22c41d42f265c073fe099d9c95cc3e165d5540",
|
||||
"coverage_rules.py": "9c22f810b123a0b2d1bb4fb0717f1df2bcab2f9c2ebd76d3b537e67e6baea055",
|
||||
"refine_patterns.py": "83b053abc53fb198b21f7a8ec80e6fa2b507855c20fc4a33e06a10f7c387346d",
|
||||
"refine_crossings.py": "7e7237cd41640ea7b298754b6be40c734eee8dc933f5be920ef9426a2c88eb6f",
|
||||
"coverage_patterns.py": "76f2a539c88e3212fd0b904a0b85d1a31c1a2357e864f4b44dc9b1a28e722638",
|
||||
"crossing_completion.py": "6e75ae4b65e8d6447acae57ae17ca088a427fda39f438271bc0f1b0ca84641fb",
|
||||
"crosswalk_family.py": "68ee6327a7a24ab74e77bdbbc9c504562f6997cfb7f0e6082095b3e2eb32fc2d",
|
||||
"recall_extent.py": "fea1f876ccf52dbaf7a06a68c7bf7870a8ebbc1331c612366419a36291433fbf",
|
||||
"render_recall.py": "51d887366f79b82d3c61ed3ba9dcd01a8c07a4b609ba379cd9393d2924c702b0",
|
||||
"refine_recall.py": "b2d323ce0325265b37302673101421078cc05f52cd00415d476165c7144247cc",
|
||||
"recall_rules.py": "7a54b3ff0aaaac84d71206f685dd8479f8bfb1966294c50f56567c908794f94c",
|
||||
"recall_templates.py": "56c8f95854df245d31b1b132bf800ab8ac9356e775bed52042304047cd849497",
|
||||
"diagnose_recall.py": "83b96adf9796412d800e702608dd6e64f237718d739ff592acca0574d2dc62a1",
|
||||
"recall_targets.py": "01bb0876d092f9de660e181f6622323704b76bbd8a62e6d8f88cfd7bf398e7bb",
|
||||
"test_recall.py": "8a35c7ea7f5bb0cea6193181c75f5bba04344ee902e000c106c07caa51b7df15",
|
||||
"audit_recall.py": "ce4cb5ae9582a6b46921fb311cec626ffdc5ee8ea2a9a19c0eb9699b0d9211e3",
|
||||
"glyph_mosaics_inspect.py": "330e6aff8fde052ca94bca0908a46c3b2f5d9457e47482a99e78708634c402fa",
|
||||
"glyph_registration.py": "30a21ce2bccb6921b5b77939ed5a329787fd1f3127d63f9cc2481a326dde6c9b",
|
||||
"diagnose_glyph.py": "982a9656f4ffc67d8b833db3cd4aa738bf8d2e9f1ee8be4d73751b66922f5ba3",
|
||||
"refine_glyph.py": "ca2bea6020ce4ab458af57553931978ee1eec1beb39225a8009f7daaac81d826",
|
||||
"render_glyph.py": "e1bda83c85d6cb48481cd7aa9cd738bf67311a693d07e33188c711e9c30ab161",
|
||||
"glyph_mosaics.py": "cdedb823f1e3d49f8072b38f38f463b0e7338351fe0d032d634396f55f45b0b9",
|
||||
"test_glyph.py": "46555f5acc2319c94418b68177991d3538e6b53eb6b3b8befca913299607ac6b",
|
||||
"glyph_identity.py": "d02114510077651db8cac1b0ec4dcf6dc98e8b64a8caa44ffc37df4914ecdd5b",
|
||||
"glyph_rules.py": "747d3da1f0e0cd3301a6f20c5185eab68c431b4966c491ea77210bc4db48eac1",
|
||||
"audit_glyph.py": "31f44bdae4c2af38cbe9af5b8bbf16bfbdcf0b96e39b62078d5459e673d30758",
|
||||
"glyph_templates.py": "8ddc50348563b048c362a447d68a30872284dc08c88ca9d9c70c27a382a62758",
|
||||
"diagnose_projection.py": "d49d44c69b9bbb3c91af27851b33b7323a68727e76846af846df94cfa663a684",
|
||||
"glyph_targets.py": "e957f2d7889b4366eacc29a0d8a1440ee16b35f00a79d9e8740f0b807a232eda",
|
||||
"registration.py": "1f66a2c70789251813ad19f92f77d5a0244a0dbafbb6bc98d6c6b0239f32192d",
|
||||
"refine_registration.py": "7740076f771b3d7949d1b03f9b6fe3034aa1c646fda7751e0cc81cb1055e5579",
|
||||
"registered_template.py": "6c256bab9275c1d4924e5eb9a5982b0b777e6e637603d33f6d0df00ffad29464",
|
||||
"render_registration.py": "c1ca93d964a8ee1cca134497f05672978c43ff845980308f2a9ab3823bea06bd",
|
||||
"audit_registration.py": "0cf92896826c40b80513f25935b8abf9de99d7f51437aea98ac825474da2b6d5",
|
||||
"test_registration.py": "e565bcbf56921bb252d8a4c0bbee7515a4ba4d73ad9797cf6b6d67de5783503d",
|
||||
"probe_bicycles.py": "8e2a66e352b6e05d2eb3f631453d53e0940f046779f4cc10e87f9a80470ff4bc",
|
||||
"inspect_recall.py": "b071dcc227002ec4cc643de48302c854997d5f7b48782c780a874d13c214e689",
|
||||
"small_bicycle.py": "fecca9312cff0d4e7035f42a7c44e441f90ab4e033cfe22ae91d609de445d2af",
|
||||
"zigzag_extension.py": "ae645f44ae6dcb9321b71efd63e6d92d15c43480cb7e3fb4962eb6ed5c082f25",
|
||||
"refine_zigzag_extensions.py": "25e6ddf19bd261f6ba84ba07ad5dee4a55f2d815740609f60afbb86adb1bd153",
|
||||
"verify_zigzag_extensions.py": "1044ad636c1c36cf0c2f20bb2be99fd82e879b372f7a8c6e97b2a3c1d5e9cdd3",
|
||||
"test_zigzag_extensions.py": "a125a9ea1c7f473e663245efba7d598d90d4900df10082401dbe5133ebacf851",
|
||||
"audit_completed_zigzags.py": "90303b09af6700fa090343e4f02386faa6b710a30b5f6c5ea484508c4f3c120d",
|
||||
"standard_arrow_evidence.py": "1678afe91acd81be83c79c6d52c223532b0e3d742a00b10c3e1870b1131e775b",
|
||||
"standard_arrow_templates.py": "9b090b9a4042cff0f759a72ccd375095ea68f93229e0e90d1715314c46ec6227",
|
||||
"fit_standard_arrows.py": "b6cb0bcc8a83d9d4da8eb5664b9a5b9fe266a3d06e56127dd06b1f0f56c9362d",
|
||||
"refine_standard_arrows.py": "252b746681f8eff8bcaf28a6f8b7a01d00d5e1117aafd3336d9b6db01e8177a4",
|
||||
"verify_standard_arrows.py": "ac6c4a8017b00e2fb8fd2026e36d3e728b241539a7e286f62d6df4cb8bd1d9bf",
|
||||
"test_standard_arrows.py": "84e52e4b568105853ad6a31bf7f9f93360ff22ebb3aa6fc98e0ca5545d3535fe",
|
||||
"render_standard_proposals.py": "0dbcc01ea9e19e18d99c799ed84b7974d57a109ea24eed69fb3f55064336db5c",
|
||||
"inspect_zigzag_gaps.py": "6669720ffd19d174df7b3873aaeddfa9bd65c3851e45bb3dbd4ea6bfaffe7ac3",
|
||||
"arrow_admission.py": "2ed5a28706416dc3a2b674cc4d8cf007049db91e3c70b530ea14f1eec986c516",
|
||||
"refine_arrow_admission.py": "c55ce2548da5795b32d7fe6718619b0d681ddd229075937a1c7ca131c394b3d0",
|
||||
"arrow_mosaics.py": "a55c3560961577c381f21f087b632a73ba778869a7f60ba58c095135523a0763",
|
||||
"arrow_evidence.py": "047c0d9fe6e17c1500b993f8a6166406db1950e38c0af4562886143238c377ad",
|
||||
"arrow_frames.py": "4be5a3d96ca29981be698a3200f7d1447d8c9848fde0e67dab5f5b3b529bc9ca",
|
||||
"arrow_tip_registration.py": "0d74cb29a0cef1c40267152a6a1fec6397d5118de0cd6c94a402fc3738354056",
|
||||
"audit_arrow_sources.py": "8d5315e52f5c414e94104aa52914eee85ab3b1c3237cfc9b042f8683a0d37525",
|
||||
"verify_arrow_observations.py": "0351443c94f6eb5c7cf87642ab785c85a2e7eb8a85f8f6ac3f59f898eb74b09e",
|
||||
"render_marking_overview.py": "1cf79de953f94f26a846c9a14872ddee7465fccad9764c8ecf17876ce1bc2115",
|
||||
"test_arrow_admission.py": "543a7c64b6c4232d8612cd0d63eb6b137466b610daa78c1f0ccd614115310425",
|
||||
"audit_arrow_admission.py": "9e365af391f403e7eb9619e4e434c336e2f7ecf703852ae3e9484e9e85cb8dc7",
|
||||
"render_arrow_admission.py": "527b9f9e65c7a522eae06309b99efa7fb0701f8ce91b4e8b388807c63b0ffb2b",
|
||||
"audit_zigzag_coverage.py": "085ef1fe01f43f4ff40b0c89df026f329120dfb8b6050269047d3422ac864eff"
|
||||
},
|
||||
"source_snapshot": "e235505f1c494214853bbd5b7b73e0cf016f435a6fa67ae6333ad89fb4130197",
|
||||
"execution_snapshot": "e05772529b48e47899a4a578820d7ec950233804ceba30a0d3e5103275bfce12",
|
||||
"runtime_images": [
|
||||
"sha256:925b093545e15c270d95d4076139ad8ed48e790eccd9434a58495d58c97671d0"
|
||||
],
|
||||
"inputs": "accepted baseline; original Gaussian renders; cached semantic evidence",
|
||||
"manual_regions": [],
|
||||
"transform": "observed-periodic-end-leg",
|
||||
"publication": "external visual acceptance and exact canonical API readback"
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
"""OpenCV proposes an observed short return at any existing zigzag endpoint.
|
||||
|
||||
The old pattern is immutable. Two Gaussian views must support the entire new
|
||||
straight stroke and observed blank ground beyond its endpoint. No curb snap,
|
||||
location index, or inferred closure participates in this pass.
|
||||
"""
|
||||
import cv2,numpy as np
|
||||
from shapely.geometry import LineString,Point
|
||||
from paint_channels import paint_mask
|
||||
from registration import grids,CELL
|
||||
from zigzag_extension import supported,quiet_end
|
||||
from zigzag_mosaics import mosaic_views
|
||||
VERSION='observed-zigzag-terminal-return-v2'
|
||||
POLICY=dict(max_length_m=2.5,min_length_m=.45,max_origin_offset_m=.18,min_turn_deg=25.,max_turn_deg=155.,max_direction_hypotheses=6,extension_sample_m=.05)
|
||||
|
||||
def directions(paint,known,lo,origin,incoming):
|
||||
cv2.setRNGSeed(2026)
|
||||
lines=cv2.HoughLinesP((paint&known).astype('uint8')*255,1,np.pi/360,threshold=12,minLineLength=.35/CELL,maxLineGap=.12/CELL)
|
||||
found=[]
|
||||
for line in []if lines is None else lines[:,0]:
|
||||
a,b=line.reshape(2,2)*CELL+lo
|
||||
if np.linalg.norm(a-origin)>np.linalg.norm(b-origin):a,b=b,a
|
||||
v=b-a;length=np.linalg.norm(v)
|
||||
if length<.35:continue
|
||||
v/=length;station=float((origin-a)@v);offset=np.linalg.norm(origin-(a+station*v))
|
||||
if offset>POLICY['max_origin_offset_m'] or station<-.30 or station>length+.05:continue
|
||||
angle=np.rad2deg(np.arccos(np.clip(v@incoming,-1,1)))
|
||||
if not POLICY['min_turn_deg']<=angle<=POLICY['max_turn_deg']:continue
|
||||
end=float((b-origin)@v)
|
||||
if end<.35:continue
|
||||
if any(abs(v@d[0])>np.cos(np.deg2rad(5))for d in found):continue
|
||||
found.append((v,min(end+.20,POLICY['max_length_m']),length))
|
||||
return sorted(found,key=lambda v:-v[2])[:POLICY['max_direction_hypotheses']]
|
||||
|
||||
def fit_terminal(vertices,width,reverse,views,audit=None):
|
||||
audit={}if audit is None else audit
|
||||
audit.update(proposal_views=[],directions=0,geometry_rejections=0,support_rejections=0,endpoint_rejections=0)
|
||||
points=np.asarray(vertices,float)
|
||||
if reverse:points=points[::-1]
|
||||
if len(points)<6 or not .06<=width<=.22:return None
|
||||
origin=points[-1];incoming=origin-points[-2];incoming/=np.linalg.norm(incoming)
|
||||
old=LineString(points).buffer(width/2,cap_style=2,join_style=2)
|
||||
grid=grids(Point(origin).buffer(1.6),views,surface_classes=(1,))
|
||||
candidates=[]
|
||||
for rank,v in enumerate(grid['views']):
|
||||
paint=paint_mask(v['rgb'],channel='yellow',cell=CELL,observed=v['observed'],calibration=v['allowed'])
|
||||
proposed=directions(paint,v['allowed']&v['observed'],grid['lo'],origin,incoming)
|
||||
audit['proposal_views'].append(dict(rank=rank,directions=len(proposed)))
|
||||
for proposal in proposed:
|
||||
# A poorer primary render must not prevent a second image from
|
||||
# proposing a complete stroke. Both images still verify admission.
|
||||
same=next((i for i,p in enumerate(candidates)if p[0]@proposal[0]>np.cos(np.deg2rad(5))),None)
|
||||
if same is None:candidates.append(proposal)
|
||||
elif proposal[1]>candidates[same][1]:candidates[same]=proposal
|
||||
candidates=sorted(candidates,key=lambda p:-p[2])[:POLICY['max_direction_hypotheses']]
|
||||
audit['directions']=len(candidates)
|
||||
for direction,maximum,_ in candidates:
|
||||
for length in np.arange(maximum,.44,-.05):
|
||||
end=origin+direction*length
|
||||
leg=LineString([origin,end]).buffer(width/2,cap_style=2,join_style=2)
|
||||
if leg.difference(old.buffer(.12)).area/leg.area<.70:audit['geometry_rejections']+=1;continue
|
||||
extended=np.vstack([points,end]);q=LineString(extended).buffer(width/2,cap_style=2,join_style=2)
|
||||
if not LineString(extended).is_simple:continue
|
||||
evidence,names=mosaic_views(leg,views,negative_context=q)
|
||||
if not supported(evidence):audit['support_rejections']+=1;continue
|
||||
probe=LineString([end+direction*.15,end+direction*.40]).buffer(width/2,cap_style=2)
|
||||
exterior,extra=mosaic_views(probe,views,negative_context=q)
|
||||
if not quiet_end(exterior):audit['endpoint_rejections']+=1;continue
|
||||
if reverse:extended=extended[::-1]
|
||||
return dict(points=extended.tolist(),polygon=q,leg=leg,evidence=evidence,names=sorted(set(names+extra)),exterior=exterior,fraction=length/maximum)
|
||||
return None
|
||||
Reference in New Issue
Block a user