Inspiration
In summer 2023, I watched wildfire season devastate rural Tunisia. Communities received warnings too late—or not at all. Satellite imagery existed, weather data was available, but there was no system connecting that data to actionable alerts in a language communities actually understood. The gap between cutting-edge sensors and real protection felt criminal.
I started building Oxygena, an IoT-based early warning system. But quickly realized the real bottleneck wasn't hardware—it was prediction speed and community accessibility. That's when PyraGrid emerged: not just detecting fires, but forecasting them before they threaten lives and assets.
What it does
PyraGrid predicts wildfire spread and asset exposure in real time, delivering actionable alerts in local dialects to communities, firefighting agencies, and companies with distributed physical assets across North Africa.
The system ingests satellite imagery (Sentinel/Landsat), real-time weather data (ERA5, GRIDMET), and historical fire perimeter records. Physics-informed neural networks (PINNs) embedding Rothermel fire spread equations run in parallel with ML models trained on temporal fire patterns. Results are reconciled, and when predictions diverge >25%, manual review is triggered.
Output: 2-48 hour fire propagation forecasts at 500m resolution, with automated alerts sent via SMS, mobile app, radio broadcast, and community networks in Tunisian, Algerian Arabic, and Tamazight.
How we built it
Core architecture: LangGraph for agentic state machine orchestration, LangChain for data pipeline coordination, and a hybrid ensemble backend.
The ML stack combines Transformers for temporal dependencies, U-Net for spatial fire spread prediction, and PINNs that embed Rothermel's empirical fire behavior equations directly into the neural network loss function. This ensures physical consistency—predictions respect the physics of how fire actually spreads, not just pattern-matching historical data.
Data sources: Open-source fire perimeters (FEDS, WildfireDB, GlobFire, FRAP), ERA5 reanalysis, and Copernicus satellite streams. Deployed on FastAPI with WebSocket real-time updates and Vercel for frontend.
Training focused on North African fire behavior—temperature ranges, fuel moisture dynamics, wind patterns—rather than generic global models.
Challenges we ran into
Physics vs. Data: Early versions were pure ML. They were fast but physically nonsensical—predicting fire spreading upwind, for example. Embedding Rothermel equations as PINN constraints solved this, but the loss landscape became harder to optimize. Took multiple iterations to balance physics fidelity with model trainability.
Data fragmentation: Fire perimeter datasets don't cover all regions equally. Morocco has robust records; some Sahel regions have sparse historical data. Had to supplement with synthetic scenarios and transfer learning from similar biomes.
Real-time latency: Satellite imagery updates every 5 days for optical sensors; synthetic aperture radar fills gaps but adds noise. Built a hybrid model that uses real observations when available and physics-driven rollforward predictions for gaps.
Community accessibility: The hardest part wasn't the math—it was translation and trust. Built interfaces in local dialects, but accuracy matters. Worked with local agricultural cooperatives during development to ensure alerts were actionable, not just technically correct.
Accomplishments that we're proud of
Won the GOMYCODE x NVIDIA "Come Build with AI" hackathon on September 27, 2026—an 11-hour regional competition across 8 African countries. Judges recognized that PyraGrid wasn't just a model; it was a complete system addressing a real problem with technical rigor and community focus.
The hybrid physics-ML ensemble: running Rothermel and neural nets in parallel, reconciling disagreements, and surfacing uncertainty to decision-makers. That architecture is novel for fire prediction at this scale and speed.
Built it solo in weeks, from research to prototype to deployed demo. Learned deployment, modern ML architectures, and real-world data constraints at startup velocity.
What we learned
Models don't matter if communities don't trust them or can't access them. Spent as much time on language, interface design, and stakeholder feedback as on the deep learning.
Physics + data isn't a tradeoff. Embedding domain knowledge (Rothermel equations) into neural networks doesn't slow training; it regularizes it and makes predictions trustworthy.
Regional, hyperlocal models outperform global ones. Fire in Tunisia behaves differently from fire in California. Training on North African data, wind patterns, and fuel composition matters enormously.
What's next for PyraGrid
Phase 1 (next 6 months): Deploy with 2-3 pilot partners—a rural cooperative in Kasserine, a utility operator, and Tunisia's Civil Protection agency. Real-world feedback will refine alert thresholds and community workflows.
Phase 2: Expand across Morocco, Algeria, and the Sahel using transfer learning. As regional data accumulates, retrain the ensemble with local fire dynamics.
Phase 3: Integrate blockchain for transparent, verifiable carbon offset tracking (if fire prevention is quantifiable, it can fund adaptation). Add an API for third-party asset owners to query exposure risk in real time.
The goal isn't just a product—it's a regional catastrophe prevention infrastructure, built by and for North African communities.
Built With
- artificial-intelligence
- climate-tech
- disaster-risk-reduction
- early-warning-systems
- earth-observation
- era5
- fastapi
- geospatial-analysis
- iot
- landsat
- langchain
- langgraph
- machine-learning
- physics-informed-neural-networks
- python
- pytorch
- react
- real-time-forecasting
- satellite-imagery
- sentinel
- transformers
- u-net
- vercel
- websocket
- wildfire-prediction
Log in or sign up for Devpost to join the conversation.