Skip to content
chenchen235Public

About

Sat2Prior: Learning Reusable 3D Driving Priors from a Single Satellite Image

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Sat2Prior: Learning Reusable 3D Driving Priors from a Single Satellite Image

Chen Chen
UCAS

Project Page Watch Video 1080p MP4 Dataset Python 3.9+ PyTorch 2.0+ License: MIT


Sat2Prior Overview and Downstream Reuse

TL;DR: Sat2Prior predicts class-resolved 3D static semantic occupancy ($200\times 200\times 16\times 7$) and 2D overlapping HD-map layers ($400\times 400\times 6$) offline from a single georeferenced satellite image—with zero ground-view input at inference—packs both priors into 0.80 MB per $80\times 80\text{ m}$ tile ($13.6\times$ compression), and adapts them online in 1.48–1.93 ms via zero-initialized residual adapters to improve both camera-only and online satellite-fusion models across 3D semantic occupancy and vectorized HD mapping.


Promotional Video Walkthrough (1080p Narrated, 02:29)

Sat2Prior 1080p Promotional Video Walkthrough


Key Highlights

Capability Verified Result (6,019 nuScenes val frames)
First Satellite-Only 3D Semantic Occupancy 53.57% S6 mIoU from a single overhead tile (+5.55 pts over camera-only FlashOcc 48.02%), 64.91% BEV-S, 63.49% PV-S, 2.18 m depth MAE, and 97.77% 6-camera overlap agreement
3D Occupancy Reuse (Camera-Only & C+S) FlashOcc: 47.78% $\rightarrow$ 55.56% S6 (+7.78), All17 32.16% $\rightarrow$ 34.83% (+2.67); SA-Occ (online satellite retained): 54.46% $\rightarrow$ 57.03% S6 (+2.56), All17 39.09% $\rightarrow$ 40.06% (+0.96)
Vectorized HD-Map Reuse (Camera-Only & C+S) MapTRv2: 61.39% $\rightarrow$ 65.06% mAP (+3.67); MapTRv2 + Geo (online satellite retained): 73.74% $\rightarrow$ 75.26% mAP (+1.52, boundary AP +2.40)
Compact Geographic Cache & $<2\text{ ms}$ Reuse 0.80 MB / tile ($13.6\times$ smaller than 10.88 MB FP16, retaining accuracy without retraining); 2,322 (3D) and 34,112 (2D) adapter parameters adding 1.48–1.93 ms online

Architecture Overview

Sat2Prior Offline Predictor and Online Residual Adapters

Sat2Prior decouples costly cross-view geometric inference from real-time onboard perception:

  1. Offline Shared Overhead Predictor (sat2prior/predictor.py): A single orthorectified satellite tile $I_s \in \mathbb{R}^{400\times 400\times 3}$ ($[-40,40]^2\text{ m}$ at $0.2\text{ m/px}$) is encoded by a multi-scale ResNet-50 UNet pyramid into a 7-state static occupancy volume $P^{3D} \in [0,1]^{200\times 200\times 16\times 7}$ ($0.4\text{ m}$ voxels over $[-40,40]^2\times[-1,5.4]\text{ m}$) and 6 overlapping semantic map layers $P^{2D} \in [0,1]^{400\times 400\times 6}$.
  2. Training-Only Cross-View Ray Supervision (sat2prior/rendering.py): Differentiable 127-sample front-to-back transmittance rendering $\mathcal{R}{\mathrm{occ}}(P^{3D}; r)$ projects predicted static voxels into six calibrated surround views for perspective depth ($\mathcal{L}{\mathrm{PV\text{-}D}}$), semantic ($\mathcal{L}{\mathrm{PV\text{-}S}}$), and static-masked RGB ($\mathcal{L}{\mathrm{RGB}}$) supervision—requiring zero ground cameras or LiDAR at inference.
  3. Compact Bit-Packed Geographic Cache (sat2prior/cache.py): Mutually exclusive voxel labels (uint8 1 << argmax, 640 KB) and 6-bit overlapping map layers (uint8 bitmask, 160 KB) compress each $80\times 80\text{ m}$ tile from 10.88 MB (FP16) to 0.80 MB ($13.6\times$).
  4. Pose-Aligned Zero-Init Residual Adapters (sat2prior/geometry.py, sat2prior/adapters.py): Cached priors are resampled in FP32 to each vehicle's instantaneous ego/LiDAR frame and fused via zero-initialized depthwise-separable residual adapters (WorldPriorAdapter3D: 2,322 params; WorldMapAdapter2D: 34,112 params), guaranteeing exact step-0 equivalence $\mathcal{A}_d^{(0)}(H, P) = H$.

Repository Structure

Sat2Prior/
├── sat2prior/
│   ├── predictor.py       # Offline shared R50-UNet / R18-UNet predictor -> P^3D & P^2D
│   ├── rendering.py       # Differentiable 127-sample transmittance ray renderer R_occ(P^3D; r)
│   ├── cache.py           # 0.80 MB/tile (13.6x) uint8 bitmask codec & disk I/O
│   ├── geometry.py        # FP32 SE(2) 3D occupancy & lidar2ego 2D MapTRv2 spatial resampling
│   ├── adapters.py        # Zero-initialized WorldPriorAdapter3D (2,322) & WorldMapAdapter2D (34,112)
│   ├── losses.py          # Grouped multi-target training objective (Eq. 3)
│   └── stage1/            # Full multi-GPU DDP Stage-I training & cross-view supervision modules
├── configs/
│   └── sat2prior_r50_50k_cosine.yaml
├── scripts/
│   ├── demo_sat2prior.py                 # Zero-download end-to-end runnable pipeline demo
│   ├── export_tile_cache.py              # Export compact 0.80 MB/tile caches from overhead imagery
│   └── benchmark_cache_and_adapters.py   # Verify 13.6x compression, bit-exact round-trip & latency
├── tests/
│   └── test_sat2prior.py                 # Unit tests for all mathematical & shape invariants
└── docs/                                 # Interactive GitHub Pages project website

Installation & Zero-Download Quickstart

git clone https://github.com/chenchen235/Sat2Prior.git
cd Sat2Prior
pip install -e .

1. Run the End-to-End Pipeline Demo (No Dataset Download Required)

Using the bundled $80\times 80\text{ m}$ ($400\times 400\text{ px}$) overhead satellite tile (assets/demo_tile_scene0104.png), run offline prediction, 127-sample ray rendering, 0.80 MB bitmask packing, SE(2)/LiDAR pose alignment, and zero-initialized 3D/2D residual adaptation:

python scripts/demo_sat2prior.py

2. Run Unit Tests & Storage/Latency Benchmark

python -m unittest discover -s tests -v
python scripts/benchmark_cache_and_adapters.py

3. Minimal Python API

import torch
from sat2prior import (
    Sat2PriorPredictor,
    WorldPriorAdapter3D,
    WorldMapAdapter2D,
    pack_tile_bytes,
    unpack_tile_bytes,
    resample_prior_3d,
    world_map_to_maptr,
)

# 1. Offline overhead prediction from a single 400x400 satellite tile (0.2 m/px)
predictor = Sat2PriorPredictor(backbone="r50").eval()
sat_tile = torch.randn(1, 3, 400, 400)
with torch.no_grad():
    pred = predictor(sat_tile)

# 2. Pack into compact 0.80 MB/tile uint8 geographic cache (13.6x smaller than FP16)
payload = pack_tile_bytes(pred["occ_probs"][0], pred["map_probs"][0])  # 800,000 bytes
cached = unpack_tile_bytes(payload)

# 3. Online pose alignment + zero-initialized residual adaptation (exact step-0 identity)
ego_occ_prior = resample_prior_3d(cached["occ_probs"].unsqueeze(0), dx=2.5, dy=-1.2, dyaw_deg=10.0)
lidar_map_prior = world_map_to_maptr(cached["map_probs"].unsqueeze(0), torch.eye(4).unsqueeze(0))

adapter_3d = WorldPriorAdapter3D()   # 2,322 trainable parameters (FlashOcc & SA-Occ)
adapter_2d = WorldMapAdapter2D()     # 34,112 trainable parameters (MapTRv2 & MapTRv2+Geo)

