Wednesday, December 2, 2026

 Relative Ground Geometry Engine (RGGE).

The objective is:

Given a nadir drone video, construct a persistent ground-plane coordinate system spanning the entire flight path. Estimate relative distances, areas, and sizes in that coordinate system. Anchor the scale using known-size objects such as vehicles. Then allow an LLM/VLM to query the reconstructed geometry.

This is a lightweight photogrammetry system than an AI world model.


Desired output

Suppose the drone flies from:

Point A

  ->

Park

  ->

Shopping Center

  ->

Intersection

  ->

Point B

The engine should ultimately produce something like:

Reference coordinate system:

Origin:

(0,0) = first frame

Park centroid:

(525 m, 180 m)

Shopping center:

(1070 m, 220 m)

Intersection:

(1515 m, -35 m)

Then the LLM can answer:

How far was the park from the shopping center?

~547 meters

or

How large was the park?

~4.2 hectares

about 12 football fields

or

Was the park larger than the mall parking lot?

Park:

42,000 m²

Parking lot:

17,000 m²


The geometry representation

Everything is represented in a 2D ground plane.

Not pixels.

Not latitude/longitude.

Not camera coordinates.

Just:

class GroundEntity:

    id: str

    polygon_world

    area_m2

    centroid_x

    centroid_y

Everything becomes:

roads

parks

buildings

parking lots

sports fields

water bodies

represented as polygons in one continuous ground-plane map.


The smallest useful model

Should an LLM or VLM be extended?

Hypothesis:

Use a tiny VLM only for semantic labeling.

Example candidates:

Florence-2-base

DINOv2-small

SmolVLM

Qwen2.5-VL-3B

The geometry itself should not be learned by the model.

Geometry should be computed.

The model only identifies:

park

road

baseball field

shopping center

lake

building

Everything else comes from geometry.


Core pipeline

Stage 1

Extract video frames

video

  ->

1 fps

  ->

frames


Stage 2

Estimate orthomosaic (https://github.com/ravibeta/dvsa-api/pull/32) or inter-frame homographies

Use:

ORB

SIFT

SuperPoint

LightGlue

For each pair:

Frame(t)

Frame(t+1)

compute:

H(t)


Stage 3 (prefer this to stage 2)

Build a global mosaic

Instead of using homographies independently:

Frame1

Frame2

Frame3

Frame4

compose them:

GlobalCoordinateSystem

This becomes:

World Mosaic

similar to drone orthomosaic software.

Not necessarily photo-realistic.

Geometry is what matters.


Stage 4

Semantic segmentation

Run a lightweight model:

park

road

building

parking lot

water

vegetation

Each detected region becomes:

polygon

inside the global mosaic.


The most important challenge

Scale

Homography-only reconstruction provides:

relative distance

but not:

meters

Scale recovery is needed. Vehicle-based approach works.


Scale anchor from vehicles

Suppose the model detects:

sedan

SUV

pickup

Known average lengths:

sedan:

4.5 m

SUV:

4.8 m

pickup:

5.4 m

Measure:

length_pixels

inside the mosaic.

Compute:

meters_per_pixel

For example:

4.8 m

--------

48 pixels

=

0.10 m/pixel

Repeat across hundreds of vehicles.

Use robust median estimation.

Now the entire mosaic acquires scale.


Better scale anchors

Vehicles should not be the only source.

Add:

basketball courts

tennis courts

soccer fields

baseball diamonds

road lane widths

crosswalk markings

parking spaces

These are geometric standards.

Examples:

lane width

≈ 3.6 m

parking stall

≈ 2.7 m

tennis court

≈ 23.77 m

The engine can fuse all of them.

Scale uncertainty drops dramatically.


The geometry engine model

A small model is preferable for this.

Instead of asking:

What is this object?

train an adapter to output:

{

  "type": "park",

  "polygon": [...],

  "confidence": 0.93

}

The model's purpose becomes:

semantic geometry extraction

rather than captioning.


Geometry database

Store:

class PolygonFeature:

    id

    category

    polygon

    area_m2

    perimeter_m

    centroid

Examples:

Park_A

Area:

41,220 m²

Centroid:

(511,221)

Bounds:

(...)

Now every query becomes computational geometry.

Not LLM reasoning.


Query layer

Then the LLM becomes extremely small.

When a user asks:

How far was the park from the baseball field?

the system executes:

distance(

    park.centroid,

    field.centroid

)

When asked:

How large was that building?

the system executes:

polygon_area(building)

When asked:

Compare the park to the Space Needle footprint.

the LLM only performs the comparison narrative after receiving the computed area.


Why this fits DVSA

The architecture aligns surprisingly well with DVSA's existing strengths:

Video

  ->

Frame extraction

  ->

Feature matching

  ->

Homography estimation

  ->

Global mosaic

  ->

Segmentation

  ->

Ground-plane geometry store

  ->

LLM query layer

The important point is that the geometry engine should be treated as a deterministic subsystem.

The model identifies semantic regions.

The geometry engine computes:

• areas

• lengths

• distances

• centroids

• boundaries

• relative positions

The LLM merely translates those measurements into human language.

This does not build "an LLM that learns geometry." This would build "a geometric map reconstruction engine that exposes geometry as tools to an LLM." For urban nadir drone videos, the hope is that this approach will be more accurate, easier to debug, and much easier to integrate into DVSA than training a new geometry-capable foundation model.



No comments:

Post a Comment