About CityPulse AI

Inspiration

Modern smart cities are fundamentally reactive. If you walk into any municipal command center today, you will see walls of screens visualizing historical data—showing traffic jams 45 minutes after they form, waterlogged streets after cars are submerged, or damaged infrastructure long after citizens file complaints. They are reactive, not predictive.

I asked myself: What if a city had its own nervous system?

What if I could combine Graph Neural Networks, hydrological elevation modeling, and real-time computer vision to predict urban disasters and traffic bottlenecks before they happen? Inspired by the spatial intelligence of Tesla Fleet Telemetry and the deep relational reasoning of Palantir Gotham, I built CityPulse AI—an AI Operating System that turns legacy cities into proactive, self-healing networks.


How I Built It

I engineered CityPulse AI using a modern, high-throughput frontend and simulated AI pipelines optimized for real-time interaction.

1. The Spatial Engine (Digital Twin)

The interface is centered around an immersive 3D/2D digital twin built with Leaflet and custom dark cartography mapping. GPS telemetry is parsed in real time to draw emergency vehicles along dynamic route polylines.

2. Graph Neural Networks (GNNs) & Traffic Flow

Road networks are represented as a directed graph $G = (V, E)$, where $V$ represents intersections and $E$ represents road segments. I modeled traffic congestion propagation using Spatial-Temporal Graph Neural Networks (ST-GNNs). The congestion velocity $V_{ij}(t + \Delta t)$ for a segment between nodes $i$ and $j$ is forecasted using:

[V_{ij}(t + \Delta t) = \sigma \left( \mathbf{W}_g \cdot \mathcal{A}(\mathbf{H}_i^{(t)}, \mathbf{H}_j^{(t)}) + b \right)]

Where $\mathcal{A}$ is the spatial attention matrix over neighboring nodes and $\mathbf{H}^{(t)}$ represents the hidden state vector from temporal LSTMs.

3. Hydrological Flood Modeling

To predict urban waterlogging, I simulated rainwater accumulation $W_{acc}$ over a drainage basin catchment zone using digital elevation models (DEM) and drainage capacity coefficients:

[W_{acc}(t) = \int_{0}^{t} \left( R(\tau) - C_{drain}(\tau) \cdot [1 - S_{clog}(\tau)] \right) d\tau]

Where $R(\tau)$ is the rainfall rate, $C_{drain}(\tau)$ is the nominal drainage capacity, and $S_{clog}(\tau) \in [0, 1]$ is the drainage grate clogging index determined by citizen telemetry and CCTV vision models.

4. Computer Vision Triage (YOLOv11 + SAM2)

My vision sandbox simulates a multi-stage zero-shot pipeline:

  1. YOLOv11 outputs bounding boxes for physical defects (potholes, garbage, fires).
  2. SAM2 (Segment Anything Model 2) extracts precise polygon segmentation masks to calculate defect area volume.
  3. The severity index $S_{idx} \in [1, 10]$ is dynamically computed, auto-generating a repair cost estimate:

[Cost_{est} = \alpha \cdot \text{Area} \cdot S_{idx} + \beta]


Challenges I Ran Into

1. Fusing Heterogeneous Asynchronous Data Streams

Fusing high-frequency telemetry (GPS feeds at 1Hz) with sporadic, unstructured data (citizen text files, CCTV frames, and hourly weather updates) created severe sync bottlenecks. I solved this by implementing a priority event queue inside the simulation engine, ensuring critical safety anomalies override nominal sensor loops instantly.

2. Styling Compiler Mismatch (Tailwind v4)

During development, standard utility classes failed to compile properly due to missing postcss directives in the Vite setup. I had to restructure the build pipeline to use @tailwindcss/vite alongside explicit CSS variable mappings to ensure the dark obsidian UI was rendered with high-fidelity glassmorphism.


Accomplishments I Are Proud Of

  • Interaction Beats Animation: I successfully built the Hero CV Demo Flow where a judge can upload a photo, see the bounding boxes draw instantly, watch the map dynamically fly-to and zoom to the coordinates, observe the risk score adjust, and see the repair dispatch update live.
  • The What-If Transformer: Building a live scenario simulator where changing rainfall intensity dynamically closes road segments and recalculates emergency corridors in real time.
  • Zero Type Errors: Compiling the entire TypeScript/JSX codebase with absolute strict typing under the verbatimModuleSyntax compiler target.

What I Learned

I learned that during a 3-minute hackathon judging session, immediate accessibility is key. I originally planned a complex scrolling landing page, but realized judges want to play with the product immediately. I dropped the scroll barrier and put the user straight into the Mission Control Command Center on launch.


What's Next for CityPulse AI

  • Edge Deployment: Compiling the YOLOv11 models to ONNX to run directly on low-power solar CCTV camera nodes at road intersections.
  • Real API Integration: Hooking the GNN models into live OpenStreetMap data and municipal dispatch WebSockets.
  • Decentralized Citizen Reporting: Utilizing cryptographic proof-of-work checks to automatically screen and filter out fake or duplicate citizen emergency reports.

Built With

Share this project:

Updates

Submission history