refined_occ_logits = adapter_3d(torch.randn(1, 18, 200, 200, 16), ego_occ_prior)
refined_bev_feats = adapter_2d(torch.randn(1, 256, 200, 100), lidar_map_prior)

4. Multi-GPU Stage-I Predictor Training

Aligned satellite tiles (sat_test) and Occ3D-nuScenes annotations follow Occ3D_nuScenes_SatExt:

torchrun --nproc_per_node=8 -m sat2prior.stage1.train_ddp \
  --config configs/sat2prior_r50_50k_cosine.yaml

Main Benchmark Results (6,019 nuScenes Validation Frames)

1. Standalone Satellite-Only 3D Static Occupancy (mask_camera)

Method Modality Driv. O.Flat Sidew. Terr. Manm. Veg. S6 mIoU D11 All17
BEVFormer C 77.5 37.8 47.2 49.4 36.7 33.0 46.93 21.84 30.70
CTF-Occ C 79.7 39.3 48.8 50.7 38.0 34.4 48.48 23.43 32.27
FlashOcc C 79.5 41.6 48.9 53.3 37.1 27.6 48.02 23.36 32.08
SA-Occ C+S 82.2 45.3 54.0 58.6 45.4 41.8 54.55 30.59 39.05
Sat2Prior (Ours, 10k) S 79.4 43.3 50.8 56.0 44.3 41.7 52.59 — —
Sat2Prior (Ours, 50k) S 80.4 43.9 52.0 57.1 45.0 42.9 53.57 — —

2. Downstream Reuse Across Camera-Only & Online Satellite-Fusion Models

Recipient Family Baseline Input Setting Zero Prior + Sat2Prior Gain ($\Delta$) Added Params Online Latency
FlashOcc Camera Static S6 / All17 mIoU 47.78 / 32.16 55.56 / 34.83 +7.78 / +2.67 2,322 (0.005%) +1.83 ms
SA-Occ Cam + Online Sat Static S6 / All17 mIoU 54.46 / 39.09 57.03 / 40.06 +2.56 / +0.96 2,322 (0.003%) +1.93 ms
MapTRv2 Camera Vectorized HD-Map mAP 61.39 65.06 +3.67 34,112 (0.084%) +1.48 ms
MapTRv2 + Geo Cam + Online Sat Vectorized HD-Map mAP (P4) 73.74 75.26 +1.52 34,112 (0.081%) +1.54 ms

3. Compact 0.80 MB/tile Bitmask vs. 10.88 MB/tile FP16 Soft Probabilities (Zero Retraining)

Recipient Metric Soft FP16 (10.88 MB/tile) Compact uint8 (0.80 MB/tile) $\Delta$ (uint8 $-$ Soft)
FlashOcc S6 / All17 55.56 / 34.83 55.51 / 34.67 $-0.05$ / $-0.17$ pp
SA-Occ S6 / All17 57.03 / 40.06 57.15 / 40.07 $+0.12$ / $+0.02$ pp
MapTRv2 mAP 65.06 65.08 $+0.02$ pp
MapTRv2 + Geo mAP 73.81 73.81 $&lt;0.01$ pp

Six-Camera 3D Geometric Consistency

Six-Camera Perspective Rendering from a Single Satellite Tile

Projecting a single satellite-predicted $P^{3D}$ volume into all six onboard cameras aligns road boundaries, building facades, and vegetation canopy height with 97.77% cross-camera label agreement on overlapping frustum rays (63.49% PV-S, 2.18 m static depth MAE).


Citation

If you find Sat2Prior useful in your research, please consider citing:

@misc{chen2026sat2prior,
  title        = {Sat2Prior: Learning Reusable 3D Driving Priors from a Single Satellite Image},
  author       = {Chen, Chen},
  howpublished = {UCAS},
  year         = {2026},
  url          = {https://chenchen235.github.io/Sat2Prior/}
}

Acknowledgements & License

This codebase builds upon public benchmarks including nuScenes, Occ3D, FlashOcc, SA-Occ, and MapTRv2. Released under the MIT License.

About

Sat2Prior: Learning Reusable 3D Driving Priors from a Single Satellite Image

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages