RepositoryPythonSGSingapore
Sijie-Yang

Sijie-Yang/UrbanCode

A Python package for street view image perception analysis, providing tools for feature extraction and comfort prediction.

83stars
10forks
0issues
2views

UrbanCode (v0.2.1)

A Python package for street view image perception analysis, providing tools for feature extraction and comfort prediction.

Thermal Comfort in Sight: Thermal Affordance and Its Visual Assessment

Features

Street View Image (SVI) Analysis

  • Semantic segmentation
  • Object detection
  • Color feature extraction
  • Scene recognition
  • Perception analysis (thermal_comfort, visual_comfort, safety, etc.)

Examples

1. Street View Image Feature Extraction

examples/test_svi_image_feature.ipynb

  • Demonstrates how to extract various features from street view images
  • Includes semantic segmentation, object detection, color analysis, and scene recognition
  • Shows how to process multiple images and save results

2. Street View Image Comfort Prediction

examples/test_svi_comfort_prediction.ipynb

  • Shows how to predict comfort scores from street view images
  • Demonstrates the use of the comfort function for both single images and folders
  • Includes visualization of perception metrics
  • Automatically normalizes perception scores to 0-5 range

Installation

pip install urbancode

Usage

Feature Extraction

import urbancode as uc
import pandas as pd

# Process a folder of images
df = uc.svi.filename("path/to/folder")
df = uc.svi.segmentation(df, folder_path="path/to/folder")
df = uc.svi.object_detection(df, folder_path="path/to/folder")
df = uc.svi.color(df, folder_path="path/to/folder")
df = uc.svi.scene_recognition(df, folder_path="path/to/folder")

# Save results
df.to_csv("svi_results.csv", index=False)

Comfort Prediction

import urbancode as uc

# Process a single image
df = uc.svi.comfort("path/to/image.jpg", mode='image')

# Process a folder of images
df = uc.svi.comfort("path/to/folder", mode='folder')

# Save results
df.to_csv("comfort_results.csv", index=False)

Perception Metrics

The comfort function returns a DataFrame with the following perception metrics (normalized to 0-5 range):

  • thermal_comfort
  • visual_comfort
  • temp_intensity
  • sun_intensity
  • humidity_inference
  • wind_inference
  • traffic_flow
  • greenery_rate
  • shading_area
  • material_comfort
  • imageability
  • enclosure
  • human_scale
  • transparency
  • complexity
  • safe
  • lively
  • beautiful
  • wealthy
  • boring
  • depressing

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
Sijie-Yang/Thermal-Comfort-In-Sight

The study leverages street view images to understand urban-scale streetscape thermal comfort.

90
Aug 16, 2026
RepositoryPython
gboeing/osmnx

Download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.

5.9k
Nov 18, 2026
RepositoryPython
kunifujiwara/VoxCity

Python framework for integrating geospatial data, 3D city modeling, and urban simulation.

634
Nov 26, 2026
RepositoryJupyter Notebook
gboeing/ppde642

USC urban data science course series in Python

1.3k
Nov 24, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryPython
domlysz/BlenderGIS

Blender addons to make the bridge between Blender and geographic data

9.7k
Dec 20, 2025
RepositoryPython
hyperknot/openfreemap

Free and open-source map hosting solution with custom styles for websites and apps, using OpenStreetMap data

6.5k
Nov 25, 2026