hzxie/GaussianCity
hzxie/GaussianCity has 342 GitHub stars and 19 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-18 02:51 UTC. Last push 2026-09-07.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
The official implementation of "GaussianCity: Generative Gaussian Splatting for Unbounded 3D City Generation". (CVPR 2025)
Creative & MediaREADME.md
Original
Generative Gaussian Splatting for Unbounded 3D City Generation
Haozhe Xie, Zhaoxi Chen, Fangzhou Hong, Ziwei Liu
S-Lab, Nanyang Technological University

Changelog 🔥
- [2025/03/02] The Hugging Face demo is available (Ranked among the Top 8 Spaces in Week 11, 2025).
- [2025/02/27] The training and testing code is released.
- [2024/05/24] The repo is created.
Cite this work 📝
@inproceedings{xie2025gaussiancity,
title = {Generative Gaussian Splatting for Unbounded 3{D} City Generation},
author = {Xie, Haozhe and
Chen, Zhaoxi and
Hong, Fangzhou and
Liu, Ziwei},
booktitle = {CVPR},
year = {2025}
}
Datasets & Pretrained Models 🛢️
Datasets
Pretrained Models
Installation 📥
Assume that you have installed CUDA and PyTorch in your Python (or Anaconda) environment.
The GaussianCity source code is tested in PyTorch 2.4.1 with CUDA 11.8 in Python 3.11. You can use the following command to install PyTorch built on CUDA 11.8.
pip install torch==2.4.1 torchvision==0.19.1 --index-url https://download.pytorch.org/whl/cu118
After that, the Python dependencies can be installed as following.
git clone https://github.com/hzxie/GaussianCity
cd GaussianCity
GCITY_HOME=`pwd`
pip install -r requirements.txt
The CUDA extensions can be compiled and installed with the following commands.
cd $GCITY_HOME/extensions
for e in `ls -d */`
do
cd $GCITY_HOME/extensions/$e
pip install .
done
Inference 🚩
The command line interface (CLI) by default load the pretrained models for Background Generator and Building Generator from output/rest.pth and output/bldg.pth, respectively. You have the option to specify a different location using runtime arguments.
├── ...
└── GaussianCity
└── scripts
| ├── ...
| └── inference.py
└── output
├── bldg.pth
└── rest.pth
Run the following command to generate 3D cities. The output video will be saved at output/rendering.mp4.
python3 scripts/inference.py
Important Note: The inference speed with inference.py is NOT 60 times faster than CityDreamer, as the footprint_extruder runs on the CPU for better compatibility. For faster inference, please use the GPU implementation available on Hugging Face.
Training👩🏽💻
Dataset Preparation
By default, all scripts load the OSM and GoogleEarth datasets from ./data/osm and ./data/google-earth, respectively. You have the option to specify a different location using runtime arguments.
├── ...
└── GaussianCity
└── data
├── google-earth
└── osm
- Generate semantic segmentation using SEEM, following the guidelines provided in CityDreamer's README.
- Generate instance segmentation with the following command.
cd $GCITY_HOME
python3 scripts/dataset_generator.py
Training Background Generator
Update config.py ⚙️
Based on the default configuration file config.py, modify the settings as follows:
cfg.DATASETS.GOOGLE_EARTH.TRAIN_N_INSTANCES = 0
cfg.DATASETS.GOOGLE_EARTH.TRAIN_INSTANCE_RANGE = [0, 10]
cfg.DATASETS.GOOGLE_EARTH.TRAIN_CROP_SIZE = (640, 448)
cfg.NETWORK.GAUSSIAN.SCALE_FACTOR = 0.5
cfg.NETWORK.GAUSSIAN.PTV3.ENABLED = False
cfg.NETWORK.GAUSSIAN.PTV3.ORDER = ("z")
Launch Training 🚀
torchrun --nnodes=1 --nproc_per_node=8 --standalone run.py -e BG-Exp
Training Building Generator
Update config.py ⚙️
Based on the default configuration file config.py, modify the settings as follows:
cfg.DATASETS.GOOGLE_EARTH.TRAIN_N_INSTANCES = 1
cfg.DATASETS.GOOGLE_EARTH.TRAIN_INSTANCE_RANGE = [10, 16384]
cfg.DATASETS.GOOGLE_EARTH.TRAIN_CROP_SIZE = (640, 448)
cfg.NETWORK.GAUSSIAN.SCALE_FACTOR = 0.5
cfg.NETWORK.GAUSSIAN.ENCODER = None
cfg.NETWORK.GAUSSIAN.ENCODER_OUT_DIM = 3
cfg.NETWORK.GAUSSIAN.POS_EMD = "SIN_COS"
cfg.NETWORK.GAUSSIAN.Z_DIM = 256
Launch Training 🚀
torchrun --nnodes=1 --nproc_per_node=8 --standalone run.py -e BLDG-Exp
License
This project is licensed under NTU S-Lab License 1.0. Redistribution and use should follow this license.