Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Spatiality and computer-vision perception

Forma treats space and perception as a two-plane boundary with one governed door. The language (std::world::space) knows only qualitative spatial relations — Region, Place, SpatialReferenceSystem, Representation, SpatialContains/Overlaps/Adjacent/Disjoint with transitivity and symmetry — and deliberately has no coordinates and no metric. All metric computation (geometry, CRS transforms, camera homographies, neural object detection, radar tracking) lives on the realization plane behind the MRS provider boundary, and reaches the semantic world only as evidence admitted through a bridge authorized by the resolved .fsl declaration itself.

SEMANTIC PLANE (.fsl)                       REALIZATION PLANE (MRS/providers)
Region, SRS, Representation                 geo / proj4rs / nalgebra / tract-onnx
SpatialContains, SpatialOverlaps, ...       RegionRing, CrsSpec, homography, ONNX
qualitative, zero coordinates               metric computation, digest-pinned
        ▲                                              │
        └──────── ADMITTED OBSERVATION BRIDGE ─────────┘
       ProviderEvidence != SemanticOutcome; the provider never
       chooses the authority — the resolved declaration does

What the implementation covers:

CapabilityMechanismWhere
Metric geometrygeo crate (and an external shapely/GEOS process as a substitute provider)crates/spatial-perception-providers
CRS transformsproj4rs, declared source/target (WGS84 → UTM 23S in the demo), no axis guessingcrates/spatial-perception-providers
Camera framesground-plane homography over a SHA-256-pinned calibration artifactcrates/spatial-perception-providers
Object detectiona separate OS process running real ONNX inference (tract-onnx, YOLOv8n/v5s, COCO-80, digest-pinned model and image)crates/yard-perception-provider
Radar trackingdeterministic clustering → gated Kalman association → N-of-M initiation → scored correlation proposals with preserved ambiguitycrates/formasl-product-airspace
Projectiondeterministic projection artifact with exact reverse correspondence (feature → SubjectRef → semantic referent) and a domain-rule-free map surfacecrates/spatial-perception-providers, demo surface

The non-collapse laws are the load-bearing part: detection != observation != claim, score != truth, bounding box != region, computed containment != SpatialContains, projection != source mutation, provider failure != semantic negative result. Each is protected by an executable hostile witness (the perception suite runs 27 of them, including real ONNX inference and a headless-browser surface witness).

Deep documentation (language level, realization contracts, perception, admission, projection, tutorial with executed transcripts, operations): docs/spatial/spatial-v0.1/. The airspace application that exercises the same machinery at product scale is documented in docs/applications/airspace-control/.