CityGen: Infinite and Controllable City Layout Generation

Jie Deng, Wenhao Chai, Jianshu Guo, Qixuan Huang, Junsheng Huang, Wenhao Hu, Shengyu Hao, Jenq-Neng Hwang, Gaoang Wang

TL;DR

CityGen is an end-to-end framework that generates infinite, diverse, and user-controllable 3D city layouts. By combining one-hot diffusion models with a multi-scale refinement pipeline, it produces high-fidelity urban environments—from roads and buildings to vegetation—that can be directed via simple user sketches.

What Problem Does This Paper Address?

Generating realistic virtual cities is a cornerstone of urban planning, autonomous vehicle simulation, and game development. However, existing methods struggle with a "trilemma" of scale, complexity, and control.

Procedural modeling is scalable but requires rigid, expert-defined rules that lack diversity. Early deep learning approaches (like VAEs and GANs) often represent buildings as simple axis-aligned bounding boxes, failing to capture the organic, irregular shapes found in real-world cities. Furthermore, while recent diffusion-based models can generate impressive local patches, extending them to an "infinite" global scale while maintaining user control and structural coherence remains a significant challenge.

Methods

CityGen tackles these issues through a modular pipeline centered on diffusion models. The framework is divided into four main stages:

  1. Local Block Generation: Instead of working in standard RGB space, the authors train a diffusion model (DDPM) in one-hot semantic space. By representing each pixel as a one-hot vector of city elements (building, road, water, etc.), the model avoids the color-bleeding artifacts common in RGB-based semantic generation.
  2. Infinite Expansion: To move beyond fixed-size images, an outpainting module iteratively extends local blocks. It uses a sliding window approach with a specialized mask to ensure smooth transitions and structural continuity across the expanding city.
  3. Multi-scale Refinement: Generating high-resolution global maps is computationally expensive. CityGen generates low-resolution global layouts first, then uses a refinement module to upsample and "fix" artifacts (like jagged edges or isolated pixels) at a local level.
  4. 3D Synthesis: The 2D semantic layout is converted to 3D by synthesizing a height field. Interestingly, the authors found that purely neural height generation often led to inconsistent rooftops. They instead use a hybrid rule-based approach: simplex noise for natural terrain and instance-based Gaussian sampling for buildings to ensure flat, realistic rooftops.
Figure 1. CityGen Framework. In the initial step, we sample a local block from Gaussian noise and extend it infinitely through the infinite expansion module. Subsequently, we iteratively refine and upsample each local region using the multi-scale refinement module to get a refined global semantic field. After that, we split the semantic field and synthesis height field for each class. Finally, we integrate the semantic field with the height field to synthesize the 3D semantic layout.

Datasets

The model is trained on data derived from OpenStreetMap (OSM). The researchers developed a custom pre-processing pipeline to turn raw geographic data into clean training samples:

  • Blender Rendering: They populated 3D models from OSM data and rendered orthogonal aerial projections.
  • Post-processing: A custom pipeline was used for boundary refinement and color correction to ensure the semantic labels were pixel-perfect.
  • Scale: The final dataset includes millions of patches at various resolutions ($128^2$, $256^2$, and $512^2$) to support the multi-scale training strategy.
Figure 2. OSM data pre-processing pipeline. We first populate 3D city models for real-world cities with various geospatial elements like buildings, roads, bodies of water, and vegetation. Subsequently, we render the 3D city models with Blender [1]. Then, we do boundary refinement and color correction.

Key Insights and Ideas

  • One-Hot is King: Training diffusion models directly on one-hot encoded semantic maps significantly outperforms RGB-space training. It forces the model to learn the underlying categorical structure of the city rather than just trying to match colors, leading to much sharper boundaries between roads and buildings.
  • Separating Semantics from Height: While multi-task networks can theoretically predict both layout and height, they often lose coherence at scale. By treating height synthesis as a separate, rule-informed step, CityGen maintains the "flatness" required for realistic urban infrastructure.
  • Sketch-to-City: By framing user control as an inpainting task, the model allows users to draw rough road networks or building footprints, which the model then "completes" into a full, high-fidelity city layout.

Key Results

CityGen demonstrates state-of-the-art performance both quantitatively and qualitatively:

  • Quantitative: In block generation tests, CityGen achieved a Frechet Inception Distance (FID) of 20.18 at the $128^2$ scale, vastly outperforming InfiniCity (80.35) and CityDreamer (111.44).
  • Qualitative: Unlike previous methods that produce "blobby" buildings or disconnected roads, CityGen generates clear, instance-separable structures. The infinite expansion module successfully creates vast urban areas without the repetitive tiling patterns often seen in auto-regressive models.

Limitations and Future Work

The authors identify a few areas for growth:

  • Resolution: The current maximum resolution is 0.5 meters per pixel. While high, even finer detail is needed for street-level applications.
  • Dynamic Elements: The current framework generates static layouts. Future iterations aim to include dynamic agents like moving vehicles and pedestrians.
  • Multimodal Control: While sketching is intuitive, the authors plan to incorporate text prompts and reference images to give users even more granular control over the architectural style and "vibe" of the generated city.

Summary updated

Abstract

The recent surge in interest in city layout generation underscores its significance in urban planning and smart city development. The task involves procedurally or automatically generating spatial arrangements for urban elements such as roads, buildings, water, and vegetation. Previous methods, whether procedural modeling or deep learning-based approaches like VAEs and GANs, rely on complex priors, expert guidance, or initial layouts, and often lack diversity and interactivity. In this paper, we present CityGen, an end-to-end framework for infinite, diverse, and controllable city layout generation. Our framework introduces an infinite expansion module to extend local layouts to city-scale layouts and a multi-scale refinement module to upsample and refine them. We also designed a user-friendly control scheme, allowing users to guide generation through simple sketching. Additionally, we convert the 2D layout to 3D by synthesizing a height field, facilitating downstream applications. Extensive experiments demonstrate CityGen's state-of-the-art performance across various metrics, making it suitable for a wide range of downstream applications.
BibTeX
@inproceedings{deng2025citygen,
  author = {Jie Deng and Wenhao Chai and Jianshu Guo and Qixuan Huang and Junsheng Huang and Wenhao Hu and Shengyu Hao and Jenq-Neng Hwang and Gaoang Wang},
  title = {{CityGen: Infinite and Controllable City Layout Generation}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure