This repository provides a pipeline to fetch and save Earth Engine (EE) datasets like MODIS, ERA5, GLDAS etc. in .npz format for custom spatiotemporal analysis.
- Modular, date-wise downloader using Earth Engine Python API
- JSON-based configuration of datasets
- Supports daily, static, and composite fetch modes
- Auto-clipping and
.npzsaving for each band/image
- earthengine-api
- numpy
- requests
A submission for the Bharatiya Antariksh Hackathon by ISRO from Team DDR3.
Agni-Net is an advanced deep learning model designed to predict the spread of wildfires by analyzing complex geospatial and meteorological data. Traditional methods often struggle with the non-linear interactions between static terrain and dynamic weather. Our solution mimics the analytical process of a human expert by using a novel dual-stream spatio-temporal architecture, allowing it to learn these complex relationships and produce highly accurate forecast maps.
This project provides a robust framework for turning raw satellite and weather data into actionable intelligence for disaster management and resource allocation, directly addressing a critical national challenge for India.
- Dual-Encoder Architecture: Processes static terrain and time-series weather data in parallel using specialized encoders.
- ConvLSTM for Temporal Dynamics: Captures the evolution and movement of weather patterns over time.
- Dual Skip Connections: Intelligently fuses spatial details from the terrain with temporal context from the weather at every level of the decoder.
- Advanced Loss Function: Employs a combined Focal + Dice Loss to effectively handle the extreme class imbalance of rare fire pixels.
- Robust Training Strategy: Incorporates Data Normalization, Instance Normalization, Gradient Clipping, and a Learning Rate Scheduler for stable and effective training.
The model is a U-Net-like architecture with two distinct encoders that merge at a central bottleneck. The decoder then uses skip connections from both encoders to reconstruct the output.
A deep CNN that analyzes the static terrain data. Its purpose is to learn the permanent, spatial features of the landscape that influence fire behavior. Its skip connections provide the final decoder with a high-fidelity geographical blueprint.
A ConvLSTM network that processes the time-series weather data. It learns the temporal patterns of how conditions change over time. Its skip connections provide the decoder with multi-scale information about the weather dynamics.
The insights from both encoders are fused at the bottleneck. The decoder then upsamples this fused representation, using the dual skip connections to combine the precise spatial details from the static data with the temporal context from the dynamic data at every step. This synergy allows the model to learn complex, real-world interactions.
The model is designed to handle a complex, multi-modal, and multi-resolution dataset:
- Static Data:
.npyfiles containing 8 feature channels (e.g., elevation, slope, fuel type). - Dynamic Data:
.npyfiles containing patches of data over 5 timesteps, with 13 feature channels (e.g., temperature, wind). - Target Data:
200x200ground truth fire masks with pixel values from 0-100.
A custom PyTorch FireDataset class handles the complex indexing and memory-mapped loading. All input data is normalized to a [0, 1] range before being fed to the model.
- Python 3.9+
- PyTorch 2.0+
- CUDA-enabled GPU (recommended)
- Other dependencies:
numpy,matplotlib,tqdm
- Clone the repository:
git clone [your-repo-url] cd [your-repo-name] - Install the required packages:
pip install -r requirements.txt
- Organize your data into the structure specified in the
Configclass. - Run the training notebook (
training_notebook.ipynb). Checkpoints will be saved automatically in the./checkpointsdirectory.
- Update the
checkpoint_to_loadpath in the evaluation notebook (evaluation_notebook.ipynb). - Run the notebook to calculate final metrics (IoU, Precision, Recall, F1 Score) on the validation set.
Our model successfully overcomes the class imbalance problem and learns to segment fire regions with high accuracy.







