RepositoryPythonUSUnited States
VIDA-NYU

VIDA-NYU/city-surfaces

CitySurfaces semantic segmentation of sidewalk surfaces

56stars
13forks
1issues
3views

CitySurfaces: City-scale Semantic Segmentation of Sidewalk Surfaces

CitySurfaces

CitySurfaces is a framework that combines active learning and semantic segmentation to locate, delineate, and classify sidewalk paving materials from street-level images. Our framework adopts a recent high-performing semantic segmentation model (Tao et al., 2020), which uses hierarchical multi-scale attention combined with object-contextual representations

The framework was presented in our paper published at the Sustainable Cities and Society journal (Arxiv link here).

CitySurfaces: City-scale semantic segmentation of sidewalk materials
Maryam Hosseini, Fabio Miranda, Jianzhe Lin, Claudio T. Silva, Sustainable Cities and Society, 2022

@article{HOSSEINI2022103630,
title = {CitySurfaces: City-scale semantic segmentation of sidewalk materials},
journal = {Sustainable Cities and Society},
volume = {79},
pages = {103630},
year = {2022},
issn = {2210-6707},
doi = {https://doi.org/10.1016/j.scs.2021.103630},
url = {https://www.sciencedirect.com/science/article/pii/S2210670721008933},
author = {Maryam Hosseini and Fabio Miranda and Jianzhe Lin and Claudio T. Silva},
keywords = {Sustainable built environment, Surface materials, Urban heat island, Semantic segmentation, Sidewalk assessment, Urban analytics, Computer vision}
}

You can use our pre-trained model to make inference on your own street-level images. Our extended model can classify eight different classes of paving materials:

CitySurfaces paving materials

The team includes:

Table of contents

Updates

New weights from our updated model trained on more cities (now including DC, Chicago, and Philadelphia) is uploaded in our Google Drive.

Installing prerequisites

The framework is based on NVIDIA Semantic Segmentation. The code is tested with pytorch 1.7 and python 3.9. You can use ./Dockerfile to build an image.

Run inference on your own data

Follow the instructions below to be able to segment your own image data. Most of the steps are based on NVIDIA's original steps, with modifications regarding weights and dataset names.

Download Weights

  • Create a directory where you can keep large files.
  > mkdir <large_asset_dir>
  • Update __C.ASSETS_PATH in config.py to point at that directory

    __C.ASSETS_PATH=<large_asset_dir>

  • Download our pretrained weights from Google Drive. Weights should be under <large_asset_dir>/seg_weights.

Running the code

The instructions below make use of a tool called runx, which we find useful to help automate experiment running and summarization. For more information about this tool, please see runx. In general, you can either use the runx-style commandlines shown below. Or you can call python train.py <args ...> directly if you like.

Inference

Update the inference-citysurfaces.yml under scripts directory with the path to your image folder that you would like to make inference on.

Run

> python -m runx.runx scripts/inference-citysurfaces.yml -i

OR

Run directly from the command line with one GPU:

> python -m val --dataset citysurfaces --bs_val 1  --eval test --eval_folder <PATH/TO/YOUR/IMAGE/FOLDER> --snapshot <PATH/TO/PRETRAINED/WEIGHTS/block_c_10classes.pth> --arch ocrnet.HRNet_Mscale --trunk hrnetv2  --result_dir <PATH/TO/SAVE/RESULTS>

The results should look like the below examples, where you have your input image and segmentation mask, side by side.

CitySurfaces results

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
EL-BID/urbanpy

A library to download, process and visualize high resolution urban data. 

132
Nov 25, 2026
RepositoryJupyter Notebook
gboeing/ppde642

USC urban data science course series in Python

1.3k
Nov 24, 2026
RepositoryJupyter Notebook
renhai-lab/Urban-Spatial-Data-Analysis-Notebook

城市空间数据分析初学者学习笔记

53
Oct 25, 2026
RepositoryPython
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

82.9k
Jul 30, 2024
RepositoryPython
rohitg00/ai-engineering-from-scratch

Learn AI Engineering! Learn it. Build it. Ship it for others.

81.4k
Nov 30, 2026
RepositoryC++
opencv/opencv

Open Source Computer Vision Library

91.8k
Nov 30, 2026
RepositoryJavaScript
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

315.1k
Dec 1, 2026
RepositoryShell
ohmyzsh/ohmyzsh

🙃 A delightful, community-driven framework for managing your zsh configuration. Built by 2,600+ contributors, with hundreds of plugins (git, rails, laravel, node, python, docker, kubectl, aws, and more), themes to spice up your terminal, and automatic updates to keep your command line feeling like home.

191.0k
Nov 29, 2026
RepositoryGo
grafana/grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

78.4k
Nov 30, 2026