TL;DR
CityCode is a novel framework for building "agent-operable" 3D cities—environments that AI agents can not only see but also measure, navigate, and modify—from as little as a single aerial image per region. By combining metric structure recovery with generative completion and a versioned state management system, it creates persistent urban worlds that remain consistent across long-horizon tasks.
What Problem Does This Paper Address?
Building 3D city models for AI agents involves a difficult trade-off. Current methods generally fall into two camps: design-driven generation, which creates beautiful but "fake" cities not grounded in reality, and image-based reconstruction, which often produces "hollow" visual shells that lack the metric scale, road topology, and instance-level metadata agents need to perform tasks like path planning or urban editing.
Furthermore, sparse aerial observations (like a single drone photo) leave huge gaps in data due to occlusions and missing facade details. If an agent edits a building or plans a route, how does the system ensure the city remains metrically consistent and "operable" over time? The authors address this by moving away from simple 3D synthesis toward a persistent, code-based representation of urban space.
Methods
The authors introduce two core components: CityCode (the representation) and Air2Code (the construction pipeline).
1. Air2Code: From Pixels to Metric Structure
The pipeline starts with a single aerial RGB image and known camera parameters.
- Metric Depth & Scale: The system uses a fine-tuned monocular depth model (MoGe2-Aerial) and calibrates the scale using "ground anchors" (like roads and hardscapes) to recover the actual physical dimensions of the scene.
- Visual Parsing: It extracts building footprints, heights, and road networks, converting them into a simplified "LoD1" (Level of Detail 1) proxy.
- Generative Completion: To fill in unobserved facades and roofs, the system uses a generative model (GPT-image-2) guided by the recovered 3D structure. This ensures that the "hallucinated" details still fit the physical footprint of the real building.
- 3D Asset Generation: An adapted version of TRELLIS.2 generates detailed 3D meshes for buildings, which are then aligned to the recovered metric footprints.
2. CityCode: The Agent-Operable State
CityCode treats the city like a versioned database. Every building and road segment has a persistent entity identity. This identity links the visual evidence (the original photo), the metric geometry (the footprint/height), and the generated 3D asset.
- Versioned Execution: Much like Git for a city, every edit creates a new "revision." This allows agents to query historical states, validate that new edits don't violate physical constraints (like a building blocking a road), and restore previous versions if a plan fails.
Datasets
The researchers evaluated their framework on both synthetic and real-world data:
- CitySample-Aerial (CS-Aerial): A large-scale synthetic dataset derived from the Unreal Engine City Sample project, providing perfect ground truth for metric evaluation.
- UrbanScene3D: A dataset of real-world scenes (e.g., Qingdao Hospital, Shenzhen University) reconstructed from high-density drone imagery, used here to test reconstruction from sparse views.
- BigCity: Used for fine-tuning the metric depth estimation models.
Key Insights and Ideas
- Metric Entities as an Interface: The core "aha moment" is using recovered metric entities (footprints and heights) as the bridge between raw observations and generative models. By forcing the generative AI to respect these metric bounds, the resulting 3D assets are "grounded" in reality.
- Persistence is Operability: For an agent to be "intelligent" in a city, the city cannot be a static mesh. By assigning persistent IDs to every building, the system allows for complex, multi-step reasoning (e.g., "Find the building I edited 10 steps ago and measure its distance to the nearest road").
- Structure-Aware Generation: The paper shows that generative models perform significantly better when they are given a 3D proxy to "fill in" rather than trying to generate a scene from scratch.
Key Results
CityCode significantly outperformed existing baselines like Sat3DGen and UrbanWorld2.0 in both visual fidelity and geometric accuracy.
- Visual Quality: On the CS-Aerial dataset, CityCode achieved a PSNR of 13.02, outperforming the best baseline by 1.17 dB. In human/VLM preference tests, CityCode was preferred over 90% of the time.
- Geometric Accuracy: The Digital Surface Model (DSM) Root Mean Square Error (RMSE) was reduced from 33.99m (baseline) to 14.37m, a massive improvement in recovering the actual physical shape of the city.
- Long-Horizon Interaction: In tests involving 50-step task chains (editing, querying, planning), CityCode successfully maintained state consistency across all 2,500 total steps, whereas baselines often failed due to constraint violations.
Limitations and Future Work
- Hallucination: While the buildings are metrically accurate, the specific facade textures (windows, doors) are still generated by an AI and may not perfectly match the real-world building's appearance if it wasn't visible in the source image.
- Camera Dependencies: The system currently requires known camera parameters (intrinsics and pose), which might not always be available for "in-the-wild" imagery.
- Dynamic Elements: The current model focuses on static structures (buildings, roads). Future work could extend this to dynamic urban elements like traffic and pedestrians.
Summary updated