Skip to content

vikky781/UrbanSAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UrbanSAR

Multi-Sensor Fusion for Autonomous Building Height Estimation & Disaster Vulnerability Mapping in Smart Cities

Team Binary Blackhole | Cosmix Abhisarga 2026 | Track 3: Multi-Sensor Fusion | IIIT Sri City


Overview

UrbanSAR fuses Synthetic Aperture Radar (SAR) and optical satellite imagery to autonomously estimate building heights and classify disaster vulnerability β€” optimized for edge deployment and real-time disaster response.

Pipeline: Multi-Sensor Fusion Engine β†’ Height Estimation & Classification β†’ Interactive Smart City Dashboard

Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Download SpaceNet-6 Data

Primary (AWS S3):

aws s3 cp s3://spacenet-dataset/spacenet/SN6_buildings/ ./data/raw/ --recursive --no-sign-request

⚠️ If --no-sign-request fails with "Access Denied":

  1. Create free AWS account: https://aws.amazon.com/
  2. Run aws configure
  3. Retry without --no-sign-request

Or use the download script:

python data/download_data.py

3. Select & Crop Building Chips

python scripts/select_chips.py --num-chips 200

4. Train the Model

On Kaggle / Google Colab (GPU required):

python training/train.py --chips-file data/processed/chips/chips_metadata.csv --epochs 50

5. Generate Fallback Data

# Demo data (for testing dashboard without trained model)
python scripts/generate_fallbacks.py

# From trained model
python scripts/generate_fallbacks.py --from-model

6. Launch Dashboard

streamlit run dashboard/app.py

Project Structure

UrbanSAR/
β”œβ”€β”€ config.py                  # Central configuration
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ download_data.py       # SpaceNet-6 download (AWS S3 / Kaggle)
β”‚   β”œβ”€β”€ loader.py              # GeoTIFF + label loading
β”‚   β”œβ”€β”€ preprocessing.py       # Lee speckle filter, radiometric norm
β”‚   └── dataset.py             # PyTorch Dataset (dual-input)
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ dual_branch_cnn.py     # ResNet18 dual-branch fusion model
β”‚   β”œβ”€β”€ vulnerability.py       # Height β†’ vulnerability tier classifier
β”‚   └── shadow_fallback.py     # SAR shadow geometry fallback (Plan B)
β”œβ”€β”€ training/
β”‚   β”œβ”€β”€ train.py               # Training loop (FP16, checkpointing)
β”‚   └── evaluate.py            # Metrics + comparison tables
β”œβ”€β”€ dashboard/
β”‚   β”œβ”€β”€ app.py                 # Streamlit main app (4 pages)
β”‚   β”œβ”€β”€ map_view.py            # Folium interactive map
β”‚   └── charts.py              # Plotly visualizations
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ fallback.py            # JSON fallback save/load
β”‚   └── geo_utils.py           # Geospatial helpers
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ select_chips.py        # Chip selection + cropping
β”‚   └── generate_fallbacks.py  # Generate demo/model fallback data
β”œβ”€β”€ checkpoints/               # Trained model files
β”œβ”€β”€ fallback_data/             # JSON fallback outputs
└── logs/                      # Training logs

Tech Stack

Layer Tools
AI/ML PyTorch, ResNet18 (fine-tuned), FP16 quantization
Data SpaceNet-6, Rasterio, Rioxarray, GeoPandas
Dashboard Streamlit, Folium, Plotly

Vulnerability Classification

Height-based proxy heuristic for rapid triage:

Tier Height Range Description
πŸ”΄ Critical Risk < 10m (1-3 floors) Likely submerged in severe flooding
🟑 Moderate Risk 10-25m (4-8 floors) Partial flood exposure
🟒 Evacuation Safe > 25m (9+ floors) Viable for vertical evacuation

Note: This is a height-based proxy. Real vulnerability depends on construction type, materials, and local conditions.

Fallback Strategy

At every phase boundary, prediction outputs are cached as JSON. If any component fails during demo, the dashboard seamlessly loads cached results.

Contributions

Role Name
Architecture, implementation & all code Vikhyat Gupta
Ideation & presentation Mohit Choudhary

Contact

Team Binary Blackhole β€” Vikhyat Gupta & Mohit Choudhary
πŸ“§ vikhyatg7@gmail.com

About

πŸ›°οΈ Multi-sensor fusion (SAR + Optical) for building height estimation & disaster vulnerability mapping

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages